@openhands/agent-canvas 1.12.0 → 1.14.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-CYy8qA2z.js} +1 -1
- package/build/assets/active-backend-context-BZDG15C0.js +2 -0
- package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DGWBBbcp.js} +1 -1
- package/build/assets/agent-profiles-settings-DrkGdf4_.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DK56YPTs.js +86 -0
- package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-DfcSgkLD.js} +2 -2
- package/build/assets/agent-settings-Lrc5-twS.js +1 -0
- package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-BgDHhL7b.js} +1 -1
- package/build/assets/api-error-message-BEIE_yD1.js +1 -0
- package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-DaZnOlVo.js} +1 -1
- package/build/assets/{app-settings-D0OKHB3M.js → app-settings-BG5NAUbC.js} +1 -1
- package/build/assets/automation-detail-D4Hs831Z.js +3 -0
- package/build/assets/automation-export-n0X6FB0C.js +2 -0
- package/build/assets/automation-git-sync-CDrm8WV7.js +1 -0
- package/build/assets/automation-setup-route-CZCl4ONs.js +1 -0
- package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DFF96AdL.js} +1 -1
- package/build/assets/automations-list-Bl-oGOrV.js +1 -0
- package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-H_ThtDA0.js} +1 -1
- package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-CbCemvHt.js} +1 -1
- package/build/assets/backend-not-configured-DP8KLNq_.js +1 -0
- package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-BBASWqsb.js} +1 -1
- package/build/assets/{badge-Dpn3-LTV.js → badge-B-51h-SW.js} +1 -1
- package/build/assets/{base-modal-3NmIOKDm.js → base-modal-BbjycA8X.js} +1 -1
- package/build/assets/bot-CGPCg03p.js +1 -0
- package/build/assets/{brand-button-CJcwjnfb.js → brand-button-Blxv5nww.js} +1 -1
- package/build/assets/browser-CuW0nWvh.js +7 -0
- package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-D5G0ORwt.js} +1 -1
- package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-BD2tii1r.js} +1 -1
- package/build/assets/check-DSuS-lyr.js +1 -0
- package/build/assets/chevron-down-CgGcmtE2.js +1 -0
- package/build/assets/circle-check-CG5-NPw7.js +1 -0
- package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-ASbpB8vN.js} +1 -1
- package/build/assets/cloud-funnel-analytics-GlCUG0gk.js +1 -0
- package/build/assets/cog-CZiR80uT.js +1 -0
- package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-DvpEsh2O.js} +1 -1
- package/build/assets/{command-menu-BKOLj-TC.js → command-menu-DwUQzjYP.js} +1 -1
- package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BptcoiLA.js} +1 -1
- package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-CiEwxZAA.js} +1 -1
- package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-CdcamfM1.js} +1 -1
- package/build/assets/conversation-DREHj4nT.js +1 -0
- package/build/assets/conversation-DotRfiDz.js +90 -0
- package/build/assets/conversation-panel-DREHj4nT.js +1 -0
- package/build/assets/conversation-state-store-DMLtlHbE.js +1 -0
- package/build/assets/conversation-store-Blc5xysY.js +6 -0
- package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-D-puECpY.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-BGxcUbgy.js} +1 -1
- package/build/assets/{device-verify-BIjXeW9N.js → device-verify-CZJfWaJf.js} +1 -1
- package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-tLhpwtxS.js} +1 -1
- package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-D8GnI6GZ.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-Fk8k60nk.js} +1 -1
- package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-DeztVYuL.js} +1 -1
- package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-Cd6GCYzq.js} +1 -1
- package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-C4sgZg-y.js} +1 -1
- package/build/assets/external-link-C0UpBgsE.js +1 -0
- package/build/assets/{file-text-RecuaId_.js → file-text-C6WYtNdV.js} +1 -1
- package/build/assets/files-tab-BW_qzyAm.js +1 -0
- package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-CGXBLcn1.js} +1 -1
- package/build/assets/format-model-name-BNPKVsIq.js +1 -0
- package/build/assets/format-relative-time-ZhQD4rsl.js +1 -0
- package/build/assets/git-provider-icon-CaQ1yLPi.js +1 -0
- package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-CgXR6M_E.js} +1 -1
- package/build/assets/git-repo-dropdown-D2Uei3CO.js +1 -0
- package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_YOp8Fo.js} +1 -1
- package/build/assets/home-DNzzJcMP.js +1 -0
- package/build/assets/home-aCos-5vc.js +1 -0
- package/build/assets/{home-store-Cubdq0uP.js → home-store-DgzViC3f.js} +1 -1
- package/build/assets/index-home-DNzzJcMP.js +1 -0
- package/build/assets/info-CLoC1LRo.js +1 -0
- package/build/assets/install-server-modal-D7zIqNKz.js +1 -0
- package/build/assets/kebab-menu-item-content-DERMdnDv.js +1 -0
- package/build/assets/{launch-c4GEP8oo.js → launch-5PjKeLak.js} +1 -1
- package/build/assets/{list-todo-CheUtB7F.js → list-todo-BF049YaY.js} +1 -1
- package/build/assets/llm-not-configured-banner-BK9z5eS0.js +27 -0
- package/build/assets/llm-settings-BLAMK2tR.js +1 -0
- package/build/assets/llm-settings-BWsbarGM.js +1 -0
- package/build/assets/llm-subscription-service-SfnEV9Uc.js +1 -0
- package/build/assets/loader-circle-D7IagAyF.js +1 -0
- package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-DBgXgra0.js} +1 -1
- package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-BTqNPhzc.js} +1 -1
- package/build/assets/manifest-abebca3c.js +1 -0
- package/build/assets/manifest-subpage-layout-Rn-glaxV.js +1 -0
- package/build/assets/{map-provider-7Bp2aih5.js → map-provider-BK4HnqYz.js} +1 -1
- package/build/assets/markdown-renderer-Cp6DlHQN.js +8 -0
- package/build/assets/{mcp-Da7wFU7A.js → mcp-BC-Ixn4T.js} +2 -2
- package/build/assets/mcp-marketplace-utils-BJWJgbB6.js +1 -0
- package/build/assets/messages-CzFKrzPG.js +40 -0
- package/build/assets/{modal-body-duRaxj_K.js → modal-body-BdKfD3Hl.js} +1 -1
- package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D5_b5vMi.js} +1 -1
- package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-objukxk_.js} +1 -1
- package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-C_gXyLyD.js} +1 -1
- package/build/assets/{npm-Cswluf6-.js → npm-CHVHV1MC.js} +1 -1
- package/build/assets/{onboarding-BKbTYlW1.js → onboarding-Diw0V51A.js} +1 -1
- package/build/assets/onboarding-modal-Da4yHzsA.js +1 -0
- package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-BztSy69u.js} +1 -1
- package/build/assets/parse-git-remote-url-BkXN9jzl.js +1 -0
- package/build/assets/pencil-49avMHlD.js +1 -0
- package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-CJiSpNax.js} +1 -1
- package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-lHdNKWNU.js} +1 -1
- package/build/assets/plus-C0BagBpV.js +1 -0
- package/build/assets/profiles-service.api-BLr7FXec.js +1 -0
- package/build/assets/providers-CWXnb7S3.js +1 -0
- package/build/assets/{proxy-b4aqL4SX.js → proxy-DYDXxtje.js} +1 -1
- package/build/assets/{puzzle-B3v361yY.js → puzzle-Bt2B1rzf.js} +1 -1
- package/build/assets/recommended-automations-launcher-CcFMfJRR.js +1 -0
- package/build/assets/refresh-cw-nmcesifB.js +1 -0
- package/build/assets/root-CT4t7apy.css +1 -0
- package/build/assets/root-DnRgLKpU.js +2 -0
- package/build/assets/root-layout-2L9tr-BN.js +2 -0
- package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-C59lVZTA.js} +1 -1
- package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-BbBEQQjq.js} +1 -1
- package/build/assets/search-CYSDBczG.js +1 -0
- package/build/assets/secrets-service-BtsgYSlj.js +1 -0
- package/build/assets/secrets-settings-DJ0OKa4_.js +1 -0
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DiVfTZuN.js} +1 -1
- package/build/assets/{settings-CZPGNens.js → settings-CDqL_Uqh.js} +1 -1
- package/build/assets/{settings-CWFxymAf.js → settings-DcNPxz0v.js} +1 -1
- package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-Ba1UN5Du.js} +1 -1
- package/build/assets/{settings-index-Dtlegd6s.js → settings-index-Cz2cKt2K.js} +1 -1
- package/build/assets/{settings-input-D61Vzp9e.js → settings-input-CWUEHHvS.js} +1 -1
- package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-DdcLXDGn.js} +1 -1
- package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-nEEK1Kh1.js} +1 -1
- package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api-3yAUFcaP.js} +1 -1
- package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-Dk9hChx1.js} +1 -1
- package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-CxjtCSB3.js} +1 -1
- package/build/assets/shared-conversation-DbAcrx3s.js +1 -0
- package/build/assets/shield-check-CiOTXxV2.js +1 -0
- package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-lrfPooIB.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-KERXfNu1.js} +1 -1
- package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-B8lFD6Cb.js} +1 -1
- package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-u6pUpxJ7.js} +1 -1
- package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-dGIUzr_b.js} +1 -1
- package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-kkOWZ89w.js} +1 -1
- package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-DWN1PBPH.js} +1 -1
- package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-DFjH2Nq6.js} +1 -1
- package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-DIHpl3ol.js} +2 -2
- package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-ntyMLnbj.js} +1 -1
- package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-B6JXcsmL.js} +1 -1
- package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-aEJzEcHD.js} +1 -1
- package/build/assets/{terminal-DRrJo-cR.js → terminal-Dch7Ty5K.js} +1 -1
- package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-B2MLKsgt.js} +1 -1
- package/build/assets/trash-2-yZnDM4Ji.js +1 -0
- package/build/assets/{typography-D9tiHct7.js → typography-DB5HoCk0.js} +1 -1
- package/build/assets/usage-tab-DrEtBmBT.js +1 -0
- package/build/assets/use-acp-credential-form-c8KXAa8A.js +1 -0
- package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-B0p34N3q.js} +1 -1
- package/build/assets/use-agent-profiles-CPIc6wLH.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dz_8Eqkv.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-DvUVqCle.js} +1 -1
- package/build/assets/use-config-C3PO4TBw.js +1 -0
- package/build/assets/use-create-conversation-DVrA_uLD.js +1 -0
- package/build/assets/use-create-secret-DbBIpaCR.js +1 -0
- package/build/assets/use-get-secrets-6PBitf54.js +1 -0
- package/build/assets/use-has-permission-CQ31Cl8j.js +1 -0
- package/build/assets/use-is-authed-2UrDIziV.js +1 -0
- package/build/assets/use-is-creating-conversation-BvYpmb3v.js +1 -0
- 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-diZS4FiN.js +1 -0
- package/build/assets/use-manifest-capabilities-HIWCtIUm.js +1 -0
- package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-Bs8PcXik.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-BCuNLFsr.js} +1 -1
- package/build/assets/use-save-agent-profile-BaMNSpBV.js +1 -0
- package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-BahvC2Gw.js} +1 -1
- package/build/assets/{use-settings-BmLzQjnC.js → use-settings-C6ZxpBDX.js} +1 -1
- package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-Bqn69Ggw.js} +2 -2
- package/build/assets/use-tracking-Bhu7gk2y.js +3 -0
- package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-BkNXpXrd.js} +1 -1
- package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-c_OmS3lK.js} +1 -1
- package/build/assets/{useMutation-ChpkYxI5.js → useMutation-6ZsQCqAn.js} +1 -1
- package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-xDrGlTO_.js} +1 -1
- package/build/assets/{useQuery-BCnzy4LX.js → useQuery-Bs5NFz2s.js} +1 -1
- package/build/assets/utils-DUD5ScdA.js +1 -0
- package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
- package/build/assets/{vendor~entry.client-CgNUwtQL.js → vendor~entry.client-BFE7Llz9.js} +1 -1
- package/build/assets/{vendor~entry.client-zSIea5EO.js → vendor~entry.client-BaKt_PIp.js} +1 -1
- 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~kepq2zme-D87mAf6K.js} +3 -3
- package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-B6POTS66.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js +13 -0
- package/build/assets/vendor~root-layout-DeQACFVA.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-bv7ooVgH.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-e8pX05xf.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-BvS6PCK2.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-DOPLJMH9.js} +2 -2
- 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~iw7io29p-Dz8NQve5.js} +1 -1
- package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-COueVXmM.js} +1 -1
- package/build/assets/{wrench-B1_H-tL1.js → wrench-C95ujnYo.js} +1 -1
- package/build/assets/x-86ZCfxKY.js +1 -0
- package/build/assets/zap-DRa-r-Tf.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +88 -3
- package/build/locales/ca/openhands.json +88 -3
- package/build/locales/de/openhands.json +88 -3
- package/build/locales/en/openhands.json +88 -3
- package/build/locales/es/openhands.json +88 -3
- package/build/locales/fr/openhands.json +88 -3
- package/build/locales/it/openhands.json +88 -3
- package/build/locales/ja/openhands.json +88 -3
- package/build/locales/ko-KR/openhands.json +88 -3
- package/build/locales/no/openhands.json +88 -3
- package/build/locales/pt/openhands.json +88 -3
- package/build/locales/tr/openhands.json +88 -3
- package/build/locales/uk/openhands.json +88 -3
- package/build/locales/zh-CN/openhands.json +88 -3
- package/build/locales/zh-TW/openhands.json +88 -3
- 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/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +10 -0
- package/dist/api/automation-service/automation-service.api.js +42 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +9 -0
- package/dist/api/cloud/conversation-service.api.js +11 -1
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.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/api/profiles-service/profiles-service.api.cjs +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.d.ts +15 -2
- package/dist/api/profiles-service/profiles-service.api.js +25 -2
- package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.d.ts +5 -0
- package/dist/api/secrets-service.js +12 -6
- package/dist/api/secrets-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/event-message-components/index.d.ts +0 -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/git-sync/git-sync-activity-row.d.ts +15 -0
- package/dist/components/features/automations/git-sync/git-sync-config-form.d.ts +13 -0
- package/dist/components/features/automations/git-sync/git-sync-error-banner.d.ts +6 -0
- package/dist/components/features/automations/git-sync/git-sync-not-local-state.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-overview-section.d.ts +12 -0
- package/dist/components/features/automations/git-sync/git-sync-skeleton.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-status-pill.d.ts +7 -0
- package/dist/components/features/automations/git-sync/git-sync-unsupported-state.d.ts +7 -0
- package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
- package/dist/components/features/automations/responder-deployment-modal.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +177 -176
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +123 -118
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-grip.js +7 -7
- package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
- package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
- package/dist/components/features/chat/components/context-window-meter.js +131 -0
- package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
- package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
- package/dist/components/features/chat/components/context-window-ring.js +45 -0
- package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.js +68 -67
- package/dist/components/features/chat/custom-chat-input.js.map +1 -1
- package/dist/components/features/chat/error-message-banner.cjs +1 -1
- package/dist/components/features/chat/error-message-banner.cjs.map +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +3 -1
- package/dist/components/features/chat/error-message-banner.js +64 -58
- package/dist/components/features/chat/error-message-banner.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/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +6 -6
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +25 -17
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +9 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +27 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +240 -175
- 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/onboarding/steps/setup-llm-step.d.ts +10 -7
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/llm-balance.cjs +2 -0
- package/dist/constants/llm-balance.cjs.map +1 -0
- package/dist/constants/llm-balance.d.ts +13 -0
- package/dist/constants/llm-balance.js +6 -0
- package/dist/constants/llm-balance.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +227 -219
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
- package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
- package/dist/hooks/chat/use-grip-resize.js +39 -30
- package/dist/hooks/chat/use-grip-resize.js.map +1 -1
- package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
- package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
- package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
- package/dist/hooks/mutation/use-condense-conversation.js +17 -0
- package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +30 -21
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +1 -1
- package/dist/hooks/query/use-commit-changes.js +4 -4
- 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-git-sync.d.ts +19 -0
- 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/query/use-task-polling.cjs +1 -1
- package/dist/hooks/query/use-task-polling.cjs.map +1 -1
- package/dist/hooks/query/use-task-polling.js +12 -10
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
- package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
- package/dist/hooks/query/use-unified-git-commits.js +4 -4
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.js +4 -4
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.cjs.map +1 -1
- package/dist/hooks/query/use-workspace-files.d.ts +14 -4
- package/dist/hooks/query/use-workspace-files.js +45 -32
- package/dist/hooks/query/use-workspace-files.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-responder-url-secret.d.ts +5 -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/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +6 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.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 +86 -1
- 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 +1475 -30
- 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 +88 -3
- package/dist/locales/ca/openhands.json +88 -3
- package/dist/locales/de/openhands.json +88 -3
- package/dist/locales/en/openhands.json +88 -3
- package/dist/locales/es/openhands.json +88 -3
- package/dist/locales/fr/openhands.json +88 -3
- package/dist/locales/it/openhands.json +88 -3
- package/dist/locales/ja/openhands.json +88 -3
- package/dist/locales/ko-KR/openhands.json +88 -3
- package/dist/locales/no/openhands.json +88 -3
- package/dist/locales/pt/openhands.json +88 -3
- package/dist/locales/tr/openhands.json +88 -3
- package/dist/locales/uk/openhands.json +88 -3
- package/dist/locales/zh-CN/openhands.json +88 -3
- package/dist/locales/zh-TW/openhands.json +88 -3
- 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/circle-alert.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.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/files-tab.cjs +1 -1
- package/dist/routes/files-tab.js +11 -11
- package/dist/routes/files-tab.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/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +2 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.js +47 -51
- package/dist/services/telemetry.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/error-message-store.cjs +1 -1
- package/dist/stores/error-message-store.cjs.map +1 -1
- package/dist/stores/error-message-store.d.ts +3 -1
- package/dist/stores/error-message-store.js +5 -3
- package/dist/stores/error-message-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/types/git-sync.d.ts +51 -0
- 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/error-handler.cjs +1 -1
- package/dist/utils/error-handler.cjs.map +1 -1
- package/dist/utils/error-handler.d.ts +3 -2
- package/dist/utils/error-handler.js +18 -5
- package/dist/utils/error-handler.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 +1 -0
- package/dist/utils/format-model-name.js +1 -0
- 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 +25 -17
- 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/check-translation-completeness.cjs +3 -0
- package/scripts/dev-process-utils.mjs +6 -1
- package/scripts/dev-safe.mjs +57 -2
- package/scripts/dev-with-automation.mjs +98 -9
- package/build/assets/active-backend-context-B_bg5h9O.js +0 -2
- package/build/assets/agent-profiles-settings-hd2cAIZM.js +0 -1
- package/build/assets/agent-server-conversation-service.api-BheU4HX3.js +0 -86
- package/build/assets/agent-settings-D_SVrWhI.js +0 -1
- package/build/assets/automation-detail-C0SxWTnQ.js +0 -3
- package/build/assets/automation-export-BjQa_fT6.js +0 -2
- package/build/assets/automation-setup-route-BzCNpljP.js +0 -1
- package/build/assets/automations-list-dZg8zOCl.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/cloud-funnel-analytics-CcSez21r.js +0 -1
- package/build/assets/conversation-Cmyw9bFh.js +0 -90
- package/build/assets/conversation-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-panel-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-state-store-CtgILxWF.js +0 -1
- package/build/assets/conversation-store-B8Eahyeg.js +0 -6
- package/build/assets/external-link-zWbg5KXS.js +0 -1
- package/build/assets/files-tab-D5zuU5TY.js +0 -1
- package/build/assets/format-model-name-BN_rx1Y3.js +0 -1
- package/build/assets/format-relative-time-BerVamGl.js +0 -1
- package/build/assets/git-provider-icon-zuKz2cwo.js +0 -1
- package/build/assets/git-repo-dropdown-Bo7ciSNX.js +0 -1
- package/build/assets/home-DqyeeFA_.js +0 -1
- package/build/assets/home-Y0aDou-a.js +0 -1
- package/build/assets/index-home-DqyeeFA_.js +0 -1
- package/build/assets/info-C9lpK5pw.js +0 -1
- package/build/assets/install-server-modal-DW6dSyGr.js +0 -1
- package/build/assets/kebab-menu-item-content-CKydZrbH.js +0 -1
- package/build/assets/llm-not-configured-banner-DCE_0B4I.js +0 -27
- package/build/assets/llm-settings-8eWBF3Ij.js +0 -1
- package/build/assets/llm-settings-D9ko42Pi.js +0 -1
- package/build/assets/llm-subscription-service-B3K-97lP.js +0 -1
- package/build/assets/loader-circle-C5AnEN8r.js +0 -1
- package/build/assets/manifest-e1c3bc3b.js +0 -1
- package/build/assets/manifest-subpage-layout-Ds7G5GZ8.js +0 -1
- package/build/assets/markdown-renderer-DzvgdZey.js +0 -8
- package/build/assets/mcp-marketplace-utils-DSLou4n7.js +0 -1
- package/build/assets/messages-B2l0qLVk.js +0 -40
- package/build/assets/onboarding-modal-DrrGlEQq.js +0 -1
- package/build/assets/pencil-Bl3GWhgq.js +0 -1
- package/build/assets/plus-CtzlyAoF.js +0 -1
- package/build/assets/profiles-service.api-vcE_jJCe.js +0 -1
- package/build/assets/providers-CdrPPm0z.js +0 -1
- package/build/assets/recommended-automations-launcher-DIYgUdMm.js +0 -1
- package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
- package/build/assets/root-CBBi6IAe.js +0 -2
- package/build/assets/root-CRK9fOFd.css +0 -1
- package/build/assets/root-layout-BFN2rCOy.js +0 -2
- package/build/assets/search-CYaiKHRp.js +0 -1
- package/build/assets/secrets-service-BHF4fxML.js +0 -1
- package/build/assets/secrets-settings-aBGXtQhX.js +0 -1
- package/build/assets/shared-conversation-BIAcuORk.js +0 -1
- package/build/assets/shield-check-D2cpEpv3.js +0 -1
- package/build/assets/trash-2-CzDVN-Iw.js +0 -1
- package/build/assets/use-acp-credential-form-DGyo0QvL.js +0 -1
- package/build/assets/use-agent-profiles-B37XWDLq.js +0 -1
- package/build/assets/use-config-DapX3pjC.js +0 -1
- package/build/assets/use-create-conversation-CRf1dCm5.js +0 -1
- package/build/assets/use-create-secret-DcpT3RPw.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-is-creating-conversation-CVefC9Ns.js +0 -1
- package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
- package/build/assets/use-manifest-capabilities-zihHDbMW.js +0 -1
- package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
- package/build/assets/use-tracking-salbPJxT.js +0 -3
- 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/api/cloud/suggestions-service.api.d.ts +0 -8
- package/dist/api/suggestions-service/suggestions-service.api.d.ts +0 -11
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +0 -7
- package/dist/components/conversation-events/index.d.ts +0 -1
- package/dist/components/features/automations/metadata-chip.d.ts +0 -6
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +0 -10
- package/dist/components/features/controls/tools.d.ts +0 -2
- 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/components/features/conversation-panel/new-conversation-button.d.ts +0 -23
- package/dist/components/features/home/home-header/guide-message.d.ts +0 -1
- package/dist/components/features/home/home-header/home-header.d.ts +0 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +0 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +0 -1
- package/dist/components/features/home/new-conversation.d.ts +0 -1
- package/dist/components/features/home/tasks/task-card.d.ts +0 -6
- package/dist/components/features/home/tasks/task-group.d.ts +0 -7
- package/dist/components/features/home/tasks/task-issue-number.d.ts +0 -6
- package/dist/components/features/home/tasks/task-item-title.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +0 -6
- package/dist/components/features/settings/agent-server-onboarding.d.ts +0 -10
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +0 -6
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +0 -8
- package/dist/hooks/query/use-suggested-tasks.d.ts +0 -1
- package/dist/hooks/use-should-show-user-features.d.ts +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/dist/ui/card-title.d.ts +0 -16
- package/dist/ui/card.d.ts +0 -14
- package/dist/utils/group-suggested-tasks.d.ts +0 -7
- /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~dcc51rps-rfV8mQ9m.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js} +0 -0
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ docker run -it --rm \
|
|
|
96
96
|
-p 8000:8000 \
|
|
97
97
|
-v "$HOME/.openhands:/home/openhands/.openhands" \
|
|
98
98
|
-v "${PROJECTS_PATH}:/projects" \
|
|
99
|
-
ghcr.io/openhands/agent-canvas:1.
|
|
99
|
+
ghcr.io/openhands/agent-canvas:1.14.0 # x-release-please-version
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
**Windows (PowerShell / Windows Terminal):** See [README.windows.md](./README.windows.md) for the equivalent commands.
|
package/README.windows.md
CHANGED
|
@@ -12,7 +12,7 @@ For the main install options and overall context, see [README.md](./README.md).
|
|
|
12
12
|
- A host directory for `PROJECTS_PATH` containing the project folders you want the agent to access (create it before starting the container)
|
|
13
13
|
|
|
14
14
|
```powershell
|
|
15
|
-
docker pull ghcr.io/openhands/agent-canvas:1.
|
|
15
|
+
docker pull ghcr.io/openhands/agent-canvas:1.14.0 # x-release-please-version
|
|
16
16
|
|
|
17
17
|
$env:PROJECTS_PATH = Join-Path $HOME "projects" # directory containing your project folders
|
|
18
18
|
New-Item -ItemType Directory -Force -Path $env:PROJECTS_PATH, (Join-Path $env:USERPROFILE ".openhands") | Out-Null
|
|
@@ -21,7 +21,7 @@ docker run -it --rm `
|
|
|
21
21
|
-p 8000:8000 `
|
|
22
22
|
-v "$($env:USERPROFILE)\.openhands:/home/openhands/.openhands" `
|
|
23
23
|
-v "$($env:PROJECTS_PATH):/projects" `
|
|
24
|
-
ghcr.io/openhands/agent-canvas:1.
|
|
24
|
+
ghcr.io/openhands/agent-canvas:1.14.0 # x-release-please-version
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Open [http://localhost:8000/canvas](http://localhost:8000/canvas) in your browser.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"./utils-
|
|
1
|
+
import{z as e}from"./utils-DUD5ScdA.js";import{n as t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js";var n=`cli-generic`;function r(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||t===`acp-managed`?null:t}function i(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=r(t);if(e)return e}return e.providerDefault??null}var a={"claude-code":{icon:`claude-code`,description_key:e.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},o=Object.entries(a).map(([e,n])=>{let r=t(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:r?.available_models?.map(e=>({id:e.id,label:e.label})),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}}),s=`custom`,c={codex:[{name:`CODEX_AUTH_JSON`,secret:!0,multiline:!0,hint_key:e.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,hint_values:{file:`~/.codex/auth.json`}}],"claude-code":[{name:`CLAUDE_CODE_OAUTH_TOKEN`,secret:!0,hint_key:e.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT}],"gemini-cli":[{name:`GOOGLE_APPLICATION_CREDENTIALS_JSON`,secret:!0,multiline:!0,hint_key:e.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,hint_values:{file:`~/.config/gcloud/application_default_credentials.json`}},{name:`GOOGLE_CLOUD_PROJECT`,hint_key:e.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT},{name:`GOOGLE_CLOUD_LOCATION`,hint_key:e.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT},{name:`GOOGLE_GENAI_USE_VERTEXAI`,hint_key:e.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT}]},l={"claude-code":[[`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_API_KEY`],[`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_BASE_URL`]]};function u(e,t){return e?(l[e]??[]).filter(([e,n])=>t(e)&&t(n)):[]}var d=`gemini-2.5-pro`;function f(e){return e===`gemini-cli`?d:m(e)?.default_model??null}function p(n){if(!n)return[];let r=t(n);if(!r)return[];let i=[...c[n]??[]];return r.api_key_env_var&&i.push({name:r.api_key_env_var,secret:!0,hint_key:e.ONBOARDING$ACP_SECRET_API_KEY_HINT}),r.base_url_env_var&&i.push({name:r.base_url_env_var,hint_key:e.ONBOARDING$ACP_SECRET_BASE_URL_HINT}),i}function m(e){if(e)return o.find(t=>t.key===e)}function h(e){let t=m(e);return t?t.display_name:null}function g(e){return m(e)?.icon??`cli-generic`}function _(e,t){return t?m(e)?.available_models?.find(e=>e.id===t)?.label??t:null}function v(e,t={}){if(e===`openhands`)return{agent_kind:`openhands`};let n=e===s,r=n?void 0:m(e);if(!n&&!r&&!t.allowUnknownServer)return null;let i=t.model===void 0?f(e):t.model;return{agent_kind:`acp`,acp_server:e,acp_command:t.command??[],acp_args:[],acp_model:i??null}}export{u as a,h as c,g as d,i as f,v as i,p as l,o as n,f as o,n as r,m as s,s as t,_ as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
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~ox0jfsa0-cHFhpUBq.js";import{A as a,E as o,F as s,I as ee,L as te,N as ne,O as re,T as c,b as ie,f as ae,k as oe}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{R as se,t as ce,z as l}from"./utils-DUD5ScdA.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(oe).use(re).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(ne()),_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 Ae(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 je(e){return ke(e).some(Ae)}function Me(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 Ne(e){let t=ke(e);return t.some(Ae)?Te:t.some(Me)?Ee:t[0]??null}function Pe(e){return typeof e==`object`&&!!e&&`isAxiosError`in e&&e.isAxiosError===!0}var Fe=e=>{let t=null,n=!1;return Pe(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,Ne(n?t??e:e)??t??``},m=(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)},h=r(),Ie={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`},g={position:`top-right`,style:Ie},Le={...Ie,color:`var(--oh-muted)`};function Re({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,h.jsxs)(`div`,{className:ce(`flex min-w-0 gap-2`,n?`items-start`:`items-center`),children:[(0,h.jsx)(o,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:se}}),(0,h.jsx)(`span`,{ref:t,className:`min-w-0 flex-1 text-sm leading-5 [word-break:break-word] [overflow-wrap:anywhere]`,children:e})]})}var ze={...g,icon:null,style:Le},Be=e=>{let t=e||p.t(l.STATUS$ERROR);Ae(t)?t=p.t(l.ERROR$CORS_OR_NETWORK):Me(t)&&(t=p.t(l.ERROR$BACKEND_REQUEST_TIMEOUT));let n=m(t,4e3);c((0,h.jsx)(Re,{message:t}),{...ze,duration:n})},Ve=e=>{let t=m(e,5e3);c.success((0,h.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...g,duration:t})},He=(e,t,n)=>{let r=m(`${e} ${t}`,5e3);c.success((0,h.jsxs)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:[e,` `,(0,h.jsx)(`a`,{className:`underline hover:no-underline`,href:n,children:t})]}),{...g,duration:r})},Ue=e=>{let t=m(e,6e3);c((0,h.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...g,icon:`⚠️`,duration:t})},We=`openhands-backend-health`,Ge=500;function Ke(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 qe(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(We);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&&Ke(r)&&(n[e]=r);return n}catch{return{}}}function Je(e){if(!(typeof window>`u`))try{if(Object.keys(e).length===0){window.localStorage.removeItem(We);return}window.localStorage.setItem(We,JSON.stringify(e))}catch{}}function Ye(e){let t=Ne(e)??`Unknown error`;return t.length>Ge?`${t.slice(0,Ge)}…`:t}var _=qe(),Xe=new Set;function Ze(){Xe.forEach(e=>e())}function v(e){_=e,Je(e),Ze()}function Qe(){return _}function $e(e){return _[e]??null}function et(e){return Xe.add(e),()=>{Xe.delete(e)}}function tt(e,t){let n=_[e],r=Math.min((n?.consecutiveFailures??0)+1,5),i=n?.disabled===!0||r>=5,a={consecutiveFailures:r,lastError:Ye(t),lastFailureAt:Date.now(),disabled:i};v({..._,[e]:a})}function nt(e){if(!(e in _))return;let{[e]:t,...n}=_;v(n)}function rt(e){if(!(e in _))return;let{[e]:t,...n}=_;v(n)}function it(e){if(!(e in _))return;let{[e]:t,...n}=_;v(n)}var at=`workspace/project`,ot=`__AGENT_CANVAS_LOCK_TO_CLOUD__`,st=`all-hands.dev`,y=`openhands.dev`,ct=`app.${st}`,lt=y,ut=`app.${y}`;function dt(e){return e?.trim()||null}function ft(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 pt(e){if(!e)return null;let t=e.trim().replace(/\/+$/,``);return t?/^https?:\/\//i.test(t)?t:`https://${t}`:null}function mt(e){let t=e.toLowerCase();return t===ct||t===ut?lt:t===st?y:t.endsWith(`.${st}`)?`${t.slice(0,-13)}${y}`:t}function ht(e){let t=pt(e);if(!t)return null;try{let e=new URL(t),n=e.port?`:${e.port}`:``;return`${e.protocol}//${mt(e.hostname)}${n}`}catch{return t.toLowerCase()}}function gt(){let e=b();return!e||typeof window>`u`||!bt(window.location.origin,e)?null:window.location.origin}function _t(){return ft(void 0)}function vt(){let e=dt(void 0);if(e)return e;if(typeof window<`u`){let e=window.__AGENT_CANVAS_SESSION_API_KEY__;if(typeof e==`string`)return dt(e)}return null}function yt(){return{baseUrl:St()??``,sessionApiKey:x()??``}}function b(){let e=pt(void 0);if(e)return e;if(typeof window<`u`){let e=window[ot];if(typeof e==`string`)return pt(e)}return null}function bt(e,t){let n=ht(e),r=ht(t);return!n||!r?!1:n===r}function xt(){return gt()?`cookie`:`api-key`}function St(){return _t()||(typeof window<`u`?window.location.origin:null)}function x(){return vt()}function Ct(){return at}function wt(e){return`${Ct().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function Tt(){let e=x();return e?{"X-Session-API-Key":e}:{}}function S(){return typeof window<`u`&&window.__AGENT_CANVAS_AUTH_REQUIRED__===!0}function Et(){return S()?!x():!1}var Dt=`default-local`,Ot=`Local`,kt=`locked-cloud`,At=`OpenHands Cloud`;function jt(){if(!b())return null;let e=gt();return e?{id:kt,name:At,host:e,apiKey:``,kind:`cloud`,authMode:`cookie`}:null}function C(){if(b())return null;let e=St(),t=x();return!e||!t?null:{id:Dt,name:Ot,host:e,apiKey:t,kind:`local`}}var Mt=`openhands-backends`,w=`openhands-active-backend`;function Nt(e){return e===`local`||e===`cloud`}function Pt(e){return e===void 0||e===`api-key`||e===`cookie`}function Ft(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`&&Nt(t.kind)&&Pt(t.authMode)&&(t.connectionRevision===void 0||typeof t.connectionRevision==`number`&&Number.isSafeInteger(t.connectionRevision)&&t.connectionRevision>=0)}function It(e){try{let{hostname:t}=new URL(e);return t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`[::1]`}catch{return!1}}function Lt(e,t){return e.id!==`default-local`||e.kind!==`local`?!1:e.host===t.host||It(e.host)&&It(t.host)}function Rt(e){let t=C();if(!t)return e;let n=!1,r=e.map(e=>!Lt(e,t)||e.apiKey===t.apiKey?e:(n=!0,{...e,apiKey:t.apiKey}));return n?(T(r),r):e}function T(e){if(!(typeof window>`u`))try{window.localStorage.setItem(Mt,JSON.stringify(e))}catch{}}function zt(){if(typeof window>`u`)return[];try{let e=jt();if(e)return T([e]),Wt()?.backendId!==e.id&&E({backendId:e.id}),[e];let t=window.localStorage.getItem(Mt);if(t===null){let e=C();return e?(T([e]),[e]):[]}let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=n.filter(Ft);if(r.length===0){let e=C();return e?(T([e]),[e]):[]}return Rt(r)}catch{return[]}}function Bt(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 Vt(e,t){try{return e?.getItem(t)??null}catch{return null}}function Ht(e,t,n){try{e?.setItem(t,n)}catch{}}function Ut(e,t){try{e?.removeItem(t)}catch{}}function Wt(){return typeof window>`u`?null:Bt(Vt(window.sessionStorage,w))||Bt(Vt(window.localStorage,w))}function E(e){if(typeof window>`u`)return;if(!e){Ut(window.sessionStorage,w),Ut(window.localStorage,w);return}let t=JSON.stringify({backendId:e.backendId,orgId:e.orgId??null});Ht(window.sessionStorage,w,t),Ht(window.localStorage,w,t)}var Gt=`backend`;function Kt(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(Gt,n.id),r&&o.set(`org`,r),`${i}?${o.toString()}`}function qt(e,t){if(!t)return null;let n;try{n=new URLSearchParams(t)}catch{return null}let r=n.get(Gt);return!r||!e.some(e=>e.id===r)?null:{backendId:r,orgId:n.get(`org`)||null}}function Jt(){return typeof window>`u`?``:window.location.search}var Yt=`no-backend`,Xt={id:Yt,name:`No Backend Available`,host:``,apiKey:``,kind:`local`};function Zt(e){return e.id===Yt}function Qt(e){return e.find(e=>e.kind===`local`&&$e(e.id)?.disabled!==!0)||(e.find(e=>e.kind===`local`)??e[0]??Xt)}function $t(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=Qt(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}function en(e){let t=qt(e,Jt());return t?(E(t),t):Wt()}var tn=zt(),D=$t(tn,en(tn)),nn=new Set;function rn(){nn.forEach(e=>e())}function an(){return D.active}function O(){let e=D.active.backend;return e.kind===`local`&&!Zt(e)?e:null}function k(){return D.backends}function on(){return D.selection}function A(){return D}function sn(e){E(e),D=$t(D.backends,e),rn()}function cn(e){T(e);let t=D.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,E(null)),D=$t(e,t),rn()}function ln(e){return nn.add(e),()=>{nn.delete(e)}}var un=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},dn=e=>{if(!(e instanceof a)||e.response?.status!==401&&e.status!==401)return!1;let t=an().backend;if(t.kind!==`cloud`)return!1;let n=e.config?.url;return!n||n.startsWith(t.host.replace(/\/+$/,``))},fn=new Set,pn=()=>{let e=new s({queryCache:new ee({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&nt(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||un(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)&&!dn(t)){let e=Fe(t);fn.has(e||``)||(Be(e||p.t(l.ERROR$GENERIC)),fn.add(e||``),setTimeout(()=>{fn.delete(e||``)},3e3))}}}),mutationCache:new te({onError:(t,n,r,i)=>{un(t,e),!(i?.meta?.disableToast??i?.options.meta?.disableToast)&&!dn(t)&&Be(Fe(t)||p.t(l.ERROR$GENERIC))}})});return e},mn=null,hn=null,gn=()=>(mn||=pn(),mn),_n=()=>hn??gn(),vn=e=>(hn=e??gn(),hn),yn=new Proxy({},{get:(e,t)=>{let n=_n(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=_n();return Reflect.set(r,t,n,r)}});function bn(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 xn(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function Sn(e){let t=bn(e),n=xn(e),r=window.location.protocol===`https:`,i=Cn(e)===`https:`;return`${r||i?`https:`:`http:`}//${t}${n}`}function Cn(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function wn(e){let t=bn(e),n=xn(e),r=window.location.protocol===`https:`,i=Cn(e)===`https:`;return`${r||i?`wss:`:`ws:`}//${t}${n}/sockets/bash-events`}function Tn(e,t){if(!e)return null;let n=bn(t),r=xn(t),i=window.location.protocol===`https:`,a=Cn(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}var En=class extends Error{constructor(){super(`No backend is configured.`),this.name=`NoBackendAvailableError`}};function Dn(e){return e.replace(/\/+$/,``)}function On(e,t){return e.host?Dn(e.host):e.conversationUrl?Dn(Sn(e.conversationUrl)):Dn(t?.host??``)}function kn(e={}){let t=O();if(!t&&!e.host&&!e.conversationUrl)throw new En;let n=e.sessionApiKey??e.apiKey??t?.apiKey??void 0;return{host:On(e,t),...n?{apiKey:n}:{},workingDir:e.workingDir??Ct(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function An(e){let{host:t,apiKey:n,timeout:r}=kn(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}var jn={_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.42.1`,agentCanvas:`1.14.0`,automation:`1.7.1`},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`}},Mn=5e3,Nn=`unknown`,j=jn.compatibility.minimumAgentServer,Pn=`AGENT_SERVER_UNSUPPORTED_VERSION`,Fn=`AGENT_SERVER_UNKNOWN_VERSION`,M=null,In=null,Ln=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,N=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}},Rn=e=>e instanceof N||typeof e==`object`&&!!e&&`name`in e&&(e.name===`AgentServerUnavailableError`||e.name===`AgentServerUnsupportedVersionError`||e.name===`AgentServerUnknownVersionError`),zn=class extends N{code=Pn;actualVersion;requiredVersion=j;constructor(e){let t=`Agent Canvas requires agent-server ${j} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},Bn=class extends N{code=Fn;actualVersion;requiredVersion=j;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${j} 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}},Vn=e=>S()&&F(e,401);function P(){M=null,In=null}function Hn(e){return e?.host&&e.host!==In?null:M}function Un(e){let t=Ln(M);return Array.isArray(t)?t.includes(e):!0}function Wn(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function F(e,t){return Wn(e)&&e.status===t}function Gn(e){return typeof e==`string`&&e.trim()||null}function Kn(e){return Gn(e.sdk_version)}function qn(e){return Gn(e.version)??Kn(e)}function Jn(e){let t=qn(e);return!t||t.toLowerCase()===Nn?null:t}function Yn(e){let t=Jn(e);return!t||!Qn(t)?null:t}function Xn(e){return!M||e&&O()?.host!==e?null:Yn(M)}function Zn(e,t){let n=Qn(e),r=Qn(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 Qn(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 $n(e){let t=Jn(e);if(!t)throw P(),new Bn(qn(e));let n=Zn(t,j);if(n===null)throw P(),new Bn(t);if(n<0)throw P(),new zn(t)}async function er(){let e=O();if(!e){if(P(),Zt(an().backend))throw new N(`No backend configured`,{noBackendConfigured:!0});return null}let t=kn({host:e.host,sessionApiKey:e.apiKey||null,timeout:Mn}),n;try{n=await new ie(t).getServerInfo()}catch(e){throw P(),F(e,401)?e:new N(e instanceof Error?e.message:null)}if($n(n),S())try{await new ae(t).getSettings()}catch(e){if(F(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return M=n,In=t.host,n}var tr={WEB_CLIENT_CONFIG:[`web-client-config`],MAIN_APP_COOKIE_AUTH:[`main-app-cookie-auth`]},nr={all:[`settings`],byScope:e=>[`settings`,e],personal:()=>[`settings`,`personal`]},rr={all:[`llm-profiles`]},ir={all:[`agent-profiles`]},ar={retry:!1},or={all:[`llm-subscription`],openaiStatus:[`llm-subscription`,`openai`,`status`],openaiModels:[`llm-subscription`,`openai`,`models`]},sr={all:[`local-workspaces`]},cr={marketplace:[`plugins-marketplace`],installed:[`plugins-installed`],local:[`plugins-local`]},lr={capabilities:()=>[`setup-capabilities`]},ur={latestVersion:[`agent-canvas-latest-version`]},dr={staleTime:1e3*60*5,gcTime:1e3*60*15},fr={name:`@openhands/agent-canvas`,version:`1.14.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.25`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.16.0`,"@openhands/typescript-client":`1.38.0`,"@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.1`,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.14`},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}`,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') }"`,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.6`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.62.1`,"@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.18`,"@types/react-dom":`19.2.4`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.65.0`,"@typescript-eslint/parser":`8.65.0`,"@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.5`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.5`,"eslint-plugin-i18next":`6.1.5`,"eslint-plugin-import-x":`4.17.1`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.6`,"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.1`,"lint-staged":`17.3.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`}},pr=`agent_canvas`,mr=fr.version,hr=`X-OpenHands-Client`,gr=`X-OpenHands-Client-Version`,_r=`X-OpenHands-Telemetry-Distinct-Id`,vr={[hr]:pr,[gr]:mr};function yr(e){return e?.trim()||`unknown`}function br(e){return e?.trim()||null}function I({backendKind:e,agentServerVersion:t,automationSdkVersion:n,backendVersion:r,connectionMethod:i}){let a=yr(t??r),o=yr(n),s=yr(r??t);return{backend_kind:e??null,agent_server_version:a,automation_sdk_version:o,backend_version:s,...i?{connection_method:i}:{}}}function xr(e=null){return{cloud_user_id:br(e?.userId),cloud_user_email:br(e?.email),cloud_org_id:br(e?.orgId)}}var L=`openhands-telemetry-consent`,R=`openhands-telemetry-consent-pending-cloud-sync`,z=`openhands-telemetry-consent-pending-local-revocation`,Sr=`openhands-telemetry-consent-change`,Cr=`openhands-telemetry-first-use`,wr=`openhands-telemetry-session`,Tr=`agent-canvas`,Er=`history_change`,Dr=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,Or=`https://z.openhands.dev`,kr=`https://us.posthog.com`,B=null,V=null,Ar,H={},U=!1,W,G=0,K=-1,jr=Object.freeze({client_source:pr,client_version:mr,package_name:fr.name,package_version:fr.version}),Mr=I({}),Nr=xr();function Pr(e){Mr=I(e)}function q(e){Nr=xr(e)}function Fr(e){return e?{...e,properties:{...Mr,...Nr,...e.properties,...jr}}:null}function Ir(e){U||Z()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function Lr(e,t=!1){e.reset(t),K=-1,Ir(e)}function J(e){if(W===void 0||!$())return;let t=W?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&Lr(e),W===null){K=G;return}(e.get_property(`$user_id`)!==W.distinctId||K!==G)&&(e.identify(W.distinctId,W.properties),K=G)}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(U)return;U=!0,B?.opt_out_capturing(),Q();return}let t=U;if(U=!1,!B&&!V){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));H={...H,...t}}t&&(B&&(Ir(B),J(B)),Q())}function Br(){return U?null:{apiKey:H.apiKey||Dr,apiHost:H.apiHost||Or,uiHost:H.uiHost||kr}}function Y(){return typeof window<`u`&&typeof localStorage<`u`}async function Vr(){if(!Y())return null;if(B)return B;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!!(U||typeof process<`u`&&{}.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function Ur(e){B||(Ar=e)}async function X(e=!1){if(B)return B;if(V)return V;V=(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:Tr,consent_persistence_name:`${Tr}-consent`,person_profiles:`always`,capture_pageview:Er,autocapture:!0,disable_session_recording:!0,bootstrap:Ar,before_send:Fr},Tr);return r?(B=r,Ar=void 0,U?B.opt_out_capturing():Z()===`granted`?(B.opt_in_capturing(),J(B)):e||B.opt_out_capturing(),B):null})();try{return await V}finally{B||(V=null)}}function Z(){if(!Y())return`pending`;if(Hr())return`denied`;if(xt()===`cookie`)return`granted`;try{let e=localStorage.getItem(L);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function Wr(){if(!Y())return null;try{let e=localStorage.getItem(R);return e===`granted`||e===`denied`?e:null}catch{return null}}function Gr(){if(!Y())return null;try{return localStorage.getItem(z)}catch{return null}}function Kr(e){if(!Y())return()=>{};let t=t=>{(t.key===L||t.key===R)&&e()};return window.addEventListener(Sr,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(Sr,e),window.removeEventListener(`storage`,t)}}function Q(){Y()&&window.dispatchEvent(new Event(Sr))}function qr(e){if(Y())try{localStorage.setItem(R,e)}catch{}}function Jr(e){if(!(!Y()||!e))try{localStorage.setItem(z,e)}catch{}}function Yr(e){if(Y())try{if(localStorage.getItem(z)!==e)return;localStorage.removeItem(z)}catch{}}function Xr(e){if(Y())try{if(e!==void 0&&localStorage.getItem(R)!==e)return;localStorage.removeItem(R),Q()}catch{}}async function Zr(e,{syncToCloud:t=!0}={}){if(Y())try{let t=Z()===e;if(localStorage.setItem(L,e),U||t)return;let n=B??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(W===n||W!=null&&n!==null&&W.distinctId===n.distinctId&&Rr(W.properties,t)||(W=n,G+=1,K=-1,!$()))return;let r=B??await X();r&&$()&&J(r)}function $(){return Z()===`granted`}function $r(){if(!Y())return!1;try{return localStorage.getItem(Cr)===`true`}catch{return!1}}function ei(){if(Y())try{localStorage.setItem(Cr,`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(wr)===`true`}catch{return!1}}function ri(){if(Y())try{sessionStorage.setItem(wr,`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 U||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(){if(Y()){try{Jr(B?.get_distinct_id?.()??null),localStorage.removeItem(L),localStorage.removeItem(Cr)}catch{}Xr();try{sessionStorage.removeItem(wr)}catch{}Mr=I({}),Nr=xr(),W=null,G+=1,K=-1;try{B&&Lr(B,!0)}catch{try{B?.opt_out_capturing()}catch{}}finally{Q()}}}var ui=u.createContext(null);function di(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function fi(e,t){let n=e.backend.kind===`cloud`,r=t.backend.kind===`cloud`;!n&&!r||(q(null),r&&(!n||e.backend.id!==t.backend.id)&&Qr(null))}function pi({children:e}){let t=u.useSyncExternalStore(ln,A,A),n=u.useCallback(()=>{P(),yn.invalidateQueries({queryKey:tr.WEB_CLIENT_CONFIG})},[]),r=u.useCallback((e,t)=>{let r=A(),i=on()?.backendId??null,a=on()?.orgId??null,o=t??null;if(e===i&&o===a)return;let s=k(),ee=s.find(t=>t.id===e),te={backend:ee??s[0]??Xt,orgId:ee?o:null};fi(r.active,te),sn({backendId:e,orgId:o}),n()},[n]),i=u.useCallback(e=>{let t=A().active,r={...e,id:di()},i=[...k(),r];return fi(t,{backend:r,orgId:null}),cn(i),sn({backendId:r.id}),n(),r},[n]),a=u.useCallback((e,t)=>{let r=k().find(t=>t.id===e),i=A().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;cn(k().map(n=>n.id===e?{...n,...t,connectionRevision:a||o?(n.connectionRevision??0)+1:n.connectionRevision}:n)),(a||o)&&(rt(e),i===e&&(r?.kind===`cloud`&&(q(null),Qr(null)),n()))},[n]),o=u.useCallback(e=>{let t=k().find(t=>t.id===e),r=t?.kind===`cloud`&&A().active.backend.id===t.id;cn(k().filter(t=>t.id!==e)),r&&(q(null),Qr(null)),it(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,h.jsx)(ui.Provider,{value:s,children:e})}function mi(){let e=u.useContext(ui);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function hi(){let e=u.useContext(ui);return e?e.active:{backend:C()??Xt,orgId:null}}export{An as $,ur as A,g as At,P as B,pe as Bt,I as C,S as Ct,_r as D,tt as Dt,mr as E,Qe as Et,cr as F,Fe as Ft,Vn as G,be as Gt,Hn as H,f as Ht,tr as I,Ne as It,Wn as J,Un as K,xe as Kt,nr as L,Me as Lt,rr as M,Ve as Mt,or as N,He as Nt,ir as O,nt as Ot,sr as P,Ue as Pt,kn as Q,lr as R,je as Rt,ai as S,b as St,pr as T,bt as Tt,Xn as U,ye as Ut,Zn as V,d as Vt,Yn as W,p as Wt,er as X,F as Y,En as Z,Zr as _,St as _t,Yr as a,yn as at,ci as b,Ct as bt,zr as c,O as ct,Z as d,Zt as dt,wn as et,oi as f,ln as ft,q as g,wt as gt,Pr as h,at as ht,Xr as i,_n as it,dr as j,Be as jt,ar as k,et as kt,Wr as l,k as lt,X as m,Ot as mt,hi as n,Tn as nt,li as o,vn as ot,si as p,Kt as pt,Rn as q,fe as qt,mi as r,gn as rt,Ur as s,an as st,pi as t,Sn as tt,Gr as u,A as ut,Qr as v,yt as vt,vr as w,Et as wt,ti as x,xt,Kr as y,Tt as yt,$n as z,Ae as zt};
|
package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DGWBBbcp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as n}from"./sdk-section-page-BbBEQQjq.js";var r=e();function i(){return(0,r.jsx)(n,{settingsSources:[{settingsSource:`agent_settings`,sectionKeys:[`agent_context`]}],testId:`agent-context-settings-screen`})}var a=t(i);export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
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~ox0jfsa0-cHFhpUBq.js";import{n as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as s}from"./useMutation-6ZsQCqAn.js";import{Ft as c,Mt as l,O as u,jt as d}from"./active-backend-context-BZDG15C0.js";import{t as f,z as p}from"./utils-DUD5ScdA.js";import{t as m}from"./back-nav-button-H_ThtDA0.js";import{t as h}from"./loading-spinner-DBgXgra0.js";import{t as g}from"./brand-button-Blxv5nww.js";import{i as _}from"./dropdown-classes-tLhpwtxS.js";import{t as v}from"./use-llm-profiles-diZS4FiN.js";import{n as y,t as b}from"./use-agent-profiles-CPIc6wLH.js";import{i as x,n as S,t as C}from"./use-can-manage-org-profiles-Dz_8Eqkv.js";import{t as w}from"./u-edit-DAkcF52u.js";import{t as T}from"./settings-dropdown-input-Ba1UN5Du.js";import{r as E}from"./typography-DB5HoCk0.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-B-51h-SW.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-DdcLXDGn.js";import{n as R}from"./settings-section-header-context-BOJ_Fbak.js";import{t as z}from"./use-save-agent-profile-BaMNSpBV.js";import{n as B}from"./use-activate-agent-profile-B0p34N3q.js";import{t as V}from"./merge-agent-profile-save-input-WcFmQVKK.js";import{i as H,t as U}from"./agent-settings-DfcSgkLD.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?.contains(t)||d?.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)}},[d,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:u.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),l(n(p.SETTINGS$PROFILE_DELETED,{name:e.name})),t()}catch(e){d(e instanceof Error?e.message:n(p.ERROR$GENERIC))}},s=()=>{r.isPending||t()},c=(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:c,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(),[u,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),l(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:u,onClose:()=>d(null)})]})}function $(){let e=a();return s({mutationFn:({name:e,newName:t})=>y.renameProfile(e,t),onSuccess:async()=>{await e.invalidateQueries({queryKey:u.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(),[u,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(u!==`list`),()=>t(!1)),[u,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})||u===`create`&&L.has(h)||u===`edit`&&h!==x?.name&&L.has(h)),[h,u,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),d(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){d(e(p.SETTINGS$AGENT_PROFILE_LLM_REQUIRED));return}t={...n,llm_profile_ref:D}}else t=n}catch(t){d(t instanceof Error?t.message:e(p.ERROR$GENERIC));return}let i=h.trim(),a=x?.name,o=u===`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(u===`edit`?x:null,t);await n.mutateAsync({name:i,profile:s}),l(e(u===`create`?p.SETTINGS$PROFILE_CREATED:p.SETTINGS$PROFILE_UPDATED,{name:i})),q()}catch(t){d(c(t)||e(p.ERROR$GENERIC))}finally{P(!1)}},[j,B,D,h,u,x,n,r,e,q]);if(u===`list`)return(0,K.jsx)(Q,{onAddProfile:H,onEditProfile:G});let Y=e(u===`edit`?p.SETTINGS$EDIT_AGENT_PROFILE:p.SETTINGS$ADD_AGENT_PROFILE),X=u===`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},u===`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};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/secrets-service-BtsgYSlj.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/active-backend-context-BZDG15C0.js","assets/vendor-styling-Ck5D_A2Q.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js","assets/utils-DUD5ScdA.js","assets/proxy-DYDXxtje.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{xt as e}from"./vendor-styling-Ck5D_A2Q.js";import{_ as t,b as n,l as r,p as i,v as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{H as o,K as s,Q as c,Z as l,bt as u,ct as d,gt as ee,lt as te,st as f,tt as p,w as m}from"./active-backend-context-BZDG15C0.js";import{C as ne}from"./utils-DUD5ScdA.js";import{r as h,t as g}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js";import{t as _}from"./proxy-DYDXxtje.js";import{t as v}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js";import{t as y}from"./settings-DcNPxz0v.js";import{t as b}from"./settings-service.api-3yAUFcaP.js";import{t as re}from"./profiles-service.api-BLr7FXec.js";import{f as x,o as S,s as C}from"./acp-providers-CYy8qA2z.js";import{d as w,f as T,r as ie}from"./llm-subscription-DTqtBCWz.js";import{t as ae}from"./llm-subscription-service-SfnEV9Uc.js";var E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function oe(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+`-`+E[e[t+4]]+E[e[t+5]]+`-`+E[e[t+6]]+E[e[t+7]]+`-`+E[e[t+8]]+E[e[t+9]]+`-`+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}var se=new Uint8Array(16);function ce(){return crypto.getRandomValues(se)}function D(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():le(e,t,n)}function le(e,t,n){e||={};let r=e.random??e.rng?.()??ce();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 oe(r)}var O=new Map;function ue(e){return/^([/\\]|[a-zA-Z]:[/\\])/.test(e)}function de(e,t){return`${e.replace(/[/\\]+$/,``)}/${t.replace(/^[/\\]+/,``)}`}async function fe(e={}){let n=c(e),r=n.host,i=O.get(r);if(i)return i;let a=(async()=>{let{home:e}=await new t(n).getHome();if(!e||typeof e!=`string`)throw Error(`Agent server returned an empty home directory`);return e.replace(/[/\\]+$/,``)})();O.set(r,a);try{return await a}catch(e){throw O.delete(r),e}}async function pe(e,t={}){let n=e.replace(/[/\\]+$/,``);return n?ue(n)?n:de(await fe(t),n):fe(t)}var k=`openhands-agent-server-conversation-metadata`,me=e=>({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}),A=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(k);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:t}catch{return{}}},j=e=>{if(!(typeof window>`u`)){if(Object.keys(e).length===0){window.localStorage.removeItem(k);return}window.localStorage.setItem(k,JSON.stringify(e))}},M=e=>A()[e]??null,N=(e,t)=>{let n=A();n[e]=t,j(n)},P=e=>{let t=A();e in t&&(delete t[e],j(t))};function F(e){if(!e?.id)return e;let t=M(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 I(){let e=f().backend;if(e.kind!==`cloud`)throw Error(`Cloud conversations call requires a cloud backend.`);return e}function he(){let e=f().backend;return e.kind===`cloud`?e:te().find(e=>e.kind===`cloud`&&!!e.apiKey)??null}async function ge(e=20,t){let n=I(),r=new URLSearchParams;r.set(`limit`,String(e)),t&&r.set(`page_id`,t),r.set(`sort_order`,`UPDATED_AT_DESC`);let i=await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/search?${r.toString()}`});return{items:(i?.items??[]).map(e=>F(e)),next_page_id:i?.next_page_id??null}}async function L(e){if(e.length===0)return[];let t=I(),n=new URLSearchParams;for(let t of e)n.append(`ids`,t);return(await _({backend:t,method:`GET`,path:`/api/v1/app-conversations?${n.toString()}`})??[]).map(F)}async function R(e,t){return await _({backend:t??I(),method:`POST`,path:`/api/v1/app-conversations`,body:e,headers:m})}async function _e(e){return _({backend:I(),method:`GET`,path:`/api/v1/app-conversations/${e}/download`,responseType:`blob`})}async function ve(e){await _({backend:I(),method:`DELETE`,path:`/api/v1/app-conversations/${e}`})}async function ye(e,t){return await _({backend:I(),method:`PATCH`,path:`/api/v1/app-conversations/${e}`,body:{public:t}})}async function be(e){await _({backend:I(),method:`POST`,path:`/api/v1/sandboxes/${e}/pause`})}async function xe(e){await _({backend:I(),method:`POST`,path:`/api/v1/sandboxes/${e}/resume`})}async function z(e,t){let n=I(),r=new URLSearchParams;return r.append(`file_path`,t),await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/file?${r.toString()}`})??``}async function Se(e,t){let n=I(),r=new URLSearchParams;r.append(`path`,t);let i=await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/files?${r.toString()}`});return Array.isArray(i)?i:[]}async function B(e,t){let n=t??I(),r=new URLSearchParams;return r.set(`ids`,e),(await _({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 V=`canvas_ui`,H=`canvas_ui_control`,we=`ClientAction_${H}`,Te={name:H,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}},U=`launch_child_conversation`,Ee=`ClientAction_${U}`,De=`[child-conversation] `,Oe=[`local`,`cloud`],ke=[`worktree`,`shared`],Ae=`1.37.1`,je={name:U,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 "${De.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:[...Oe],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:[...ke],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}},Me=[`terminal`,`file_editor`,`task_tracker`],Ne=`browser_tool_set`,Pe=`task_tool_set`;function Fe(){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 Ie(){let e;try{e=c({timeout:3e3})}catch{return null}let t=W(o({host:e.host})?.runtime_services);if(t)return t;try{return W((await new n(e).getServerInfo()).runtime_services)}catch{return null}}function Le(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 Re(e){let{host:t}=c();return`${t}/api/conversations/${e}`}function ze(e){return`Conversation ${e.slice(0,5)}`}function Be(e){let t=M(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:ze(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??y.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??ne.IDLE,sandbox_status:e.sandbox_status??null,conversation_url:Re(e.id),session_api_key:c().apiKey??null,sandbox_id:null,workspace:{working_dir:e.workspace?.working_dir??u()},public:!1,sub_conversation_ids:[]}}function Ve(e){return{items:e.items.map(Be),next_page_id:e.next_page_id??null}}var He=`acpserver`,Ue=`automationtrigger`,We=`automationid`,Ge=`automationname`,Ke=`automationrunid`,qe=[Ue,We,Ge,Ke],Je=new Set([He,We,Ke,`title`,`git_provider`,`repo_name`,`repo`,`repository`,`selected_branch`,`branch`,`archiveworkspacepath`,`workspace`,`working_dir`]),Ye=[`origin`];function Xe(e){if(!e)return[];let t=e=>{let t=Ye.indexOf(e.trim().toLowerCase());return t===-1?1/0:t};return Object.entries(e).filter(([e,t])=>!Je.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 Ze=`gAAAAA`,Qe=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 $e(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function et(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function K(e){return typeof e==`string`?e.startsWith(Ze):Array.isArray(e)?e.some(K):et(e)?Object.values(e).some(K):!1}function tt(e){return et(e)?Object.values(e).some(K):!1}function nt(e){return e.confirmation_mode===!0?e.security_analyzer===`llm`?{kind:`ConfirmRisky`,threshold:`HIGH`,confirm_unknown:!0}:{kind:`AlwaysConfirm`}:{kind:`NeverConfirm`}}function rt(e){switch(e.security_analyzer){case`llm`:return{kind:`LLMSecurityAnalyzer`};case`pattern`:return{kind:`PatternSecurityAnalyzer`};case`policy_rail`:return{kind:`PolicyRailSecurityAnalyzer`};default:return}}function it(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`}function q(e,t){return e===Ne?Fe()&&s(e):e===Pe?t.enable_sub_agents===!0&&s(e):!0}function at(e){let t=new Map;for(let n of Me)q(n,e)&&t.set(n,{name:n,params:{}});for(let n of[Ne,Pe])q(n,e)&&t.set(n,{name:n,params:{}});let n=e.tools;if(Array.isArray(n)&&n.every(e=>it(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 ot(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 st(){return v.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 ct(e,t,n=[]){let r=Le(t),i=G(e.agent_context),a=Array.isArray(i.skills)?i.skills:[],o=new Set(n),s=[...a,...st()].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 lt(e){return G(e.agent_settings).agent_kind===`acp`}function ut(e){let t=G(e.agent_settings).acp_server;return typeof t==`string`&&t.length>0?t:void 0}function dt(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 ft(e,t){let n=G(e.agent_settings),r={agent_kind:`acp`,agent_context:ct(n,t,e.disabled_skills)};for(let e of g){if(e===`acp_model`||e===`acp_env`)continue;let t=e===`acp_command`?dt(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 pt(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:y.llm_model,r.stream=!0;let i=$e(r.api_key);i?r.api_key=i:delete r.api_key;let a=$e(r.base_url);a?r.base_url=a:delete r.base_url,T(r)?(r.auth_type=ie,r.subscription_vendor=w,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 g)delete n[e];return delete n.acp_env,{...n,llm:r,agent_context:ct(n,t,e.disabled_skills),tools:at(n)}}function mt(e,t){return lt(e)?ft(e,t):pt(e,t)}function ht(e){let{settings:t,query:n,conversationInstructions:r,plugins:i,workingDir:a}=e,o=G(t.conversation_settings),s=ot(n,r);return Qe.forEach(e=>delete o[e]),{...o,workspace:{kind:`LocalWorkspace`,working_dir:a??u()},...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 gt(e){let t=e.encryptedAgentSettings?{...e.settings,agent_settings:e.encryptedAgentSettings}:e.settings,n=lt(t),r=e.agentProfileId?e.agentProfileKind:n?`acp`:`openhands`,i=mt(t,e.runtimeServicesInfo),a=n?ut(t):void 0,o=ht(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,je]:[],confirmation_policy:nt(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={[He]:a}),!e.agentProfileId&&e.secretsEncrypted&&(!n||tt(i.mcp_config))&&(s.secrets_encrypted=!0),e.conversationId&&(s.conversation_id=e.conversationId),e.parentConversationId&&(s.parent_conversation_id=e.parentConversationId);let c=rt(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[V],delete l[H],delete l[U],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 _t=`Connect your ChatGPT subscription before starting a conversation with this LLM profile.`;async function vt(e){if(T(G(e.llm))&&!(await ae.getOpenAIStatus()).connected)throw Error(_t)}async function yt(t){let{SecretsService:n}=await e(async()=>{let{SecretsService:e}=await import(`./secrets-service-BtsgYSlj.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([b.getSettingsForConversation(),n.getSecrets(),Ie()]),{agentSettings:o,conversationSettings:s,secretsEncrypted:c}=r;return t.agentProfileId||await vt(o),gt({...t,encryptedAgentSettings:o,encryptedConversationSettings:s,secretsEncrypted:c,customSecrets:i,runtimeServicesInfo:a})}function bt(){return{hooks:[]}}function xt(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 St=`1970-01-01T00:00:00.000Z`,Ct=300*1e3,wt=`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(wt)}function Y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Tt(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 Et(e,t,n){let r=e[t]??e[n];return typeof r==`string`&&r.trim()?r:St}function Dt(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 Q(e){return Y(e)?{accumulated_cost:Tt(e.accumulated_cost),max_budget_per_task:Tt(e.max_budget_per_task),accumulated_token_usage:Dt(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 Pt(e){if(!Y(e)||typeof e.id!=`string`||!e.id.trim())throw J();return{id:e.id.trim(),title:Z(e.title),created_at:Et(e,`created_at`,`createdAt`),updated_at:Et(e,`updated_at`,`updatedAt`),execution_status:Z(e.execution_status),sandbox_status:Z(e.sandbox_status),metrics:Q(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(Pt)}function Ft(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 It=new Set([`idle`,`running`,`paused`,`waiting_for_confirmation`,`finished`,`error`,`stuck`]);function Lt(e){let t=e??`idle`;return It.has(t)?t:`idle`}function Rt(e,t){if(!e)throw Error(`Conversation ${t} was not found`);return e}var zt=class{static async sendMessage(e,t,n){let r=f().backend,i=n?.conversationUrl??null,o=n?.sessionApiKey??null;if(r.kind===`cloud`){if(!i||!o){let[t]=await L([e]);i=t?.conversation_url?.trim()??null,o=t?.session_api_key?.trim()??null}if(!i||!o)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return await _({backend:r,method:`POST`,hostOverride:p(i),path:`/api/conversations/${e}/events`,body:{...t,run:!0},authMode:`session-api-key`,sessionApiKey:o}),t}return await new a(c({conversationUrl:i,sessionApiKey:o})).sendEvent(e,t,{run:!0}),t}static async createConversation(e={}){let{initialUserMsg:t,conversationInstructions:n,plugins:r,metadata:i,workingDirOverride:o,workspaceMode:s,parentConversationId:u,agentType:te,sandboxId:p,agentProfileId:m,agentProfileKind:ne}=e;if(f().backend.kind===`cloud`)return R({initial_message:t?{role:`user`,content:[{type:`text`,text:t}]}: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:u??null,agent_type:te,sandbox_id:p??null,agent_profile_id:m??null});let[h,g]=await Promise.all([b.getSettings(),re.listProfiles().catch(()=>void 0)]),_=xt(h.title_llm_profile,g),v=D(),y=await pe(o??ee(v)),x=s??(o?`local_repo`:`new_worktree`),S=await yt({settings:h,query:t,conversationInstructions:n,plugins:r,conversationId:v,parentConversationId:u,workingDir:y,worktree:x===`new_worktree`,agentProfileId:m,agentProfileKind:ne,titleLlmProfile:_}),C=await new a(c({timeout:Ct})).createConversation(S),w=d();if(!w)throw new l;return(i?.selected_repository||o)&&N(C.id,{selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,selected_workspace:o??null,workspace_mode:x}),{id:C.id,created_by_user_id:null,status:`READY`,detail:null,app_conversation_id:C.id,agent_server_url:w.host,request:{initial_message:S.initial_message,plugins:r??null},created_at:C.created_at,updated_at:C.updated_at}}static async getStartTask(e){return f().backend.kind===`cloud`?B(e):null}static async getVSCodeUrl(e,t,n){let i=await this.resolveConversationWorkingDir(e);return{vscode_url:await new r(c({conversationUrl:t,sessionApiKey:n})).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??u()}static async batchGetAppConversations(e){return e.length===0?[]:f().backend.kind===`cloud`?L(e):$(await new a(c()).getConversations(e)).map(e=>Be(e))}static async updateConversationPublicFlag(e,t){if(f().backend.kind!==`cloud`)throw Error(`Public sharing requires a cloud backend.`);return ye(e,t)}static async updateConversationRepository(e,t,n,r){t?N(e,{...M(e)??{},selected_repository:t,selected_branch:n??null,git_provider:r??null}):P(e);let[i]=await this.batchGetAppConversations([e]);return Rt(i,e)}static async readConversationFile(e,n){if(f().backend.kind===`cloud`)return z(e,Nt(n??`/workspace/project/.agents_tmp/PLAN.md`,`/workspace/project`));let r=await this.resolveConversationWorkingDir(e),i=Nt(n??`${r}/.agents_tmp/PLAN.md`,r);return new t(c()).downloadTextFile(i)}static async downloadConversation(e){return f().backend.kind===`cloud`?_e(e):new t(c()).downloadTrajectory(e)}static async getHooks(e){return bt()}static async getRuntimeConversation(e,t,n){let r=await new a(c({conversationUrl:t,sessionApiKey:n})).getConversation(e),i=Pt(r),o=Y(r)?r.stats:null;return{id:i.id,title:i.title?.trim()?i.title:ze(i.id),metrics:Q(i.metrics),created_at:i.created_at,updated_at:i.updated_at,status:Lt(i.execution_status),stats:Y(o)?o:{usage_to_metrics:{}}}}static async condenseConversation(e,t,n){let r=f().backend;if(r.kind===`cloud`&&t){await _({backend:r,method:`POST`,hostOverride:p(t),path:`/api/conversations/${e}/condense`,authMode:`session-api-key`,sessionApiKey:n});return}await new a(c({conversationUrl:t,sessionApiKey:n})).condenseConversation(e)}static async searchConversations(e=20,t){return f().backend.kind===`cloud`?ge(e,t):Ve(Ft(await new a(c()).searchConversations({limit:e,page_id:t,sort_order:h.UPDATED_AT_DESC})))}static async deleteConversation(e){f().backend.kind===`cloud`?await ve(e):await new a(c()).deleteConversation(e),P(e)}static async updateConversationTitle(e,t){await new a(c()).updateConversation(e,{title:t});let[n]=await this.batchGetAppConversations([e]);return Rt(n,e)}static async forkConversation(e,t,n){if(f().backend.kind===`cloud`)throw Error(`Branching a conversation isn't supported on the cloud backend yet.`);let r=await new a(c()).forkConversation(e,{from_event_id:t,...n?{title:n}:{}}),i=M(e);return i&&N(r.id,i),r}static async getEventParentId(e,t){return(await new a(c()).getEvent(e,t)).parent_id??void 0}static async switchProfile(e,t){let{backend:n}=f();if(n.kind===`cloud`){if(!e){await re.activateProfile(t);return}await _({backend:n,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_profile`,body:{profile_name:t}});return}if(!e){await new i(c()).activateProfile(t);return}let r=c(),o=new a(r),s=await new i(r).getProfile(t,{exposeSecrets:`encrypted`}),l=typeof s.config.model==`string`?s.config.model:``;if(!l)throw Error(`Profile '${t}' has no model.`);await vt({llm:s.config}),await o.switchLLM(e,{...s.config,model:l,stream:!0,usage_id:`profile:${t}:${D()}`})}static async switchAcpModel(e,t){let{backend:n}=f();if(n.kind===`cloud`){await _({backend:n,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_acp_model`,body:{model:t}});return}await new a(c()).switchAcpModel(e,t)}};export{N as C,D as E,M as S,pe as T,Se as _,ke as a,z as b,Ee as c,we as d,H as f,B as g,R as h,Xe as i,U as l,L as m,Ge as n,De as o,V as p,qe as r,Oe as s,zt as t,Ae as u,be as v,me as w,xe as x,he as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i,f as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
2
|
-
`||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var fe=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function j(e){return e.map(e=>fe.test(e)||e===``?k([e]):e).join(` `)}var M={hideTitle:!0},pe=`enable_sub_agents`,me=`tool_concurrency_limit`,he=`npx -y <package-name>`,N=`__custom_model__`;function ge(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function P(e,t){let n=A(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return te}function _e(e){return e?.find(e=>e.key===pe)}function ve(e,t){return typeof e==`boolean`?e:t?.default===!0}function ye(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function be(e){let{isAcp:t,selectedPreset:n,isDefaultProviderCommand:r,commandTokens:i,acpModel:a,subAgentsEnabled:o,toolConcurrencyField:s,toolConcurrency:c}=e;if(t){let e=r&&n!==`custom`;return{agent_kind:`acp`,acp_server:n,acp_model:a.trim()||null,acp_command:e?null:j(i)||null,acp_args:null}}let l={agent_kind:`openhands`,enable_sub_agents:o};if(s){let e=se(s,c),t=typeof s.default==`number`?s.default:1;l.tool_concurrency_limit=e==null?t:Number(e)}return l}function F({embedded:e=!1,agentSettingsOverride:t=null,onSaveControlChange:n}={}){let{t:r}=o(`openhands`),{data:i,isLoading:a}=f(),g=t??i?.agent_settings??null,{mutate:S,isPending:le}=p(),{data:C}=ne(i?.agent_settings_schema),w=T.useMemo(()=>C?.sections.flatMap(e=>e.fields),[C]),D=_e(w),O=T.useMemo(()=>ve(g?.[pe],D),[D,g]),[k,fe]=(0,T.useState)(O),M=w?.find(e=>e.key===me),F=T.useMemo(()=>{if(!M)return``;let e=g?.[me];return ae(M,e)},[M,g]),[I,xe]=(0,T.useState)(F),[L,R]=(0,T.useState)(`openhands`),[z,B]=(0,T.useState)(``),[V,H]=(0,T.useState)(``),[Se,U]=(0,T.useState)(!1),[Ce,W]=(0,T.useState)(!1),G=L===`acp`?P(z,v):null,K=ue(G&&G!==`custom`?G:null),we=(0,T.useRef)(null),q=(0,T.useRef)(null),J=(0,T.useRef)(``);(0,T.useEffect)(()=>{let e=t??i?.agent_settings??null;if(!e&&!i)return;let n=t??i;if(we.current!==n){if(we.current=n,e?.agent_kind===`acp`){R(`acp`);let t=e?.acp_server,n=typeof t==`string`?t:void 0,r=ee(n),i=ge(e?.acp_command),a=[...i.length>0?i:r?.default_command??[],...ge(e?.acp_args)],o=a.length>0?j(a):``;B(o),q.current=n??null,J.current=o;let s=e?.acp_model,c=typeof s==`string`?s.trim():``;H(c||y(n)||``),U(!!c&&(!r||!ye(r,c)))}else R(`openhands`),B(``),H(``),q.current=null,J.current=``,U(!1);W(!1)}},[i,t]),(0,T.useEffect)(()=>{fe(O)},[O]),(0,T.useEffect)(()=>{xe(F)},[F]);let Te=(0,T.useRef)(()=>({agent_kind:`openhands`,enable_sub_agents:!1})),Ee=(0,T.useCallback)(()=>Te.current(),[]),Y=(0,T.useRef)(K);Y.current=K;let De=(0,T.useCallback)(e=>Y.current.save(e),[]),Oe=(0,T.useCallback)(()=>Y.current.reset(),[]),ke=L===`acp`&&A(z).length===0,Ae=K.isDirty;if((0,T.useEffect)(()=>{!e||!n||n({agentType:L,isValid:!ke,buildAgentProfileFields:Ee,credentials:{isDirty:Ae,save:De,reset:Oe}})},[e,n,L,ke,Ae,Ee,De,Oe]),a)return null;let X=L===`acp`,Z=A(z),je=X&&Z.length===0,Q=P(z,v),$=ee(Q),Me=$?.available_models??[],Ne=Me.length>0,Pe=ye($,V),Fe=Se||!Pe?N:V,Ie=!!$&&Z.join(` `)===$.default_command.join(` `),Le=j(v[0]?.default_command??[])||he;Te.current=()=>be({isAcp:X,selectedPreset:Q,isDefaultProviderCommand:Ie,commandTokens:Z,acpModel:V,subAgentsEnabled:k,toolConcurrencyField:M,toolConcurrency:I});let Re=Ce||!X&&(k!==O||I!==F),ze=K.isDirty,Be=Re||ze,Ve=le||K.isSaving,He=async()=>{if(K.isDirty){if(!await K.save({silent:Re}))return;K.reset()}if(Re)if(X){let e=!!($&&Ie),t=q.current,n=z===J.current,i=!!t&&t!==`custom`&&!v.some(e=>e.key===t),a=X&&n&&i,o=_(a?t:$&&Ie?$.key:te,{command:e?[]:Z,model:V.trim()||void 0,allowUnknownServer:a});if(!o)return;S({agent_settings_diff:o},{onError:e=>{s(
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i,f as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{Ft as s,Mt as c,jt as l}from"./active-backend-context-BZDG15C0.js";import{t as u,z as d}from"./utils-DUD5ScdA.js";import{n as f}from"./use-settings-C6ZxpBDX.js";import{t as p}from"./use-save-settings-BahvC2Gw.js";import"./form-control-classes-CGXBLcn1.js";import{t as m}from"./brand-button-Blxv5nww.js";import{t as h}from"./settings-input-CWUEHHvS.js";import{c as g,i as _,n as v,o as y,s as ee,t as te}from"./acp-providers-CYy8qA2z.js";import{_ as ne,g as re,h as ie,m as ae,n as oe,o as se}from"./schema-field-C59lVZTA.js";import{t as b}from"./settings-dropdown-input-Ba1UN5Du.js";import{r as x}from"./typography-DB5HoCk0.js";import{t as ce}from"./settings-switch-Dk9hChx1.js";import{a as S,i as le,n as C,r as w,t as ue}from"./use-acp-credential-form-c8KXAa8A.js";var T=e(n(),1),E=r();function de({form:e,providerKey:t}){let{t:n}=o(`openhands`),{fields:r,values:i,setValue:a,secretExists:s,conflicts:c}=e,{status:l,isChecking:u}=C(t),f=g(t)??t;return r.length===0?null:(0,E.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,E.jsx)(x.Text,{className:`text-sm font-medium text-white`,children:n(d.SETTINGS$ACP_CREDENTIALS_TITLE)}),(0,E.jsx)(x.Text,{className:`text-xs text-[#717888]`,children:n(d.SETTINGS$ACP_CREDENTIALS_DESCRIPTION)})]}),(0,E.jsx)(le,{status:l,isChecking:u,providerName:f,testIdPrefix:`settings-acp-auth`}),(0,E.jsx)(`div`,{className:`flex flex-col gap-5`,children:r.map(e=>(0,E.jsx)(w,{field:e,value:i[e.name]??``,onChange:t=>a(e.name,t),alreadySet:s(e.name),testId:`settings-acp-secret-${e.name}`,showOptionalTag:!0},e.name))}),(0,E.jsx)(S,{conflicts:c})]})}var D=t(((e,t)=>{var n=[`||`,`&&`,`;;`,`|&`,`<(`,`<<<`,`>>`,`>&`,`<&`,`&`,`;`,`(`,`)`,`|`,`<`,`>`],r=/[\n\r\u2028\u2029]/,i=/[\s#!"$&'():;<=>@\\^`|]/g;t.exports=function(e){return e.map(function(e){if(e===``)return`''`;if(e&&typeof e==`object`){if(`op`in e&&e.op===`glob`){if(typeof e.pattern!=`string`)throw TypeError("glob token requires a string `pattern`");if(r.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(i,`\\$&`)}if(`op`in e&&typeof e.op==`string`){if(n.indexOf(e.op)<0)throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,`\\$&`)}if(`comment`in e&&typeof e.comment==`string`){if(r.test(e.comment))throw TypeError("`comment` must not contain line terminators");return`#`+e.comment}throw TypeError(`unrecognized object token shape`)}return/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,`$1\\$2`)}).join(` `)}})),O=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r[r.length]=i,t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function g(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function _(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var _=!1;return m.map(function(n){var i=n[0];if(!i||_)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return g(t,``,n)}for(m=0;m<i.length;m++){var v=i.charAt(m);if(p||=!a&&(v===`*`||v===`?`),o)d+=v,o=!1;else if(a)v===a?a=!1:a==c?d+=v:v===f?(m+=1,v=i.charAt(m),v===l||v===f||v===u?d+=v:d+=f+v):v===u?d+=h():d+=v;else if(v===l||v===c)a=v;else if(r.test(v))return{op:i};else if(s.test(v)){_=!0;var y={comment:e.slice(n.index+m+1)};return d.length?[d,y]:[y]}else v===f?o=!0:v===u?d+=h():d+=v}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}t.exports=function(e,t,n){var r=_(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e[e.length]=t,e;var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?(e[e.length]=n[0],e):(n.filter(Boolean).forEach(function(t){e[e.length]=m.test(t)?JSON.parse(t.split(d)[1]):t}),e)},[]):r}})),{quote:k}=e(t((e=>{e.quote=D(),e.parse=O()}))(),1);function A(e){let t=[],n=0,r=``,i=!1;for(;n<e.length;){let a=e[n];if(a===` `||a===` `||a===`
|
|
2
|
+
`||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var fe=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function j(e){return e.map(e=>fe.test(e)||e===``?k([e]):e).join(` `)}var M={hideTitle:!0},pe=`enable_sub_agents`,me=`tool_concurrency_limit`,he=`npx -y <package-name>`,N=`__custom_model__`;function ge(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function P(e,t){let n=A(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return te}function _e(e){return e?.find(e=>e.key===pe)}function ve(e,t){return typeof e==`boolean`?e:t?.default===!0}function ye(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function be(e){let{isAcp:t,selectedPreset:n,isDefaultProviderCommand:r,commandTokens:i,acpModel:a,subAgentsEnabled:o,toolConcurrencyField:s,toolConcurrency:c}=e;if(t){let e=r&&n!==`custom`;return{agent_kind:`acp`,acp_server:n,acp_model:a.trim()||null,acp_command:e?null:j(i)||null,acp_args:null}}let l={agent_kind:`openhands`,enable_sub_agents:o};if(s){let e=se(s,c),t=typeof s.default==`number`?s.default:1;l.tool_concurrency_limit=e==null?t:Number(e)}return l}function F({embedded:e=!1,agentSettingsOverride:t=null,onSaveControlChange:n}={}){let{t:r}=o(`openhands`),{data:i,isLoading:a}=f(),g=t??i?.agent_settings??null,{mutate:S,isPending:le}=p(),{data:C}=ne(i?.agent_settings_schema),w=T.useMemo(()=>C?.sections.flatMap(e=>e.fields),[C]),D=_e(w),O=T.useMemo(()=>ve(g?.[pe],D),[D,g]),[k,fe]=(0,T.useState)(O),M=w?.find(e=>e.key===me),F=T.useMemo(()=>{if(!M)return``;let e=g?.[me];return ae(M,e)},[M,g]),[I,xe]=(0,T.useState)(F),[L,R]=(0,T.useState)(`openhands`),[z,B]=(0,T.useState)(``),[V,H]=(0,T.useState)(``),[Se,U]=(0,T.useState)(!1),[Ce,W]=(0,T.useState)(!1),G=L===`acp`?P(z,v):null,K=ue(G&&G!==`custom`?G:null),we=(0,T.useRef)(null),q=(0,T.useRef)(null),J=(0,T.useRef)(``);(0,T.useEffect)(()=>{let e=t??i?.agent_settings??null;if(!e&&!i)return;let n=t??i;if(we.current!==n){if(we.current=n,e?.agent_kind===`acp`){R(`acp`);let t=e?.acp_server,n=typeof t==`string`?t:void 0,r=ee(n),i=ge(e?.acp_command),a=[...i.length>0?i:r?.default_command??[],...ge(e?.acp_args)],o=a.length>0?j(a):``;B(o),q.current=n??null,J.current=o;let s=e?.acp_model,c=typeof s==`string`?s.trim():``;H(c||y(n)||``),U(!!c&&(!r||!ye(r,c)))}else R(`openhands`),B(``),H(``),q.current=null,J.current=``,U(!1);W(!1)}},[i,t]),(0,T.useEffect)(()=>{fe(O)},[O]),(0,T.useEffect)(()=>{xe(F)},[F]);let Te=(0,T.useRef)(()=>({agent_kind:`openhands`,enable_sub_agents:!1})),Ee=(0,T.useCallback)(()=>Te.current(),[]),Y=(0,T.useRef)(K);Y.current=K;let De=(0,T.useCallback)(e=>Y.current.save(e),[]),Oe=(0,T.useCallback)(()=>Y.current.reset(),[]),ke=L===`acp`&&A(z).length===0,Ae=K.isDirty;if((0,T.useEffect)(()=>{!e||!n||n({agentType:L,isValid:!ke,buildAgentProfileFields:Ee,credentials:{isDirty:Ae,save:De,reset:Oe}})},[e,n,L,ke,Ae,Ee,De,Oe]),a)return null;let X=L===`acp`,Z=A(z),je=X&&Z.length===0,Q=P(z,v),$=ee(Q),Me=$?.available_models??[],Ne=Me.length>0,Pe=ye($,V),Fe=Se||!Pe?N:V,Ie=!!$&&Z.join(` `)===$.default_command.join(` `),Le=j(v[0]?.default_command??[])||he;Te.current=()=>be({isAcp:X,selectedPreset:Q,isDefaultProviderCommand:Ie,commandTokens:Z,acpModel:V,subAgentsEnabled:k,toolConcurrencyField:M,toolConcurrency:I});let Re=Ce||!X&&(k!==O||I!==F),ze=K.isDirty,Be=Re||ze,Ve=le||K.isSaving,He=async()=>{if(K.isDirty){if(!await K.save({silent:Re}))return;K.reset()}if(Re)if(X){let e=!!($&&Ie),t=q.current,n=z===J.current,i=!!t&&t!==`custom`&&!v.some(e=>e.key===t),a=X&&n&&i,o=_(a?t:$&&Ie?$.key:te,{command:e?[]:Z,model:V.trim()||void 0,allowUnknownServer:a});if(!o)return;S({agent_settings_diff:o},{onError:e=>{l(s(e)||r(d.ERROR$GENERIC))},onSuccess:()=>{c(r(d.SETTINGS$SAVED)),W(!1)}})}else{let e={agent_kind:`openhands`,enable_sub_agents:k};if(M){let t;try{t=se(M,I)}catch(e){l(e instanceof Error?e.message:r(d.ERROR$GENERIC));return}t!=null&&(e[me]=t)}S({agent_settings_diff:e},{onError:e=>{l(s(e)||r(d.ERROR$GENERIC))},onSuccess:()=>{c(r(d.SETTINGS$SAVED)),W(!1)}})}},Ue=D?re(r,D.key,D.label):r(d.SCHEMA$ENABLE_SUB_AGENTS$LABEL),We=D?ie(r,D.key,D.description):r(d.SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION);return(0,E.jsxs)(`div`,{"data-testid":`agent-settings-screen`,className:`flex flex-col gap-6 pb-8 max-w-2xl`,children:[!e&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(x.H2,{className:`mb-2`,children:r(d.SETTINGS$NAV_AGENT)}),(0,E.jsx)(x.Paragraph,{className:`text-sm text-[#A3A3A3]`,children:r(d.SETTINGS$AGENT_PAGE_DESCRIPTION)})]}),(0,E.jsx)(b,{testId:`agent-type-selector`,name:`agent-type`,label:r(d.SETTINGS$NAV_AGENT),items:[{key:`openhands`,label:r(d.SETTINGS$AGENT_TYPE_OPENHANDS)},{key:`acp`,label:r(d.SETTINGS$AGENT_TYPE_ACP)}],selectedKey:L,onSelectionChange:e=>{if(!e)return;let t=e;if(R(t),t===`acp`&&!z){let e=v[0];e&&(B(j(e.default_command)),H(y(e.key)??``),U(!1))}else t===`openhands`&&U(!1);W(!0)}}),!X&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,E.jsx)(ce,{testId:`agent-settings-enable-sub-agents`,isToggled:k,onToggle:e=>{fe(e)},children:Ue}),We?(0,E.jsx)(x.Paragraph,{className:u(`pl-12`,`text-tertiary-alt text-xs leading-5`),children:We}):null]}),!X&&M?(0,E.jsx)(oe,{field:M,value:I,isDisabled:Ve,onChange:xe}):null,X&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(b,{testId:`agent-preset-selector`,name:`agent-preset`,label:r(d.SETTINGS$AGENT_PRESET),items:[...v.map(e=>({key:e.key,label:e.display_name})),{key:`custom`,label:r(d.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Q,onSelectionChange:e=>{if(!e)return;let t=String(e),n=ee(t);n?(B(j(n.default_command)),H(y(t)??``),U(!1)):t===`custom`&&(B(``),H(``),U(!0)),W(!0)}}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,E.jsx)(x.Text,{className:`text-sm`,children:r(d.SETTINGS$AGENT_COMMAND)}),(0,E.jsx)(`textarea`,{"data-testid":`agent-command-input`,className:`bg-tertiary border border-[#717888] rounded-sm p-2 text-sm font-mono text-white placeholder:text-[#717888] min-h-[60px] resize-y focus:outline-none focus:border-white`,value:z,placeholder:Le,onChange:e=>{let t=e.target.value,n=P(z,v),r=P(t,v);r!==n&&(H(y(r)??``),U(!1)),B(t),W(!0)}}),(0,E.jsx)(x.Text,{className:`text-xs text-[#717888]`,children:r(d.SETTINGS$AGENT_COMMAND_HINT)})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[Ne&&(0,E.jsx)(b,{testId:`agent-model-selector`,name:`agent-model`,label:r(d.SETTINGS$AGENT_MODEL),items:[...Me.map(e=>({key:e.id,label:e.label})),{key:N,label:r(d.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Fe,onSelectionChange:e=>{if(!e)return;let t=String(e);t===N?(U(!0),H(``)):(U(!1),H(t)),W(!0)}}),Fe===N&&(0,E.jsx)(h,{testId:`agent-model-input`,label:r(Ne?d.SETTINGS$AGENT_CUSTOM_MODEL:d.SETTINGS$AGENT_MODEL),type:`text`,className:`w-full`,value:V,showOptionalTag:!0,onChange:e=>{H(e),W(!0)}}),(0,E.jsx)(x.Text,{className:`text-xs text-[#717888]`,children:r(d.SETTINGS$AGENT_MODEL_HINT)})]})]}),X&&Q!==`custom`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`hr`,{className:`border-[#3D4046]`}),(0,E.jsx)(de,{form:K,providerKey:Q})]}),!e&&(0,E.jsx)(`div`,{children:(0,E.jsx)(m,{testId:`agent-save-button`,type:`button`,variant:`primary`,isDisabled:Ve||!Be||je,onClick:He,children:r(Ve?d.SETTINGS$SAVING:d.SETTINGS$SAVE_CHANGES)})})]})}var I=i(function(){return(0,E.jsx)(a,{to:`/settings/agents`,replace:!0})});export{A as i,I as n,M as r,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./agent-settings-DfcSgkLD.js";export{e as default,t as handle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as i,z as a}from"./utils-DUD5ScdA.js";import{c as o}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js";import{n as s}from"./navigation-context-CQZwH_tC.js";import{t as c}from"./close-ScPlnwyq.js";import{r as l}from"./typography-DB5HoCk0.js";import{t as u}from"./vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js";var d=e(t(),1),f=n();function p({maintenanceStartTime:e,faultyModels:t,errorMessage:n,updatedAt:p}){let{t:m}=r(`openhands`),[h,g]=u(`alert_banner_dismissed_at`,null),{currentPath:_}=s(),v=e?(e=>new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,timeZoneName:`short`}))(e):null,y=!!e,b=t&&t.length>0,x=n&&n.trim().length>0,S=y||b||x,C=(0,d.useMemo)(()=>S?h!==p:!1,[h,p,S]),w=(0,d.useMemo)(()=>{if(!n)return null;let e=m(n);return e===n?n:e},[n,m]);return C?(0,f.jsxs)(`div`,{"data-testid":`alert-banner`,className:i(`bg-base border border-primary text-white p-4 rounded`,`flex flex-row items-center justify-between m-1`,_===`/`&&`mt-3 mr-3`),children:[(0,f.jsxs)(`div`,{className:`flex items-center`,children:[(0,f.jsx)(`div`,{className:`flex-shrink-0`,children:(0,f.jsx)(o,{className:`text-primary align-middle`})}),(0,f.jsx)(`div`,{className:`ml-3 flex flex-col gap-1`,children:(()=>{let e=[];return y&&v&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:m(a.MAINTENANCE$SCHEDULED_MESSAGE,{time:v})},`maintenance`)),b&&e.push((0,f.jsxs)(l.Paragraph,{className:`text-sm font-medium`,children:[m(a.ALERT$FAULTY_MODELS_MESSAGE),` `,t.join(`, `)]},`faulty-models`)),x&&w&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:w},`error-message`)),e})()})]}),(0,f.jsx)(`button`,{type:`button`,"data-testid":`dismiss-button`,onClick:()=>g(p),className:i(`bg-base rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`),children:(0,f.jsx)(c,{})})]}):null}export{p as AlertBanner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";function t(t){if(e.isAxiosError(t))return t.response?.data;if(t instanceof Error&&`response`in t)return t.response}function n(e,n){let r=t(e);if(r&&typeof r==`object`){let{message:e,detail:t}=r;if(typeof e==`string`&&e)return e;if(typeof t==`string`&&t)return t}return e instanceof Error&&e.message?e.message:n}export{n,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{Q as a,Y as o,dt as s,r as c}from"./active-backend-context-BZDG15C0.js";import{t as l,z as u}from"./utils-DUD5ScdA.js";import{n as d,o as f}from"./backend-form-modal-CbCemvHt.js";import{r as p,t as m}from"./modal-body-BdKfD3Hl.js";import{t as h}from"./brand-button-Blxv5nww.js";var g=e(t(),1),_=n();function v(){let{t:e}=r(`openhands`),{active:t,addBackend:n,updateBackend:v}=c(),y=window.location.origin,[b,x]=g.useState(!1),[S,C]=g.useState(`idle`),[w,T]=g.useState(null),E=g.useCallback(async r=>{x(!0),C(`idle`),T(null);try{await new i(a({host:r.host,sessionApiKey:r.apiKey,timeout:5e3})).getSettings(),C(`success`),s(t.backend)?n(r):v(t.backend.id,r),window.location.reload()}catch(t){if(C(`error`),o(t,401))T(e(u.AUTH$INVALID_KEY));else{let n=t instanceof Error?t.message:String(t);T(`${e(u.AUTH$CONNECTION_FAILED)}${n?`: ${n}`:``}`)}x(!1)}},[t.backend,n,v,e]);return(0,_.jsx)(`div`,{"data-testid":`api-key-entry-screen`,className:`flex min-h-screen items-center justify-center bg-base px-6`,children:(0,_.jsxs)(`div`,{className:l(`relative rounded-xl border border-[var(--oh-border)] bg-base-secondary`,p(`md`),m),children:[(0,_.jsx)(`div`,{className:`px-6 pt-6 pb-2 pr-12`,children:(0,_.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(u.BACKEND$ADD_TITLE)})}),(0,_.jsx)(`div`,{className:`px-6 pb-6 pt-2`,children:(0,_.jsx)(d,{mode:`add`,backend:{...t.backend,host:y,apiKey:``,name:``},onSubmitted:()=>{},testIdRoot:`api-key-entry`,hostReadOnly:!0,requireApiKey:!0,onSubmitOverride:E,renderActions:({canSubmit:t,testIdRoot:n})=>(0,_.jsxs)(_.Fragment,{children:[S!==`idle`&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,_.jsx)(f,{isConnected:S===`success`}),(0,_.jsx)(`span`,{"data-testid":`${n}-status`,className:S===`error`?`text-red-400`:`text-green-400`,children:S===`error`?w:e(u.ONBOARDING$BACKEND_STATUS_CONNECTED)})]}),(0,_.jsx)(h,{type:`submit`,variant:`secondary`,isDisabled:!t||b,testId:`${n}-submit`,className:`w-full text-center`,children:e(b?u.ONBOARDING$BACKEND_STATUS_CHECKING:u.BACKEND$CONNECT)})]})})})]})})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
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~
|
|
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~ox0jfsa0-cHFhpUBq.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{Bt as a,Ft as o,Mt as s,_ as ee,jt as c,n as l}from"./active-backend-context-BZDG15C0.js";import{z as u}from"./utils-DUD5ScdA.js";import{t as d}from"./settings-DcNPxz0v.js";import{n as f}from"./use-settings-C6ZxpBDX.js";import{t as p}from"./use-save-settings-BahvC2Gw.js";import{t as m}from"./brand-button-Blxv5nww.js";import{i as h,n as g,r as _,t as v}from"./color-themes-DTj5Ylbr.js";import{t as y}from"./navigation-link-Bxo3-4vo.js";import{t as b}from"./settings-input-CWUEHHvS.js";import{t as x}from"./use-llm-profiles-diZS4FiN.js";import{r as S}from"./format-model-name-BNPKVsIq.js";import{t as C}from"./settings-dropdown-input-Ba1UN5Du.js";import{n as w,t as T}from"./switch-skeleton-DwOoCqaL.js";import{t as E}from"./settings-switch-Dk9hChx1.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(u.SETTINGS$LANGUAGE),items:a.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;g(t),_(t)},[]);return(0,O.jsx)(C,{testId:`color-theme-input`,name:`color-theme-input`,label:e(u.SETTINGS$COLOR_THEME),items:v.map(e=>({key:e.key,label:e.label})),defaultSelectedKey:h(),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}=p(),{data:r,isLoading:h}=f(),g=l().backend.kind===`cloud`,{data:_,isLoading:v}=x(),[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||!_||_.profiles.some(t=>t.name===e)?e:null},[_,r?.title_llm_profile]),W=V===void 0?U:V,G=D.useMemo(()=>[{key:M,label:e(u.SETTINGS$TITLE_GENERATION_AUTOMATIC)},..._?.profiles.map(t=>({key:t.name,label:t.model?e(u.SETTINGS$TITLE_GENERATION_PROFILE_OPTION,{name:t.name,model:S(t.model)??t.model}):t.name}))??[]],[_?.profiles,e]),K=n=>{let r=n.get(`language-input`)?.toString(),i=a.find(({label:e})=>e===r)?.value||d.language,l=g?!0:n.get(`enable-analytics-switch`)?.toString()===`on`,f=n.get(`enable-sound-notifications-switch`)?.toString()===`on`,p=n.get(`git-user-name-input`)?.toString()||d.git_user_name,m=n.get(`git-user-email-input`)?.toString()||d.git_user_email;t({language:i,...!g&&{user_consents_to_analytics:l},enable_sound_notifications:f,git_user_name:p,git_user_email:m,title_llm_profile:W},{onSuccess:()=>{ee(l?`granted`:`denied`),s(e(u.SETTINGS$SAVED))},onError:t=>{c(o(t)||e(u.ERROR$GENERIC))},onSettled:()=>{T(!1),P(!1),I(!1),R(!1),B(!1),H(void 0)}})},q=e=>{let t=a.find(({label:t})=>t===e)?.label,n=a.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||h||v||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:g?void 0:`enable-analytics-switch`,defaultIsToggled:g?!0:r.user_consents_to_analytics??!0,isToggled:g?!0:void 0,isDisabled:g,onToggle:g?void 0:J,children:e(u.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(u.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(u.SETTINGS$CONVERSATION_TITLES)}),(0,O.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(u.SETTINGS$TITLE_GENERATION_DESCRIPTION)}),(0,O.jsx)(C,{testId:`title-llm-profile-input`,name:`title-llm-profile-input`,label:e(u.SETTINGS$TITLE_GENERATION_MODEL),items:G,selectedKey:W??M,onSelectionChange:e=>{let t=e?.toString();H(!t||t===M?null:t)}}),(0,O.jsx)(y,{to:`/settings/llm`,className:`mt-3 inline-block text-sm text-primary hover:underline`,children:e(u.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(u.SETTINGS$GIT_SETTINGS)}),(0,O.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(u.SETTINGS$GIT_SETTINGS_DESCRIPTION)}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,O.jsx)(b,{testId:`git-user-name-input`,name:`git-user-name-input`,type:`text`,label:e(u.SETTINGS$GIT_USERNAME),defaultValue:r.git_user_name||``,onChange:X,placeholder:e(u.SETTINGS$GIT_USERNAME_PLACEHOLDER),className:`w-full min-w-0`}),(0,O.jsx)(b,{testId:`git-user-email-input`,name:`git-user-email-input`,type:`email`,label:e(u.SETTINGS$GIT_EMAIL),defaultValue:r.git_user_email||``,onChange:Z,placeholder:e(u.SETTINGS$GIT_EMAIL_PLACEHOLDER),className:`w-full min-w-0`})]}),(0,O.jsx)(`div`,{className:`flex justify-start pt-4`,children:(0,O.jsxs)(m,{testId:`submit-button`,variant:`primary`,type:`submit`,isDisabled:n||Q,children:[!n&&e(u.SETTINGS$SAVE_CHANGES),n&&e(u.SETTINGS$SAVING)]})})]})]})]})}var P=r(N);export{P as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,H as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{M as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as l}from"./useQuery-Bs5NFz2s.js";import{J as u,Mt as d,Q as f,jt as p,n as m,st as h,tt as g}from"./active-backend-context-BZDG15C0.js";import{i as _,t as v,z as y}from"./utils-DUD5ScdA.js";import{t as b}from"./zap-DRa-r-Tf.js";import{t as x}from"./proxy-DYDXxtje.js";import{m as S,n as C,t as w}from"./use-tracking-Bhu7gk2y.js";import{t as T}from"./use-settings-C6ZxpBDX.js";import{r as E}from"./modal-classes-D5_b5vMi.js";import{t as D}from"./brand-button-Blxv5nww.js";import{n as O}from"./navigation-context-CQZwH_tC.js";import{n as ee}from"./use-create-conversation-DVrA_uLD.js";import{t as k}from"./u-edit-DAkcF52u.js";import{t as A}from"./terminal-BUpID2wS.js";import{t as j}from"./use-user-conversation-BkNXpXrd.js";import{t as M}from"./toggle-switch-B2MLKsgt.js";import{t as N}from"./x-mark-BopmFoBq.js";import{n as P,t as F}from"./link-external-BNZzCM1I.js";import{n as I,r as te,t as ne}from"./use-has-permission-CQ31Cl8j.js";import{t as L}from"./automation-C_eCrGyP.js";import{a as R,c as re,d as ie,i as ae,l as oe,m as z,n as B,p as se,r as V}from"./kebab-menu-item-content-DERMdnDv.js";import{n as H}from"./api-error-message-BEIE_yD1.js";import{i as ce,n as le,r as ue,t as de}from"./format-relative-time-ZhQD4rsl.js";import{a as fe,i as pe,o as me,r as he,s as ge,t as _e}from"./automation-export-n0X6FB0C.js";import{n as ve,r as ye,t as be}from"./backend-not-configured-DP8KLNq_.js";import{a as U,i as xe,n as W,r as G,t as Se}from"./cog-CZiR80uT.js";var K=e(t()),q=n(),J=e=>(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3`})});function Ce({active:e}){let{t}=o(`openhands`);return(0,q.jsx)(`span`,{"data-testid":e?`active-status-badge-active`:`active-status-badge-inactive`,className:v(`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium`,e?`bg-[var(--oh-success)]/15 text-[var(--oh-success)]`:`bg-surface-raised text-muted`),children:t(e?y.AUTOMATIONS$DETAIL$ACTIVE:y.AUTOMATIONS$DETAIL$INACTIVE)})}function we({automation:e,onToggle:t,onEdit:n,onDelete:r,onExport:i,onDownloadTarball:a,onRunNow:s,isRunningNow:c=!1}){let{t:l}=o(`openhands`),u=ne(`manage_automations`),d=[...n?[{label:l(y.AUTOMATIONS$EDIT),icon:(0,q.jsx)(k,{className:`size-4`}),onClick:n}]:[],{label:e.enabled?l(y.AUTOMATIONS$TURN_OFF):l(y.AUTOMATIONS$TURN_ON),icon:(0,q.jsx)(B,{className:`size-4`}),onClick:t},{label:l(y.AUTOMATIONS$EXPORT),icon:(0,q.jsx)(J,{className:`size-4`}),onClick:i},{label:l(y.AUTOMATIONS$DOWNLOAD_TARBALL),icon:(0,q.jsx)(J,{className:`size-4`}),onClick:a},{label:l(y.AUTOMATIONS$DELETE),icon:(0,q.jsx)(fe,{className:`size-4`}),onClick:r}];return(0,q.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:e.name}),(0,q.jsx)(Ce,{active:e.enabled})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&s&&(0,q.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 rounded-md border border-[var(--oh-border)] px-3 py-1.5 text-sm font-medium text-content transition-colors hover:bg-surface-raised disabled:cursor-not-allowed disabled:opacity-60`,disabled:c||!e.enabled,onClick:s,children:[(0,q.jsx)(V,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),l(c?y.AUTOMATIONS$STARTING:y.AUTOMATIONS$RUN_NOW)]}),u&&(0,q.jsx)(M,{enabled:e.enabled,label:e.enabled?l(y.AUTOMATIONS$TURN_OFF):l(y.AUTOMATIONS$TURN_ON),onToggle:t}),u&&(0,q.jsx)(ge,{items:d})]})]})})}var Te=240,Ee=`max-h-60`;function De({prompt:e}){let{t}=o(`openhands`),[n,r]=K.useState(!1),[i,a]=K.useState(!1),s=K.useRef(null),c=i&&!n;return K.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=()=>{a(e.scrollHeight>Te)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e]),(0,q.jsx)(G,{icon:(0,q.jsx)(A,{className:`size-4`}),title:t(y.AUTOMATIONS$DETAIL$PROMPT),children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,q.jsxs)(`div`,{className:`relative`,children:[(0,q.jsx)(`p`,{ref:s,className:v(`whitespace-pre-wrap text-sm leading-6 text-content`,c&&v(Ee,`overflow-hidden`)),"data-testid":`automation-prompt-content`,children:e}),c?(0,q.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-[var(--oh-surface)] to-transparent`,"aria-hidden":!0,"data-testid":`automation-prompt-fade`}):null]}),i?(0,q.jsx)(`button`,{type:`button`,className:`self-start cursor-pointer text-sm font-normal text-[var(--oh-muted)] hover:text-white`,onClick:()=>r(e=>!e),"data-testid":`automation-prompt-toggle`,children:t(n?y.COMMON$VIEW_LESS:y.COMMON$VIEW_MORE)}):null]})})}var Y=e=>(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5`})}),Oe=e=>(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0`})});function ke({branch:e}){return(0,q.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-surface-raised px-2.5 py-0.5 text-xs text-muted`,children:e})}var X=60;function Ae({filter:e}){let{t}=o(`openhands`),[n,r]=(0,K.useState)(!1),i=e.length>X;return(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`font-mono break-all`,children:i&&!n?`${e.slice(0,X)}…`:e}),i&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>r(!n),"aria-expanded":n,className:`text-xs text-muted hover:text-content self-start`,children:t(n?y.SETTINGS$SKILLS_SHOW_LESS:y.SETTINGS$SKILLS_SHOW_MORE)})]})}function je({automation:e}){let{t}=o(`openhands`),n=e.trigger.type===`event`,r=e.trigger.schedule??``;e.trigger.schedule_human&&(r=e.timezone?`${e.trigger.schedule_human} (${e.timezone})`:e.trigger.schedule_human);let i=t(n?y.AUTOMATIONS$DETAIL$TRIGGER_EVENT:y.AUTOMATIONS$DETAIL$TRIGGER_SCHEDULE);return(0,q.jsx)(G,{icon:(0,q.jsx)(Se,{className:`size-4`}),title:t(y.AUTOMATIONS$DETAIL$CONFIGURATION),children:(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-5`,children:[e.repository&&(0,q.jsx)(W,{icon:(0,q.jsx)(xe,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$REPOSITORIES),children:(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[e.repository,e.branch&&(0,q.jsx)(ke,{branch:e.branch})]})}),(0,q.jsx)(W,{icon:(0,q.jsx)(ce,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$TRIGGER),children:i}),!n&&(0,q.jsx)(W,{icon:(0,q.jsx)(Y,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$SCHEDULE),children:r}),n&&e.trigger.source&&(0,q.jsx)(W,{icon:(0,q.jsx)(b,{className:`size-3.5`,"aria-hidden":`true`}),label:t(y.AUTOMATIONS$DETAIL$EVENT_SOURCE),children:e.trigger.source}),n&&e.trigger.on&&(0,q.jsx)(W,{icon:(0,q.jsx)(F,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$EVENT_TYPE),children:R(e.trigger.on)}),n&&e.trigger.filter&&(0,q.jsx)(W,{icon:(0,q.jsx)(P,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$EVENT_FILTER),children:(0,q.jsx)(Ae,{filter:e.trigger.filter})}),(0,q.jsx)(W,{icon:(0,q.jsx)(me,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$MODEL),children:e.model??t(y.COMMON$ACTIVE_PROFILE)}),e.notification&&(0,q.jsx)(W,{icon:(0,q.jsx)(Oe,{className:`size-3.5`}),label:t(y.AUTOMATIONS$DETAIL$NOTIFICATION),children:e.notification})]})})}var Me=e=>(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z`})});function Ne({name:e}){return(0,q.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-3.5 py-1.5 text-sm text-content`,children:e})}function Pe({plugins:e}){let{t}=o(`openhands`);return(0,q.jsx)(G,{icon:(0,q.jsx)(Me,{className:`size-4`}),title:t(y.AUTOMATIONS$DETAIL$PLUGINS),children:(0,q.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,q.jsx)(Ne,{name:e},e))})})}var Z=e=>(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182`})});function Fe({createdAt:e,lastRunAt:t}){let{t:n,i18n:r}=o(`openhands`),i=r.language;return(0,q.jsx)(G,{icon:(0,q.jsx)(Z,{className:`size-4`}),title:n(y.AUTOMATIONS$DETAIL$ACTIVITY),children:(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4`,children:[(0,q.jsx)(W,{icon:(0,q.jsx)(Y,{className:`size-3.5`}),label:n(y.AUTOMATIONS$DETAIL$CREATED),children:de(e,i)}),(0,q.jsx)(W,{icon:(0,q.jsx)(I,{className:`size-3.5`}),label:n(y.AUTOMATIONS$DETAIL$LAST_RUN),children:t?le(t,i,n):n(y.AUTOMATIONS$DETAIL$TIME_NEVER)})]})})}var Ie=100,Le=[`run_id`,`automation_id`,`automation_name`,`trigger`,`start_time`,`end_time`,`duration_seconds`,`status`,`conversation_id`,`conversation_url`,`error`,`cost`];function Re(e,t){return`${e.name.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||e.id}.activity-log.${t}`}function ze(e){return/[",\n\r]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e}function Be(e){let t=[Le.join(`,`)];for(let n of e){let e=Le.map(e=>{let t=n[e];return t==null?``:ze(e===`trigger`?JSON.stringify(t):String(t))});t.push(e.join(`,`))}return`${t.join(`
|
|
2
|
+
`)}\n`}function Ve(e,t){if(!e)return null;let n=`/conversations/${e}`;return t?`${t.replace(/\/$/,``)}${n}`:n}function He(e,t,n){let r=e.started_at||null,i=e.completed_at,a=null;return r&&i&&(a=(new Date(i).getTime()-new Date(r).getTime())/1e3),{run_id:e.id,automation_id:t.id,automation_name:t.name,trigger:t.trigger,start_time:r,end_time:i,duration_seconds:a,status:e.status,conversation_id:e.conversation_id,conversation_url:Ve(e.conversation_id,n),error:e.error_detail,cost:e.cost??null}}async function Ue(e,t){let n=[],r=0,i=1/0;for(;r<i;){let a=await C.listAutomationRuns(e.id,{limit:Ie,offset:r});for(let r of a.runs)n.push(He(r,e,t));if(i=a.total,r+=a.runs.length,a.runs.length===0)break}return n}async function We(e){let{automation:t,format:n,conversationBaseUrl:r}=e,i=await Ue(t,r);if(n===`json`){_(new Blob([`${JSON.stringify({runs:i,total:i.length},null,2)}\n`],{type:`application/json`}),Re(t,`json`));return}_(new Blob([Be(i)],{type:`text/csv;charset=utf-8`}),Re(t,`csv`))}var Ge=20;function Ke(e){return e.kind===`BashOutput`}var qe=class e{static async listOutputs(t,n,r){let i=[],a;for(let o=0;o<Ge;o+=1){let o=await e.searchEvents(t,n,{kind__eq:`BashOutput`,command_id__eq:r,sort_order:`TIMESTAMP`,...a?{page_id:a}:{}});if(o.items.forEach(e=>{Ke(e)&&i.push(e)}),!o.next_page_id)break;a=o.next_page_id}return i}static async searchEvents(e,t,n){let r=h().backend;if(r.kind===`cloud`){if(!e)throw Error(`BashService.listOutputs requires a conversation URL on cloud backends`);let i=new URLSearchParams;return Object.entries(n).forEach(([e,t])=>{t!=null&&i.set(e,String(t))}),x({backend:r,method:`GET`,hostOverride:g(e),path:`/api/bash/bash_events/search?${i.toString()}`,authMode:`session-api-key`,sessionApiKey:t})}return new c(f({...e?{conversationUrl:e}:{},sessionApiKey:t})).searchEvents(n)}},Je=[`bash-command-logs`];function Ye(e){switch(e){case`MISSING`:return`missing`;case`PAUSED`:return`paused`;case`STARTING`:return`starting`;case`ERROR`:return`errored`;case`RUNNING`:case null:case void 0:default:return null}}function Xe(e){let t=s.isAxiosError(e)?e.response?.status:u(e)?e.status:void 0;if(t!==void 0)return t===404||t>=500?`unreachable`:null;if(s.isAxiosError(e)||e instanceof TypeError)return`unreachable`;if(e instanceof Error){let t=e.cause instanceof Error?e.cause.name:null;if(e.name===`AbortError`||e.name===`TimeoutError`||t===`AbortError`||t===`TimeoutError`)return`unreachable`}return null}function Ze(e){let{conversationId:t,bashCommandId:n,enabled:r=!0}=e,i=m(),a=j(r?t??null:null),o=a.data,s=o?.conversation_url??null,c=o?.session_api_key??null,u=i.backend.kind===`cloud`,d=a.isFetched,f=null,p=!1;u&&d&&(o?f=Ye(o.sandbox_status)??(o.conversation_url?null:`missing`):p=!0);let h=r&&!!n&&(u?!!s:!0)&&!f&&!p,g=l({queryKey:[...Je,n,s,c,i.backend.id,i.orgId],queryFn:()=>qe.listOutputs(s,c,n),enabled:h,staleTime:60*1e3,gcTime:300*1e3,retry:!1}),_=u?Xe(g.error):null,v=f??_;return{data:g.data,error:_?null:g.error,isFetching:g.isFetching,isPending:g.isPending,isResolvingConversation:u&&a.isPending,conversationMissing:p,sandboxIssue:v}}var Qe=4e3;function $e(e,t){return e.length<=t?e:`…(truncated)…\n${e.slice(e.length-t)}`}function et({automationName:e,automationPrompt:t,errorDetail:n,stderr:r,runId:i}){let a=r?.trim()||n?.trim()||``,o=a?$e(a,Qe):`No error output was captured for this run.`,s=e?.trim(),c=[`${s?`The scheduled automation "${s}" failed during a run.`:`A scheduled automation failed during a run.`} Please investigate the error and fix the root cause.`],l=t?.trim();return l&&c.push(``,`What the automation was set up to do:`,l),c.push(``,`Error output from the failed run (run ${i}):`,o,``,`Please diagnose why it failed and propose or implement a fix.`),c.join(`
|
|
3
|
+
`)}function tt({run:e,automation:t,stderr:n}){let{t:r}=o(`openhands`),{navigate:i}=O(),a=ee();return(0,q.jsx)(D,{testId:`debug-automation-button`,type:`button`,variant:`primary`,onClick:()=>{if(a.isPending)return;let r=et({automationName:t?.name,automationPrompt:t?.prompt,errorDetail:e.error_detail,stderr:n,runId:e.id});a.mutate({query:r},{onSuccess:e=>{i(`/conversations/${e.conversation_id}`)}})},isDisabled:a.isPending,"aria-busy":a.isPending,children:r(y.AUTOMATIONS$DETAIL$DEBUG_WITH_OPENHANDS)})}var nt={missing:y.AUTOMATIONS$DETAIL$LOGS_SANDBOX_MISSING,paused:y.AUTOMATIONS$DETAIL$LOGS_SANDBOX_PAUSED,starting:y.AUTOMATIONS$DETAIL$LOGS_SANDBOX_STARTING,errored:y.AUTOMATIONS$DETAIL$LOGS_SANDBOX_ERROR,unreachable:y.AUTOMATIONS$DETAIL$LOGS_SANDBOX_UNREACHABLE};function rt(e,t){return[...e].sort((e,t)=>{let n=e.timestamp.localeCompare(t.timestamp);return n===0?(e.order??0)-(t.order??0):n}).map(e=>e[t]??``).join(``)}function it({conversationId:e,bashCommandId:t,isOpen:n,onClose:r,run:i,automation:a}){let{t:s}=o(`openhands`),[c,l]=(0,K.useState)(`stdout`),{data:u,isFetching:d,isResolvingConversation:f,sandboxIssue:p,conversationMissing:m,error:h}=Ze({conversationId:e,bashCommandId:t,enabled:n});(0,K.useEffect)(()=>{n&&l(`stdout`)},[n,t]),(0,K.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,r]);let{stdout:g,stderr:_}=(0,K.useMemo)(()=>u?{stdout:rt(u,`stdout`),stderr:rt(u,`stderr`)}:{stdout:``,stderr:``},[u]);if(!n)return null;let b=f||d&&!u,x=!t,S=c===`stdout`?g:_,C=`border-b-2 px-3 py-2 text-sm font-normal transition-colors focus:outline-none`,w=`border-[var(--oh-primary)] text-white`,T=`border-transparent text-muted hover:text-content`;return(0,q.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,role:`dialog`,"aria-modal":`true`,"aria-label":s(y.AUTOMATIONS$DETAIL$LOGS_TITLE),children:[(0,q.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,q.jsxs)(`div`,{className:`relative flex max-h-[80vh] w-full max-w-3xl flex-col rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":s(y.AUTOMATIONS$CANCEL),children:(0,q.jsx)(N,{className:`size-5`})}),(0,q.jsx)(`h2`,{className:v(`pr-8`,E),children:s(y.AUTOMATIONS$DETAIL$LOGS_TITLE)}),(0,q.jsxs)(`div`,{role:`tablist`,"aria-label":s(y.AUTOMATIONS$DETAIL$LOGS_TITLE),className:`mt-4 flex gap-1 border-b border-[var(--oh-border)]`,children:[(0,q.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`stdout`,"aria-controls":`run-logs-panel-stdout`,id:`run-logs-tab-stdout`,tabIndex:c===`stdout`?0:-1,onClick:()=>l(`stdout`),className:`${C} ${c===`stdout`?w:T}`,children:s(y.AUTOMATIONS$DETAIL$LOGS_TAB_OUTPUT)}),(0,q.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`stderr`,"aria-controls":`run-logs-panel-stderr`,id:`run-logs-tab-stderr`,tabIndex:c===`stderr`?0:-1,onClick:()=>l(`stderr`),className:`${C} ${c===`stderr`?w:T}`,children:s(y.AUTOMATIONS$DETAIL$LOGS_TAB_ERROR)})]}),(0,q.jsxs)(`div`,{role:`tabpanel`,id:`run-logs-panel-${c}`,"aria-labelledby":`run-logs-tab-${c}`,className:`mt-3 min-h-[12rem] flex-1 overflow-auto rounded-lg border border-[var(--oh-border)] bg-black/40 p-4 font-mono text-xs`,children:[x&&(0,q.jsx)(`p`,{className:`text-muted italic`,children:s(y.AUTOMATIONS$DETAIL$LOGS_NO_COMMAND)}),!x&&m&&(0,q.jsx)(`p`,{className:`text-muted italic`,children:s(y.AUTOMATIONS$DETAIL$LOGS_CONVERSATION_MISSING)}),!x&&!m&&p&&(0,q.jsx)(`p`,{"data-testid":`run-logs-sandbox-issue-${p}`,className:`text-muted italic`,children:s(nt[p])}),!x&&!m&&!p&&b&&(0,q.jsx)(`p`,{className:`text-muted italic`,children:s(y.AUTOMATIONS$DETAIL$LOGS_LOADING)}),!x&&!m&&!p&&!b&&h&&!u&&(0,q.jsxs)(`p`,{className:`text-danger`,children:[s(y.AUTOMATIONS$DETAIL$LOGS_ERROR),`: `,String(h)]}),!b&&!p&&u&&(0,q.jsx)(`pre`,{"data-testid":`run-logs-output-${c}`,className:`whitespace-pre-wrap break-words ${c===`stderr`?`text-danger`:`text-content`}`,children:S.length>0?S:(0,q.jsx)(`span`,{className:`text-muted italic`,children:s(y.AUTOMATIONS$DETAIL$LOGS_EMPTY)})})]}),i?.status===L.FAILED&&(0,q.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,q.jsx)(tt,{run:i,automation:a,stderr:_})})]})]})}function at(e,t){return new Date(e).toLocaleDateString(t,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function ot(e){if(!e)return!0;let t=new Date(e).getTime();return Number.isNaN(t)||t===0}function st(e){return`/conversations/${e}`}function ct(e){return typeof e!=`number`||!Number.isFinite(e)?null:`$${e.toFixed(4)}`}function lt({run:e,automation:t}){let{t:n,i18n:r}=o(`openhands`),i=!!e.conversation_id,a=!!e.bash_command_id,s=e.status===L.COMPLETED||e.status===L.FAILED,c=!i&&s,[l,u]=(0,K.useState)(!1),[d]=(0,K.useState)(()=>new Date().toISOString()),f=at(ot(e.started_at)?d:e.started_at,r.language),p=ct(e.cost),m=a?(0,q.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),e.preventDefault(),u(!0)},className:`rounded-md p-1 text-muted hover:bg-surface-raised hover:text-foreground focus:bg-surface-raised focus:outline-none`,"aria-label":n(y.AUTOMATIONS$DETAIL$LOGS_VIEW,{timestamp:f}),title:n(y.AUTOMATIONS$DETAIL$LOGS_VIEW_SHORT),children:(0,q.jsx)(A,{className:`size-4`})}):null,h=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(`span`,{className:`text-sm text-content`,children:f}),c&&(0,q.jsx)(`span`,{className:`text-xs text-muted`,children:n(y.AUTOMATIONS$DETAIL$NO_CONVERSATION)})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p&&(0,q.jsx)(`span`,{"data-testid":`run-cost`,title:n(y.AUTOMATIONS$DETAIL$RUN_COST),className:`text-xs tabular-nums text-muted`,children:p}),m,(0,q.jsx)(ue,{status:e.status})]})]});return(0,q.jsxs)(q.Fragment,{children:[i&&e.conversation_id?(0,q.jsx)(`a`,{href:st(e.conversation_id),className:`flex items-center justify-between px-5 py-3 transition-colors cursor-pointer hover:bg-surface-raised focus:bg-surface-raised focus:outline-none`,"aria-label":`View conversation for run at ${f}`,children:h}):(0,q.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 cursor-default`,children:h}),a&&(0,q.jsx)(it,{conversationId:e.conversation_id,bashCommandId:e.bash_command_id,isOpen:l,onClose:()=>u(!1),run:e,automation:t})]})}var Q=20,ut=100;function dt({automation:e,highlightedRunId:t=null}){let{t:n}=o(`openhands`),r=m(),{trackAutomationActivityLogExported:i}=w(),[a,s]=(0,K.useState)(Q),c=(0,K.useRef)(null),[l,u]=(0,K.useState)(!1),{data:d,isLoading:f}=z({id:e.id,limit:a,offset:0}),h=d?d.total>d.runs.length:!1,g=!f&&(d?.total??0)>0&&!l,_=async t=>{if(g){u(!0);try{await We({automation:e,format:t,conversationBaseUrl:window.location.origin}),i({backendKind:r.backend.kind,format:t})}catch(e){p(H(e,n(y.AUTOMATIONS$DETAIL$EXPORT_ACTIVITY_LOG_ERROR)))}finally{u(!1)}}};return(0,K.useEffect)(()=>{if(!(!t||!d?.runs.length)){if(d.runs.findIndex(e=>e.id===t)<0){h&&a<ut&&s(e=>e+Q);return}c.current?.scrollIntoView({behavior:`smooth`,block:`center`})}},[d?.runs,h,t,a]),(0,q.jsxs)(`div`,{"data-testid":`automation-activity-log`,className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,q.jsx)(`span`,{className:`size-4 text-muted`,children:(0,q.jsx)(Z,{className:`size-4`})}),(0,q.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:n(y.AUTOMATIONS$DETAIL$ACTIVITY_LOG)}),(0,q.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,q.jsx)(`button`,{type:`button`,"data-testid":`activity-log-export-json`,disabled:!g,onClick:()=>void _(`json`),className:`text-sm text-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,children:n(y.AUTOMATIONS$DETAIL$EXPORT_JSON)}),(0,q.jsx)(`button`,{type:`button`,"data-testid":`activity-log-export-csv`,disabled:!g,onClick:()=>void _(`csv`),className:`text-sm text-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,children:n(y.AUTOMATIONS$DETAIL$EXPORT_CSV)})]})]}),f&&(0,q.jsx)(`div`,{className:`space-y-1 p-5`,children:Array.from({length:3}).map((e,t)=>(0,q.jsxs)(`div`,{className:`flex items-center justify-between py-3`,children:[(0,q.jsx)(`div`,{className:`h-5 w-64 animate-pulse rounded bg-surface-raised`}),(0,q.jsx)(`div`,{className:`h-6 w-24 animate-pulse rounded-full bg-surface-raised`})]},`skeleton-${t}`))}),!f&&d?.runs.length===0&&(0,q.jsx)(`p`,{className:`px-5 py-8 text-center text-sm text-muted`,children:n(y.AUTOMATIONS$DETAIL$NO_RUNS)}),!f&&d&&d.runs.length>0&&(0,q.jsxs)(`div`,{children:[d.runs.map((n,r)=>{let i=n.id===t;return(0,q.jsx)(`div`,{ref:i?c:void 0,"data-testid":i?`automation-run-highlight-${n.id}`:void 0,className:v(r>0?`border-t border-[var(--oh-border)]`:``,i&&`bg-[var(--oh-focus)]/10`),children:(0,q.jsx)(lt,{run:n,automation:e})},n.id)}),h&&(0,q.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-5 py-3`,children:(0,q.jsx)(`button`,{type:`button`,onClick:()=>s(e=>e+Q),className:`text-sm text-muted hover:text-foreground`,children:n(y.AUTOMATIONS$DETAIL$LOAD_MORE_RUNS)})})]})]})}function $({className:e}){return(0,q.jsx)(`div`,{className:v(`animate-pulse rounded bg-surface-raised`,e)})}function ft(){return(0,q.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`detail-skeleton`,children:[(0,q.jsx)($,{className:`h-5 w-40`}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)($,{className:`h-6 w-48`}),(0,q.jsx)($,{className:`h-6 w-16 rounded-full`})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)($,{className:`h-6 w-11 rounded-full`}),(0,q.jsx)($,{className:`h-8 w-8`})]})]}),(0,q.jsx)($,{className:`h-5 w-96`}),(0,q.jsx)($,{className:`h-36 w-full rounded-2xl`}),(0,q.jsx)($,{className:`h-72 w-full rounded-2xl`}),(0,q.jsx)($,{className:`h-32 w-full rounded-2xl`}),(0,q.jsx)($,{className:`h-40 w-full rounded-2xl`})]})}function pt(){let{t:e}=o(`openhands`);return(0,q.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,q.jsx)(ye,{className:`size-12 text-muted`}),(0,q.jsx)(`p`,{className:`mt-4 text-sm font-medium text-content`,children:e(y.AUTOMATIONS$DETAIL$NOT_FOUND_TITLE)}),(0,q.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:e(y.AUTOMATIONS$DETAIL$NOT_FOUND_MESSAGE)}),(0,q.jsx)(`div`,{className:`mt-6`,children:(0,q.jsx)(U,{})})]})}var mt=a(function(){let{t:e}=o(`openhands`),{automationId:t}=r(),[n]=i(),a=n.get(`run`),{navigate:s}=O(),[c,l]=(0,K.useState)(!1),[u,f]=(0,K.useState)(!1),{data:h,isLoading:g,refetch:v}=te(),b=h?.status===`ok`,x=m(),E=(0,K.useRef)(x.backend.id).current!==x.backend.id,{data:D,isLoading:ee,isError:k,error:A,refetch:j}=se({id:t??``,enabled:b&&!E}),{trackPrebuiltAutomationEnabled:M,trackAutomationExported:N}=w(),P=ie(),F=re(),I=oe(),ne=k&&T(A)===404;if(g)return(0,q.jsx)(`div`,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,q.jsx)(ft,{})})});if(!b)return(0,q.jsx)(`div`,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,q.jsx)(be,{onRetry:v})})});if(ee)return(0,q.jsx)(`div`,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,q.jsx)(ft,{})})});if(ne)return(0,q.jsx)(`div`,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,q.jsx)(pt,{})})});if(k||!D)return(0,q.jsx)(`div`,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,q.jsx)(ve,{onRetry:()=>j()})})});let L=()=>{let e=!D.enabled;P.mutate({id:D.id,enabled:e}),e&&M({automationId:D.id,automationName:D.name})},R=()=>{F.mutate(D.id,{onSuccess:()=>{s?.(S())}})},z=()=>{I.mutate(D.id,{onSuccess:()=>{d(e(y.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:t=>{p(H(t,e(y.AUTOMATIONS$RUN_NOW_ERROR)))}})},B=()=>{let e=`${JSON.stringify(he(D),null,2)}\n`;_(new Blob([e],{type:`application/json`}),_e(D)),N({backendKind:x.backend.kind})},V=x.backend.kind===`local`;return(0,q.jsx)(`div`,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,q.jsx)(U,{}),(0,q.jsx)(we,{automation:D,onToggle:L,onEdit:V?()=>f(!0):void 0,onDelete:()=>l(!0),onExport:B,onDownloadTarball:()=>C.downloadTarball(D.id,D.name),onRunNow:z,isRunningNow:I.isPending}),D.prompt&&(0,q.jsx)(De,{prompt:D.prompt}),(0,q.jsx)(je,{automation:D}),D.plugins&&D.plugins.length>0&&(0,q.jsx)(Pe,{plugins:D.plugins}),(0,q.jsx)(Fe,{createdAt:D.created_at,lastRunAt:D.last_triggered_at}),(0,q.jsx)(dt,{automation:D,highlightedRunId:a}),(0,q.jsx)(pe,{automationName:D.name,isOpen:c,onConfirm:R,onCancel:()=>l(!1)}),V&&(0,q.jsx)(ae,{automation:D,isOpen:u,onClose:()=>f(!1)})]})})})});export{mt as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
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{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as a,z as o}from"./utils-DUD5ScdA.js";import{b as s}from"./use-tracking-Bhu7gk2y.js";import{r as c}from"./modal-classes-D5_b5vMi.js";import{r as l}from"./dropdown-classes-tLhpwtxS.js";import{n as u,t as d}from"./context-menu-list-item-CdcamfM1.js";import{t as f}from"./x-mark-BopmFoBq.js";import{t as p}from"./kebab-menu-item-content-DERMdnDv.js";var m=e(n(),1),h=e(t()),g=r(),_=e=>(0,g.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,viewBox:`0 0 20 20`,...e,children:(0,g.jsx)(`path`,{d:`M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z`})}),v=a(`inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,l),y=a(`inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 text-xs text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,l);function b({items:e}){let{t}=i(`openhands`),[n,r]=(0,h.useState)(!1),[a,s]=(0,h.useState)(),c=(0,h.useRef)(null),l=(0,h.useRef)(null);(0,h.useLayoutEffect)(()=>{if(!n||!c.current)return;let e=()=>{let e=c.current?.getBoundingClientRect();e&&s({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[n]),(0,h.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;c.current?.contains(t)||l.current?.contains(t)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]);let f=n&&a?(0,g.jsx)(u,{ref:l,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,g.jsx)(`li`,{children:(0,g.jsx)(d,{onClick:t=>{t.stopPropagation(),e.onClick(),r(!1)},isDisabled:e.disabled,className:`group`,children:(0,g.jsx)(p,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{ref:c,type:`button`,onClick:e=>{e.stopPropagation(),r(e=>!e)},className:v,"aria-label":t(o.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":n,"aria-haspopup":`menu`,children:(0,g.jsx)(_,{className:`size-4`})}),n&&a&&typeof document<`u`?m.createPortal((0,g.jsx)(`div`,{style:a,children:f}),document.body):null]})}var x=e=>(0,g.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,g.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z`})}),S=e=>(0,g.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,g.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})});function C({automationName:e,isOpen:t,onConfirm:n,onCancel:r}){let{t:a}=i(`openhands`);return t?(0,g.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,g.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,g.jsxs)(`div`,{className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":a(o.BUTTON$CLOSE),children:(0,g.jsx)(f,{className:`size-5`})}),(0,g.jsx)(`h2`,{className:c,children:a(o.AUTOMATIONS$DELETE_CONFIRM_TITLE)}),(0,g.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:a(o.AUTOMATIONS$DELETE_CONFIRM_MESSAGE,{name:e})}),(0,g.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:a(o.AUTOMATIONS$CANCEL)}),(0,g.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:a(o.AUTOMATIONS$DELETE)})]})]})]}):null}var w=new Set([`cron`,`schedule`,`event`]),T=class extends Error{issues;constructor(e){super(e.join(`
|
|
2
|
+
`)),this.name=`AutomationFileValidationError`,this.issues=e}};function E(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function D(e,t,n,r){let i=e[t];if(typeof i!=`string`||i.trim().length===0){r.push(`${n}: expected a non-empty string`);return}return i}function O(e,t,n,r){let i=e[t];if(i!==void 0){if(typeof i!=`string`){r.push(`${n}: expected a string`);return}return i}}function k(e,t){if(!E(e)){t.push(`spec.trigger: expected an object`);return}let n=D(e,`type`,`spec.trigger.type`,t);n&&!w.has(n)&&t.push(`spec.trigger.type: expected one of "cron", "schedule", or "event"`);let r=O(e,`schedule`,`spec.trigger.schedule`,t),i=O(e,`schedule_human`,`spec.trigger.schedule_human`,t),a=O(e,`timezone`,`spec.trigger.timezone`,t),o=O(e,`source`,`spec.trigger.source`,t),s=O(e,`filter`,`spec.trigger.filter`,t),c;if(e.on!==void 0&&(typeof e.on==`string`||Array.isArray(e.on)&&e.on.length>0&&e.on.every(e=>typeof e==`string`&&e.trim().length>0)?c=e.on:t.push(`spec.trigger.on: expected a string or a non-empty array of strings`)),(n===`cron`||n===`schedule`)&&!r?.trim()&&t.push(`spec.trigger.schedule: required for a scheduled trigger`),n===`event`&&(o?.trim()||t.push(`spec.trigger.source: required for an event trigger`),(c===void 0||typeof c==`string`&&c.trim().length===0)&&t.push(`spec.trigger.on: required for an event trigger`)),!(!n||!w.has(n)))return{type:n,...r!==void 0&&{schedule:r},...i!==void 0&&{schedule_human:i},...a!==void 0&&{timezone:a},...o!==void 0&&{source:o},...c!==void 0&&{on:c},...s!==void 0&&{filter:s}}}function A(e){let t=e.timezone??e.trigger.timezone,n={name:e.name,trigger:{...e.trigger},enabled:e.enabled,prompt:e.prompt,...e.repository!==void 0&&{repository:e.repository},...e.model!==void 0&&{model:e.model},...e.timeout!=null&&{timeout:e.timeout},...e.branch!==void 0&&{branch:e.branch},...e.plugins!==void 0&&{plugins:[...e.plugins]},...e.notification!==void 0&&{notification:e.notification},...t!==void 0&&{timezone:t}},r=s();return{version:r.fileVersion,kind:r.fileKind,spec:n}}function j(e){return`${e.name.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||e.id}${s().filenameSuffix}`}function M(e){let t=[];if(!E(e))throw new T([`file: expected a JSON object`]);let n=s();if(e.version!==n.fileVersion&&t.push(`version: expected ${n.fileVersion}`),e.kind!==n.fileKind&&t.push(`kind: expected "${n.fileKind}"`),!E(e.spec))throw t.push(`spec: expected an object`),new T(t);let r=D(e.spec,`name`,`spec.name`,t),i=D(e.spec,`prompt`,`spec.prompt`,t),a=k(e.spec.trigger,t),o=e.spec.enabled;typeof o!=`boolean`&&t.push(`spec.enabled: expected a boolean`);let c=O(e.spec,`repository`,`spec.repository`,t),l=O(e.spec,`branch`,`spec.branch`,t),u=O(e.spec,`notification`,`spec.notification`,t),d=O(e.spec,`timezone`,`spec.timezone`,t),f;e.spec.model===null||e.spec.model===void 0||typeof e.spec.model==`string`&&e.spec.model.trim().length>0?f=e.spec.model:t.push(`spec.model: expected a non-empty string or null`);let p;e.spec.timeout===null||e.spec.timeout===void 0||typeof e.spec.timeout==`number`&&Number.isInteger(e.spec.timeout)&&e.spec.timeout>0?p=e.spec.timeout:t.push(`spec.timeout: expected a positive integer`);let m;if(e.spec.plugins!==void 0&&(Array.isArray(e.spec.plugins)&&e.spec.plugins.every(e=>typeof e==`string`&&e.trim().length>0)?m=[...e.spec.plugins]:t.push(`spec.plugins: expected an array of non-empty strings`)),t.length>0||!r||!i||!a)throw new T(t);return{name:r,prompt:i,trigger:a,enabled:o,...c!==void 0&&{repository:c},...f!==void 0&&{model:f},...p!==void 0&&{timeout:p},...l!==void 0&&{branch:l},...m!==void 0&&{plugins:m},...u!==void 0&&{notification:u},...d!==void 0&&{timezone:d}}}export{S as a,v as c,C as i,y as l,M as n,x as o,A as r,b as s,j as t};
|