@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{v as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as a}from"./useMutation-6ZsQCqAn.js";import{t as o}from"./useQuery-Bs5NFz2s.js";import{$ as s,Nt as c,Q as l,U as u,V as d,Wt as f,b as p,jt as m,nt as h,qt as g,st as _,tt as v}from"./active-backend-context-BZDG15C0.js";import{C as y,T as b,b as ee,t as x,z as S}from"./utils-DUD5ScdA.js";import{c as C,i as w,n as T,r as te,s as E}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js";import{a as D}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js";import{t as O}from"./proxy-DYDXxtje.js";import{n as ne}from"./navigation-context-CQZwH_tC.js";import{_t as k,ct as A,dt as j,ft as M,gt as re,ht as N,lt as P,mt as F,ot as ie,pt as I,st as ae,ut as oe,vt as se}from"./vendor-markdown-j0kYzV48.js";import{c as ce,f as L,o as le,t as R,u as ue}from"./conversation-store-Blc5xysY.js";import{C as de,E as fe,S as pe,a as z,g as me,h as he,l as B,o as V,s as H,t as U,u as ge,y as _e}from"./agent-server-conversation-service.api-DK56YPTs.js";import{_ as ve,a as ye,l as be,r as xe,t as Se}from"./conversation-state-store-DMLtlHbE.js";import{t as Ce}from"./use-user-conversation-BkNXpXrd.js";import{t as we}from"./copy-to-clipboard-button-BGxcUbgy.js";import"./syntax-highlighter-BGDg_7w9.js";var W=e(t(),1);function Te(){let{conversationId:e}=ne();return{conversationId:e}}function Ee(){let{conversationId:e}=Te();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}var De=()=>{let{conversationId:e}=Te(),t=!!e&&e.startsWith(`task-`),n=Ce(!e||t?null:e,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`||!t.title&&ee(t.execution_status))?3e3:3e4});return(0,W.useEffect)(()=>{let e=n.data;ye.setCurrentConversation(e||null)},[e,n.isFetched,n?.data?.execution_status]),n};function Oe(e){if(!e)return b.LOADING;switch(e){case y.IDLE:return b.AWAITING_USER_INPUT;case y.RUNNING:return b.RUNNING;case y.PAUSED:return b.PAUSED;case y.WAITING_FOR_CONFIRMATION:return b.AWAITING_USER_CONFIRMATION;case y.FINISHED:return b.FINISHED;case y.ERROR:return b.ERROR;case y.STUCK:return b.ERROR;default:return b.LOADING}}function ke(){let e=Se(e=>e.execution_status),t=De().data?.execution_status??null,n=e??t;return{curAgentState:(0,W.useMemo)(()=>Oe(n),[n]),executionStatus:n}}var Ae=`auth`,je=`session_api_key`;function Me(e,t){t&&e.send(JSON.stringify({type:Ae,[je]:t}))}var Ne=(e,t)=>{let[n,r]=W.useState(!1),[i,a]=W.useState(null),[o,s]=W.useState(null),[c,l]=W.useState(!1),u=W.useRef(null),d=W.useRef(0),f=W.useRef(null),p=W.useRef(!0),m=W.useRef(new WeakSet),h=W.useRef(t);W.useEffect(()=>{h.current=t},[t]);let g=W.useCallback(()=>{let t=e;if(h.current?.queryParams){let n=Object.entries(h.current.queryParams).reduce((e,[t,n])=>(e[t]=String(n),e),{});t=`${e}?${new URLSearchParams(n).toString()}`}let n=new WebSocket(t);u.current=n,m.current.add(n),n.onopen=e=>{Me(n,h.current?.sessionApiKey),r(!0),s(null),l(!1),d.current=0,h.current?.onOpen?.(e)},n.onmessage=e=>{a(e.data),h.current?.onMessage?.(e)},n.onclose=e=>{let t=m.current.has(n);r(!1),e.code!==1e3&&(s(Error(`WebSocket closed with code ${e.code}: ${e.reason||`Connection closed unexpectedly`}`)),t&&h.current?.onError?.(e)),h.current?.onClose?.(e);let i=h.current?.reconnect?.enabled??!1,a=h.current?.reconnect?.maxAttempts??1/0;i&&t&&p.current&&d.current<a?(l(!0),d.current+=1,f.current=setTimeout(()=>{g()},3e3)):l(!1)},n.onerror=e=>{r(!1),h.current?.onError?.(e)}},[e]);W.useEffect(()=>(p.current=!0,d.current=0,e&&e.trim()!==``&&g(),()=>{if(p.current=!1,f.current&&=(clearTimeout(f.current),null),u.current){let{readyState:e}=u.current;m.current.delete(u.current),(e===WebSocket.CONNECTING||e===WebSocket.OPEN)&&u.current.close(),u.current=null}}),[e,g]);let _=W.useCallback(e=>{u.current?.readyState===WebSocket.OPEN&&u.current.send(e)},[]),v=W.useCallback(()=>{p.current=!1,l(!1),f.current&&=(clearTimeout(f.current),null),u.current&&(m.current.delete(u.current),u.current.close())},[]),y=W.useCallback(()=>{if(p.current=!0,d.current=0,l(!0),s(null),f.current&&=(clearTimeout(f.current),null),u.current){let e=u.current;m.current.delete(e),u.current=null,(e.readyState===WebSocket.CONNECTING||e.readyState===WebSocket.OPEN)&&e.close()}g()},[g]);return{isConnected:n,lastMessage:i,error:o,socket:u.current,sendMessage:_,isReconnecting:c,attemptCount:d.current,disconnect:v,reconnect:y}},Pe=`Unable to connect to server`;function Fe(e){return typeof e==`object`&&!!e&&`id`in e&&`timestamp`in e&&`source`in e&&typeof e.id==`string`&&e.id.length>0&&typeof e.timestamp==`string`&&e.timestamp.length>0&&typeof e.source==`string`&&(e.source===`agent`||e.source===`user`||e.source===`environment`||e.source===`hook`)}var G=e=>e.source===`environment`&&`action_id`in e&&`observation`in e&&e.observation!==null&&typeof e.observation==`object`&&`kind`in e.observation,Ie=e=>e.source===`agent`&&`tool_name`in e&&`tool_call_id`in e&&`error`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`&&typeof e.error==`string`,K=e=>`llm_message`in e&&typeof e.llm_message==`object`&&e.llm_message!==null&&`role`in e.llm_message&&`content`in e.llm_message,Le=e=>K(e)&&e.llm_message.role===`user`,q=e=>e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&`tool_name`in e&&`tool_call_id`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`,Re=e=>q(e)&&(e.action.kind===`ExecuteBashAction`||e.action.kind===`TerminalAction`),ze=e=>G(e)&&(e.observation.kind===`ExecuteBashObservation`||e.observation.kind===`TerminalObservation`),Be=e=>G(e)&&e.observation.kind===`PlanningFileEditorObservation`,Ve=e=>G(e)&&e.observation.kind===`BrowserObservation`,He=e=>G(e)&&e.observation.kind===`SwitchLLMObservation`,Ue=e=>q(e)&&e.action.kind===`BrowserNavigateAction`,We=e=>q(e)&&(e.tool_name===`canvas_ui`||e.tool_name===`canvas_ui_control`),Ge=e=>q(e)&&e.tool_name===`launch_child_conversation`,Ke=e=>e.source===`agent`&&`system_prompt`in e&&`tools`in e&&typeof e.system_prompt==`object`&&Array.isArray(e.tools),qe=e=>`kind`in e&&e.kind===`ConversationStateUpdateEvent`,Je=e=>e.key===`full_state`,Ye=e=>e.key===`execution_status`,Xe=e=>e.key===`stats`,Ze=e=>e.key===`goal`,Qe=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,$e=e=>`kind`in e&&e.kind===`ServerErrorEvent`,et=e=>Qe(e)||$e(e),tt=e=>`kind`in e&&e.kind===`HookExecutionEvent`,nt=e=>`kind`in e&&e.kind===`ACPToolCallEvent`,J=e=>`kind`in e&&e.kind===`StreamingDeltaEvent`,rt=e=>`kind`in e&&e.kind===`Condensation`;function it(e){return Fe(e)}var at=e=>e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
|
+
`),ot=e=>e.reasoning_content?e.reasoning_content:e.thinking_blocks?.length?e.thinking_blocks.filter(e=>e.type===`thinking`).map(e=>e.thinking).join(`
|
|
3
|
+
|
|
4
|
+
`):``,st=e=>at(e).trim().length>0,ct=(e,t)=>{let n=e.replace(/^\s+/,``);if(!n.startsWith(`<think>`))return{reasoning:``,message:e};let r=n.slice(7),i=r.indexOf(`</think>`);return i===-1?t?.streaming?{reasoning:r.trim(),message:``}:{reasoning:``,message:e}:{reasoning:r.slice(0,i).trim(),message:r.slice(i+8).trim()}},lt=(e,t)=>{if(q(e))return e.action.kind===`ThinkAction`?null:st(e)?e:null;if(G(e)){let n=t.find(t=>q(t)&&t.id===e.action_id);return!n||n.action.kind===`ThinkAction`?null:st(n)?n:null}return null},ut=(e,t)=>({...t,content:`${t.content??``}${e.content??``}`||null,reasoning_content:`${t.reasoning_content??``}${e.reasoning_content??``}`||null}),Y=(e,t)=>!!e.isFromPlanningAgent==!!t.isFromPlanningAgent,dt=e=>{for(let t=e.length-1;t>=0;--t){let n=e[t];if(K(n)&&n.source===`user`)return t}return-1},ft=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),pt=(e,t)=>{let n=0,r=0;for(let i of t){let t=e.indexOf(i,n);if(t===-1)return{matched:!1,lastMatchEnd:r};r=t+i.length,n=r}return{matched:!0,lastMatchEnd:r}},mt=(e,t)=>{let n=dt(e);return e.map((e,t)=>({event:e,index:t})).filter(e=>e.index>n&&J(e.event)&&(e.event.content?.length??0)>0&&Y(t,e.event))},ht=(e,t)=>{let n=[];for(let r=e.length-1;r>=0;--r){let i=e[r];if(!J(i))break;t(i)&&n.unshift({event:i,index:r})}return n},gt=e=>ht(e,e=>(e.content?.length??0)>0),_t=(e,t)=>ht(e,e=>!!e.reasoning_content&&Y(t,e)),vt=(e,t,n)=>{let r=new Set(t.map(({index:e})=>e)),i=[];return e.forEach((e,t)=>{if(!r.has(t)||!J(e)){i.push(e);return}!n&&e.reasoning_content&&i.push({...e,content:null})}),i},yt=(e,t)=>{let n=t.join(``),r=new Set([n,n.trimEnd(),n.trimStart(),n.trim()]);for(let t of r)if(t&&e.startsWith(t))return{matched:!0,lastMatchEnd:t.length};let i=t.length-1;return pt(e,t.map((e,t)=>t===i?e.trimEnd():e))},bt=e=>q(e)?ot(e).trim().length>0:K(e)&&e.source===`agent`?ct(ft(e.llm_message.content)).reasoning.length>0:!1,xt=(e,t)=>{let n=mt(t,e);if(n.length===0)return null;let r=vt(t,n,bt(e));return r.push(e),r},St=(e,t)=>{let n=ft(e.thought);if(!n)return null;let r=gt(t);return r.length===0||!yt(n,r.map(({event:e})=>e.content??``)).matched?null:vt(t,r,ot(e).trim().length>0)},Ct=(e,t)=>{if(ot(e).trim().length===0)return null;let n=_t(t,e);if(n.length===0)return null;let r=new Set(n.map(({index:e})=>e)),i=[];return t.forEach((e,t)=>{if(!r.has(t)||!J(e)){i.push(e);return}e.content&&i.push({...e,reasoning_content:null})}),i},wt=(e,t)=>{let n=[...t];if(J(e)){if(e.content===null&&e.reasoning_content===null)return n;let t=n.length-1,r=n[t];return r&&J(r)&&Y(e,r)?(n[t]=ut(e,r),n):(n.push(e),n)}if(q(e)&&e.action.kind===`FinishAction`||K(e)&&e.source===`agent`){let t=xt(e,n);if(t)return t}if(q(e)&&e.action.kind!==`FinishAction`&&e.action.kind!==`ThinkAction`){let t=St(e,n)??Ct(e,n);if(t)return t.push(e),t}if(nt(e)){let t=n.findIndex(t=>nt(t)&&t.tool_call_id===e.tool_call_id);return t===-1?n.push(e):n[t]=e,n}if(G(e)){if(e.observation.kind===`ThinkObservation`||e.observation.kind===`FinishObservation`)return n;let t=n.findIndex(t=>t.id===e.action_id);t===-1?n.push(e):n[t]=e}else n.push(e);return n},Tt=e=>`id`in e?e.id:void 0,Et=e=>`timestamp`in e?e.timestamp:void 0,Dt=(e,t)=>{let n=Et(e),r=Et(t);return!n&&!r?0:n?r?n.localeCompare(r):-1:1},Ot=(e,t)=>{if(e.length===0)return!1;let n=e[e.length-1],r=Et(n),i=Et(t);return!r||!i?!1:i<r},kt=(e,t)=>{let n=Tt(t);if(n!==void 0&&e.eventIds.has(n))return e;let r=n===void 0?e.eventIds:new Set(e.eventIds).add(n),i=e.events.length-1,a=e.events[i],o=a&&J(t)&&J(a)&&Y(t,a),s=[...e.events];return o?s[i]=ut(t,a):s.push(t),{...e,events:s,eventIds:r,uiEvents:wt(t,e.uiEvents)}},At=e=>({...e,events:[...e.events].sort(Dt),uiEvents:[...e.uiEvents].sort(Dt)}),jt=(e,t)=>{let n=kt(e,t);return n===e?e:!Ot(e.events,t)&&!Ot(e.uiEvents,t)?n:At(n)},X=L()(e=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null,addEvent:t=>e(e=>jt(e,t)),addEvents:t=>e(e=>{if(t.length===0)return e;let n=new Set(e.eventIds),r=[...e.events],i=[...e.uiEvents],a=!1;for(let e of t){let t=Tt(e);if(!(t!==void 0&&n.has(t))){a=!0,t!==void 0&&n.add(t);let o=r.length-1,s=r[o];s&&J(e)&&J(s)&&Y(e,s)?r[o]=ut(e,s):r.push(e),i=wt(e,i)}}return a?At({...e,events:r,eventIds:n,uiEvents:i}):e}),clearEvents:()=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null})),clearEventsForConversation:t=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:t}))})),Mt={errorMessage:null,errorType:null,errorCode:null,errorClassification:null},Nt=L(e=>({...Mt,setErrorMessage:(t,n=`conversation`,r=null,i=null)=>e(()=>({errorMessage:t,errorType:n,errorCode:r,errorClassification:i})),removeErrorMessage:()=>e(()=>({...Mt})),clearConnectionError:()=>e(e=>e.errorType===`connection`?{...Mt}:e)})),Pt=15e4,Ft={pendingMessages:[]},It=()=>`pending-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,Lt=L((e,t)=>({...Ft,enqueuePendingMessage:n=>{let r=It(),i={id:r,conversationId:n.conversationId,text:n.text,content:n.content??n.text,status:`sending`,imageUrls:n.imageUrls??[],fileUrls:n.fileUrls??[],timestamp:n.timestamp??new Date().toISOString()};return e(e=>({pendingMessages:[...e.pendingMessages,i]})),setTimeout(()=>{t().pendingMessages.find(e=>e.id===r)?.status===`sending`&&t().markPendingMessageError(r,`Send timed out`)},Pt),r},markPendingMessageError:(t,n)=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.id===t?{...e,status:`error`,errorMessage:n}:e)})),markPendingMessageSending:t=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.id===t?{...e,status:`sending`,errorMessage:void 0}:e)})),removePendingMessage:t=>e(e=>({pendingMessages:e.pendingMessages.filter(e=>e.id!==t)})),consumeMatchingPendingMessage:(t,n)=>{let r=null;return e(e=>{let i=e.pendingMessages.map((e,t)=>({m:e,i:t})).filter(({m:e})=>e.status===`sending`&&e.conversationId===t);if(i.length===0)return e;let a=i.find(({m:e})=>e.content===n)??i[0];return r=a.m,{pendingMessages:[...e.pendingMessages.slice(0,a.i),...e.pendingMessages.slice(a.i+1)]}}),r},clearPendingMessages:()=>e(()=>({...Ft})),reassignPendingMessages:(t,n)=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.conversationId===t?{...e,conversationId:n}:e)}))})),Rt=L(e=>({commands:[],appendInput:t=>e(e=>({commands:[...e.commands,{content:t,type:`input`}]})),appendOutput:t=>e(e=>({commands:[...e.commands,{content:t,type:`output`}]})),clearTerminal:()=>e({commands:[]})})),zt={url:``,screenshotSrc:``},Bt=L(e=>({...zt,setUrl:t=>e({url:t}),setScreenshotSrc:t=>e({screenshotSrc:t}),reset:()=>e(zt)})),Vt={statusByConversation:{}},Ht=L()(ue(e=>({...Vt,setStatus:(t,n)=>e(e=>({statusByConversation:{...e.statusByConversation,[t]:n}}))}),{name:`GoalStore`})),Ut=L(e=>({selectedPath:null,selectedConversationId:null,setSelectedPath:(t,n=null)=>e({selectedPath:t,selectedConversationId:n})})),Wt=new Set([`files`,`browser`,`terminal`,`planner`,`tasklist`]);function Gt(e){let t=R.getState();t.setSelectedTab(e),t.isRightPanelShown||(t.setHasRightPanelToggled(!0),t.setIsRightPanelShown(!0))}function Kt(e){return Wt.has(e)}function qt(e,t=null){switch(e.command){case`navigate_to_file`:case`show_preview`:Gt(`files`),e.path&&Ut.getState().setSelectedPath(e.path,t);return;case`open_tab`:e.tab===`vscode`?Gt(`files`):e.tab&&Kt(e.tab)?Gt(e.tab):e.tab&&console.warn(`[canvas_ui] Ignoring open_tab with unknown tab: ${e.tab}`);return}}var Jt=3e3,Yt=18e4,Xt=`openhands-child-conversation-launches:`,Z=(e,t)=>({status:`error`,error:e,guidance:t}),Zt=e=>e.map(e=>`"${e}"`).join(` or `),Q=e=>e?.trim()||null;function Qt(e){let t=e.target;if(!H.includes(t))return{ok:!1,failure:Z(`Unknown target ${JSON.stringify(e.target)}.`,`\`target\` must be exactly ${Zt(H)}. Nothing was launched — call ${B} again with a valid target.`)};let n=Q(e.task);if(!n)return{ok:!1,failure:Z("`task` is empty.","`task` must be a self-contained brief: the child conversation cannot see this one, so state the goal, constraints and expected output.")};let r=Q(e.repository),i=Q(e.branch),a=Q(e.isolation);return t===`local`&&(r||i)?{ok:!1,failure:Z('`repository`/`branch` were passed with target="local".','A local child always runs in this conversation\'s workspace. Drop `repository` and `branch`, or use target="cloud" to run against a repository in a Cloud sandbox.')}:t===`cloud`&&a?{ok:!1,failure:Z('`isolation` was passed with target="cloud".','Cloud children always run in their own isolated sandbox. Drop `isolation`, or use target="local" to choose between "worktree" and "shared".')}:i&&!r?{ok:!1,failure:Z("`branch` was passed without `repository`.",'Pass `repository` as "owner/repo" alongside `branch`, or drop `branch` to use the repository\'s default branch.')}:a&&!z.includes(a)?{ok:!1,failure:Z(`Unknown isolation ${JSON.stringify(e.isolation)}.`,`\`isolation\` must be exactly ${Zt(z)}. Nothing was launched — call ${B} again with a valid isolation.`)}:{ok:!0,params:{target:t,task:n,title:Q(e.title),repository:r,branch:i,isolation:a??`worktree`}}}function $t(e,t){let n=`${Xt}${e}`,r=[];try{let e=window.localStorage.getItem(n),t=e?JSON.parse(e):null;Array.isArray(t)&&(r=t.filter(e=>typeof e==`string`))}catch{}if(r.includes(t))return!1;try{window.localStorage.setItem(n,JSON.stringify([...r,t]))}catch{}return!0}function en(e){let t=g(e);return typeof window>`u`?t:new URL(t,window.location.origin).toString()}function tn(){let e=u();if(!e)return null;let t=d(e,ge);return t===null||t>=0?null:`Agent server ${e} does not persist parent/child conversation links (needs ${ge}); the child was created but is not linked to this conversation.`}var nn=e=>!!(e?.selected_repository||e?.selected_workspace),rn=`The child was launched in this conversation's directory instead, so it can see work in progress here and the two agents may conflict over the same files.`;async function an(e,t){let n=await U.resolveConversationWorkingDir(t),r=pe(t),i=i=>U.createConversation({initialUserMsg:e.task,metadata:r?{selected_repository:r.selected_repository,selected_branch:r.selected_branch,git_provider:r.git_provider}:null,workingDirOverride:n,workspaceMode:i===`shared`?`local_repo`:`new_worktree`,parentConversationId:t}),a=e.isolation,o=null;a===`worktree`&&!nn(r)&&(a=`shared`,o=`This conversation's workspace is a scratch directory with no commits, which git cannot cut a worktree from. ${rn}`);let s;try{s=await i(a)}catch(e){if(a!==`worktree`)throw e;try{s=await i(`shared`)}catch{throw e}a=`shared`,o=`Creating a git worktree in this conversation's workspace failed (${e instanceof Error?e.message:String(e)}). ${rn}`}let c=s.app_conversation_id??s.id;e.title&&await U.updateConversationTitle(c,e.title).catch(()=>void 0);let l=tn();return{status:`launched`,target:`local`,conversation_id:c,url:en(`/conversations/${c}`),initial_status:s.status,title:e.title,workspace:n,isolation:a,...o?{isolation_note:o}:{},parent_link:!l,...l?{parent_link_note:l}:{}}}var on=e=>new Promise(t=>{setTimeout(t,e)});async function sn(e,t){let n=Date.now()+Yt,r=e;for(;!r.app_conversation_id&&r.status!==`ERROR`&&!(Date.now()>=n);){await on(Jt);let e=await me(r.id,t).catch(()=>null);if(!e)break;r=e}return r}async function cn(e,t){let n=_e();if(!n)return Z(`No OpenHands Cloud backend is connected in Agent Canvas.`,`Ask the user to connect OpenHands Cloud from the backend picker, then call this tool again — or relaunch now with target="local".`);let r=pe(t),i=await sn(await he({initial_message:{role:`user`,content:[{type:`text`,text:e.task}]},title:e.title,selected_repository:e.repository??r?.selected_repository??null,selected_branch:e.branch??null,git_provider:e.repository?null:r?.git_provider??null,parent_conversation_id:null},n),n);if(i.status===`ERROR`)return Z(i.detail||`The Cloud conversation failed to start.`,`The Cloud sandbox could not be provisioned. Report this to the user; you can retry, or fall back to target="local".`);let a=i.app_conversation_id;return{status:`launched`,target:`cloud`,conversation_id:a,url:a?`${n.host.replace(/\/$/,``)}/conversations/${a}`:null,initial_status:i.status,title:e.title,start_task_id:i.id,backend:n.name,parent_link:!1,parent_link_note:`This conversation runs on the local agent server, so OpenHands Cloud has no parent to link the child to.`}}async function ln(e,t){t.status===`error`?m(f.t(S.CHILD_CONVERSATION$LAUNCH_FAILED,{error:t.error})):t.url&&c(f.t(t.target===`cloud`?S.CHILD_CONVERSATION$LAUNCHED_CLOUD:S.CHILD_CONVERSATION$LAUNCHED_LOCAL),f.t(S.CHILD_CONVERSATION$OPEN),t.url),!Ht.getState().statusByConversation[e]?.active&&await U.sendMessage(e,{role:`user`,content:[{type:`text`,text:`${V}${JSON.stringify(t)}`}]})}async function un(e,t,n){if(!$t(t,n))return;let r=Qt(e),i;if(!r.ok)i=r.failure;else try{i=r.params.target===`cloud`?await cn(r.params,t):await an(r.params,t)}catch(e){i=Z(e instanceof Error?e.message:String(e),`The launch request failed. Report the error to the user; retry only if the cause looks transient.`)}await ln(t,i).catch(e=>{console.warn(`[${B}] Failed to report the launch result:`,e)})}var dn=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:[...e.entriesByConversation[t]??[],n]}}),fn=L()(ue(e=>({entriesByConversation:{},activeProfileByConversation:{},show:(t,n,r)=>e(e=>dn(e,t,{id:fe(),anchorEventId:n,profiles:r})),recordSwitch:(t,n,r)=>e(e=>({...dn(e,t,{id:fe(),anchorEventId:n,profiles:[],switchedTo:r}),activeProfileByConversation:{...e.activeProfileByConversation,[t]:r}})),seedSwitches:(t,n)=>e(e=>{let r=e.entriesByConversation[t]??[],i=new Set(r.map(e=>e.id)),a=n.filter(e=>!i.has(e.id)).map(e=>({id:e.id,anchorEventId:e.anchorEventId,profiles:[],switchedTo:e.profileName}));return a.length===0?e:{entriesByConversation:{...e.entriesByConversation,[t]:[...r,...a]}}}),clearActiveProfile:t=>e(e=>{if(!(t in e.activeProfileByConversation))return e;let n={...e.activeProfileByConversation};return delete n[t],{activeProfileByConversation:n}}),clear:t=>e(e=>{let n={...e.entriesByConversation};delete n[t];let r={...e.activeProfileByConversation};return delete r[t],{entriesByConversation:n,activeProfileByConversation:r}}),clearAll:()=>e({entriesByConversation:{},activeProfileByConversation:{}})}),{name:`ModelStore`})),pn=(e,t,n)=>{let{action:r}=e;if((r.kind===`StrReplaceEditorAction`||r.kind===`FileEditorAction`||r.kind===`ExecuteBashAction`)&&n.invalidateQueries({queryKey:[`file_changes`,t]},{cancelRefetch:!1}),(r.kind===`StrReplaceEditorAction`||r.kind===`FileEditorAction`)&&r.path){let e=xe(r.path);n.invalidateQueries({queryKey:[`file_diff`,t,e]})}e.tool_name===`SwitchLLMTool`&&(n.invalidateQueries({queryKey:[`user`,`conversation`,t]}),fn.getState().clearActiveProfile(t))},mn=class{static async respondToConfirmation(e,t,n,r){let a=_().backend;return a.kind===`cloud`?O({backend:a,method:`POST`,hostOverride:v(t),path:`/api/conversations/${e}/events/respond_to_confirmation`,body:n,authMode:`session-api-key`,sessionApiKey:r}):new i(l({conversationUrl:t,sessionApiKey:r})).respondToConfirmation(e,n)}static async getEventCount(e,t,n){let r=_().backend;return r.kind===`cloud`?O({backend:r,method:`GET`,hostOverride:v(t),path:`/api/conversations/${e}/events/count`,authMode:`session-api-key`,sessionApiKey:n}):new i(l({conversationUrl:t,sessionApiKey:n})).getEventCount(e)}static async searchEvents(e,t,n,r={}){let i=_().backend,a=r.limit??100;if(i.kind===`cloud`){let t=Math.min(a,100),n=!!(r.sortOrder||r.pageId||r.timestampGte||r.timestampLt),o=new URLSearchParams;o.set(`limit`,String(t)),r.sortOrder&&o.set(`sort_order`,r.sortOrder),r.pageId&&o.set(`page_id`,r.pageId),r.timestampGte&&o.set(`timestamp__gte`,r.timestampGte),r.timestampLt&&o.set(`timestamp__lt`,r.timestampLt);let s=t=>O({backend:i,method:`GET`,path:`/api/v1/conversation/${e}/events/search?${t.toString()}`});try{let e=await s(o);return{items:e?.items??[],next_page_id:e?.next_page_id??null}}catch(e){if(!n||r.strictPagination)throw e;return console.warn(`[EventService] Cloud backend doesn't support pagination filters. Falling back to initial load only. Server needs OpenHands/OpenHands#14399.`),{items:[],next_page_id:null}}}let o=await new D(s({conversationUrl:t,sessionApiKey:n}),e).search({limit:a,...r.pageId?{page_id:r.pageId}:{},...r.sortOrder?{sort_order:r.sortOrder}:{},...r.timestampGte?{timestamp__gte:r.timestampGte}:{},...r.timestampLt?{timestamp__lt:r.timestampLt}:{}});return{items:o?.items??[],next_page_id:o?.next_page_id??null}}},hn=new Set([`error_source`,`error_kind`,`error_id`,`error_telemetry`]);function gn({source:e,metadata:t={},classification:n}){let r=Object.fromEntries(Object.entries(t).filter(([e])=>!hn.has(e))),i=n?.kind||`unknown`,a=typeof t.eventId==`string`?t.eventId:void 0;a!=null&&delete r.eventId;let o=n?.error_id??a;p(`error_outcome`,{...r,current_url:window.location.href,error_source:e||`unknown`,error_kind:i,...o==null?{}:{error_id:o},error_telemetry:i===`internal`||i===`unknown`?`diagnostic`:`outcome`})}var _n=()=>a({mutationKey:[`read-conversation-file`],mutationFn:async({conversationId:e,filePath:t})=>U.readConversationFile(e,t)}),vn={cost:null,max_budget_per_task:null,usage:null},yn=L(e=>({...vn,setMetrics:t=>e(t),resetMetrics:()=>e(vn)})),bn=e=>{let{data:t}=Ce(e??null);return o({queryKey:[`conversation-history`,e,t?.conversation_url??null,t?.session_api_key??null],enabled:!!e&&!!t,queryFn:async()=>{if(!e)return{events:[],hasMore:!1,nextPageId:null};let n=await mn.searchEvents(e,t?.conversation_url??null,t?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`});if(!Array.isArray(n.items))throw Error(`Invalid conversation history response: expected page.items to be an array.`);return{events:[...n.items].reverse(),hasMore:!!n.next_page_id||n.items.length>=50,nextPageId:n.next_page_id??null}},staleTime:0,gcTime:1800*1e3,refetchOnMount:`always`,refetchOnWindowFocus:!1})},xn=[`The goal is NOT yet complete (audit iteration`,`Resuming a goal that was paused or interrupted.`],Sn=e=>{if(e.llm_message?.role!==`user`)return null;let t=e.llm_message.content;return Array.isArray(t)?t.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
5
|
+
`):``},Cn=e=>{let t=Sn(e);return t===null?!1:xn.some(e=>t.startsWith(e))},wn=e=>Sn(e)?.startsWith(`[child-conversation] `)??!1,Tn=e=>{if(qe(e))return Ze(e)&&!e.value.active;if(q(e)){let t=e.action.kind;return!(!t||t===`ExecuteBashAction`&&e.source===`user`||t===`PlanningFileEditorAction`||t===`SwitchLLMAction`)}return G(e)?!(e.observation.kind===`SwitchLLMObservation`&&!e.observation.is_error):K(e)?!Cn(e)&&!wn(e):Ie(e)||tt(e)||nt(e)?!0:J(e)?e.content!==null||e.reasoning_content!==null:!1},En=e=>e.some(e=>e.source===`user`),Dn=()=>{let{uiEvents:e}=X.getState();for(let t=e.length-1;t>=0;--t){let n=e[t];if(Tn(n))return String(n.id)}return null};function On(e,t,n=Dn()){fn.getState().recordSwitch(e,n,t)}function kn(e,t){let n=[],r=null;for(let e of t)He(e)&&!e.observation.is_error&&n.push({id:`history-switch:${e.id}`,anchorEventId:r,profileName:e.observation.profile_name}),Tn(e)&&(r=String(e.id));n.length>0&&fn.getState().seedSwitches(e,n)}var $=n(),An=(0,W.createContext)(void 0);function jn(e){return e.llm_message.content.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function Mn({children:e,conversationId:t,conversationUrl:n,sessionApiKey:a,subConversations:o,subConversationIds:s}){let[c,u]=(0,W.useState)(`CONNECTING`),[d,f]=(0,W.useState)(`CONNECTING`),p=W.useRef(!1),m=W.useRef(!1),g=r(),_=X(e=>e.addEvent),v=X(e=>e.addEvents),y=X(e=>e.clearEventsForConversation),{setErrorMessage:b,removeErrorMessage:ee,clearConnectionError:x}=Nt(),S=Lt(e=>e.consumeMatchingPendingMessage),{setExecutionStatus:C}=Se(),{appendInput:w,appendOutput:T}=Rt(),te=Bt(e=>e.reset),[E,D]=(0,W.useState)(!0),[O,ne]=(0,W.useState)(null),{setPlanContent:k}=R(),{mutate:A}=_n(),j=(0,W.useRef)(0),M=(0,W.useRef)(null),re=e=>e?.toUpperCase().endsWith(`PLAN.MD`)??!1,N=(0,W.useCallback)(()=>{x()},[x]),P=(0,W.useCallback)(e=>{let t=e.value.usage_to_metrics;if(!t)return;let n=Object.values(t).reduce((e,t)=>{e.cost+=t.accumulated_cost,e.maxBudgetPerTask===null&&t.max_budget_per_task!==null&&(e.maxBudgetPerTask=t.max_budget_per_task);let n=t.accumulated_token_usage;return n&&(e.usage={prompt_tokens:(e.usage?.prompt_tokens??0)+n.prompt_tokens,completion_tokens:(e.usage?.completion_tokens??0)+n.completion_tokens,cache_read_tokens:(e.usage?.cache_read_tokens??0)+n.cache_read_tokens,cache_write_tokens:(e.usage?.cache_write_tokens??0)+n.cache_write_tokens,context_window:Math.max(e.usage?.context_window??0,n.context_window),per_turn_token:Math.max(e.usage?.per_turn_token??0,n.per_turn_token)}),e},{cost:0,maxBudgetPerTask:null,usage:null});yn.getState().setMetrics({cost:n.cost,max_budget_per_task:n.maxBudgetPerTask,usage:n.usage})},[]),{data:F,isPending:ie,isFetching:I,isError:ae}=bn(t),oe=!!t&&ie;(0,W.useLayoutEffect)(()=>{let e=t??null;X.getState().loadedConversationId!==e&&(y(e),te(),yn.getState().resetMetrics())},[t,y,te]),(0,W.useLayoutEffect)(()=>{if(!(!F||F.events.length===0)&&(v(F.events),t)){kn(t,X.getState().uiEvents);for(let e of F.events)Le(e)&&S(t,jn(e))}},[F,v,t,S]);let se=(0,W.useMemo)(()=>{if(I)return null;let e=F?.events??[],t=e[e.length-1];return!t||!(`timestamp`in t)||!t.timestamp?null:t.timestamp},[F,I]),ce=(0,W.useMemo)(()=>!t||!n||I&&!ae?null:h(t,n),[t,n,I,ae]),L=(0,W.useMemo)(()=>{if(!o?.length)return null;let e=o[0];return!e?.id||!e.conversation_url?null:h(e.id,e.conversation_url)},[o]),ue=(0,W.useMemo)(()=>L?c===`CONNECTING`||d===`CONNECTING`?`CONNECTING`:c===`OPEN`&&d===`OPEN`?`OPEN`:c===`CLOSED`&&d===`CLOSED`?`CLOSED`:c===`CLOSING`||d===`CLOSING`?`CLOSING`:`CLOSED`:c,[c,d,L]);(0,W.useEffect)(()=>{O!==null&&j.current>=O&&E&&D(!1)},[O,E,j]),(0,W.useEffect)(()=>{if(!E&&M.current){let{path:e,conversationId:t}=M.current;A({conversationId:t,filePath:e},{onSuccess:e=>{k(e)},onError:e=>{console.warn(`Failed to read conversation file:`,e)}}),M.current=null}},[E,A,k]),(0,W.useEffect)(()=>{p.current=!1,D(!!s?.length),ne(null),j.current=0,M.current=null},[s]),(0,W.useEffect)(()=>{p.current=!1,m.current=!1,M.current=null},[t]);let fe=(0,W.useMemo)(()=>oe||E,[oe,E]),z=(0,W.useCallback)(e=>{try{let n=JSON.parse(e.data);if(it(n)){let e=X.getState().eventIds.has(n.id??``),r=He(n)?n:null;if(_(n),e)return;if(et(n)){let e=n,t=`classification`in e?e.classification:null;gn({source:`conversation`,metadata:{eventId:e.id,errorCode:e.code},classification:t}),b(e.detail,`conversation`,e.code,t)}else N();if(Ie(n)&&gn({source:`agent`,metadata:{eventId:n.id,toolName:n.tool_name,toolCallId:n.tool_call_id},classification:n.classification}),Le(n)&&t&&(S(t,jn(n)),le(t,{draftMessage:null})),q(n)&&pn(n,t||`test-conversation-id`,g),qe(n)&&(Je(n)&&C(n.value.execution_status),Ye(n)&&C(n.value),Xe(n)&&P(n),Ze(n)&&t&&Ht.getState().setStatus(t,n.value)),Re(n)&&w(n.action.command),ze(n)&&T(n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
6
|
+
`)),Ve(n)){let{screenshot_data:e}=n.observation;if(e){let t=e.startsWith(`data:`)?e:`data:image/png;base64,${e}`;Bt.getState().setScreenshotSrc(t)}}if(Ue(n)&&Bt.getState().setUrl(n.action.url),t&&r&&!r.observation.is_error){On(t,r.observation.profile_name);let e=pe(t);de(t,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,active_profile:r.observation.profile_name,plugins:e?.plugins??null}),r.observation.active_model&&ve(g,t,r.observation.active_model),be(g,t)}We(n)&&qt(n.action,t??null),t&&Ge(n)&&un(n.action,t,n.tool_call_id)}}catch(e){console.warn(`Failed to parse WebSocket message as JSON:`,e)}},[_,b,S,g,t,C,w,T,P,N]),me=(0,W.useCallback)(e=>{try{let n=JSON.parse(e.data);if(E&&(j.current+=1,O!==null&&j.current>=O&&D(!1)),it(n)){let e=X.getState().eventIds.has(n.id??``);if(_({...n,isFromPlanningAgent:!0}),e)return;if(et(n)){let e=n,t=`classification`in e?e.classification:null;gn({source:`planning_conversation`,metadata:{eventId:e.id,errorCode:e.code},classification:t}),b(e.detail,`conversation`,e.code,t)}else N();if(Ie(n)&&gn({source:`planning_agent`,metadata:{eventId:n.id,toolName:n.tool_name,toolCallId:n.tool_call_id},classification:n.classification}),Le(n)&&t&&(S(t,jn(n)),le(t,{draftMessage:null})),q(n)&&pn(n,o?.[0]?.id||`test-conversation-id`,g),qe(n)&&(Je(n)&&C(n.value.execution_status),Ye(n)&&C(n.value),Xe(n)&&P(n),Ze(n)&&t&&Ht.getState().setStatus(t,n.value)),Re(n)&&w(n.action.command),ze(n)&&T(n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
7
|
+
`)),Be(n)){let{path:e}=n.observation;if(re(e)){let t=o?.[0]?.id;t&&e&&(E?M.current={path:e,conversationId:t}:A({conversationId:t,filePath:e},{onSuccess:e=>{k(e)},onError:e=>{console.warn(`Failed to read conversation file:`,e)}}))}}}}catch(e){console.warn(`Failed to parse WebSocket message as JSON:`,e)}},[_,E,O,b,S,g,o,t,C,w,T,A,k,P,N]),he=(0,W.useMemo)(()=>({queryParams:se?{resend_mode:`since`,after_timestamp:se}:{resend_mode:`all`},sessionApiKey:a,reconnect:{enabled:!0},onOpen:()=>{u(`OPEN`),p.current=!0,x()},onClose:()=>{u(`CLOSED`)},onError:()=>{u(`CLOSED`),p.current&&b(Pe,`connection`)},onMessage:z}),[z,b,x,a,se]),B=(0,W.useMemo)(()=>{let e={resend_all:!0},t=o?.[0];return{queryParams:e,sessionApiKey:t?.session_api_key??a,reconnect:{enabled:!0},onOpen:async()=>{if(f(`OPEN`),m.current=!0,x(),t?.id&&t.conversation_url)try{let e=await mn.getEventCount(t.id,t.conversation_url,t.session_api_key);ne(e),e===0&&D(!1)}catch{D(!1)}},onClose:()=>{f(`CLOSED`)},onError:()=>{f(`CLOSED`),m.current&&b(Pe,`connection`)},onMessage:me}},[me,b,x,a,o]),{socket:V,reconnect:H}=Ne(ce||``,he),{socket:U,reconnect:ge}=Ne(L||``,B),_e=(0,W.useCallback)(()=>{if(ee(),R.getState().conversationMode===`plan`&&L){ge();return}H()},[L,H,ge,ee]),ye=(0,W.useCallback)(async e=>{let n=R.getState().conversationMode===`plan`?U:V;if(n?.readyState!==WebSocket.OPEN){if(!t){let e=Error(`No conversation ID available`);throw b(e.message),e}try{return await new i(l()).sendEvent(t,{role:`user`,content:e.content},{run:!0}),{queued:!0}}catch(e){throw b(e instanceof Error?e.message:`Failed to queue message for delivery`),e}}try{return n.send(JSON.stringify({...e,run:!0})),{queued:!1}}catch(e){throw b(e instanceof Error?e.message:`Failed to send message`),e}},[V,U,b,t]);(0,W.useEffect)(()=>{V&&ce&&(()=>{switch(V.readyState){case WebSocket.CONNECTING:u(`CONNECTING`);break;case WebSocket.OPEN:u(`OPEN`);break;case WebSocket.CLOSING:u(`CLOSING`);break;case WebSocket.CLOSED:u(`CLOSED`);break;default:u(`CLOSED`);break}})()},[V,ce]),(0,W.useEffect)(()=>{U&&L&&(()=>{switch(U.readyState){case WebSocket.CONNECTING:f(`CONNECTING`);break;case WebSocket.OPEN:f(`OPEN`);break;case WebSocket.CLOSING:f(`CLOSING`);break;case WebSocket.CLOSED:f(`CLOSED`);break;default:f(`CLOSED`);break}})()},[U,L]);let xe=(0,W.useMemo)(()=>({connectionState:ue,sendMessage:ye,isLoadingHistory:fe,reconnect:_e}),[ue,ye,fe,_e]);return(0,$.jsx)(An.Provider,{value:xe,children:e})}var Nn=()=>(0,W.useContext)(An)||null,Pn=e=>(0,$.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:109,height:109,viewBox:`0 0 109 109`,fill:`none`,...e,children:[(0,$.jsx)(`path`,{d:`M40.1979 21.8969L34.7311 17.832L25.2691 30.5574L20.2094 26.784L16.1367 32.2451L26.6653 40.0969L40.1979 21.8969Z`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M90.8342 35.1983H50.4639V28.3858H90.8342V35.1983Z`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M90.8342 57.9067H50.4638V51.0942H90.8342V57.9067Z`,fill:`currentColor`}),(0,$.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M27.2508 63.5837C32.2674 63.5837 36.3342 59.517 36.3342 54.5004C36.3342 49.4838 32.2674 45.4171 27.2508 45.4171C22.2342 45.4171 18.1675 49.4838 18.1675 54.5004C18.1675 59.517 22.2342 63.5837 27.2508 63.5837ZM27.2508 59.0421C29.7591 59.0421 31.7925 57.0087 31.7925 54.5004C31.7925 51.9921 29.7591 49.9587 27.2508 49.9587C24.7425 49.9587 22.7092 51.9921 22.7092 54.5004C22.7092 57.0087 24.7425 59.0421 27.2508 59.0421Z`,fill:`currentColor`}),(0,$.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M36.3342 77.2087C36.3342 82.2253 32.2674 86.2921 27.2508 86.2921C22.2342 86.2921 18.1675 82.2253 18.1675 77.2087C18.1675 72.1922 22.2342 68.1254 27.2508 68.1254C32.2674 68.1254 36.3342 72.1922 36.3342 77.2087ZM31.7925 77.2087C31.7925 79.717 29.7591 81.7504 27.2508 81.7504C24.7425 81.7504 22.7092 79.717 22.7092 77.2087C22.7092 74.7005 24.7425 72.6671 27.2508 72.6671C29.7591 72.6671 31.7925 74.7005 31.7925 77.2087Z`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M50.4637 80.615H90.834V73.8025H50.4637V80.615Z`,fill:`currentColor`})]});function Fn(){let{conversationId:e}=Te(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=R(),{setSelectedTab:a}=ce(e??``),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var In={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Ln=[],Rn={allowDangerousHtml:!0},zn=/^(https?|ircs?|mailto|xmpp)$/i,Bn=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Vn(e){let t=Hn(e),n=Un(e);return Wn(t.runSync(t.parse(n),n),e)}function Hn(e){let t=e.rehypePlugins||Ln,n=e.remarkPlugins||Ln,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Rn}:Rn;return I().use(k).use(n).use(N,r).use(t)}function Un(e){let t=e.children||``,n=new F;return typeof t==`string`?n.value=t:``+t,n}function Wn(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Gn;for(let e of Bn)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return re(e,l),se(e,{Fragment:$.Fragment,components:i,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in In)if(Object.hasOwn(In,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=In[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Gn(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||zn.test(e.slice(0,t))?e:``}function Kn({text:e,children:t}){let[n,r]=W.useState(!1),[i,a]=W.useState(!1);return W.useEffect(()=>{let e;return i&&(e=setTimeout(()=>a(!1),2e3)),()=>clearTimeout(e)},[i]),(0,$.jsxs)(`div`,{className:`relative`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[(0,$.jsx)(`div`,{className:`absolute top-2 right-2 z-10`,children:(0,$.jsx)(we,{isHidden:!n,isDisabled:i,onClick:async()=>{await navigator.clipboard.writeText(e),a(!0)},mode:i?`copied`:`copy`})}),t]})}function qn({children:e,className:t}){let n=/language-(\w+)/.exec(t||``),r=String(e).replace(/\n$/,``);return n?(0,$.jsx)(Kn,{text:r,children:(0,$.jsx)(ie,{className:`rounded-lg`,style:ae,language:n?.[1],PreTag:`div`,children:r})}):String(e).includes(`
|
|
8
|
+
`)?(0,$.jsx)(Kn,{text:r,children:(0,$.jsx)(`pre`,{className:`bg-surface-raised text-foreground border border-surface-raised rounded p-[1em] overflow-auto`,children:(0,$.jsx)(`code`,{className:t,children:r})})}):(0,$.jsx)(`code`,{className:x(t,`bg-surface-raised text-foreground border border-surface-raised rounded px-[0.4em] py-[0.2em]`),children:e})}function Jn({children:e}){return(0,$.jsx)(`ul`,{className:`my-2 list-disc ml-5 pl-2 whitespace-normal leading-6`,children:e})}function Yn({children:e,start:t}){return(0,$.jsx)(`ol`,{className:`my-2 list-decimal ml-5 pl-2 whitespace-normal leading-6`,start:t,children:e})}function Xn({children:e}){return(0,$.jsx)(`li`,{className:`py-0.5`,children:e})}function Zn({children:e}){return(0,$.jsx)(`p`,{className:`py-1.5 leading-6 first:pt-0 last:pb-0`,children:e})}function Qn({href:e,children:t}){return(0,$.jsx)(`a`,{className:`text-blue-500 hover:underline`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})}function $n({children:e}){return(0,$.jsx)(`h1`,{className:`text-xl text-white font-medium leading-7 mb-3 mt-4 first:mt-0`,children:e})}function er({children:e}){return(0,$.jsx)(`h2`,{className:`text-lg font-medium leading-6 -tracking-[0.01em] text-white mb-2.5 mt-4 first:mt-0`,children:e})}function tr({children:e}){return(0,$.jsx)(`h3`,{className:`text-base font-medium text-white mb-2 mt-3 first:mt-0`,children:e})}function nr({children:e}){return(0,$.jsx)(`h4`,{className:`text-sm font-medium text-white mb-1.5 mt-3 first:mt-0`,children:e})}function rr({children:e}){return(0,$.jsx)(`h5`,{className:`text-sm font-normal text-[var(--oh-text-tertiary)] mb-1.5 mt-2.5 first:mt-0`,children:e})}function ir({children:e}){return(0,$.jsx)(`h6`,{className:`text-sm font-normal text-[var(--oh-text-tertiary)] mb-1.5 mt-2.5 first:mt-0`,children:e})}var ar=1,or=`w-10`;function sr(e){let{scrollLeft:t,scrollWidth:n,clientWidth:r}=e,i=n-r,a=i>ar;return{left:a&&t>ar,right:a&&t<i-ar}}function cr({children:e}){let t=W.useRef(null),[n,r]=W.useState({left:!1,right:!1}),i=W.useCallback(()=>{let e=t.current;e&&r(sr(e))},[]);return W.useLayoutEffect(()=>{i();let e=t.current;if(!e)return;let n=new ResizeObserver(i);n.observe(e);let r=e.firstElementChild;return r&&n.observe(r),()=>n.disconnect()},[i,e]),(0,$.jsxs)(`div`,{className:`relative max-w-full`,children:[(0,$.jsx)(`div`,{ref:t,"data-testid":`markdown-table-scroll`,onScroll:i,className:`max-w-full overflow-x-auto custom-scrollbar-always`,children:e}),(0,$.jsx)(`div`,{"aria-hidden":!0,"data-testid":`markdown-table-scroll-fade-left`,"data-visible":n.left?`true`:`false`,className:x(`pointer-events-none absolute inset-y-0 left-0 z-10`,or,`bg-gradient-to-r from-[var(--oh-scroll-fade-from,var(--oh-color-base))] to-transparent`,`transition-opacity duration-300 ease-out motion-reduce:transition-none`,n.left?`opacity-100`:`opacity-0`)}),(0,$.jsx)(`div`,{"aria-hidden":!0,"data-testid":`markdown-table-scroll-fade-right`,"data-visible":n.right?`true`:`false`,className:x(`pointer-events-none absolute inset-y-0 right-0 z-10`,or,`bg-gradient-to-l from-[var(--oh-scroll-fade-from,var(--oh-color-base))] to-transparent`,`transition-opacity duration-300 ease-out motion-reduce:transition-none`,n.right?`opacity-100`:`opacity-0`)})]})}function lr({children:e}){return(0,$.jsx)(cr,{children:(0,$.jsx)(`table`,{className:[`my-4 w-max min-w-full border-separate border-spacing-0 overflow-hidden rounded-xl border border-[var(--oh-border)] text-sm`,`[&_td]:border-b [&_td]:border-r [&_th]:border-b [&_th]:border-r`,`[&_td:last-child]:border-r-0 [&_th:last-child]:border-r-0`,`[&_tbody_tr:last-child_td]:border-b-0`].join(` `),children:e})})}function ur({children:e}){return(0,$.jsx)(`th`,{className:`whitespace-nowrap border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-2 text-left font-semibold text-white`,children:e})}function dr({children:e}){return(0,$.jsx)(`td`,{className:`whitespace-nowrap border-[var(--oh-border)] px-3 py-2 align-top`,children:e})}var fr={note:{label:`Note`,icon:te,containerClass:`border-l-blue-500 bg-blue-500/10`,titleClass:`text-blue-300`,iconClass:`text-blue-400`},tip:{label:`Tip`,icon:E,containerClass:`border-l-emerald-500 bg-emerald-500/10`,titleClass:`text-emerald-300`,iconClass:`text-emerald-400`},important:{label:`Important`,icon:T,containerClass:`border-l-purple-500 bg-purple-500/10`,titleClass:`text-purple-300`,iconClass:`text-purple-400`},warning:{label:`Warning`,icon:C,containerClass:`border-l-yellow-500 bg-yellow-500/10`,titleClass:`text-yellow-300`,iconClass:`text-yellow-400`},caution:{label:`Caution`,icon:w,containerClass:`border-l-rose-500 bg-rose-500/10`,titleClass:`text-rose-300`,iconClass:`text-rose-400`}},pr=/(?:^|\s)markdown-alert-(note|tip|important|warning|caution)(?:\s|$)/i;function mr(e){if(!e)return null;let t=e.match(pr);return t?t[1].toLowerCase():null}function hr({children:e,className:t}){let n=mr(t);if(n){let t=fr[n],r=t.icon;return(0,$.jsxs)(`div`,{"data-testid":`markdown-alert-${n}`,className:x(`my-3 rounded-r-sm border-l-4 px-3 py-2`,t.containerClass),children:[(0,$.jsxs)(`p`,{className:x(`flex items-center gap-2 font-semibold`,t.titleClass),children:[(0,$.jsx)(r,{"aria-hidden":!0,className:x(`shrink-0`,t.iconClass)}),(0,$.jsx)(`span`,{children:t.label})]}),(0,$.jsx)(`div`,{className:`text-content`,children:e})]})}return(0,$.jsx)(`blockquote`,{className:`my-2 border-l-4 border-border pl-3 italic text-content-muted`,children:e})}function gr({...e}){return(0,$.jsx)(`hr`,{...e,className:`my-4 border-0 border-t border-[var(--oh-border)]`})}var _r=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\][ \t]*\r?\n?/i;function vr(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/).filter(Boolean):[]}var yr=()=>e=>{re(e,`blockquote`,e=>{let t=e,n=t.children[0];if(n?.type!==`paragraph`)return;let r=n,i=r.children[0];if(i?.type!==`text`)return;let a=i.value.match(_r);if(!a)return;let o=a[1].toLowerCase(),s=i;s.value=s.value.replace(_r,``),s.value===``&&(r.children.shift(),r.children[0]?.type===`break`&&r.children.shift(),r.children.length===0&&t.children.shift()),t.data=t.data??{};let c=t.data.hProperties??{},l=vr(c.className);t.data.hProperties={...c,className:[...l,`markdown-alert`,`markdown-alert-${o}`]}})},br={...P,attributes:{...P.attributes,"*":[...P.attributes?.[`*`]??[],`className`,`id`],a:[`href`,`title`,`target`,`rel`],img:[...P.attributes?.img??[],`src`,`alt`,`title`,`width`,`height`,`loading`]},tagNames:[...P.tagNames??[],`img`,`details`,`summary`,`figure`,`figcaption`,`mark`,`kbd`,`sub`,`sup`],protocols:{...P.protocols,src:[`http`,`https`],href:[`http`,`https`,`mailto`,`tel`]}};function xr({children:e,content:t,components:n,includeStandard:r=!1,includeHeadings:i=!1,allowHtml:a=!0}){return(0,$.jsx)(`div`,{"data-testid":`markdown-renderer`,children:(0,$.jsx)(Vn,{components:{code:qn,ul:Jn,ol:Yn,li:Xn,hr:gr,table:lr,th:ur,td:dr,blockquote:hr,...r&&{a:Qn,p:Zn},...i&&{h1:$n,h2:er,h3:tr,h4:nr,h5:rr,h6:ir},...n},remarkPlugins:[yr,M,j],rehypePlugins:a?[oe,[A,br]]:void 0,children:t??e??``})})}export{Ie as A,Be as B,wt as C,ct as D,lt as E,ze as F,Pe as G,He as H,Ze as I,De as J,Me as K,tt as L,We as M,rt as N,nt as O,qe as P,K as R,X as S,ot as T,Ke as U,J as V,Le as W,Te as X,Ee as Y,Ht as _,Mn as a,Lt as b,kn as c,Tn as d,bn as f,Ut as g,fn as h,Pn as i,it as j,q as k,Dn as l,mn as m,Kn as n,Nn as o,yn as p,ke as q,Fn as r,On as s,xr as t,En as u,Bt as v,at as w,Nt as x,Rt as y,G as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as o}from"./useMutation-ChpkYxI5.js";import{At as s,Pt as c,R as l,jt as u,n as d}from"./active-backend-context-B_bg5h9O.js";import{t as f,z as p}from"./utils-DPQfkd-7.js";import{t as m}from"./puzzle-B3v361yY.js";import{t as h}from"./search-CYaiKHRp.js";import{t as g}from"./trash-2-CzDVN-Iw.js";import{t as _}from"./x-RYDBg-e2.js";import{a as v,d as y,f as b,l as x,o as S,p as C,t as w}from"./settings-service.api-DfPYaxZJ.js";import{n as T}from"./use-settings-BmLzQjnC.js";import{t as ee}from"./modal-backdrop-BSzNhM4r.js";import{n as E}from"./modal-classes-CLEXO6dj.js";import{l as D}from"./form-control-classes-DLN3Qgub.js";import{t as O}from"./brand-button-CJcwjnfb.js";import{t as k}from"./modal-close-button-D0aT02hs.js";import{n as A,t as j}from"./settings-input-D61Vzp9e.js";import{t as te}from"./confirmation-modal-DAH0XtOp.js";import{a as M,c as N,d as P,f as F,i as I,l as L,n as R,o as z,p as B,r as V,s as H,t as ne,u as re}from"./install-server-modal-DW6dSyGr.js";import{t as U}from"./settings-dropdown-input-TWIeiG02.js";import{a as W,n as G,o as ie,r as K,t as q}from"./extension-module-card-classes-Bo43vY5V.js";import{a as ae,d as oe,l as se,r as ce,s as J,t as le,u as ue}from"./mcp-marketplace-utils-DSLou4n7.js";import{t as Y}from"./vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js";import{n as de}from"./circle-plus-check-toggle-BVzv5EkZ.js";import{n as fe}from"./extensions-navigation-Bnx32WAb.js";import{n as pe}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";import{t as me}from"./enum-filter-dropdown-CctILg5t.js";var X=e(t(),1);function Z(){let e=i(),{data:t}=T();return o({mutationFn:async({serverId:e,server:n})=>{let r=t?.mcp_config??x(t?.agent_settings?.mcp_config),i=r[e];if(!i)throw Error(`MCP server "${e}" no longer exists.`);let a=P({id:e,type:i.transport===`stdio`?`stdio`:i.transport===`sse`?`sse`:`shttp`,name:e,...i.transport===`stdio`?{command:i.command,args:i.args??void 0,env:i.env??void 0}:{url:i.url,headers:i.headers??void 0,auth:i.auth??void 0}}),o=C(n.name||e);if(o!==e){if(o in r)throw Error(`MCP server "${o}" already exists.`);return await w.patchMcpConfig(S(e,o,i,n)),a}return await w.patchMcpServer(e,v(i,n)),a},onSuccess:(t,n)=>{N(t),N(P(n.server)),e.invalidateQueries({queryKey:l.personal()})}})}function he(e){return e.name?.trim()||void 0}function ge(e,t){let n=he(e);return n&&n!==t?.id?n:t?.name?t.name:e.type===`stdio`?n??e.command??``:e.url??``}var _e={status:`unchecked`};function ve(e){let t=P(e),n=X.useSyncExternalStore(re,()=>L()[t]??_e),r=X.useRef(e);return r.current=e,{health:n,probe:X.useCallback(()=>M(r.current),[]),reauthorize:X.useCallback(()=>z(r.current),[])}}var Q=n(),ye={unchecked:`bg-[var(--oh-text-tertiary)]`,checking:`bg-[var(--oh-interactive-selected)] animate-pulse`,healthy:`bg-[var(--oh-status-success)]`,failed:`bg-red-500`},$=`text-xs text-[var(--oh-muted)] underline transition-colors hover:text-white disabled:cursor-not-allowed disabled:opacity-60`;function be(e){return e.status===`healthy`?e.verification===`verified`?`healthy`:`healthy-connectivity`:e.status}function xe(e,t){switch(t.status){case`checking`:return e(p.MCP$HEALTH_STATUS_CHECKING);case`healthy`:return t.verification===`verified`?e(p.MCP$HEALTH_STATUS_VERIFIED,{count:t.toolCount}):e(p.MCP$HEALTH_STATUS_CONNECTIVITY_ONLY);case`failed`:return R(e,t.kind,t.error);default:return e(p.MCP$HEALTH_STATUS_UNCHECKED)}}function Se({server:e,catalog:t,onEdit:n}){let{t:r}=a(`openhands`),{backend:i}=d(),{health:o,probe:l,reauthorize:u}=ve(e),{mutate:m}=Z();if(i.kind===`cloud`)return null;let h=o.status===`checking`,g=o.status===`failed`,_=xe(r,o),v=async()=>{let t=await u();if(!t?.ok||!t.oauth_state||e.auth?.strategy!==`oauth2`)return;let n={...e,auth:{...e.auth,state:t.oauth_state}};m({serverId:e.id,server:n},{onSuccess:()=>H(n,t,[]),onError:e=>s(c(e)||r(p.ERROR$GENERIC))})};return(0,Q.jsxs)(`div`,{"data-testid":`mcp-server-health-${e.id}`,role:`presentation`,className:`flex flex-col gap-1.5`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{"data-testid":`mcp-health-dot`,"data-status":be(o),"aria-hidden":`true`,className:f(`inline-block h-2 w-2 shrink-0 rounded-full`,ye[o.status])}),(0,Q.jsx)(`p`,{"data-testid":`mcp-health-label-${e.id}`,className:f(`line-clamp-2 break-words text-xs`,g?`text-red-500`:`text-tertiary-alt`),title:_,children:_})]}),o.status===`healthy`&&o.verification===`connectivity-only`?(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:r(p.MCP$HEALTH_CONNECTIVITY_ONLY_HINT)}):null,(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,Q.jsx)(`button`,{type:`button`,"data-testid":`mcp-health-probe-${e.id}`,className:$,onClick:()=>void l(),disabled:h,children:r(g?p.MCP$HEALTH_RETRY:p.MCP$TEST_BUTTON)}),g&&o.kind===`credentials`?(0,Q.jsx)(`button`,{type:`button`,"data-testid":`mcp-health-update-credentials-${e.id}`,className:$,onClick:n,children:r(p.MCP$HEALTH_UPDATE_CREDENTIALS)}):null,g&&e.auth?.strategy===`oauth2`?(0,Q.jsx)(`button`,{type:`button`,"data-testid":`mcp-health-reauthorize-${e.id}`,className:$,onClick:()=>void v(),children:r(p.MCP$HEALTH_REAUTHORIZE)}):null,g&&t?.docsUrl?(0,Q.jsx)(`a`,{href:t.docsUrl,target:`_blank`,rel:`noreferrer`,className:$,children:r(p.MCP$VIEW_DOCS)}):null]})]})}function Ce(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function we(e){if(e.type===`stdio`){let t=e.args&&e.args.length>0?` ${e.args.join(` `)}`:``;return`${e.command??``}${t}`.trim()}return e.url??``}function Te({server:e,onEdit:t,onToggleEnabled:n}){let{t:r}=a(`openhands`),i=le(e,J(Y)),o=ge(e,i),s=we(e),c=Ce(e.type);return(0,Q.jsx)(`div`,{"data-testid":`mcp-server-item`,"data-server-id":e.id,role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"aria-label":r(p.MCP$EDIT_SERVER_ARIA,{name:o}),className:f(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,W,K),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:i,fallback:(0,Q.jsx)(m,{strokeWidth:2.25})}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,title:o,children:o}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:c})]}),(0,Q.jsx)(de,{testId:`mcp-installed-toggle-${e.id}`,isSelected:e.enabled!==!1,onToggle:n,enableLabelKey:p.MCP$TOGGLE_ENABLE_SERVER,disableLabelKey:p.MCP$TOGGLE_DISABLE_SERVER,disableTooltipKey:p.COMMON$DISABLE})]}),i?.description?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-description-${e.id}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:i.description}):null,s?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-detail-${e.id}`,className:`truncate text-xs text-tertiary-alt`,title:s,children:s}):null,(0,Q.jsx)(Se,{server:e,catalog:i,onEdit:t})]})]})})}function Ee({servers:e,hasAnyInstalled:t,query:n=``,onEdit:r,onToggleEnabled:i}){let{t:o}=a(`openhands`);return e.length===0?t&&n.trim().length>0?(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-empty-search`,className:`rounded-xl border border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:o(p.MCP$SEARCH_EMPTY)})}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-installed-empty`,className:ie,children:[(0,Q.jsx)(`p`,{className:`text-sm text-white`,children:o(p.MCP$INSTALLED_EMPTY_TITLE)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light mt-1`,children:o(p.MCP$INSTALLED_EMPTY_HINT)})]}):(0,Q.jsx)(`div`,{className:G,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-list`,className:q,children:e.map(e=>(0,Q.jsx)(Te,{server:e,onEdit:()=>r(e),onToggleEnabled:t=>i(e,t)},e.id))})})}function De({entry:e,onClick:t,onAdd:n}){let r=ce(e),i=(()=>{switch(r?.kind){case`stdio`:return`STDIO`;case`shttp`:return`HTTP`;case`sse`:return`SSE`;default:return``}})();return(0,Q.jsx)(`div`,{role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"data-testid":`mcp-marketplace-card-${e.id}`,className:f(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,W,K),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:e}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:i})]}),(0,Q.jsx)(de,{testId:`mcp-marketplace-toggle-${e.id}`,isSelected:!1,onToggle:e=>{e&&n()},enableLabelKey:p.MCP$TOGGLE_ADD_SERVER,disableLabelKey:p.MCP$TOGGLE_ADD_SERVER})]}),(0,Q.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-tertiary-light`,children:e.description})]})]})})}function Oe({onSelect:e,onAdd:t,query:n=``}){let{t:r}=a(`openhands`),i=ae(J(Y)).filter(e=>ue(e,n));return(0,Q.jsxs)(`section`,{"data-testid":`mcp-marketplace-section`,className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-medium text-foreground`,children:r(p.MCP$LIBRARY_TITLE)}),i.length===0?(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-empty`,className:`rounded-xl border border-dashed border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:r(p.MCP$SEARCH_EMPTY)})}):(0,Q.jsx)(`div`,{className:G,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-grid`,className:q,children:i.map(n=>(0,Q.jsx)(De,{entry:n,onClick:()=>e(n),onAdd:()=>t(n)},n.id))})})]})}function ke({mode:e,server:t,existingServers:n,onSubmit:r,onCancel:i,onDelete:o,isActionDisabled:s=!1,onTest:c,isTestPending:l=!1,testMessage:u=null}){let{t:d}=a(`openhands`),[m,h]=X.useState(t?.type||`sse`),[_,v]=X.useState(()=>t?.auth?.strategy===`oauth2`?`oauth2`:t?.auth?.strategy===`header`?`header`:t?.auth?.strategy===`bearer`||t?.auth?.strategy===`api_key`?`bearer`:`none`),[x,S]=X.useState(()=>t?.auth?.strategy===`oauth2`?t.auth.authentication?.client_auth_method??`auto`:`auto`),[C,w]=X.useState(null),T=X.useRef(null),ee=[{key:`sse`,label:d(p.SETTINGS$MCP_SERVER_TYPE_SSE)},{key:`stdio`,label:d(p.SETTINGS$MCP_SERVER_TYPE_STDIO)},{key:`shttp`,label:d(p.SETTINGS$MCP_SERVER_TYPE_SHTTP)}],E=[{key:`none`,label:d(p.SETTINGS$MCP_AUTH_MODE_NONE)},{key:`bearer`,label:d(p.SETTINGS$MCP_AUTH_MODE_BEARER)},{key:`header`,label:d(p.SETTINGS$MCP_AUTH_MODE_HEADER)},{key:`oauth2`,label:d(p.SETTINGS$MCP_AUTH_MODE_OAUTH)}],k=[{key:`auto`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_AUTO)},{key:`none`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_NONE)},{key:`client_secret_post`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_SECRET_POST)},{key:`client_secret_basic`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_SECRET_BASIC)},{key:`private_key_jwt`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_PRIVATE_KEY_JWT)}],te=e=>{if(!e)return d(p.SETTINGS$MCP_ERROR_URL_REQUIRED);try{let t=new URL(e);if(![`http:`,`https:`].includes(t.protocol))return d(p.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL)}catch{return d(p.SETTINGS$MCP_ERROR_URL_INVALID)}return null},M=e=>e?b(e)?null:d(p.SETTINGS$MCP_ERROR_NAME_INVALID):d(p.SETTINGS$MCP_ERROR_NAME_REQUIRED),N=r=>!n||!(e===`add`||e===`edit`&&t?.name!==r)?null:n.filter(e=>e.type===`stdio`).map(e=>e.name).filter(Boolean).includes(r)?d(p.SETTINGS$MCP_ERROR_NAME_DUPLICATE):null,P=e=>e?e.includes(` `)?d(p.SETTINGS$MCP_ERROR_COMMAND_NO_SPACES):null:d(p.SETTINGS$MCP_ERROR_COMMAND_REQUIRED),F=r=>{if(!n)return null;let i=t?.url;return(e===`add`||e===`edit`&&i!==r)&&n.some(e=>(e.type===`sse`||e.type===`shttp`)&&e.url===r)?d(p.SETTINGS$MCP_ERROR_URL_DUPLICATE):null},I=e=>{if(!e.trim())return null;let t=e.split(`
|
|
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{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as o}from"./useMutation-6ZsQCqAn.js";import{Ft as s,L as c,Mt as l,jt as u,n as d}from"./active-backend-context-BZDG15C0.js";import{t as f,z as p}from"./utils-DUD5ScdA.js";import{t as m}from"./puzzle-Bt2B1rzf.js";import{t as h}from"./search-CYSDBczG.js";import{t as g}from"./trash-2-yZnDM4Ji.js";import{t as _}from"./x-86ZCfxKY.js";import{a as v,d as y,f as b,l as x,o as S,p as C,t as w}from"./settings-service.api-3yAUFcaP.js";import{n as T}from"./use-settings-C6ZxpBDX.js";import{t as ee}from"./modal-backdrop-BSzNhM4r.js";import{n as E}from"./modal-classes-D5_b5vMi.js";import{l as D}from"./form-control-classes-CGXBLcn1.js";import{t as O}from"./brand-button-Blxv5nww.js";import{t as k}from"./modal-close-button-objukxk_.js";import{n as A,t as j}from"./settings-input-CWUEHHvS.js";import{t as te}from"./confirmation-modal-CiEwxZAA.js";import{a as M,c as N,d as P,f as F,i as I,l as L,n as R,o as z,p as B,r as V,s as H,t as ne,u as re}from"./install-server-modal-D7zIqNKz.js";import{t as U}from"./settings-dropdown-input-Ba1UN5Du.js";import{a as W,n as G,o as ie,r as K,t as q}from"./extension-module-card-classes-Bo43vY5V.js";import{a as ae,d as oe,f as se,l as ce,r as le,s as J,t as ue}from"./mcp-marketplace-utils-BJWJgbB6.js";import{t as Y}from"./vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js";import{n as de}from"./circle-plus-check-toggle-ASbpB8vN.js";import{n as fe}from"./extensions-navigation-C4sgZg-y.js";import{n as pe}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";import{t as me}from"./enum-filter-dropdown-Fk8k60nk.js";var X=e(t(),1);function Z(){let e=i(),{data:t}=T();return o({mutationFn:async({serverId:e,server:n})=>{let r=t?.mcp_config??x(t?.agent_settings?.mcp_config),i=r[e];if(!i)throw Error(`MCP server "${e}" no longer exists.`);let a=P({id:e,type:i.transport===`stdio`?`stdio`:i.transport===`sse`?`sse`:`shttp`,name:e,...i.transport===`stdio`?{command:i.command,args:i.args??void 0,env:i.env??void 0}:{url:i.url,headers:i.headers??void 0,auth:i.auth??void 0}}),o=C(n.name||e);if(o!==e){if(o in r)throw Error(`MCP server "${o}" already exists.`);return await w.patchMcpConfig(S(e,o,i,n)),a}return await w.patchMcpServer(e,v(i,n)),a},onSuccess:(t,n)=>{N(t),N(P(n.server)),e.invalidateQueries({queryKey:c.personal()})}})}function he(e){return e.name?.trim()||void 0}function ge(e,t){let n=he(e);return n&&n!==t?.id?n:t?.name?t.name:e.type===`stdio`?n??e.command??``:e.url??``}var _e={status:`unchecked`};function ve(e){let t=P(e),n=X.useSyncExternalStore(re,()=>L()[t]??_e),r=X.useRef(e);return r.current=e,{health:n,probe:X.useCallback(()=>M(r.current),[]),reauthorize:X.useCallback(()=>z(r.current),[])}}var Q=n(),ye={unchecked:`bg-[var(--oh-text-tertiary)]`,checking:`bg-[var(--oh-interactive-selected)] animate-pulse`,healthy:`bg-[var(--oh-status-success)]`,failed:`bg-red-500`},$=`text-xs text-[var(--oh-muted)] underline transition-colors hover:text-white disabled:cursor-not-allowed disabled:opacity-60`;function be(e){return e.status===`healthy`?e.verification===`verified`?`healthy`:`healthy-connectivity`:e.status}function xe(e,t){switch(t.status){case`checking`:return e(p.MCP$HEALTH_STATUS_CHECKING);case`healthy`:return t.verification===`verified`?e(p.MCP$HEALTH_STATUS_VERIFIED,{count:t.toolCount}):e(p.MCP$HEALTH_STATUS_CONNECTIVITY_ONLY);case`failed`:return R(e,t.kind,t.error);default:return e(p.MCP$HEALTH_STATUS_UNCHECKED)}}function Se({server:e,catalog:t,onEdit:n}){let{t:r}=a(`openhands`),{backend:i}=d(),{health:o,probe:c,reauthorize:l}=ve(e),{mutate:m}=Z();if(i.kind===`cloud`)return null;let h=o.status===`checking`,g=o.status===`failed`,_=xe(r,o),v=async()=>{let t=await l();if(!t?.ok||!t.oauth_state||e.auth?.strategy!==`oauth2`)return;let n={...e,auth:{...e.auth,state:t.oauth_state}};m({serverId:e.id,server:n},{onSuccess:()=>H(n,t,[]),onError:e=>u(s(e)||r(p.ERROR$GENERIC))})};return(0,Q.jsxs)(`div`,{"data-testid":`mcp-server-health-${e.id}`,role:`presentation`,className:`flex flex-col gap-1.5`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{"data-testid":`mcp-health-dot`,"data-status":be(o),"aria-hidden":`true`,className:f(`inline-block h-2 w-2 shrink-0 rounded-full`,ye[o.status])}),(0,Q.jsx)(`p`,{"data-testid":`mcp-health-label-${e.id}`,className:f(`line-clamp-2 break-words text-xs`,g?`text-red-500`:`text-tertiary-alt`),title:_,children:_})]}),o.status===`healthy`&&o.verification===`connectivity-only`?(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:r(p.MCP$HEALTH_CONNECTIVITY_ONLY_HINT)}):null,(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,Q.jsx)(`button`,{type:`button`,"data-testid":`mcp-health-probe-${e.id}`,className:$,onClick:()=>void c(),disabled:h,children:r(g?p.MCP$HEALTH_RETRY:p.MCP$TEST_BUTTON)}),g&&o.kind===`credentials`?(0,Q.jsx)(`button`,{type:`button`,"data-testid":`mcp-health-update-credentials-${e.id}`,className:$,onClick:n,children:r(p.MCP$HEALTH_UPDATE_CREDENTIALS)}):null,g&&e.auth?.strategy===`oauth2`?(0,Q.jsx)(`button`,{type:`button`,"data-testid":`mcp-health-reauthorize-${e.id}`,className:$,onClick:()=>void v(),children:r(p.MCP$HEALTH_REAUTHORIZE)}):null,g&&t?.docsUrl?(0,Q.jsx)(`a`,{href:t.docsUrl,target:`_blank`,rel:`noreferrer`,className:$,children:r(p.MCP$VIEW_DOCS)}):null]})]})}function Ce(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function we(e){if(e.type===`stdio`){let t=e.args&&e.args.length>0?` ${e.args.join(` `)}`:``;return`${e.command??``}${t}`.trim()}return e.url??``}function Te({server:e,onEdit:t,onToggleEnabled:n}){let{t:r}=a(`openhands`),i=ue(e,J(Y)),o=ge(e,i),s=we(e),c=Ce(e.type);return(0,Q.jsx)(`div`,{"data-testid":`mcp-server-item`,"data-server-id":e.id,role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"aria-label":r(p.MCP$EDIT_SERVER_ARIA,{name:o}),className:f(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,W,K),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:i,fallback:(0,Q.jsx)(m,{strokeWidth:2.25})}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,title:o,children:o}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:c})]}),(0,Q.jsx)(de,{testId:`mcp-installed-toggle-${e.id}`,isSelected:e.enabled!==!1,onToggle:n,enableLabelKey:p.MCP$TOGGLE_ENABLE_SERVER,disableLabelKey:p.MCP$TOGGLE_DISABLE_SERVER,disableTooltipKey:p.COMMON$DISABLE})]}),i?.description?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-description-${e.id}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:i.description}):null,s?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-detail-${e.id}`,className:`truncate text-xs text-tertiary-alt`,title:s,children:s}):null,(0,Q.jsx)(Se,{server:e,catalog:i,onEdit:t})]})]})})}function Ee({servers:e,hasAnyInstalled:t,query:n=``,onEdit:r,onToggleEnabled:i}){let{t:o}=a(`openhands`);return e.length===0?t&&n.trim().length>0?(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-empty-search`,className:`rounded-xl border border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:o(p.MCP$SEARCH_EMPTY)})}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-installed-empty`,className:ie,children:[(0,Q.jsx)(`p`,{className:`text-sm text-white`,children:o(p.MCP$INSTALLED_EMPTY_TITLE)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light mt-1`,children:o(p.MCP$INSTALLED_EMPTY_HINT)})]}):(0,Q.jsx)(`div`,{className:G,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-list`,className:q,children:e.map(e=>(0,Q.jsx)(Te,{server:e,onEdit:()=>r(e),onToggleEnabled:t=>i(e,t)},e.id))})})}function De({entry:e,onClick:t,onAdd:n}){let r=le(e),i=(()=>{switch(r?.kind){case`stdio`:return`STDIO`;case`shttp`:return`HTTP`;case`sse`:return`SSE`;default:return``}})();return(0,Q.jsx)(`div`,{role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"data-testid":`mcp-marketplace-card-${e.id}`,className:f(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,W,K),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:e}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:i})]}),(0,Q.jsx)(de,{testId:`mcp-marketplace-toggle-${e.id}`,isSelected:!1,onToggle:e=>{e&&n()},enableLabelKey:p.MCP$TOGGLE_ADD_SERVER,disableLabelKey:p.MCP$TOGGLE_ADD_SERVER})]}),(0,Q.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-tertiary-light`,children:e.description})]})]})})}function Oe({onSelect:e,onAdd:t,query:n=``}){let{t:r}=a(`openhands`),i=ae(J(Y)).filter(e=>oe(e,n));return(0,Q.jsxs)(`section`,{"data-testid":`mcp-marketplace-section`,className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-medium text-foreground`,children:r(p.MCP$LIBRARY_TITLE)}),i.length===0?(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-empty`,className:`rounded-xl border border-dashed border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:r(p.MCP$SEARCH_EMPTY)})}):(0,Q.jsx)(`div`,{className:G,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-grid`,className:q,children:i.map(n=>(0,Q.jsx)(De,{entry:n,onClick:()=>e(n),onAdd:()=>t(n)},n.id))})})]})}function ke({mode:e,server:t,existingServers:n,onSubmit:r,onCancel:i,onDelete:o,isActionDisabled:s=!1,onTest:c,isTestPending:l=!1,testMessage:u=null}){let{t:d}=a(`openhands`),[m,h]=X.useState(t?.type||`sse`),[_,v]=X.useState(()=>t?.auth?.strategy===`oauth2`?`oauth2`:t?.auth?.strategy===`header`?`header`:t?.auth?.strategy===`bearer`||t?.auth?.strategy===`api_key`?`bearer`:`none`),[x,S]=X.useState(()=>t?.auth?.strategy===`oauth2`?t.auth.authentication?.client_auth_method??`auto`:`auto`),[C,w]=X.useState(null),T=X.useRef(null),ee=[{key:`sse`,label:d(p.SETTINGS$MCP_SERVER_TYPE_SSE)},{key:`stdio`,label:d(p.SETTINGS$MCP_SERVER_TYPE_STDIO)},{key:`shttp`,label:d(p.SETTINGS$MCP_SERVER_TYPE_SHTTP)}],E=[{key:`none`,label:d(p.SETTINGS$MCP_AUTH_MODE_NONE)},{key:`bearer`,label:d(p.SETTINGS$MCP_AUTH_MODE_BEARER)},{key:`header`,label:d(p.SETTINGS$MCP_AUTH_MODE_HEADER)},{key:`oauth2`,label:d(p.SETTINGS$MCP_AUTH_MODE_OAUTH)}],k=[{key:`auto`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_AUTO)},{key:`none`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_NONE)},{key:`client_secret_post`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_SECRET_POST)},{key:`client_secret_basic`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_SECRET_BASIC)},{key:`private_key_jwt`,label:d(p.SETTINGS$MCP_OAUTH_CLIENT_AUTH_PRIVATE_KEY_JWT)}],te=e=>{if(!e)return d(p.SETTINGS$MCP_ERROR_URL_REQUIRED);try{let t=new URL(e);if(![`http:`,`https:`].includes(t.protocol))return d(p.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL)}catch{return d(p.SETTINGS$MCP_ERROR_URL_INVALID)}return null},M=e=>e?b(e)?null:d(p.SETTINGS$MCP_ERROR_NAME_INVALID):d(p.SETTINGS$MCP_ERROR_NAME_REQUIRED),N=r=>!n||!(e===`add`||e===`edit`&&t?.name!==r)?null:n.filter(e=>e.type===`stdio`).map(e=>e.name).filter(Boolean).includes(r)?d(p.SETTINGS$MCP_ERROR_NAME_DUPLICATE):null,P=e=>e?e.includes(` `)?d(p.SETTINGS$MCP_ERROR_COMMAND_NO_SPACES):null:d(p.SETTINGS$MCP_ERROR_COMMAND_REQUIRED),F=r=>{if(!n)return null;let i=t?.url;return(e===`add`||e===`edit`&&i!==r)&&n.some(e=>(e.type===`sse`||e.type===`shttp`)&&e.url===r)?d(p.SETTINGS$MCP_ERROR_URL_DUPLICATE):null},I=e=>{if(!e.trim())return null;let t=e.split(`
|
|
2
2
|
`);for(let e=0;e<t.length;e+=1){let n=t[e].trim();if(n){let e=n.indexOf(`=`);if(e===-1||!n.substring(0,e).trim())return d(p.SETTINGS$MCP_ERROR_ENV_INVALID_FORMAT)}}return null},L=e=>{if(_===`header`){let t=e.get(`headers`)?.toString()||``;return t.trim()?I(t):d(p.SETTINGS$MCP_ERROR_HEADER_REQUIRED)}if(_===`oauth2`){let t=e.get(`oauth_client_id`)?.toString().trim();if(e.get(`oauth_client_secret`)?.toString().trim()&&!t)return d(p.SETTINGS$MCP_ERROR_OAUTH_SECRET_REQUIRES_ID)}return null},R=e=>{if(!e.trim())return null;let t=parseInt(e.trim(),10);return Number.isNaN(t)?d(p.SETTINGS$MCP_ERROR_TIMEOUT_INVALID_NUMBER):t<=0?d(p.SETTINGS$MCP_ERROR_TIMEOUT_POSITIVE):t>3600?d(p.SETTINGS$MCP_ERROR_TIMEOUT_MAX_EXCEEDED):null},z=e=>{let t=e.get(`name`)?.toString().trim()||``,n=e.get(`command`)?.toString().trim()||``,r=e.get(`env`)?.toString()||``;return M(t)||N(t)||P(n)||I(r)||null},B=e=>{if(m===`sse`||m===`shttp`){let t=e.get(`url`)?.toString().trim()||``,n=te(t);if(n)return n;let r=F(t);if(r)return r;let i=e.get(`name`)?.toString().trim()||``;if(i&&!b(i))return d(p.SETTINGS$MCP_ERROR_NAME_INVALID);if(m===`shttp`){let t=R(e.get(`timeout`)?.toString()||``);if(t)return t}return L(e)}return m===`stdio`?z(e):null},V=e=>{let t={},n=e.trim();if(!n)return t;for(let e of n.split(`
|
|
3
3
|
`)){let n=e.trim(),r=n.indexOf(`=`),i=r>=0?n.substring(0,r).trim():``;n&&r!==-1&&i&&(t[i]=n.substring(r+1).trim())}return t},H=e=>e?Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`
|
|
4
4
|
`):``,ne=e=>e?.strategy===`bearer`||e?.strategy===`api_key`?e.value??``:``,re=e=>e?.strategy===`header`?H(e.headers):``,W=t?.auth?.strategy===`oauth2`?t.auth.authentication:void 0,G=t?.auth?.strategy===`oauth2`?t.auth.state:void 0,ie=e=>{if(_===`none`)return;if(_===`bearer`){let n=e.get(`api_key`)?.toString().trim();return n?t?.auth?.strategy===`api_key`?{...t.auth,value:n}:{strategy:`bearer`,value:n}:void 0}if(_===`header`)return{strategy:`header`,headers:V(e.get(`headers`)?.toString()||``)};let n=e.get(`oauth_scopes`)?.toString().trim(),r=e.get(`oauth_client_id`)?.toString().trim(),i=e.get(`oauth_client_secret`)?.toString().trim();return{strategy:`oauth2`,authentication:{type:`oauth`,...x!==`auto`&&{client_auth_method:x},...n&&{scopes:n},...r&&{client_id:r},...i&&{client_secret:i}},...G&&{state:G}}},K=e=>{let n={id:t?.id||``,type:m,...t?.enabled===!1&&{enabled:!1}};if(m===`sse`||m===`shttp`){let r=e.get(`name`)?.toString().trim(),i=e.get(`url`)?.toString().trim(),a=e.get(`timeout`)?.toString().trim(),o=ie(e),s={...n,...r&&{name:r},url:i,...t?.headers&&{headers:t.headers},...o&&{auth:o}};if(m===`shttp`&&a){let e=parseInt(a,10);Number.isNaN(e)||(s.timeout=e)}return s}let r=e.get(`name`)?.toString().trim(),i=e.get(`command`)?.toString().trim(),a=e.get(`args`)?.toString().trim(),o=e.get(`env`)?.toString().trim(),s=a?a.split(`
|
|
@@ -6,4 +6,4 @@ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from".
|
|
|
6
6
|
`)||``,placeholder:`arg1
|
|
7
7
|
arg2
|
|
8
8
|
arg3`,className:f(D,`resize-none placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:d(p.SETTINGS$MCP_COMMAND_ARGUMENTS_HELP)})]}),(0,Q.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-sm`,children:d(p.SETTINGS$MCP_ENVIRONMENT_VARIABLES)}),(0,Q.jsx)(A,{})]}),(0,Q.jsx)(`textarea`,{"data-testid":`env-input`,name:`env`,rows:4,defaultValue:H(t?.env),placeholder:`KEY1=value1
|
|
9
|
-
KEY2=value2`,className:f(D,`resize-none placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)})]})]}),u&&(0,Q.jsx)(`p`,{"data-testid":`mcp-test-message`,className:u.ok?`text-sm text-green-500 whitespace-pre-wrap`:`text-sm text-red-500 whitespace-pre-wrap`,children:u.text}),(0,Q.jsxs)(`div`,{className:f(`flex w-full items-center gap-2`,o?`justify-between`:`justify-end`),children:[o?(0,Q.jsx)(O,{testId:`mcp-custom-editor-delete`,type:`button`,variant:`secondary`,onClick:o,isDisabled:s,startContent:(0,Q.jsx)(g,{"aria-hidden":!0,className:`size-4`,strokeWidth:2}),children:d(p.BUTTON$DELETE)}):null,(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(O,{testId:`cancel-button`,type:`button`,variant:`secondary`,onClick:i,isDisabled:s,children:d(p.BUTTON$CANCEL)}),c&&(0,Q.jsx)(O,{testId:`mcp-test-connection`,type:`button`,variant:`secondary`,onClick:()=>{if(!c||!T.current)return;w(null);let e=new FormData(T.current),t=B(e);if(t){w(t);return}c(K(e))},isDisabled:s||l,children:d(l?p.MCP$VERIFYING:p.MCP$TEST_BUTTON)}),(0,Q.jsxs)(O,{testId:`submit-button`,type:`submit`,variant:`primary`,isDisabled:s||l,children:[e===`add`&&d(p.SETTINGS$MCP_ADD_SERVER),e===`edit`&&d(p.SETTINGS$MCP_SAVE_SERVER)]})]})]})]})}function Ae(){let e=i();return o({mutationFn:async e=>{await w.deleteMcpServer(e.id)},onSuccess:(t,n)=>{N(P(n)),e.invalidateQueries({queryKey:
|
|
9
|
+
KEY2=value2`,className:f(D,`resize-none placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)})]})]}),u&&(0,Q.jsx)(`p`,{"data-testid":`mcp-test-message`,className:u.ok?`text-sm text-green-500 whitespace-pre-wrap`:`text-sm text-red-500 whitespace-pre-wrap`,children:u.text}),(0,Q.jsxs)(`div`,{className:f(`flex w-full items-center gap-2`,o?`justify-between`:`justify-end`),children:[o?(0,Q.jsx)(O,{testId:`mcp-custom-editor-delete`,type:`button`,variant:`secondary`,onClick:o,isDisabled:s,startContent:(0,Q.jsx)(g,{"aria-hidden":!0,className:`size-4`,strokeWidth:2}),children:d(p.BUTTON$DELETE)}):null,(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(O,{testId:`cancel-button`,type:`button`,variant:`secondary`,onClick:i,isDisabled:s,children:d(p.BUTTON$CANCEL)}),c&&(0,Q.jsx)(O,{testId:`mcp-test-connection`,type:`button`,variant:`secondary`,onClick:()=>{if(!c||!T.current)return;w(null);let e=new FormData(T.current),t=B(e);if(t){w(t);return}c(K(e))},isDisabled:s||l,children:d(l?p.MCP$VERIFYING:p.MCP$TEST_BUTTON)}),(0,Q.jsxs)(O,{testId:`submit-button`,type:`submit`,variant:`primary`,isDisabled:s||l,children:[e===`add`&&d(p.SETTINGS$MCP_ADD_SERVER),e===`edit`&&d(p.SETTINGS$MCP_SAVE_SERVER)]})]})]})]})}function Ae(){let e=i();return o({mutationFn:async e=>{await w.deleteMcpServer(e.id)},onSuccess:(t,n)=>{N(P(n)),e.invalidateQueries({queryKey:c.personal()})}})}function je({server:e,existingServers:t,onClose:n}){let{t:r}=a(`openhands`),{mutate:i,isPending:o}=I(),{mutate:c,isPending:m}=Z(),{mutate:h,isPending:g}=Ae(),{mutate:_,isPending:v,data:y,reset:b}=V(),[x,S]=X.useState(!1),[C,w]=X.useState(null),[T,D]=X.useState(!1),{backend:O}=d(),A=O.kind===`cloud`,j=!!e.id,M=o||m||g,N=M||v||T||x,P=X.useMemo(()=>{let e=C??y;return e?e.ok?{ok:!0,text:r(p.MCP$TEST_SUCCESS,{count:e.tools.length})}:{ok:!1,text:R(r,e.error_kind,e.error)}:null},[C,y,r]),L=(n,r)=>{A||H(n,r,j?t.filter(t=>t.id!==e.id):t)},z=e=>{if(e instanceof Error&&e.message===`Replace or clear the stored credential before renaming this MCP server.`){u(e.message);return}u(s(e)||r(p.ERROR$GENERIC))};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ee,{onClose:N?void 0:n,closeOnEscape:!N,"aria-label":r(j?p.MCP$EDIT_CUSTOM_TITLE:p.MCP$ADD_CUSTOM_TITLE),children:(0,Q.jsxs)(`div`,{"data-testid":`mcp-custom-editor`,className:`relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar`,children:[(0,Q.jsx)(k,{onClose:n,testId:`mcp-custom-editor-close`,disabled:N}),(0,Q.jsx)(`h2`,{className:f(`mb-4 pr-6`,E),children:r(j?p.MCP$EDIT_CUSTOM_TITLE:p.MCP$ADD_CUSTOM_TITLE)}),(0,Q.jsx)(ke,{mode:j?`edit`:`add`,server:j?e:void 0,existingServers:t,onSubmit:t=>{if(b(),w(null),t.auth?.strategy===`oauth2`){D(!0),F.authorizeOAuth(t).then(r=>{if(w(r),!r.ok)return;let a=r.oauth_state?{...t,auth:{...t.auth,state:r.oauth_state}}:t,o=()=>{L(a,r),n()};j?c({serverId:e.id,server:a},{onSuccess:o,onError:z}):i(a,{onSuccess:o,onError:z})}).catch(z).finally(()=>D(!1));return}_(t,{onSuccess:r=>{if(!r.ok)return;let a=r.oauth_state&&t.auth?.strategy===`oauth2`?{...t,auth:{...t.auth,state:r.oauth_state}}:t,o=()=>{L(a,r),n()};j?c({serverId:e.id,server:a},{onSuccess:o,onError:z}):i(a,{onSuccess:o,onError:z})},onError:z})},onCancel:n,onDelete:j?()=>S(!0):void 0,isActionDisabled:M,onTest:A?void 0:e=>{if(w(null),e.auth?.strategy===`oauth2`&&!A){D(!0),F.authorizeOAuth(e).then(w).catch(z).finally(()=>D(!1));return}_(e)},isTestPending:v||T,testMessage:A?null:P})]})}),x?(0,Q.jsx)(te,{text:r(p.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>S(!1),onConfirm:()=>{h(e,{onSuccess:()=>{l(r(p.MCP$REMOVE_SUCCESS)),S(!1),n()},onError:e=>{z(e),S(!1)}})},isConfirming:g}):null]})}var Me=[`all`,`installed`,`library`],Ne={all:p.MCP$SECTION_FILTER_ALL,installed:p.MCP$INSTALLED_TITLE,library:p.MCP$LIBRARY_TITLE};function Pe({value:e,onChange:t}){return(0,Q.jsx)(me,{testId:`mcp-section-filter`,value:e,onChange:t,options:Me,labelKeyByValue:Ne})}function Fe({search:e,onSearchChange:t,sectionFilter:n,onSectionFilterChange:r}){let{t:i}=a(`openhands`);return(0,Q.jsxs)(`div`,{"data-testid":`mcp-toolbar`,className:`flex items-stretch gap-2`,children:[(0,Q.jsxs)(`div`,{"data-testid":`mcp-search`,className:f(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,Q.jsx)(h,{className:`ml-3 h-4 w-4 text-tertiary-alt shrink-0`,"aria-hidden":!0}),(0,Q.jsx)(`input`,{type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(p.MCP$SEARCH_PLACEHOLDER),"aria-label":i(p.MCP$SEARCH_PLACEHOLDER),"data-testid":`mcp-search-input`,className:f(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,Q.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(p.MCP$SEARCH_CLEAR),"data-testid":`mcp-search-clear`,className:`mr-2 p-1 rounded text-tertiary-alt hover:text-content-1 cursor-pointer`,children:(0,Q.jsx)(_,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,Q.jsx)(Pe,{value:n,onChange:r})]})}var Ie=r(function(){let{t:e}=a(`openhands`),{data:t,isLoading:n}=T(),{mutate:r}=Z(),[i,o]=X.useState(null),[c,l]=X.useState(null),[d,f]=X.useState(``),[m,h]=X.useState(`all`),g=se(t?.mcp_config??x(t?.agent_settings?.mcp_config)),_=J(Y),v=g.filter(e=>ce(e,ue(e,_),d)),y=e=>{o(e)};return n||!t?(0,Q.jsxs)(`div`,{"data-testid":`mcp-page`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,Q.jsx)(fe,{}),(0,Q.jsx)(`div`,{className:`flex h-full flex-1 items-center justify-center px-4 md:px-0`,children:(0,Q.jsx)(`div`,{className:`h-8 w-8 rounded-full border-2 border-transparent border-t-white animate-spin`})})]}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-page`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,Q.jsx)(fe,{}),(0,Q.jsxs)(`main`,{className:pe,children:[(0,Q.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,Q.jsx)(`div`,{className:`min-w-0`,children:(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`h2`,{className:`text-xl font-medium leading-6 text-foreground`,children:e(p.SETTINGS$MCP_TITLE)}),(0,Q.jsx)(`div`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(p.MCP$PAGE_DESCRIPTION)})]}),(0,Q.jsx)(O,{type:`button`,variant:`secondary`,testId:`mcp-add-custom-server`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>l({id:``,type:`sse`}),children:e(p.MCP$ADD_CUSTOM)})]})}),(0,Q.jsx)(Fe,{search:d,onSearchChange:f,sectionFilter:m,onSectionFilterChange:h}),m===`library`?null:(0,Q.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:e(p.MCP$INSTALLED_TITLE)}),(0,Q.jsx)(Ee,{servers:v,hasAnyInstalled:g.length>0,query:d,onEdit:e=>{l(e)},onToggleEnabled:(t,n)=>{r({serverId:t.id,server:{...t,enabled:n}},{onError:t=>{u(s(t)||e(p.ERROR$GENERIC))}})}})]}),m===`installed`?null:(0,Q.jsx)(Oe,{onSelect:y,onAdd:y,query:d})]}),i&&(0,Q.jsx)(ne,{entry:i,existingServers:g,onClose:()=>o(null)}),c&&(0,Q.jsx)(je,{server:c,existingServers:g,onClose:()=>l(null)})]})]})});export{Ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./settings-service.api-3yAUFcaP.js";function t(t){return Object.entries(t).map(([t,n])=>n.transport===`stdio`?{id:t,type:`stdio`,name:t,command:n.command,args:n.args??void 0,env:n.env??void 0,enabled:e(n)}:{id:t,type:n.transport===`sse`?`sse`:`shttp`,name:t,url:n.url,headers:n.headers??void 0,timeout:n.timeout??void 0,auth:n.auth??void 0,enabled:e(n)})}function n(e){return e.connectionOptions.filter(e=>e.provider===`mcp`&&!!e.transport)}function r(e){return n(e)[0]}function i(e){if(e.auth.strategy!==`oauth2`)return!0;let t=e.auth.oauth;return t?!t.authorizationUrl&&!t.tokenUrl&&!t.registrationUrl&&!t.additionalAuthorizationParams&&!t.additionalTokenParams:!1}function a(e){return n(e).find(i)}function o(e){return r(e)?.transport}function s(e){switch(e){case`none`:return`none`;case`body`:return`client_secret_post`;case`basic`:return`client_secret_basic`;default:return}}function c(e){if(e.auth.strategy!==`oauth2`)return;let t={type:`oauth`},n=s(e.auth.oauth?.clientAuthentication);return n&&(t.client_auth_method=n),e.auth.oauth?.scopes?.length&&(t.scopes=e.auth.oauth.scopes),Object.keys(t).length>1?t:void 0}function l(e){return e.filter(u)}function u(e){return!!r(e)}var d=e=>{try{return new URL(e)}catch{return null}};function f(e,t){let n=typeof e==`string`?e:``,r=typeof t==`string`?t:``;if(!n||!r)return!1;let i=d(n),a=d(r);return!i||!a?n.replace(/\/+$/,``)===r.replace(/\/+$/,``):i.protocol===a.protocol&&i.host===a.host&&i.pathname.replace(/\/+$/,``)===a.pathname.replace(/\/+$/,``)}function p(e,t){return t.find(t=>h(e,t))??null}function m(e,t){for(let r of n(e)){let e=p(r.transport,t);if(e)return e}return null}function h(e,t){if(e.kind===`shttp`){let n=e.url;return t.type===`shttp`&&!!t.url&&f(t.url,n)}if(e.kind===`sse`){let n=e.url;return t.type===`sse`&&!!t.url&&f(t.url,n)}return t.type===`stdio`&&t.name===e.serverName}function g(e){return e.trim().toLowerCase()}function _(e){return e.map((e,t)=>({entry:e,index:t})).sort((e,t)=>(t.entry.popularityRank??0)-(e.entry.popularityRank??0)||e.index-t.index).map(({entry:e})=>e)}function v(e,t){return t.find(t=>t.id===e)}function y(e,t){let n=g(t);return n?[e.name,e.description,e.id,...e.keywords??[]].join(` `).toLowerCase().includes(n):!0}function b(e,t,n){let r=g(n);return r?[e.type,`name`in e?e.name:void 0,`command`in e?e.command:void 0,`args`in e?e.args?.join(` `):void 0,`url`in e?e.url:void 0,t?.name,t?.description,t?.id,...t?.keywords??[]].filter(Boolean).join(` `).toLowerCase().includes(r):!0}function x(e,t){return t.find(t=>n(t).some(t=>h(t.transport,e)))}export{_ as a,c,y as d,t as f,a as i,b as l,m as n,v as o,o as r,l as s,x as t,u};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{M as t,N as n,St as r,j as i,yt as a}from"./vendor-styling-Ck5D_A2Q.js";import{n as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as s}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{D as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as l}from"./useMutation-6ZsQCqAn.js";import{t as u}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js";import{Wt as d,ht as f,jt as p,n as m}from"./active-backend-context-BZDG15C0.js";import{P as h,T as g,t as _,w as v,z as y}from"./utils-DUD5ScdA.js";import{t as b}from"./chevron-down-CgGcmtE2.js";import{l as ee}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js";import{t as te}from"./loader-circle-D7IagAyF.js";import{t as ne}from"./use-config-C3PO4TBw.js";import{n as re}from"./use-settings-C6ZxpBDX.js";import{n as ie,o as x}from"./form-control-classes-CGXBLcn1.js";import{n as S}from"./navigation-context-CQZwH_tC.js";import{ot as C,st as ae}from"./vendor-markdown-j0kYzV48.js";import{t as oe}from"./styled-tooltip-B6JXcsmL.js";import{f as se,t as w}from"./conversation-store-Blc5xysY.js";import{c as T,d as ce,t as le}from"./agent-server-conversation-service.api-DK56YPTs.js";import{a as ue,d as de,h as fe,i as pe,p as me}from"./conversation-state-store-DMLtlHbE.js";import{n as he}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js";import{t as ge}from"./skills-B0IliMxw.js";import{r as _e}from"./format-model-name-BNPKVsIq.js";import{t as ve}from"./close-ScPlnwyq.js";import{t as ye}from"./copy-to-clipboard-button-BGxcUbgy.js";import{r as E}from"./typography-DB5HoCk0.js";import{t as be}from"./u-check-circle-BKn1spCL.js";import{A as xe,B as Se,D as Ce,E as we,I as Te,J as Ee,L as De,M as Oe,O as ke,P as Ae,S as je,T as Me,V as Ne,W as Pe,X as D,_ as Fe,b as Ie,g as Le,h as Re,i as ze,k as O,m as Be,n as Ve,o as He,q as Ue,r as We,t as k,z as A}from"./markdown-renderer-Cp6DlHQN.js";import{t as Ge}from"./syntax-highlighter-BGDg_7w9.js";var Ke=c(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(r(),1);function qe(){!t.current&&i();let[e]=(0,j.useState)(n.current);return e}var M=a(),Je=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(Je||{});function Ye(){let{conversationId:e}=D(),t=He();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Xe(e,t,n,r){return{action:Je.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var N=e=>(0,M.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,M.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),P=e=>(0,M.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,M.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function Ze({status:e}){return(0,M.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,M.jsx)(he,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function F({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let{t:c}=s(`openhands`),[l,u]=j.useState(r),d=t?(0,M.jsx)(`button`,{type:`button`,onClick:()=>u(e=>!e),className:`cursor-pointer text-left`,"aria-label":c(l?y.BUTTON$COLLAPSE:y.BUTTON$EXPAND),children:l?(0,M.jsx)(P,{className:_(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,M.jsx)(N,{className:_(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,M.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&d,o,(0,M.jsx)(`span`,{children:e}),i===`after`&&d]}),(0,M.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,M.jsx)(Ze,{status:n})]})]}),l&&(typeof t==`string`?(0,M.jsx)(k,{children:t}):t)]})}var Qe=e=>(0,M.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,M.jsx)(`path`,{d:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z`})}),$e=e=>(0,M.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,M.jsx)(`path`,{d:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z`})}),et={running:y.GOAL$STATUS_RUNNING,complete:y.GOAL$STATUS_COMPLETE,capped:y.GOAL$STATUS_CAPPED,interrupted:y.GOAL$STATUS_INTERRUPTED};function tt({status:e}){let{t}=s(`openhands`),{conversationId:n}=D(),r=Fe(e=>n?!!e.statusByConversation[n]?.active:!1),[i,a]=(0,j.useState)(!1),{active:o,objective:c,iteration:l,max_iterations:u,verdict:d}=e,f=d?Math.round(d.score*100):null,m=d?.missing?t(y.GOAL$MISSING,{missing:d.missing}):``,h=async(e,r)=>{if(!(!n||i)){a(!0);try{await e(n)}catch(e){p(e instanceof Error&&e.message?e.message:t(r))}finally{a(!1)}}},g=()=>h(async e=>{await fe(e),await de(e)},y.GOAL$STOP_FAILED),v=()=>h(me,y.GOAL$RESUME_FAILED),b=null;return n&&o?b=(0,M.jsx)(`button`,{type:`button`,"data-testid":`goal-stop`,disabled:i,onClick:g,className:_(ie,x),children:t(y.GOAL$STOP)}):n&&e.status===`interrupted`&&!r&&(b=(0,M.jsx)(`button`,{type:`button`,"data-testid":`goal-resume`,disabled:i,onClick:v,className:_(ie,x),children:t(y.GOAL$RESUME)})),(0,M.jsx)(`div`,{"data-testid":`goal-status`,className:`flex flex-col w-full`,children:(0,M.jsx)(F,{title:(0,M.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,M.jsx)(`span`,{className:`opacity-60`,children:t(y.GOAL$PREFIX)}),(0,M.jsx)(`span`,{children:c}),(0,M.jsx)(`span`,{className:`opacity-60`,children:t(y.GOAL$ROUND,{iteration:l,max:u})}),(0,M.jsx)(`span`,{children:t(et[e.status])}),f!==null&&(0,M.jsx)(`span`,{className:`opacity-60`,children:t(y.GOAL$SCORE,{score:f})}),o?(0,M.jsx)(`span`,{"data-testid":`goal-spinner`,className:`inline-block w-3.5 h-3.5 ml-1 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin`}):e.status===`complete`?(0,M.jsx)(`span`,{"data-testid":`goal-done`,className:`inline-flex ml-1`,children:(0,M.jsx)(Qe,{className:`w-3.5 h-3.5 fill-success`})}):(0,M.jsx)(`span`,{"data-testid":`goal-ended`,className:`inline-flex ml-1`,children:(0,M.jsx)($e,{className:`w-3.5 h-3.5 fill-[var(--oh-muted)]`})})]}),titleTrailing:b,details:m,initiallyExpanded:!o,chevronPosition:`before`})})}var nt=e=>(0,M.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,M.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,M.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,M.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,M.jsx)(`defs`,{children:(0,M.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,M.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function rt({profile:e}){let[t,n]=j.useState(!1),r=_e(e.model);return(0,M.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,M.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,M.jsx)(b,{size:14}):(0,M.jsx)(ee,{size:14})}),(0,M.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`hr`,{className:`border-neutral-700`}),(0,M.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${r??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function it({conversationId:e,anchorEventId:t}){let n=Re(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,M.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,M.jsx)(F,{title:(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,M.jsx)(nt,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,M.jsx)(u,{i18nKey:y.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,M.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,M.jsx)(F,{title:(0,M.jsx)(`span`,{children:t?(0,M.jsx)(u,{i18nKey:y.MODEL$NO_SAVED_PROFILES}):(0,M.jsx)(u,{i18nKey:y.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,M.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,M.jsx)(u,{i18nKey:y.MODEL$NO_PROFILES_HINT})}):(0,M.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,M.jsx)(rt,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}function at(e){let[t,n]=(0,j.useState)(!0),[r,i]=(0,j.useState)(!0),a=(0,j.useRef)(0),o=(0,j.useCallback)(e=>e.scrollTop+e.clientHeight>=e.scrollHeight-20,[]),s=(0,j.useCallback)(e=>{let t=o(e);i(t);let r=e.scrollTop,s=r<a.current;a.current=r,s&&n(!1),t&&n(!0)},[o]);return{scrollRef:e,autoScroll:t,setAutoScroll:n,scrollDomToBottom:(0,j.useCallback)(()=>{let t=e.current;t&&requestAnimationFrame(()=>{n(!0),i(!0),t.scrollTop=t.scrollHeight})},[e]),hitBottom:r,setHitBottom:i,onChatBodyScroll:s}}var ot=(0,j.createContext)(void 0);function st({children:e,value:t}){let n=at(j.useRef(null)),r=t||n;return(0,M.jsx)(ot.Provider,{value:r,children:e})}function ct(){let e=(0,j.useContext)(ot);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function lt(){return(0,j.useContext)(ot)}var I=1e3,ut=e=>`\`\`\`json\n${JSON.stringify(e,null,2)}\n\`\`\``,dt=e=>{switch(e.tool_kind){case`execute`:return`ACTION_MESSAGE$ACP_RUN`;case`edit`:return`ACTION_MESSAGE$ACP_EDIT`;case`read`:return`ACTION_MESSAGE$ACP_READ`;case`fetch`:return`ACTION_MESSAGE$ACP_FETCH`;default:return`ACTION_MESSAGE$ACP_TOOL`}},ft={read:[`Read`],edit:[`Edit`,`Write`],execute:[`Bash`,`Run`],fetch:[`Fetch`,`WebFetch`]},pt=e=>{let t=e.title,n=e.tool_kind;if(!t||!n)return t;let r=ft[n];if(!r)return t;for(let e of r)if(t.length>e.length&&t.startsWith(e)&&/\s/.test(t.charAt(e.length)))return t.slice(e.length).trimStart();return t},mt=e=>{if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}},ht=e=>e.length>1e3?`${e.slice(0,I)}...`:e,gt=e=>{let t=e.tool_kind,n=e.raw_input,r=e.raw_output,i=e.is_error,a=``;if(t===`execute`&&n&&typeof n==`object`&&`command`in n&&typeof n.command==`string`){let{command:e}=n;a+=`Command: \`${e}\`\n\n`}else if(n!=null&&n!==``){let e=mt(n);e.trim()&&(a+=`Input:\n\`\`\`json\n${e}\n\`\`\`\n\n`)}let o=ht(mt(r).trim()),s=i?`**Error:**`:`Output:`,c=o||d.t(y.OBSERVATION$COMMAND_NO_OUTPUT);return a+=`${s}\n\`\`\`\n${c}\n\`\`\``,a},L=(e,t)=>e?e.length>t?`${e.substring(0,t)}...`:e:``,_t=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),vt=e=>{let t=e.summary?.trim().replace(/\s+/g,` `)||``;return!t||_t(t)?null:t},yt=e=>{let t=vt(e);if(t)return{kind:`text`,text:t};let n=e.action.kind;switch(n){case`ExecuteBashAction`:case`TerminalAction`:return{kind:`translation`,key:`ACTION_MESSAGE$RUN`,values:{command:L(e.action.command,80)}};case`FileEditorAction`:case`StrReplaceEditorAction`:return{kind:`translation`,key:e.action.command===`view`?`ACTION_MESSAGE$READ`:e.action.command===`create`?`ACTION_MESSAGE$WRITE`:`ACTION_MESSAGE$EDIT`,values:{path:e.action.path}};case`MCPToolAction`:return{kind:`translation`,key:`ACTION_MESSAGE$CALL_TOOL_MCP`,values:{mcp_tool_name:e.tool_name}};case`InvokeSkillAction`:return{kind:`translation`,key:`ACTION_MESSAGE$INVOKE_SKILL`,values:{name:e.action.name}};case`TaskAction`:return{kind:`translation`,key:`ACTION_MESSAGE$TASK`,values:{name:e.action.subagent_type}};case`ThinkAction`:return{kind:`translation`,key:`ACTION_MESSAGE$THINK`,values:{}};case`FinishAction`:return{kind:`translation`,key:`ACTION_MESSAGE$FINISH`,values:{}};case`TaskTrackerAction`:return{kind:`translation`,key:`ACTION_MESSAGE$TASK_TRACKING`,values:{}};case`GrepAction`:return{kind:`translation`,key:`ACTION_MESSAGE$GREP`,values:{pattern:e.action.pattern?L(e.action.pattern,50):``}};case`GlobAction`:return{kind:`translation`,key:`ACTION_MESSAGE$GLOB`,values:{pattern:e.action.pattern?L(e.action.pattern,50):``}};case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:return{kind:`translation`,key:`ACTION_MESSAGE$BROWSE`,values:{}};case`CanvasUIAction`:case ce:return{kind:`text`,text:`CANVASUI`};case T:return{kind:`translation`,key:`ACTION_MESSAGE$LAUNCH_CHILD_CONVERSATION`,values:{}};default:return{kind:`text`,text:String(n).replace(`Action`,``).toUpperCase()}}},bt=class{static isDevMode=!1;static message(e){this.isDevMode&&console.warn(JSON.stringify(JSON.parse(e.data.toString()),null,2))}static event(e,t){this.isDevMode&&console.warn(t||`EVENT`,e)}static warning(e){this.isDevMode&&console.warn(e)}static error(e){this.isDevMode&&console.error(e)}},xt=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value};function St(e){let{children:t}=e,n=e=>{try{return xt(e)}catch(t){return bt.error(String(t)),e}};return Array.isArray(t)?(0,M.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,M.jsx)(`strong`,{className:`font-mono`,children:n(t)}):(0,M.jsx)(`strong`,{className:`font-mono`,children:t})}var Ct=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},wt=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,Tt=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return wt(e)&&!n.endsWith(`/`)?`${n}/`:n};function Et(e){let{children:t}=e,n=e=>{try{let t=Ct(e);return(0,M.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,title:t,children:Tt(t)})}catch(t){return bt.error(String(t)),(0,M.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,children:e})}};return Array.isArray(t)?(0,M.jsx)(`span`,{className:`font-normal tracking-tight`,children:t.map((e,t)=>typeof e==`string`?(0,M.jsx)(`span`,{children:n(e)},`${e}-${t}`):e)}):typeof t==`string`?(0,M.jsx)(`span`,{className:`font-normal tracking-tight`,children:n(t)}):(0,M.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,children:t})}var Dt=()=>{let{setConversationMode:e}=w(),{send:t}=Ye(),{conversationId:n}=D(),r=Ie(e=>e.enqueuePendingMessage),i=Ie(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Xe(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}},Ot=`200%`,R=8,kt=R*2;function At({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=qe(),c=`oh-text-shimmer-${(0,j.useId)().replace(/:/g,``)}`,l=(0,j.useMemo)(()=>Math.min(R/2-1,1+i/2),[i]),u=(0,j.useMemo)(()=>{let e=R/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${R}%)`,backgroundSize:`${Ot} 100%`,backgroundRepeat:`no-repeat`,WebkitBackgroundClip:`text`,backgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`,animation:`${c} ${r}s linear infinite`}},[c,l,r,a]);return s?(0,M.jsx)(t,{className:_(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${kt}% center}to{background-position:0% center}}`}}),(0,M.jsx)(t,{className:_(`relative inline-block`,n),style:u,...o,children:e})]})}var jt=j.memo(At);function Mt({className:e}){return(0,M.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,M.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,className:`fill-[var(--oh-foreground)] transition-colors duration-150 group-hover:fill-[var(--oh-text-secondary)]`}),(0,M.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var Nt=5,Pt=360,Ft={p:({children:e})=>(0,M.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function It({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=s(`openhands`),a=j.useRef(null),[o,c]=j.useState(!1);j.useEffect(()=>{r(o)},[o,r]),j.useLayoutEffect(()=>{let t=a.current;if(!t||n){c(!1);return}let r=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),r=Nt*(Number.isFinite(n)&&n>0?n:24),i=(e.match(/\n/g)??[]).length;c(t.scrollHeight>r+1||i>=Nt||e.trim().length>Pt)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e,n]);let l=o&&!n;return(0,M.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,M.jsx)(`div`,{ref:a,className:_(`text-sm leading-6 whitespace-normal [word-break:break-word]`,l&&`line-clamp-5`),children:(0,M.jsx)(k,{includeStandard:!0,includeHeadings:!0,allowHtml:!1,components:Ft,children:e})}),l?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{"aria-hidden":!0,"data-testid":`chat-message-truncation-gradient`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-tertiary to-transparent`}),(0,M.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:_(`pointer-events-none absolute bottom-1 left-1/2 z-10 inline-flex -translate-x-1/2 items-center rounded-full border border-[var(--oh-border-subtle)] bg-[var(--oh-surface-raised)] px-2.5 py-0.5 text-xs font-normal text-[var(--oh-foreground)] transition-opacity duration-150`,t?`opacity-100`:`opacity-0`),children:i(y.COMMON$VIEW_MORE)})]}):null]})}function z({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:a,onRetry:o,onDismiss:c,onStop:l}){let{t:u}=s(`openhands`),[d,f]=j.useState(!1),[p,m]=j.useState(!1),[h,g]=j.useState(!1),[v,b]=j.useState(!1),[ee,te]=j.useState(!0),ne=j.useRef(null);j.useEffect(()=>{g(!1)},[t]);let re=async()=>{await navigator.clipboard.writeText(t),m(!0)};j.useEffect(()=>{let e;return p&&(e=setTimeout(()=>{m(!1)},2e3)),()=>{clearTimeout(e)}},[p]);let ie=e===`user`&&(a===`error`||a===`sending`),x=a===`sending`&&l!=null,S=x&&d,C=e===`user`&&a==null,ae=C&&v&&!h,se=j.Children.count(n)>0;j.useLayoutEffect(()=>{if(!x||C)return;let e=ne.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:24;te(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,x,C]);let w=C?(0,M.jsx)(It,{message:t,isHovering:d,isExpanded:h,onTruncatableChange:b}):(0,M.jsx)(`div`,{ref:ne,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,M.jsx)(k,{includeStandard:!0,includeHeadings:!0,allowHtml:e!==`user`,components:Ft,children:t})}),T=(0,M.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":a,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:_(`rounded-xl relative w-fit max-w-full flex flex-col`,se&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,a===`error`&&`border border-[var(--oh-status-error)]/40`,!ie&&`last:mb-4`),children:[(0,M.jsxs)(`div`,{className:_(`absolute -top-2.5 -right-2.5 z-10`,!d||a===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,M.jsx)(oe,{content:e.tooltip,placement:`top`,children:(0,M.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,M.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,M.jsx)(ye,{isHidden:!d,isDisabled:p,onClick:re,mode:p?`copied`:`copy`})]}),w,x?(0,M.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),l?.()},"data-testid":`chat-message-stop`,"aria-label":u(y.BUTTON$STOP),"aria-hidden":!S,tabIndex:S?0:-1,className:_(`group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150`,ee?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,S?`opacity-100`:`pointer-events-none opacity-0`),children:(0,M.jsx)(Mt,{className:`block h-7 w-7 max-w-none`})}):null,ae?(0,M.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":u(y.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>g(!0)}):null,n]});return e===`user`&&a===`error`?(0,M.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[T,(0,M.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,M.jsx)(`span`,{children:u(y.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),o?(0,M.jsx)(`button`,{type:`button`,onClick:o,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:u(y.CHAT_INTERFACE$MESSAGE_RETRY)}):null,c?(0,M.jsx)(`button`,{type:`button`,onClick:c,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-dismiss`,children:u(y.CHAT_INTERFACE$MESSAGE_DISMISS)}):null]})]}):e===`user`&&a===`sending`?(0,M.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[T,(0,M.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,M.jsx)(jt,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:u(y.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):T}function Lt(e){return{h1:({children:t,className:n})=>(0,M.jsx)(`h1`,{className:_(`text-lg text-white font-bold leading-6 mb-1.5 mt-3 first:mt-0`,n,e),children:t}),h2:({children:t,className:n})=>(0,M.jsx)(`h2`,{className:_(`text-base font-semibold leading-5 text-white mb-1 mt-2.5 first:mt-0`,n,e),children:t}),h3:({children:t,className:n})=>(0,M.jsx)(`h3`,{className:_(`text-sm font-semibold text-white mb-1 mt-2 first:mt-0`,n,e),children:t}),h4:({children:t,className:n})=>(0,M.jsx)(`h4`,{className:_(`text-sm font-semibold text-white mb-1 mt-2 first:mt-0`,n,e),children:t}),h5:({children:t,className:n})=>(0,M.jsx)(`h5`,{className:_(`text-xs font-semibold text-white mb-0.5 mt-1.5 first:mt-0`,n,e),children:t}),h6:({children:t,className:n})=>(0,M.jsx)(`h6`,{className:_(`text-xs font-medium text-[var(--oh-text-tertiary)] mb-0.5 mt-1.5 first:mt-0`,n,e),children:t}),p:({children:t,className:n})=>(0,M.jsx)(`p`,{className:_(`py-2.5 first:pt-0 last:pb-0`,n,e),children:t}),ul:({children:t,className:n})=>(0,M.jsx)(`ul`,{className:_(`list-disc ml-5 pl-2 whitespace-normal`,n,e),children:t}),ol:({children:t,className:n,start:r})=>(0,M.jsx)(`ol`,{className:_(`list-decimal ml-5 pl-2 whitespace-normal`,n,e),start:r,children:t}),li:({children:t,className:n})=>(0,M.jsx)(`li`,{className:_(n,e),children:t}),a:({children:t,className:n,href:r})=>(0,M.jsx)(`a`,{className:_(`text-blue-500 hover:underline`,n,e),href:r,target:`_blank`,rel:`noopener noreferrer`,children:t}),code:({children:t,className:n})=>(0,M.jsx)(`code`,{className:_(`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 rounded text-[var(--oh-foreground)] border border-[var(--oh-border-subtle)]`,n,e),children:t})}}var Rt=Lt(),zt=300,Bt=Lt(`shine-text`);function Vt({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=s(`openhands`),{navigateToTab:i}=We(),{handleBuildPlanClick:a}=Dt(),{scrollDomToBottom:o}=ct(),c=()=>{i(`planner`)},l=(0,j.useCallback)(e=>{a(e),o()},[a,o]),u=(0,j.useMemo)(()=>e?e.length<=zt?e:`${e.slice(0,zt)}...`:``,[e]);return e?(0,M.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,M.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,M.jsx)(ze,{width:18,height:18,color:`var(--oh-muted)`}),(0,M.jsx)(E.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(y.COMMON$PLAN_MD)}),(0,M.jsx)(`div`,{className:`flex-1`}),(0,M.jsxs)(`button`,{type:`button`,onClick:c,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,M.jsx)(E.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(y.COMMON$VIEW)}),(0,M.jsx)(Ke,{className:`text-white`,size:18})]})]}),(0,M.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:u&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(k,{includeStandard:!0,components:t?Bt:Rt,children:u}),e&&e.length>zt&&(0,M.jsx)(`button`,{type:`button`,onClick:c,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(y.COMMON$READ_MORE)})]})}),(0,M.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,M.jsx)(`button`,{type:`button`,onClick:l,disabled:n,className:_(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,M.jsxs)(E.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(y.COMMON$BUILD),` `,(0,M.jsx)(E.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function Ht({errorId:e,defaultMessage:t}){let{t:n}=s(`openhands`),[r,i]=j.useState(!1);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,M.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&d.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,M.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,M.jsx)(P,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,M.jsx)(N,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,M.jsx)(k,{children:t})]})}function Ut({event:e}){return xe(e)?(0,M.jsx)(Ht,{errorId:e.id,defaultMessage:e.error}):null}function Wt({width:e=20,height:t=20,active:n}){return(0,M.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Gt({width:e=20,height:t=20,active:n}){return(0,M.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,M.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Kt({onClick:e,className:t}){return(0,M.jsx)(`button`,{type:`button`,onClick:e,className:_(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,M.jsx)(ve,{width:18,height:18})})}function qt({src:e,size:t=`small`}){return(0,M.jsx)(`img`,{role:`img`,alt:``,src:e,className:_(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Jt({src:e,onRemove:t,size:n=`small`}){return(0,M.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,M.jsx)(qt,{src:e,size:n}),t&&(0,M.jsx)(Kt,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Yt({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,M.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,M.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,M.jsx)(Wt,{active:!o})}),(0,M.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:_(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,M.jsx)(Jt,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,M.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,M.jsx)(Gt,{active:!c})})]})}function Xt({type:e,onClick:t}){let{t:n}=s(`openhands`),r=e===`confirm`,i=n(r?y.ACTION$CONFIRM:y.ACTION$REJECT),a=n(r?y.CHAT_INTERFACE$USER_CONFIRMED:y.CHAT_INTERFACE$USER_REJECTED),o=r?`${n(y.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(y.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,M.jsx)(oe,{closeDelay:100,content:a,children:(0,M.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:_(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:o})})}function Zt({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,M.jsxs)(`div`,{className:_(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,M.jsx)(`span`,{className:``,children:n}),(0,M.jsx)(`span`,{className:`font-bold`,children:i}),(0,M.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var Qt=e=>(0,M.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,M.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),$t=se(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),en=()=>l({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return Be.respondToConfirmation(e,t,i,n)}});function tn(){let e=$t(e=>e.submittedEventIds),t=$t(e=>e.addSubmittedEventId),{t:n}=s(`openhands`),{data:r}=Ee(),{curAgentState:i}=Ue(),{mutate:a}=en(),o=je(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===g.AWAITING_USER_CONFIRMATION:!1),c=(0,j.useCallback)(e=>{!o||!r||(o.id&&t(o.id),a({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[o,r,t,a]);return(0,j.useEffect)(()=>{if(!o)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),c(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),c(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[o,c]),i!==g.AWAITING_USER_CONFIRMATION||!o||o.id!==void 0&&e.includes(o.id)?null:(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(O(o)?o.security_risk:v.UNKNOWN)===v.HIGH&&(0,M.jsx)(Zt,{content:n(y.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,M.jsx)(Qt,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(y.COMMON$HIGH_RISK)}),(0,M.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,M.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(y.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,M.jsx)(Xt,{type:`reject`,onClick:()=>c(!1)}),(0,M.jsx)(Xt,{type:`confirm`,onClick:()=>c(!0)})]})]})]})}var nn=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
|
+
`):typeof t.content==`string`&&(n=t.content)),!(Array.isArray(t.content)&&t.content.some(e=>e.type===`image`)))return n;let r=d.t(y.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE);return n.split(r)[0]};function rn(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function an(e){let t=Math.round(e*5);return{filled:t,empty:5-t}}function on(e){return e>=.6?`text-green-400`:e>=.4?`text-yellow-400`:`text-red-400`}function sn(e){return e>=.7?`text-red-400 font-semibold`:e>=.5?`text-yellow-400`:`text-neutral-400`}function cn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ln(e){let t=e?.verification;if(!cn(t))return null;let n=t.enable_iterative_refinement;return typeof n==`boolean`?n:null}function un({feature:e}){let t=Math.round(e.probability*100),n=sn(e.probability);return(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,M.jsx)(`span`,{className:`text-neutral-200`,children:e.display_name}),(0,M.jsxs)(`span`,{className:n,children:[`(`,t,`%)`]})]})}function B({label:e,features:t}){return!t||t.length===0?null:(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-1 text-xs`,children:[(0,M.jsx)(`span`,{className:`font-semibold text-neutral-300`,children:e}),t.map((e,t)=>(0,M.jsxs)(j.Fragment,{children:[t>0&&(0,M.jsx)(`span`,{className:`text-neutral-500`,children:`·`}),(0,M.jsx)(un,{feature:e})]},e.name))]})}function dn({categorized:e}){let{t}=s(),n=e.agent_behavioral_issues&&e.agent_behavioral_issues.length>0,r=e.user_followup_patterns&&e.user_followup_patterns.length>0,i=e.infrastructure_issues&&e.infrastructure_issues.length>0,a=e.other&&e.other.length>0;return!n&&!r&&!i&&!a?null:(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 mt-1.5`,children:[n&&(0,M.jsx)(B,{label:t(y.CRITIC$POTENTIAL_ISSUES),features:e.agent_behavioral_issues}),i&&(0,M.jsx)(B,{label:t(y.CRITIC$INFRASTRUCTURE),features:e.infrastructure_issues}),r&&(0,M.jsx)(B,{label:t(y.CRITIC$LIKELY_FOLLOWUP),features:e.user_followup_patterns}),a&&(0,M.jsx)(B,{label:t(y.CRITIC$OTHER),features:e.other})]})}function fn({criticResult:e}){let{t}=s(),{data:n}=re(),[r,i]=j.useState(!1),a=rn(e.score),{filled:o,empty:c}=an(a),l=on(a),u=(a*100).toFixed(1),d=ln(n?.agent_settings)===!1,f=e.metadata?.categorized_features,p=f!=null&&((f.agent_behavioral_issues??[]).length>0||(f.user_followup_patterns??[]).length>0||(f.infrastructure_issues??[]).length>0||(f.other??[]).length>0);return(0,M.jsxs)(`div`,{className:`border-l-2 border-neutral-600 pl-2 my-2 py-1.5 text-sm`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`span`,{className:`font-semibold text-neutral-300 text-xs`,children:t(y.CRITIC$SUCCESS_LIKELIHOOD_LABEL)}),(0,M.jsxs)(`span`,{className:`${l} text-xs tracking-wide`,"aria-label":`Score: ${u}%`,children:[`★`.repeat(o),`☆`.repeat(c)]}),(0,M.jsxs)(`span`,{className:`text-neutral-500 text-xs`,children:[`(`,u,`%)`]}),p&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer ml-1`,"aria-label":t(r?y.BUTTON$COLLAPSE_DETAILS:y.BUTTON$EXPAND_DETAILS),children:r?(0,M.jsx)(P,{className:`h-3 w-3 inline fill-neutral-400`}):(0,M.jsx)(N,{className:`h-3 w-3 inline fill-neutral-400`})})]}),r&&p&&(0,M.jsx)(dn,{categorized:f}),d&&(0,M.jsx)(`p`,{className:`mt-1.5 text-xs leading-5 text-neutral-500`,"data-testid":`critic-iterative-refinement-hint`,children:t(y.CRITIC$ITERATIVE_REFINEMENT_HINT)})]})}var pn=e=>(0,M.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,M.jsx)(`path`,{d:`M11.3931 1.88021C10.78 1.37593 10.062 1.01489 9.29157 0.823438C8.52113 0.631981 7.71767 0.614934 6.9398 0.773542C5.90405 0.982756 4.95379 1.49492 4.20959 2.24506C3.46538 2.9952 2.96078 3.9495 2.7598 4.98688C2.61303 5.76469 2.6397 6.56531 2.83791 7.33163C3.03611 8.09795 3.40097 8.8111 3.90647 9.42021C4.37559 9.94959 4.64449 10.6266 4.66647 11.3335V13.3335C4.66647 13.864 4.87718 14.3727 5.25225 14.7478C5.62732 15.1228 6.13603 15.3335 6.66647 15.3335H9.33313C9.86356 15.3335 10.3723 15.1228 10.7473 14.7478C11.1224 14.3727 11.3331 13.864 11.3331 13.3335V11.4602C11.3555 10.6797 11.6423 9.92983 12.1465 9.33354C13.0299 8.24073 13.4463 6.84342 13.3052 5.44529C13.1642 4.04716 12.477 2.7612 11.3931 1.86687V1.88021ZM9.9998 13.3335C9.9998 13.5104 9.92956 13.6799 9.80454 13.8049C9.67951 13.93 9.50994 14.0002 9.33313 14.0002H6.66647C6.48965 14.0002 6.32009 13.93 6.19506 13.8049C6.07004 13.6799 5.9998 13.5104 5.9998 13.3335V12.6669H9.9998V13.3335ZM11.1131 8.50688C10.4428 9.30194 10.0517 10.2949 9.9998 11.3335H8.66647V9.33354C8.66647 9.15673 8.59623 8.98716 8.4712 8.86214C8.34618 8.73711 8.17661 8.66688 7.9998 8.66688C7.82299 8.66688 7.65342 8.73711 7.52839 8.86214C7.40337 8.98716 7.33313 9.15673 7.33313 9.33354V11.3335H5.9998C5.98221 10.3123 5.60443 9.33005 4.93313 8.56021C4.49023 8.02954 4.19239 7.39316 4.06867 6.71311C3.94495 6.03306 3.99957 5.33255 4.22719 4.6799C4.45481 4.02724 4.84768 3.4447 5.36748 2.98909C5.88728 2.53348 6.51627 2.22034 7.19313 2.08021C7.77483 1.96044 8.37591 1.9717 8.95271 2.11319C9.52952 2.25467 10.0676 2.52282 10.5278 2.89818C10.9881 3.27353 11.359 3.74666 11.6136 4.28322C11.8682 4.81978 12.0001 5.4063 11.9998 6.00021C12.0047 6.91345 11.6912 7.79985 11.1131 8.50688Z`,fill:`currentColor`})});function V({content:e}){let{t}=s(`openhands`),[n,r]=j.useState(!1);if(!e.trim())return null;let i=n?P:N;return(0,M.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`collapsible-thinking`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,"aria-label":t(n?y.THINKING$COLLAPSE:y.THINKING$EXPAND),"data-testid":`collapsible-thinking-toggle`,className:`w-full flex items-center gap-2 text-left cursor-pointer`,children:[(0,M.jsx)(i,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,M.jsx)(pn,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,M.jsx)(`span`,{className:`font-normal text-[var(--oh-muted)]`,children:t(y.THINKING$TITLE)})]}),n&&(0,M.jsx)(`div`,{className:`mt-1.5 pl-6`,"data-testid":`collapsible-thinking-content`,children:(0,M.jsx)(k,{children:e})})]})}var mn=()=>{let e=o();return l({mutationKey:[`fork-conversation`],mutationFn:async({sourceConversationId:e,eventId:t,editText:n,title:r})=>{let i=t,a=!1;if(n!=null){let n=await le.getEventParentId(e,t);n&&(i=n,a=!0)}let o=await le.forkConversation(e,i,r);return a&&o.leaf_event_id!==i&&(a=!1),{info:o,excluded:a}},onSuccess:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]})}})};function hn({event:e,isLastMessage:t,isFromPlanningAgent:n}){let{t:r}=s(`openhands`),{navigate:i}=S(),{conversationId:a}=D(),o=m().backend.kind===`cloud`,{mutate:c,isPending:l}=mn(),u=w(e=>e.setMessageToSend),d=j.useRef(!1),f=nn(e),{reasoning:h,message:g}=e.source===`agent`?Ce(f):{reasoning:``,message:f},_=[];Array.isArray(e.llm_message.content)&&e.llm_message.content.forEach(e=>{e.type===`image`&&_.push(...e.image_urls)});let v=!o&&a?[{icon:(0,M.jsx)(pe,{width:15,height:15,"aria-hidden":!0}),onClick:()=>{if(!a||l||d.current)return;d.current=!0;let t=ue.getCurrentConversation(),n=t?.id===a?t.title:void 0,r=n?`${n} (branch)`:void 0,o=e.source===`user`&&g.length>0;c({sourceConversationId:a,eventId:e.id,...o?{editText:g}:{},...r?{title:r}:{}},{onSuccess:({info:e,excluded:t})=>{i(`/conversations/${e.id}`),t&&window.setTimeout(()=>u(g),0)},onError:e=>p(e instanceof Error?e.message:null),onSettled:()=>{d.current=!1}})},tooltip:r(y.CHAT_INTERFACE$BRANCH_FROM_HERE)}]:void 0;return(0,M.jsxs)(M.Fragment,{children:[h&&(0,M.jsx)(V,{content:h}),(0,M.jsxs)(z,{type:e.source,message:g,isFromPlanningAgent:n,actions:v,children:[_.length>0&&(0,M.jsx)(Yt,{size:`small`,images:_}),t&&(0,M.jsx)(tn,{})]}),e.source===`agent`&&e.critic_result!=null&&(0,M.jsx)(fn,{criticResult:e.critic_result})]})}var gn=e=>{switch(e){case v.LOW:return d.t(y.SECURITY$LOW_RISK);case v.MEDIUM:return d.t(y.SECURITY$MEDIUM_RISK);case v.HIGH:return d.t(y.SECURITY$HIGH_RISK);case v.UNKNOWN:default:return d.t(y.SECURITY$UNKNOWN_RISK)}},H=()=>``,_n=e=>e.name?`**Skill:** \`${e.name}\``:H(),vn=e=>{let{action:t}=e,n=[];return t.pattern&&n.push(`**Pattern:** \`${t.pattern}\``),t.path&&n.push(`**Path:** \`${t.path}\``),`include`in t&&t.include&&n.push(`**Include:** \`${t.include}\``),n.length>0?n.join(`
|
|
3
|
+
`):H()},yn=e=>{if(e.command!==`create`||!e.file_text)return H();let t=e.file_text;return t.length>1e3&&(t=`${t.slice(0,I)}...`),`${e.path}\n${t}`},bn=e=>{let t=`Command:\n\`${e.action.command}\``;return(e.security_risk===v.HIGH||e.security_risk===v.MEDIUM)&&(t+=`\n\n${gn(e.security_risk)}`),t},xn=e=>{let t=`**MCP Tool Call**
|
|
4
|
+
|
|
5
|
+
`;return t+=`**Arguments:**\n\`\`\`json\n${JSON.stringify(e.data,null,2)}\n\`\`\``,t},Sn=e=>e.thought,Cn=e=>e.message.trim(),wn=e=>{let t=`**Command:** \`${e.command}\``;return e.command===`plan`&&(e.task_list&&e.task_list.length>0?(t+=`\n\n**Task List (${e.task_list.length} ${e.task_list.length===1?`item`:`items`}):**\n`,e.task_list.forEach((e,n)=>{let r={todo:`⏳`,in_progress:`🔄`,done:`✅`}[e.status]||`❓`;t+=`\n${n+1}. ${r} **[${e.status.toUpperCase().replace(`_`,` `)}]** ${e.title}`,e.notes&&(t+=`\n *Notes: ${e.notes}*`)})):t+=`
|
|
6
|
+
|
|
7
|
+
**Task List:** Empty`),t},Tn=e=>{switch(e.kind){case`BrowserNavigateAction`:{let t=`Browsing ${e.url}`;return e.new_tab&&(t+=`
|
|
8
|
+
**New Tab:** Yes`),t}case`BrowserClickAction`:{let t=`**Element Index:** ${e.index}`;return e.new_tab&&(t+=`
|
|
9
|
+
**New Tab:** Yes`),t}case`BrowserTypeAction`:{let t=e.text.length>50?`${e.text.slice(0,50)}...`:e.text;return`**Element Index:** ${e.index}\n**Text:** ${t}`}case`BrowserGetStateAction`:return e.include_screenshot?`**Include Screenshot:** Yes`:H();case`BrowserGetContentAction`:{let t=[];return e.extract_links&&t.push(`**Extract Links:** Yes`),e.start_from_char>0&&t.push(`**Start From Character:** ${e.start_from_char}`),t.length>0?t.join(`
|
|
10
|
+
`):H()}case`BrowserScrollAction`:return`**Direction:** ${e.direction}`;case`BrowserGoBackAction`:return H();case`BrowserListTabsAction`:return H();case`BrowserSwitchTabAction`:return`**Tab ID:** ${e.tab_id}`;case`BrowserCloseTabAction`:return`**Tab ID:** ${e.tab_id}`;default:return H()}},En=e=>{let{action:t}=e;switch(t.kind){case`FileEditorAction`:case`StrReplaceEditorAction`:return yn(t);case`ExecuteBashAction`:case`TerminalAction`:return bn(e);case`MCPToolAction`:return xn(t);case`ThinkAction`:return Sn(t);case`FinishAction`:return Cn(t);case`TaskTrackerAction`:return wn(t);case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:return Tn(t);case`GrepAction`:case`GlobAction`:return vn(e);case`InvokeSkillAction`:return _n(t);default:return ut(e)}},Dn=e=>{if(e.is_error||e.status===`failed`)return`error`;if(e.status===`completed`)return`success`},On=e=>{let{observation:t}=e;switch(t.kind){case`ExecuteBashObservation`:{let e=t.exit_code,{metadata:n}=t;return e===-1||n.exit_code===-1?`timeout`:e===0||n.exit_code===0?`success`:`error`}case`TerminalObservation`:{let e=t.exit_code??t.metadata.exit_code??null;return t.timeout||e===-1?`timeout`:e===0?`success`:t.is_error?`error`:`success`}case`FileEditorObservation`:case`StrReplaceEditorObservation`:return t.error?`error`:`success`;case`MCPToolObservation`:return t.is_error?`error`:`success`;case`SwitchLLMObservation`:return t.is_error?`error`:`success`;case`InvokeSkillObservation`:return t.is_error?`error`:`success`;case`TaskObservation`:return t.is_error||t.status===`failed`?`error`:`success`;case`CanvasUIObservation`:return t.is_error?`error`:`success`;default:return`success`}},kn=e=>{let{observation:t}=e;if(t.error)return`**Error:**\n${t.error}`;let n=`content`in t&&Array.isArray(t.content)?t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
11
|
+
`):null;return On(e)===`success`&&`old_content`in t&&`new_content`in t&&t.old_content&&t.new_content||t.command===`view`?`\`\`\`\n${n||t.output}\n\`\`\``:n||t.output},An=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
12
|
+
`)||``;n.length>1e3&&(n=`${n.slice(0,I)}...`);let r=``;return t.command&&(r+=`Command: \`${t.command}\`\n\n`),r+=`Output:\n\`\`\`sh\n${n.trim()||d.t(y.OBSERVATION$COMMAND_NO_OUTPUT)}\n\`\`\``,r},jn=e=>{let{observation:t}=e,n=`content`in t&&Array.isArray(t.content)?t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
13
|
+
`):t.output||``,r=``;return t.error?r+=`**Error:**\n${t.error}`:n?r+=`**Output:**\n${n}`:r+=`Browser action completed successfully.`,r.length>1e3&&(r=`${r.slice(0,I)}...(truncated)`),r},Mn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
14
|
+
`),r=`**Tool:** ${t.tool_name}\n\n`;return t.is_error?r+=`**Error:**\n${n}`:r+=`**Result:**\n${n}`,r.length>1e3&&(r=`${r.slice(0,I)}...`),r},Nn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
15
|
+
`),r=`${t.skill_name?`**Skill:** \`${t.skill_name}\`\n\n`:``}${t.is_error?`**Error:**\n${n}`:n}`;return r.length>1e3&&(r=`${r.slice(0,I)}...(truncated)`),r},Pn=e=>e.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
16
|
+
`),Fn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
17
|
+
`);if(t.is_error)return n?`**Error:**\n${n}`:`**Error:**\nFailed to switch LLM profile \`${t.profile_name}\`.`;let r=[`**Profile:** \`${t.profile_name}\``];return t.active_model&&r.push(`**Active model:** \`${t.active_model}\``),t.reason&&r.push(`**Reason:** ${t.reason}`),r.join(`
|
|
18
|
+
`)},In=e=>{let{observation:t}=e,{command:n,task_list:r}=t,i=`**Command:** \`${n}\``;return n===`plan`&&r.length>0?(i+=`\n\n**Task List (${r.length} ${r.length===1?`item`:`items`}):**\n`,r.forEach((e,t)=>{let n={todo:`⏳`,in_progress:`🔄`,done:`✅`}[e.status]||`❓`;i+=`\n${t+1}. ${n} **[${e.status.toUpperCase().replace(`_`,` `)}]** ${e.title}`,e.notes&&(i+=`\n *Notes: ${e.notes}*`)})):n===`plan`&&(i+=`
|
|
19
|
+
|
|
20
|
+
**Task List:** Empty`),`content`in t&&t.content&&typeof t.content==`string`&&t.content.trim()&&(i+=`\n\n**Result:** ${t.content.trim()}`),i},Ln=e=>{let{observation:t}=e;return t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
21
|
+
`)||``},Rn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
22
|
+
`),r=``;return t.is_error?r+=`**Error:**\n${n}`:r+=n,r},zn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
23
|
+
`),r=`**Pattern:** \`${t.pattern}\`\n`;return r+=`**Search Path:** \`${t.search_path}\`\n\n`,t.is_error?r+=`**Error:**\n${n}`:t.files.length===0?r+=`**Result:** No files found.`:(r+=`**Files Found (${t.files.length}${t.truncated?`+, truncated`:``}):**\n`,r+=t.files.map(e=>`- \`${e}\``).join(`
|
|
24
|
+
`)),r.length>1e3&&(r=`${r.slice(0,I)}...(truncated)`),r},Bn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
25
|
+
`),r=`**Pattern:** \`${t.pattern}\`\n`;return r+=`**Search Path:** \`${t.search_path}\`\n`,t.include_pattern&&(r+=`**Include:** \`${t.include_pattern}\`\n`),r+=`
|
|
26
|
+
`,t.is_error?r+=`**Error:**\n${n}`:t.matches.length===0?r+=`**Result:** No matches found.`:(r+=`**Matches (${t.matches.length}${t.truncated?`+, truncated`:``}):**\n`,r+=t.matches.map(e=>`- \`${e}\``).join(`
|
|
27
|
+
`)),r.length>1e3&&(r=`${r.slice(0,I)}...(truncated)`),r},Vn=e=>{switch(e.observation.kind){case`FileEditorObservation`:case`StrReplaceEditorObservation`:return kn(e);case`ExecuteBashObservation`:case`TerminalObservation`:return An(e);case`BrowserObservation`:return jn(e);case`MCPToolObservation`:return Mn(e);case`TaskTrackerObservation`:return In(e);case`ThinkObservation`:return Ln(e);case`FinishObservation`:return Rn(e);case`GlobObservation`:return zn(e);case`GrepObservation`:return Bn(e);case`InvokeSkillObservation`:return Nn(e);case`CanvasUIObservation`:return Pn(e);case`ClientToolObservation`:return e.tool_name===`canvas_ui_control`?Pn(e):ut(e);case`SwitchLLMObservation`:return Fn(e);default:return ut(e)}},Hn=e=>(0,M.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,M.jsx)(`path`,{d:`M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z`,fill:`currentColor`})}),Un=e=>(0,M.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,...e,children:[(0,M.jsx)(`path`,{d:`M5.79029 12.9507C5.69629 12.9042 5.59557 12.8843 5.50157 12.8843C5.25314 12.8843 5.01142 13.0238 4.89728 13.2562C4.72942 13.5883 4.87042 13.9868 5.20614 14.1462C5.30014 14.1927 5.40086 14.2127 5.50157 14.2127C5.75 14.2127 5.985 14.0732 6.10586 13.8407C6.15286 13.7477 6.17301 13.6481 6.17301 13.5551C6.17301 13.3027 6.03201 13.0636 5.79029 12.9507ZM13.3641 12.3463C13.3641 12.3463 13.3909 12.333 13.3977 12.3198C13.4178 12.2998 13.4312 12.2733 13.4447 12.2533C13.4245 12.2865 13.3977 12.3198 13.3641 12.3463ZM3.91698 11.463C3.7827 11.2969 3.58798 11.2106 3.39326 11.2106C3.24555 11.2106 3.09783 11.2637 2.97697 11.3567C2.68154 11.5892 2.63454 12.0076 2.86283 12.2932C2.99712 12.4592 3.19183 12.5456 3.39326 12.5456C3.54098 12.5456 3.68869 12.4924 3.80955 12.3995C3.97741 12.2666 4.0647 12.074 4.0647 11.8814C4.0647 11.7353 4.0177 11.5892 3.91698 11.463ZM2.88297 9.32433C2.80911 9.01881 2.53382 8.80627 2.23168 8.80627C2.18468 8.80627 2.13096 8.81291 2.07725 8.8262C1.71467 8.9059 1.48638 9.26455 1.56696 9.61657C1.64081 9.92873 1.9161 10.1346 2.22496 10.1346C2.27196 10.1346 2.32568 10.1346 2.37268 10.1213C2.68825 10.0549 2.8964 9.77597 2.8964 9.47045C2.8964 9.42395 2.8964 9.37082 2.88297 9.32433ZM2.37939 6.15621C2.33239 6.14293 2.27868 6.14293 2.23168 6.14293C1.92282 6.14293 1.64753 6.34218 1.57367 6.65434C1.4931 7.013 1.71467 7.36501 2.07725 7.45135C2.13096 7.46464 2.17796 7.47128 2.22496 7.47128C2.53382 7.47128 2.80911 7.25874 2.88297 6.95322C2.8964 6.90673 2.8964 6.8536 2.8964 6.8071C2.8964 6.50158 2.69497 6.22263 2.37939 6.15621ZM3.82298 3.87809C3.70212 3.78511 3.55441 3.73197 3.40669 3.73197C3.20526 3.73197 3.01054 3.81831 2.87626 3.98436C2.64797 4.26995 2.69497 4.68838 2.98369 4.92085C3.10454 5.01383 3.25226 5.06696 3.39998 5.06696C3.59469 5.06696 3.79612 4.98062 3.9237 4.81458C4.02441 4.69503 4.07141 4.54227 4.07141 4.39615C4.07141 4.20354 3.99084 4.01093 3.82298 3.87809ZM6.11929 2.45011C6.00515 2.21101 5.76343 2.07153 5.50829 2.07153C5.41428 2.07153 5.31357 2.09146 5.21957 2.13795C4.88385 2.29735 4.74956 2.69586 4.90399 3.0213C5.02485 3.26041 5.25985 3.39988 5.50829 3.39988C5.609 3.39988 5.70972 3.37996 5.80372 3.33347C6.04543 3.22056 6.17972 2.98145 6.17972 2.73571C6.17972 2.63608 6.15958 2.5431 6.11929 2.45011Z`,fill:`currentColor`}),(0,M.jsx)(`path`,{d:`M14.8809 8.14215C14.8809 8.65356 14.8205 9.15834 14.7063 9.64983C14.5251 10.4269 14.2028 11.1708 13.7462 11.8482C13.6589 11.9811 13.5649 12.1073 13.4642 12.2268C13.4642 12.2401 13.4575 12.2468 13.444 12.2534C13.4239 12.2866 13.397 12.3198 13.3635 12.3464C12.7457 13.1102 11.9602 13.7212 11.0604 14.1529C11.047 14.1596 11.0269 14.1662 11.0134 14.1729C10.9194 14.2194 10.8187 14.2658 10.718 14.3057C9.90558 14.6378 9.01928 14.8105 8.1397 14.8105H8.11955C7.74355 14.8038 7.45483 14.5116 7.45483 14.1463C7.45483 13.781 7.75698 13.4821 8.12627 13.4821H8.14641C8.85142 13.4821 9.55643 13.3426 10.2077 13.077C11.047 12.7316 11.7789 12.187 12.3496 11.4896C12.4436 11.37 12.5443 11.2438 12.6316 11.111C12.9942 10.5664 13.256 9.97527 13.397 9.35095C13.397 9.33766 13.397 9.32438 13.397 9.31774C13.4843 8.93252 13.5313 8.54065 13.5313 8.14215C13.5313 7.43812 13.3903 6.75402 13.1218 6.10313C12.927 5.64485 12.6786 5.21978 12.3697 4.83455C12.2422 4.67515 12.1012 4.51575 11.9535 4.36963C11.4499 3.8715 10.859 3.47964 10.201 3.21397C9.55643 2.9483 8.86485 2.81546 8.16655 2.80882H8.13298C7.76369 2.80882 7.46155 2.50994 7.46155 2.14464C7.46155 1.77935 7.76369 1.48047 8.13298 1.48047H8.17327C9.05285 1.48711 9.90557 1.65315 10.7113 1.98524C10.8322 2.03838 10.953 2.08487 11.0672 2.14464C11.0806 2.15129 11.094 2.15793 11.1007 2.15793C11.7722 2.48337 12.3697 2.90845 12.9002 3.43314C13.0815 3.61247 13.256 3.80508 13.4172 4.00434C13.4239 4.01098 13.4239 4.01762 13.4306 4.02426C13.8133 4.49583 14.1222 5.02717 14.3639 5.59171C14.4982 5.91052 14.6056 6.24261 14.6795 6.57469C14.6929 6.62119 14.7063 6.66768 14.7131 6.71417C14.8205 7.17909 14.8742 7.6573 14.8742 8.14215H14.8809Z`,fill:`currentColor`})]});function Wn({task:e}){let{t}=s(`openhands`),n=(0,j.useMemo)(()=>{switch(e.status){case`todo`:return(0,M.jsx)(Hn,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,M.jsx)(Un,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,M.jsx)(be,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,M.jsx)(Hn,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),r=e.status===`done`;return(0,M.jsxs)(`div`,{className:`flex gap-[14px] items-center px-4 py-2 w-full`,"data-name":`item`,children:[(0,M.jsx)(`div`,{className:`shrink-0`,children:n}),(0,M.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[20px] text-nowrap whitespace-pre font-normal`,children:[(0,M.jsx)(E.Text,{className:_(`text-[12px] text-white`,r&&`text-[var(--oh-muted)]`),children:e.title}),e.notes&&(0,M.jsxs)(E.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(y.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function Gn({taskList:e}){let{t}=s(`openhands`);return(0,M.jsxs)(`div`,{className:`flex flex-col overflow-clip bg-[var(--oh-surface)] border border-[var(--oh-border)] rounded-[12px] w-full`,children:[(0,M.jsxs)(`div`,{className:`flex gap-1 items-center border-b border-[var(--oh-border)] h-[41px] px-2 shrink-0`,children:[(0,M.jsx)(ze,{className:`shrink-0 w-4.5 h-4.5 text-[var(--oh-muted)]`}),(0,M.jsx)(E.Text,{className:`text-[11px] text-nowrap text-white tracking-[0.11px] font-medium leading-[16px] whitespace-pre`,children:t(y.COMMON$TASKS)})]}),(0,M.jsx)(`div`,{children:e.map((e,t)=>(0,M.jsx)(Wn,{task:e},`task-${t}`))})]})}function Kn({event:e}){let{observation:t}=e,{command:n,task_list:r}=t;return(0,M.jsx)(`div`,{className:`flex flex-col gap-4`,children:n===`plan`&&r.length>0&&(0,M.jsx)(Gn,{taskList:r})})}var qn=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),Jn=e=>{let t=[],n=/<EXTRA_INFO>([\s\S]*?)<\/EXTRA_INFO>/gi,r=n.exec(e);for(;r!==null;){let i=r[1].trim();i.length>0&&t.push(i),r=n.exec(e)}return t},Yn=(e,t)=>{let n=`\n\n- **${e}**`;return t&&t.trim().length>0&&(n+=`\n\n${t}`),n},Xn=(e,t)=>{let n=`
|
|
28
|
+
|
|
29
|
+
**Triggered Skill Knowledge:**`;return e.forEach((e,r)=>{let i=r<t.length?t[r]:void 0;n+=Yn(e,i)}),n},Zn=e=>{let t=`
|
|
30
|
+
|
|
31
|
+
**Extended Content:**`;return e.forEach(e=>{e.trim().length>0&&(t+=`\n\n${e}`)}),t},Qn=e=>!e||e.length===0?[]:Jn(qn(e)),$n=(e,t)=>{let n=Qn(t);return e&&e.length>0?Xn(e,n):n.length>0?Zn(n):``},er=(e,t)=>{let n=Qn(t);return e&&e.length>0?e.map((e,t)=>({name:e,content:t<n.length?n[t].trim():``})):n.length>0?n.filter(e=>e.trim().length>0).map((e,t)=>({name:`Extended Content ${t+1}`,content:e.trim()})):[]},U=e=>typeof e==`object`&&!!e&&`_isSkillReadyEvent`in e&&e._isSkillReadyEvent===!0,tr=e=>{let t=e.activated_skills||e.activated_microagents||[],n=e.extended_content||[];if(t.length===0&&n.length===0)throw Error(`Cannot create skill ready event without activated skills or extended content`);let r=$n(t,n),i=er(t,n);return{id:`${e.id}-skill-ready`,timestamp:e.timestamp,source:`agent`,_isSkillReadyEvent:!0,_skillReadyContent:r,_skillReadyItems:i}},W=e=>e,G=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
32
|
+
`);function nr({code:e,language:t,copy:n=!0,placeholder:r,expandable:i=!1,wrapLongLines:a=!1}){let{t:o}=s(`openhands`),[c,l]=j.useState(!1),u=e.length>I,d=(u&&!(i&&c)?`${e.slice(0,1e3)}…`:e).trim()||r||``,f=n&&e.trim().length>0,p=o(c?y.BUTTON$COLLAPSE:y.BUTTON$EXPAND),m=(0,M.jsx)(C,{className:`rounded-lg text-xs`,style:ae,language:t,PreTag:`div`,wrapLongLines:a,customStyle:a?{whiteSpace:`pre-wrap`}:void 0,codeTagProps:a?{style:{whiteSpace:`pre-wrap`}}:void 0,children:d});return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[f?(0,M.jsx)(Ve,{text:e,children:m}):m,i&&u&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`self-start text-xs text-muted transition-colors hover:text-white hover:underline`,children:p})]})}function rr({output:e,exitCode:t,copy:n=!0}){let{t:r}=s(`openhands`);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t!=null&&t!==0&&t!==-1&&(0,M.jsx)(`span`,{className:`self-start rounded bg-status-fail-bg px-1.5 py-0.5 font-mono text-xs text-status-fail-text`,children:r(y.OBSERVATION$EXIT_CODE,{code:t})}),(0,M.jsx)(nr,{code:e,language:`bash`,copy:n,placeholder:r(y.OBSERVATION$COMMAND_NO_OUTPUT),expandable:!0,wrapLongLines:!0})]})}var ir=W({actionKinds:[`ExecuteBashAction`,`TerminalAction`],observationKinds:[`ExecuteBashObservation`,`TerminalObservation`],Body:function({action:e,observation:t}){let{t:n}=s(`openhands`),r=t?.observation.command??e?.action.command??``,i=e?.security_risk;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r&&(0,M.jsx)(nr,{code:r,language:`bash`}),(i===v.HIGH||i===v.MEDIUM)&&(0,M.jsx)(`span`,{className:`text-xs text-status-fail-text`,children:n(i===v.HIGH?y.SECURITY$HIGH_RISK:y.SECURITY$MEDIUM_RISK)}),t&&(0,M.jsx)(rr,{output:G(t.observation.content),exitCode:t.observation.exit_code})]})}}),ar=e=>{switch(e.split(`.`).pop()?.toLowerCase()){case`js`:case`jsx`:return`javascript`;case`ts`:case`tsx`:return`typescript`;case`py`:return`python`;case`html`:return`html`;case`css`:return`css`;case`json`:return`json`;case`md`:return`markdown`;case`yml`:case`yaml`:return`yaml`;case`sh`:case`bash`:return`bash`;case`dockerfile`:return`dockerfile`;case`rs`:return`rust`;case`go`:return`go`;case`java`:return`java`;case`cpp`:case`cc`:case`cxx`:return`cpp`;case`c`:return`c`;case`rb`:return`ruby`;case`php`:return`php`;case`sql`:return`sql`;default:return`text`}};function or(e){let t=e.trim();return(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function sr(e,t){let n=e.trim();if(!n)return n;if(!n.startsWith(`/`))return n.replace(/^\.\//,``);let r=[t,f].filter(e=>!!e?.trim());for(let e of r){let t=or(e);if(n===t)return``;if(n.startsWith(`${t}/`))return n.slice(t.length+1)}return n.replace(/^\/+/,``)}var cr=3,lr=300,ur=25e4,dr=(e,t)=>{if(e.length*t.length>ur)return[...e.map(e=>({type:`del`,text:e})),...t.map(e=>({type:`add`,text:e}))];let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;--a)for(let n=r-1;n>=0;--n)i[a][n]=e[a]===t[n]?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o]===t[s]?(a.push({type:`ctx`,text:e[o]}),o+=1,s+=1):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,text:e[o]}),o+=1):(a.push({type:`add`,text:t[s]}),s+=1);for(;o<n;)a.push({type:`del`,text:e[o]}),o+=1;for(;s<r;)a.push({type:`add`,text:t[s]}),s+=1;return a},fr=(e,t)=>{let n=e.split(`
|
|
33
|
+
`),r=t.split(`
|
|
34
|
+
`),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i+=1;let a=n.length,o=r.length;for(;a>i&&o>i&&n[a-1]===r[o-1];)--a,--o;let s=n.slice(Math.max(0,i-cr),i),c=n.slice(a,Math.min(n.length,a+cr));return[...s.map(e=>({type:`ctx`,text:e})),...dr(n.slice(i,a),r.slice(i,o)),...c.map(e=>({type:`ctx`,text:e}))]},pr={add:`bg-status-success-bg text-status-success-text`,del:`bg-status-fail-bg text-status-fail-text`,ctx:`text-muted`},mr={add:`+ `,del:`- `,ctx:` `};function hr({oldText:e,newText:t}){let{t:n}=s(`openhands`),r=fr(e,t),i=r.length>lr;return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`div`,{className:`overflow-auto rounded-lg border border-surface-raised font-mono text-xs`,children:(i?r.slice(0,lr):r).map((e,t)=>(0,M.jsx)(`div`,{className:_(`whitespace-pre-wrap px-2`,pr[e.type]),children:`${mr[e.type]}${e.text}`},`${t}-${e.type}`))}),i&&(0,M.jsx)(`span`,{className:`text-xs text-muted`,children:n(y.COMMON$TRUNCATED)})]})}function gr({path:e,range:t,onClick:n}){let r=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Ge,{className:`h-3.5 w-3.5 flex-shrink-0 text-muted`}),(0,M.jsx)(`span`,{className:`break-all`,children:t?`${e}:${t}`:e})]}),i=`inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground`;return n?(0,M.jsx)(`button`,{type:`button`,className:`${i} cursor-pointer hover:bg-[var(--oh-interactive-hover)]`,onClick:n,children:r}):(0,M.jsx)(`span`,{className:i,children:r})}var _r=new Set([`md`,`markdown`,`mdx`]);function vr(e){let t=e.lastIndexOf(`.`);return t===-1?!1:_r.has(e.slice(t+1).toLowerCase())}var K=new Set([`FileEditorAction`,`StrReplaceEditorAction`]),yr=new Set([`FileEditorObservation`,`StrReplaceEditorObservation`]);function br(e,t){if(O(e)&&K.has(e.action.kind))return e.action.path||null;if(A(e)&&yr.has(e.observation.kind)){let n=e.observation.path;if(n)return n;if(t&&K.has(t.action.kind))return t.action.path||null}return null}function xr(e,t){if(O(e)&&K.has(e.action.kind))return e.action.command||null;if(A(e)&&yr.has(e.observation.kind)){let n=e.observation.command;if(n)return n;if(t&&K.has(t.action.kind))return t.action.command||null}return null}function q(e,t){let n=br(e,t),r=xr(e,t);return!!(n&&r===`create`&&vr(n))}function Sr({content:e,path:t,onView:n}){let{t:r}=s(`openhands`),i=t.split(`/`).pop()||t;return(0,M.jsxs)(`div`,{className:`w-full overflow-hidden rounded-[12px] border border-[var(--oh-border)] bg-[var(--oh-surface)]`,"data-testid":`markdown-file-preview`,children:[(0,M.jsx)(`div`,{"data-testid":`markdown-file-preview-content`,className:`max-h-40 overflow-y-auto px-4 py-3 text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]`,children:(0,M.jsx)(k,{content:e,includeStandard:!0,includeHeadings:!0,components:Rt})}),(0,M.jsxs)(`div`,{className:`flex h-10 items-center justify-between gap-2 border-t border-[var(--oh-border)] px-3`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,M.jsx)(Ge,{className:`h-3.5 w-3.5 flex-shrink-0 text-[var(--oh-muted)]`}),(0,M.jsx)(E.Text,{className:`truncate font-mono text-[11px] leading-4 tracking-[0.11px] text-[var(--oh-muted)]`,children:i})]}),n?(0,M.jsxs)(`button`,{type:`button`,onClick:n,className:`flex shrink-0 cursor-pointer items-center gap-1 transition-opacity hover:opacity-80`,"data-testid":`markdown-file-preview-view`,children:[(0,M.jsx)(E.Text,{className:`text-[11px] leading-4 tracking-[0.11px] text-white`,children:r(y.COMMON$VIEW)}),(0,M.jsx)(Ke,{className:`text-white`,size:16})]}):null]})]})}var Cr=({action:e,observation:t})=>t?.observation.path??e?.action.path??``;function wr({action:e,observation:t,onOpenFile:n}){let r=Cr({action:e,observation:t}),i=t?.observation.command??e?.action.command,a=ar(r),o=e?.action.view_range,s=i===`view`&&o?`${o[0]}-${o[1]}`:void 0,c=r?(0,M.jsx)(gr,{path:r,range:s,onClick:n}):null,l=e=>r&&i===`create`&&vr(r)?{chip:null,body:(0,M.jsx)(Sr,{content:e,path:r,onView:n})}:{chip:c,body:(0,M.jsx)(nr,{code:e,language:a})};if(t){let e=t.observation,n=null,r=c;if(e.error)n=(0,M.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:e.error});else if(e.old_content!=null&&e.new_content!=null)n=(0,M.jsx)(hr,{oldText:e.old_content,newText:e.new_content});else{let t=e.new_content||e.output||(e.content?G(e.content):``);if(t){let e=l(t);r=e.chip,n=e.body}}return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,n]})}if(e){let t=e.action,n=null,r=c;if(t.command===`create`&&t.file_text){let e=l(t.file_text);r=e.chip,n=e.body}else (t.command===`str_replace`||t.command===`insert`)&&t.new_str!=null&&(n=(0,M.jsx)(hr,{oldText:t.old_str??``,newText:t.new_str}));return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,n]})}return null}function Tr({conversationId:e,...t}){let{navigateToTab:n}=We(),r=Le(e=>e.setSelectedPath),{data:i}=Ee(),a=Cr(t),o=i?.workspace?.working_dir,s=a&&t.observation?()=>{r(sr(a,o),e),n(`files`)}:void 0;return(0,M.jsx)(wr,{...t,onOpenFile:s})}var Er=W({actionKinds:[`FileEditorAction`,`StrReplaceEditorAction`],observationKinds:[`FileEditorObservation`,`StrReplaceEditorObservation`],Body:function(e){let{conversationId:t}=D();return t?(0,M.jsx)(Tr,{...e,conversationId:t}):(0,M.jsx)(wr,{...e})}});function Dr({rows:e}){return(0,M.jsx)(`div`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:e.map(({label:e,value:t})=>(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(`span`,{className:`text-muted`,children:e}),(0,M.jsx)(`span`,{className:`break-all font-mono text-foreground`,children:t})]},e))})}var Or=W({actionKinds:[`GrepAction`,`GlobAction`],observationKinds:[`GrepObservation`,`GlobObservation`],Body:function({action:e,observation:t}){let{t:n}=s(`openhands`),r=t?.observation,i=e?.action,a=r?.pattern??i?.pattern??``,o=r?.search_path??i?.path??``,c=r?`include_pattern`in r?r.include_pattern:null:i&&`include`in i?i.include:null,l=r?`matches`in r?r.matches:r.files:[];return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,M.jsx)(Dr,{rows:[{label:n(y.COMMON$PATTERN),value:a},...o?[{label:n(y.COMMON$PATH),value:o}]:[],...c?[{label:n(y.COMMON$INCLUDE),value:c}]:[]]}),r&&(r.is_error?(0,M.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:G(r.content)}):l.length===0?(0,M.jsx)(`span`,{className:`text-xs text-muted`,children:n(y.COMMON$NO_RESULTS)}):(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:`text-xs text-muted`,children:n(y.COMMON$RESULTS,{count:l.length})}),(0,M.jsx)(`div`,{className:`flex flex-col gap-0.5 font-mono text-xs text-foreground`,children:l.map(e=>(0,M.jsx)(`span`,{className:`break-all`,children:e},e))}),r.truncated&&(0,M.jsx)(`span`,{className:`text-xs text-muted`,children:n(y.COMMON$TRUNCATED)})]}))]})}});function kr({label:e,text:t,isError:n=!1}){return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,M.jsx)(Ve,{text:t,children:(0,M.jsx)(`div`,{className:`overflow-auto rounded border border-surface-raised bg-surface-raised p-2 text-xs ${n?`text-danger`:`text-foreground`}`,children:(0,M.jsx)(k,{includeStandard:!0,includeHeadings:!0,children:t})})})]})}var Ar=[ir,Er,Or,W({actionKinds:[`TaskAction`],observationKinds:[`TaskObservation`],Body:function({action:e,observation:t}){let{t:n}=s(`openhands`),r=e?.action,i=t?.observation,a=i?.subagent??r?.subagent_type??``,o=i?.task_id,c=r?.prompt?.trim()??``,l=i?G(i.content).trim():``,u=[...a?[{label:n(y.TASK$SUBAGENT),value:a}]:[],...o?[{label:n(y.TASK$TASK_ID),value:o}]:[]];return(0,M.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[u.length>0&&(0,M.jsx)(Dr,{rows:u}),c&&(0,M.jsx)(kr,{label:n(y.TASK$QUERY),text:c}),l&&(0,M.jsx)(kr,{label:n(y.TASK$RESULT),text:l,isError:i?.is_error})]})}})],jr=e=>new Map(Ar.flatMap(t=>(e(t)??[]).map(e=>[e,t]))),Mr=jr(e=>e.actionKinds),Nr=jr(e=>e.observationKinds);function Pr(e,t){if(O(e)){let t=Mr.get(e.action.kind);if(t)return(0,M.jsx)(t.Body,{action:e})}else if(A(e)){let n=Nr.get(e.observation.kind);if(n)return(0,M.jsx)(n.Body,{action:t,observation:e})}return null}var J=(e,t)=>d.exists(e)?(0,M.jsx)(u,{ns:`openhands`,i18nKey:e,values:t,components:{path:(0,M.jsx)(Et,{}),cmd:(0,M.jsx)(St,{})}}):e,Fr=e=>e.kind===`text`?e.text:J(e.key,e.values),Y=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?L(n,t):n:null},Ir=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=Y(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},Lr=(e,t)=>{let n=t?.tool_name,r=e.observation,i=Y(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=Y((t?.action??{}).profile_name)??Y(r.profile_name)??Y(r.base_url,80)??Y(r.endpoint,80)??Y(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},Rr=e=>O(e)?Ir(e)||Fr(yt(e)):``,zr=(e,t)=>{if(!A(e))return``;let n=Lr(e,t);if(n)return n;if(t){let e=Ir(t);if(e)return e;let n=vt(t);if(n)return n}let r=e.observation.kind,i=``,a={};switch(r){case`ExecuteBashObservation`:case`TerminalObservation`:i=`OBSERVATION_MESSAGE$RUN`,a={command:e.observation.command?L(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:i=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:e.observation.command===`create`?`OBSERVATION_MESSAGE$WRITE`:`OBSERVATION_MESSAGE$EDIT`,a={path:e.observation.path||``};break;case`MCPToolObservation`:i=`OBSERVATION_MESSAGE$MCP`,a={mcp_tool_name:e.observation.tool_name};break;case`InvokeSkillObservation`:i=`OBSERVATION_MESSAGE$INVOKE_SKILL`,a={name:e.observation.skill_name};break;case`TaskObservation`:i=`OBSERVATION_MESSAGE$TASK`,a={name:e.observation.subagent};break;case`CanvasUIObservation`:i=`OBSERVATION_MESSAGE$CANVAS_UI`;break;case`ClientToolObservation`:if(e.tool_name===`canvas_ui_control`){i=`OBSERVATION_MESSAGE$CANVAS_UI`;break}if(e.tool_name===`launch_child_conversation`){i=`OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION`;break}return r.replace(`Observation`,``).toUpperCase();case`SwitchLLMObservation`:i=e.observation.is_error?`MODEL$SWITCH_FAILED`:`MODEL$SWITCHED_TO_PROFILE`,a={name:e.observation.profile_name};break;case`BrowserObservation`:i=`OBSERVATION_MESSAGE$BROWSE`;break;case`TaskTrackerObservation`:{let{command:t}=e.observation;i=t===`plan`?`OBSERVATION_MESSAGE$TASK_TRACKING_PLAN`:`OBSERVATION_MESSAGE$TASK_TRACKING_VIEW`;break}case`ThinkObservation`:i=`OBSERVATION_MESSAGE$THINK`;break;case`GlobObservation`:i=`OBSERVATION_MESSAGE$GLOB`,a={pattern:e.observation.pattern?L(e.observation.pattern,50):``};break;case`GrepObservation`:i=`OBSERVATION_MESSAGE$GREP`,a={pattern:e.observation.pattern?L(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return i?J(i,a):r},Br=(e,t)=>e.observation.kind!==`ClientToolObservation`||e.tool_name!==`canvas_ui_control`||!t||!Oe(t)?null:`UI command '${t.action.command}' dispatched to the Agent Canvas frontend.`,X=(e,t)=>{let n=``,r=``;if(U(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;n=d.exists(t)?J(t,{}):`Skill Ready`,r=e._skillReadyContent}else O(e)?(n=Rr(e),r=Pr(e)??En(e)):A(e)?(n=zr(e,t),r=e.observation.kind===`TaskTrackerObservation`?(0,M.jsx)(Kn,{event:e}):Br(e,t)??Pr(e,t)??Vn(e)):ke(e)?(n=J(dt(e),{title:pt(e)}),r=gt(e)):e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&typeof e.action.kind==`string`&&(n=String(e.action.kind).replace(`Action`,``).toUpperCase());return{title:n||d.t(y.EVENT$UNKNOWN_EVENT),details:r}};function Vr({event:e,isFromPlanningAgent:t=!1}){let n=X(e);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(z,{type:`agent`,message:typeof n.details==`string`?n.details:String(n.details),isFromPlanningAgent:t}),e.critic_result!=null&&(0,M.jsx)(fn,{criticResult:e.critic_result})]})}var Hr=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
35
|
+
`).trim();return!t.skill_name&&!n?[]:[{name:t.skill_name,content:n}]};function Ur(e){let t=e.split(`
|
|
36
|
+
`),n=null,r=null,i=0;for(let e=0;e<t.length;e+=1){let a=t[e];if(a.startsWith(h[0]))n=a.trim(),i=e+1;else if(a.startsWith(h[2]))r=a.replace(h[2],``).trim(),i=e+1;else if(a.startsWith(h[1])||a.startsWith(h[3]))i=e+1;else if(a.trim()===``&&e<=i)i=e+1;else break}return{matchInfo:n,filePath:r,body:t.slice(i).join(`
|
|
37
|
+
`).trim()}}function Wr(e){return e.replace(/<important>([\s\S]*?)<\/important>/gi,(e,t)=>`**${t.trim()}**`)}function Gr({content:e}){let{t}=s(`openhands`),{matchInfo:n,filePath:r,body:i}=Ur(e),a=n||r;return(0,M.jsxs)(`div`,{className:`pl-6 pr-2 pt-2 pb-2`,children:[a&&(0,M.jsxs)(`div`,{className:`mb-3 text-sm text-[var(--oh-muted)] space-y-1`,children:[n&&(0,M.jsx)(`p`,{children:n}),r&&(0,M.jsxs)(`p`,{children:[(0,M.jsxs)(E.Text,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.COMMON$PATH),` `]}),(0,M.jsx)(`code`,{className:`bg-[var(--oh-surface)] px-1.5 py-0.5 rounded text-[var(--oh-text-tertiary)]`,children:r})]})]}),a&&i&&(0,M.jsx)(`hr`,{className:`border-[var(--oh-border-subtle)] mb-3`}),i&&(0,M.jsx)(k,{children:Wr(i)})]})}function Kr({items:e,titleKey:t=y.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}){let{t:n}=s(`openhands`),[r,i]=j.useState({}),a=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,M.jsxs)(`div`,{className:`flex flex-col gap-1 mt-1`,children:[(0,M.jsx)(E.Text,{className:`font-bold text-[var(--oh-foreground)] text-sm px-2 py-1`,children:n(t)}),e.map(e=>{let t=r[e.name]||!1;return(0,M.jsxs)(`div`,{className:`border border-[var(--oh-border-subtle)] rounded-md overflow-hidden`,children:[(0,M.jsxs)(`button`,{type:`button`,onClick:()=>a(e.name),className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-tertiary transition-colors cursor-pointer`,children:[(0,M.jsx)(E.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,M.jsx)(b,{size:14}):(0,M.jsx)(ee,{size:14})}),(0,M.jsx)(E.Text,{className:`font-normal text-[var(--oh-foreground)] text-sm`,children:e.name})]}),t&&e.content&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`hr`,{className:`border-[var(--oh-border-subtle)]`}),(0,M.jsx)(Gr,{content:e.content})]})]},e.name)})]})}function qr(e){if(U(e))return e._skillReadyItems.length>0?{items:e._skillReadyItems,titleKey:y.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}:null;if(A(e)&&e.observation.kind===`InvokeSkillObservation`){let t=Hr(e);return t.length>0?{items:t,titleKey:y.SKILLS$INVOKED_SKILL_KNOWLEDGE}:null}return null}function Z({event:e,isLastMessage:t,correspondingAction:n}){let{title:r,details:i}=X(e,n);if(!U(e)&&A(e)&&e.observation.kind===`TaskTrackerObservation`)return(0,M.jsx)(`div`,{children:i});let a;U(e)?a=`success`:A(e)?a=On(e):ke(e)&&(a=Dn(e));let o=qr(e),s=o?(0,M.jsx)(Kr,{items:o.items,titleKey:o.titleKey}):i,c=!U(e)&&q(e,n);return(0,M.jsxs)(`div`,{children:[(0,M.jsx)(F,{title:r,details:s,success:a,initiallyExpanded:c,titleIcon:o?(0,M.jsx)(ge,{className:`h-4 w-4 stroke-[var(--oh-muted)] flex-shrink-0 mr-2`}):void 0}),t&&(0,M.jsx)(tn,{})]})}function Jr({event:e,actions:t,isFromPlanningAgent:n=!1}){let r=e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
38
|
+
`);return r?(0,M.jsx)(z,{type:`agent`,message:r,actions:t,isFromPlanningAgent:n}):null}function Yr(e,t){if(t)return`🚫`;switch(e){case`PreToolUse`:return`⏳`;case`PostToolUse`:return`✅`;case`UserPromptSubmit`:return`📝`;case`SessionStart`:return`🚀`;case`SessionEnd`:return`🏁`;case`Stop`:return`⏹️`;default:return`🔗`}}function Xr(e){return e.length>80?`${e.slice(0,77)}...`:e}function Zr(e,t){return e?`blocked`:t?`ok`:`failed`}function Qr(e,t){return e?`bg-amber-900/50 text-amber-300`:t?`bg-green-900/50 text-green-300`:`bg-red-900/50 text-red-300`}function $r({event:e}){let{t}=s(`openhands`);if(!De(e))return null;let n=Yr(e.hook_event_type,e.blocked),r=Zr(e.blocked,e.success),i=Qr(e.blocked,e.success),a=(()=>{if(!e.blocked)return e.success?`success`:`error`})();return(0,M.jsx)(F,{title:(0,M.jsxs)(`span`,{children:[n,` `,t(y.HOOK$HOOK_LABEL),`: `,e.hook_event_type,e.tool_name&&(0,M.jsxs)(`span`,{className:`text-[var(--oh-muted)] ml-2`,children:[`(`,e.tool_name,`)`]}),(0,M.jsx)(`span`,{className:_(`ml-2 px-1 py-0.5 rounded text-xs`,i),children:r})]}),details:(0,M.jsxs)(`div`,{className:`flex flex-col gap-2 text-[var(--oh-muted)]`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$COMMAND),`:`]}),` `,(0,M.jsx)(`code`,{className:`text-xs bg-[var(--oh-surface)] px-1 py-0.5 rounded`,children:Xr(e.hook_command)})]}),e.exit_code!==null&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$EXIT_CODE),`:`]}),` `,e.exit_code]}),e.blocked&&e.reason&&(0,M.jsxs)(`div`,{className:`text-amber-400`,children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$BLOCKED_REASON),`:`]}),` `,e.reason]}),e.additional_context&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$CONTEXT),`:`]}),` `,e.additional_context]}),e.error&&(0,M.jsxs)(`div`,{className:`text-red-400`,children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$ERROR),`:`]}),` `,e.error]}),e.stdout&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$OUTPUT),`:`]}),(0,M.jsx)(`pre`,{className:`text-xs bg-[var(--oh-surface)] p-2 rounded mt-1 overflow-x-auto max-h-40 overflow-y-auto`,children:e.stdout})]}),e.stderr&&(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(y.HOOK$STDERR),`:`]}),(0,M.jsx)(`pre`,{className:`text-xs bg-[var(--oh-surface)] p-2 rounded mt-1 overflow-x-auto max-h-40 overflow-y-auto text-amber-300`,children:e.stderr})]})]}),success:a})}function ei(e){let t=[],n=[];for(let r of e)Pe(r)?(n.length>0&&t.push(n),n=[r]):n.push(r);return n.length>0&&t.push(n),t}var ti=e=>e?.toUpperCase().endsWith(`PLAN.MD`)??!1;function ni(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(Se(n)&&ti(n.observation.path))return n.id}return null}function ri(e){return(0,j.useMemo)(()=>{let t=new Set;return ei(e).forEach(e=>{let n=ni(e);n&&t.add(n)}),t},[e])}function ii(e,t){return t.has(e)}var ai=e=>e.activated_skills||e.activated_microagents||[],oi=e=>!e||e.length===0?!1:e.some(e=>e.type===`text`&&e.text.trim().length>0),si=e=>{let t=ai(e).length>0,n=oi(e.extended_content);return t&&n},ci=(e,t,n)=>{try{let r=tr(e);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(hn,{event:e,isLastMessage:!1,isFromPlanningAgent:t.isFromPlanningAgent}),(0,M.jsx)(Z,{event:r,isLastMessage:n})]})}catch{return(0,M.jsx)(hn,{event:e,isLastMessage:n,isFromPlanningAgent:t.isFromPlanningAgent})}};function li({event:e,messages:t,isLastMessage:n,isInLast10Actions:r,planPreviewEventIds:i,suppressThought:a=!1}){let{data:o}=ne(),{planContent:s}=w(),{curAgentState:c}=Ue(),l=c===g.RUNNING||c===g.LOADING,u=e.isFromPlanningAgent||!1,d={isLastMessage:n,isInLast10Actions:r,config:o,isFromPlanningAgent:u};if(Ae(e)&&Te(e))return(0,M.jsx)(tt,{status:e.value});if(xe(e))return(0,M.jsx)(Ut,{event:e,...d});if(De(e))return(0,M.jsx)($r,{event:e});if(ke(e))return(0,M.jsx)(Z,{event:e,isLastMessage:n});if(Ne(e)){let{reasoning:t,message:n}=Ce(e.content??``,{streaming:!0}),r=[e.reasoning_content??``,t].filter(Boolean).join(`
|
|
39
|
+
|
|
40
|
+
`);return(0,M.jsxs)(M.Fragment,{children:[r&&(0,M.jsx)(V,{content:r}),n&&(0,M.jsx)(z,{type:`agent`,message:n,isFromPlanningAgent:u})]})}if(O(e)&&e.action.kind===`FinishAction`)return(0,M.jsx)(Vr,{event:e,...d});if(O(e)&&e.action.kind===`ThinkAction`)return(0,M.jsx)(V,{content:e.action.thought});if(O(e)){let t=Me(e);return(0,M.jsxs)(M.Fragment,{children:[t&&(0,M.jsx)(V,{content:t}),!a&&(0,M.jsx)(Jr,{event:e,isFromPlanningAgent:u}),(0,M.jsx)(Z,{event:e,isLastMessage:n})]})}if(A(e)){if(Se(e))return i&&ii(e.id,i)?(0,M.jsx)(Vt,{planContent:s,isStreaming:n&&c===g.RUNNING,isBuildDisabled:l}):null;let r=t.find(t=>O(t)&&t.id===e.action_id),o=!a&&r&&O(r)&&r.action.kind!==`ThinkAction`,d=r&&O(r)?Me(r):``;return(0,M.jsxs)(M.Fragment,{children:[d&&(0,M.jsx)(V,{content:d}),o&&(0,M.jsx)(Jr,{event:r,isFromPlanningAgent:u}),(0,M.jsx)(Z,{event:e,isLastMessage:n,correspondingAction:r&&O(r)?r:void 0})]})}if(!O(e)&&!A(e)){let t=e;return Pe(e)&&si(t)?ci(t,d,n):(0,M.jsx)(hn,{event:t,...d,isLastMessage:n})}return(0,M.jsx)(Z,{event:e,isLastMessage:n})}var ui=(e,t)=>{if(O(e)){let{kind:n}=e.action;return!(n===`FinishAction`||n===`ThinkAction`||q(e,t))}return A(e)?!(Se(e)||q(e,t)||e.observation.kind===`TaskTrackerObservation`):!1},di=(e,t=2,n=e)=>{if(t<1)throw Error(`minSize must be at least 1`);let r=[],i=new Set,a=null,o=()=>{a&&=(a.events.length>=t?r.push({kind:`group`,events:a.events,startIndex:a.startIndex}):a.events.forEach((e,t)=>{r.push({kind:`single`,event:e,index:a.startIndex+t})}),null)};return e.forEach((e,t)=>{if(ui(e,A(e)?n.find(t=>O(t)&&t.id===e.action_id):void 0)){let s=we(e,n);s&&!i.has(s.id)&&(o(),i.add(s.id),r.push({kind:`thought`,action:s,index:t})),a||={events:[],startIndex:t},a.events.push(e)}else o(),r.push({kind:`single`,event:e,index:t})}),o(),r},fi=(0,j.createContext)(!1);function pi({events:e,allEvents:t,isFinalized:n=!1,children:r}){let{t:i}=s(`openhands`),[a,o]=j.useState(!1),c=j.useId(),l=`${c}-toggle`;if(e.length===0)return null;let u=e.find(e=>O(e)),d=e.filter(A).length,f=e.length,p=!!u,m=e[e.length-1],h=null;m&&(O(m)?h=X(m).title:A(m)&&(h=X(m,(t??e).find(e=>O(e)&&e.id===m.action_id)).title));let g=p?i(y.EVENT_GROUP$ACTIONS_PROGRESS,{completed:d,total:f}):i(y.EVENT_GROUP$ACTIONS_COMPLETED,{count:f}),_=a?P:N;return(0,M.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`event-group`,children:[(0,M.jsx)(`button`,{id:l,type:`button`,onClick:()=>o(e=>!e),"aria-controls":c,"aria-expanded":a,"aria-label":i(a?y.EVENT_GROUP$COLLAPSE:y.EVENT_GROUP$EXPAND),"data-testid":`event-group-toggle`,className:`w-full flex items-center justify-between gap-2 text-left cursor-pointer`,children:n?(0,M.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,M.jsx)(_,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,M.jsx)(`span`,{className:`truncate`,children:g})]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,M.jsx)(_,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,M.jsx)(`span`,{className:`truncate`,children:h??g})]}),(0,M.jsxs)(`span`,{className:`flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]`,children:[(0,M.jsx)(`span`,{className:`truncate`,children:g}),p?(0,M.jsx)(te,{"data-testid":`spinner-icon`,className:`h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]`}):null]})]})}),a&&(0,M.jsx)(`div`,{id:c,role:`region`,"aria-labelledby":l,className:`mt-1.5 flex flex-col`,"data-testid":`event-group-content`,children:(0,M.jsx)(fi.Provider,{value:!0,children:r})})]})}var Q=e=>e.at(-1)?.id,$=e=>e.at(-1),mi=j.memo(({messages:e,allEvents:t})=>{let{conversationId:n}=D(),r=ri(t),i=Re(e=>n?e.entriesByConversation[n]:void 0),a=j.useMemo(()=>{if(!i||i.length===0)return null;let e=new Set;for(let t of i)t.anchorEventId!==null&&e.add(t.anchorEventId);return e.size>0?e:null},[i]),o=e=>{if(!a||e===void 0)return null;let t=String(e);return a.has(t)?(0,M.jsx)(it,{conversationId:n,anchorEventId:t}):null},s=j.useMemo(()=>di(e,void 0,t),[e,t]),c=(n,i,a)=>(0,M.jsx)(li,{event:n,messages:t,isLastMessage:e.length-1===i,isInLast10Actions:e.length-1-i<10,planPreviewEventIds:r,suppressThought:a},n.id);return(0,M.jsx)(M.Fragment,{children:s.map((e,n)=>{if(e.kind===`single`)return(0,M.jsxs)(j.Fragment,{children:[c(e.event,e.index,!0),o(e.event.id)]},`single-${e.event.id}`);if(e.kind===`thought`)return(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(Jr,{event:e.action}),o(e.action.id)]},`thought-${e.action.id}`);let r=n<s.length-1,i=e.events[0]?.id??`group-${e.startIndex}`;return(0,M.jsxs)(j.Fragment,{children:[(0,M.jsx)(pi,{events:e.events,allEvents:t,isFinalized:r,children:e.events.map((t,n)=>c(t,e.startIndex+n,!0))}),e.events.map(e=>(0,M.jsx)(j.Fragment,{children:o(e.id)},`model-${e.id}`))]},`group-${i}`)})})},(e,t)=>e.messages.length===t.messages.length&&e.allEvents.length===t.allEvents.length&&Q(e.messages)===Q(t.messages)&&Q(e.allEvents)===Q(t.allEvents)&&$(e.messages)===$(t.messages)&&$(e.allEvents)===$(t.allEvents));mi.displayName=`Messages`;export{Xe as A,st as C,tt as D,it as E,Je as M,qe as N,Qe as O,pt as S,at as T,St as _,Un as a,gt as b,En as c,Yt as d,Rt as f,Et as g,Dt as h,ar as i,Ye as j,F as k,pn as l,jt as m,di as n,Hn as o,z as p,vr as r,Vn as s,mi as t,nn as u,yt as v,lt as w,dt as x,vt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-DUD5ScdA.js";e();var r=t(),i={sm:`w-[384px]`,md:`w-[520px]`,lg:`w-[640px]`,xl:`w-[720px]`},a=`max-w-[90vw]`;function o(e){return i[e]}function s({testID:e,children:t,className:i,width:a=`sm`}){return(0,r.jsx)(`div`,{"data-testid":e,className:n(`bg-base-secondary flex flex-col gap-6 items-center p-6 rounded-xl`,o(a),i),children:t})}export{s as n,o as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./utils-
|
|
1
|
+
import{t as e}from"./utils-DUD5ScdA.js";var t=e(`text-xl leading-6 -tracking-[0.01em] font-medium text-[var(--oh-modal-title-foreground)]`),n=e(`text-sm font-medium text-[var(--oh-modal-title-foreground)]`),r=e(`text-lg font-medium text-[var(--oh-modal-title-foreground)]`),i=r;export{n as i,r as n,i as r,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as r,z as i}from"./utils-DUD5ScdA.js";e();var a=t(),o=e=>(0,a.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,a.jsx)(`path`,{d:`M12 4L4 12M4 4L12 12`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})});function s({onClose:e,testId:t,className:s,disabled:c=!1}){let{t:l}=n(`openhands`);return(0,a.jsx)(`button`,{type:`button`,"data-testid":t,onClick:e,disabled:c,"aria-label":l(i.BUTTON$CLOSE),className:r(`absolute right-4 top-4 z-10 flex cursor-pointer items-center justify-center rounded-sm border-0 bg-transparent p-1 text-tertiary-alt transition-colors hover:bg-surface-raised hover:text-white disabled:cursor-not-allowed disabled:opacity-50`,s),children:(0,a.jsx)(o,{"aria-hidden":!0,className:`size-4`})})}export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";var t=e(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{D as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as r}from"./useQuery-Bs5NFz2s.js";import{A as i}from"./active-backend-context-BZDG15C0.js";var a=n(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),o=`https://registry.npmjs.org/@openhands/agent-canvas/latest`,s=`https://github.com/OpenHands/OpenHands/releases`,c={npm:`npm install -g @openhands/agent-canvas@latest`,docker:`docker pull ghcr.io/openhands/agent-canvas:latest`};async function l(e){let t=await fetch(o,{signal:e,headers:{Accept:`application/json`}});if(!t.ok)throw Error(`npm registry responded ${t.status}`);let n=(await t.json())?.version;if(typeof n!=`string`||!n.trim())throw Error(`npm registry response missing version`);return n.trim()}function u({enabled:e=!0}={}){return r({queryKey:i.latestVersion,queryFn:({signal:e})=>l(e),enabled:e,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*60,meta:{disableToast:!0}})}e();var d=t(),f=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{fill:`currentColor`,d:`M21.81 10.25c-.06-.04-.56-.43-1.64-.43c-.28 0-.56.03-.84.08c-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17l-.18.27c-.24.36-.43.77-.51 1.19c-.2.8-.08 1.56.33 2.21c-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63c0 1.15.18 2.3.58 3.38c.45 1.19 1.13 2.07 2 2.61c.98.6 2.59.94 4.42.94c.79 0 1.61-.07 2.42-.22c1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85c.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16`})}),p=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{fill:`currentColor`,d:`M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z`})});export{c as a,s as i,f as n,a as o,u as r,p as t};
|