@openhands/agent-canvas 1.5.2 → 1.6.1
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/{Trans-DqF_OEZB.js → Trans-52HCczKK.js} +1 -1
- package/build/assets/{acp-providers-DerAmTyY.js → acp-providers-xACMK9ZP.js} +1 -1
- package/build/assets/{active-backend-context-DHhm10VS.js → active-backend-context-Cd1qcZsb.js} +1 -1
- package/build/assets/{add-backend-modal-BoMkMyLB.js → add-backend-modal-5chsfln3.js} +1 -1
- package/build/assets/{agent-profiles-settings-CYPloKYK.js → agent-profiles-settings-BWK4H3kR.js} +1 -1
- package/build/assets/agent-server-compatibility-DMY0CihN.js +1 -0
- package/build/assets/agent-server-conversation-service.api-CI5-xmIX.js +41 -0
- package/build/assets/agent-settings-CMd8-O4f.js +2 -0
- package/build/assets/agent-settings-CdrhQJXX.js +1 -0
- package/build/assets/{alert-banner-Dh51WURQ.js → alert-banner-CLfWuIAX.js} +1 -1
- package/build/assets/api-key-entry-screen-Cc3aC7DZ.js +1 -0
- package/build/assets/app-settings-B-DQcBoB.js +1 -0
- package/build/assets/{automation-detail-Bn8q0AG3.js → automation-detail-BgxBIpyK.js} +2 -2
- package/build/assets/automation-export-Dbur8OHa.js +2 -0
- package/build/assets/automations-list-BWfjizlp.js +1 -0
- package/build/assets/{back-nav-button-DVknCcSP.js → back-nav-button-CaKvsD1E.js} +1 -1
- package/build/assets/backend-form-modal-YcfpuBZo.js +1 -0
- package/build/assets/{backend-synced-settings-badge-yVh6Kf4E.js → backend-synced-settings-badge-BellMmgC.js} +1 -1
- package/build/assets/{base-modal-CIF_785P.js → base-modal-Cw7enAHz.js} +1 -1
- package/build/assets/{brand-button-B1izLAdR.js → brand-button-BulEFHr3.js} +1 -1
- package/build/assets/{browser-DKaeq_sT.js → browser-DfVgUREb.js} +2 -2
- package/build/assets/browser-store-CBqI3tNR.js +1 -0
- package/build/assets/{browser-tab-qb_ftCxW.js → browser-tab-CmIKQB7S.js} +1 -1
- package/build/assets/chat-send-button-BchSSwuD.js +1 -0
- package/build/assets/circle-check-BXbQ5nEH.js +1 -0
- package/build/assets/{circle-plus-check-toggle-DoFIjVE0.js → circle-plus-check-toggle-BhpPjkh9.js} +1 -1
- package/build/assets/client-source-DAUgyJsi.js +1 -0
- package/build/assets/cloud-funnel-analytics-B5OeWh4y.js +1 -0
- package/build/assets/{color-themes-CHizm1xF.js → color-themes-QKMSVfDU.js} +1 -1
- package/build/assets/{combobox-caret-CxZpqoSR.js → combobox-caret-kNZtp53R.js} +1 -1
- package/build/assets/{command-menu-oTvKDU3Y.js → command-menu-tUsn23zy.js} +1 -1
- package/build/assets/{command-store-D8J5LMW1.js → command-store-B0hrIWMN.js} +1 -1
- package/build/assets/{condenser-settings-Q1rHh4Qe.js → condenser-settings-BBizzfIH.js} +1 -1
- package/build/assets/{confirmation-modal-DGBWM2Ls.js → confirmation-modal-108xng7X.js} +1 -1
- package/build/assets/{context-menu-list-item-6psNyl7X.js → context-menu-list-item-BbKfFuN1.js} +1 -1
- package/build/assets/conversation-CTzSrLMq.js +1 -0
- package/build/assets/conversation-CgcXNb-Z.js +90 -0
- package/build/assets/conversation-panel-bscjGQda.js +1 -0
- package/build/assets/{conversation-service.api-D8QU-BiL.js → conversation-service.api-DbBvscJA.js} +1 -1
- package/build/assets/conversation-state-store-C5GagZHT.js +1 -0
- package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-CyVqoa0d.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-CNUmIms2.js → conversation-tab-empty-state-2KYlk5Bh.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-CFzH_NOX.js → copy-to-clipboard-button-C54YRPMg.js} +1 -1
- package/build/assets/declaration-_yumYLEx.js +1 -0
- package/build/assets/{device-verify-WBSjJBLH.js → device-verify-D6FW_KZq.js} +1 -1
- package/build/assets/{dropdown-classes-D3wMJlXT.js → dropdown-classes-9uONlOg1.js} +1 -1
- package/build/assets/{ellipsis-button-CbNnHlIq.js → ellipsis-button-CoaUrKmQ.js} +1 -1
- package/build/assets/{entry.client-Dnnak-Hq.js → entry.client-BJSVzw7V.js} +2 -2
- package/build/assets/{enum-filter-dropdown-JLYv1t8L.js → enum-filter-dropdown-qQzyjk_q.js} +1 -1
- package/build/assets/{environment-switch-overlay-B1PFO8P8.js → environment-switch-overlay-XRWCClLu.js} +1 -1
- package/build/assets/extensions-hub-DUp9sWQY.js +1 -0
- package/build/assets/extensions-navigation-DmkftjAx.js +1 -0
- package/build/assets/file-tUAzhmJ3.js +1 -0
- package/build/assets/files-tab-GV5hwiIM.js +1 -0
- package/build/assets/files-tab-store-DehyITNC.js +1 -0
- package/build/assets/{form-control-classes-CbdN5aO3.js → form-control-classes-BPUnoYyg.js} +1 -1
- package/build/assets/git-provider-icon-DDkru3b_.js +1 -0
- package/build/assets/highlighted-source-view-CYkPZUxr.js +1 -0
- package/build/assets/home-C53WekZ2.js +1 -0
- package/build/assets/home-EAwq8ah2.js +1 -0
- package/build/assets/index-home-kBdZGKtu.js +1 -0
- package/build/assets/install-server-modal-DYk4VP3-.js +1 -0
- package/build/assets/{launch-DlXspDku.js → launch-CIecOy_y.js} +1 -1
- package/build/assets/lesson-plan-BSEUwflx.js +4 -0
- package/build/assets/llm-not-configured-banner-C8uv1PHT.js +27 -0
- package/build/assets/llm-settings-0Bb97NCk.js +1 -0
- package/build/assets/llm-settings-D4toJ90k.js +1 -0
- package/build/assets/{llm-subscription-service-C0zN0-rH.js → llm-subscription-service-BPRw3u3H.js} +1 -1
- package/build/assets/{loading-spinner-BcdnT0mN.js → loading-spinner-BCInDEXB.js} +1 -1
- package/build/assets/manage-backends-modal-Bon32JYr.js +1 -0
- package/build/assets/manifest-ec000ae3.js +1 -0
- package/build/assets/markdown-renderer-BlaJOAI2.js +2 -0
- package/build/assets/mcp-CFIpOkn2.js +9 -0
- package/build/assets/messages-eRPeR4pW.js +40 -0
- package/build/assets/{modal-body-Cc2zp0xb.js → modal-body-Bg9UCeoV.js} +1 -1
- package/build/assets/{modal-classes-3qT9Ap7Q.js → modal-classes-H1KbJkeC.js} +1 -1
- package/build/assets/{modal-close-button-BcIBUdSq.js → modal-close-button-BMLYvo0C.js} +1 -1
- package/build/assets/{model-selector-D51W2Q9b.js → model-selector-BqX2RvEr.js} +1 -1
- package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-DoJzTCEz.js} +1 -1
- package/build/assets/onboarding-3KO4qE6R.js +1 -0
- package/build/assets/onboarding-modal-D4vqkJeT.js +1 -0
- package/build/assets/{organization-service.api-Da2jiuBS.js → organization-service.api-CvfQugOt.js} +1 -1
- package/build/assets/{path-utils-D53ZHUQU.js → path-utils-DRgexxnX.js} +1 -1
- package/build/assets/{plan-components-BdZXPyZU.js → plan-components-qkMiGs_-.js} +1 -1
- package/build/assets/{planner-tab-BM-pKx0z.js → planner-tab-ZrjiirRr.js} +1 -1
- package/build/assets/{plugins-management-service-DISfOL13.js → plugins-management-service-9qT-r_37.js} +1 -1
- package/build/assets/plus-CzE1b-wl.js +1 -0
- package/build/assets/{profiles-service.api-DWetW2TL.js → profiles-service.api-CRVlrQpT.js} +1 -1
- package/build/assets/{providers-C7lMslCi.js → providers-C2DFGBrf.js} +1 -1
- package/build/assets/{proxy-G4ce0fnQ.js → proxy-DnnDqkwn.js} +1 -1
- package/build/assets/puzzle-IHQnD54C.js +1 -0
- package/build/assets/recommended-automations-launcher-B97vgHuN.js +58 -0
- package/build/assets/refresh-cw-DxbAs3SK.js +1 -0
- package/build/assets/root-BbONavTg.css +1 -0
- package/build/assets/root-D01rpqZU.js +2 -0
- package/build/assets/root-layout-BiHbCIkS.js +2 -0
- package/build/assets/{runtime-waiting-state-CnyVhX4T.js → runtime-waiting-state-CbUV9txX.js} +1 -1
- package/build/assets/{schema-field-CwdqUOnE.js → schema-field-B9-9Ta9u.js} +1 -1
- package/build/assets/sdk-section-page-DG1s25Pr.js +1 -0
- package/build/assets/{sdk-settings-schema-CLR01YIK.js → sdk-settings-schema-B42JFr5Y.js} +1 -1
- package/build/assets/{secrets-service-Ch7RH8eH.js → secrets-service-DvyS6-mV.js} +1 -1
- package/build/assets/secrets-settings-CeSq6cQw.js +1 -0
- package/build/assets/{segmented-toggle-kzwZkLaj.js → segmented-toggle-DRVJBNy0.js} +1 -1
- package/build/assets/settings-Dzo0dJKM.js +1 -0
- package/build/assets/{settings-mQUckT0g.js → settings-HcwfqMjJ.js} +1 -1
- package/build/assets/{settings-dropdown-input-Dhx9ErGd.js → settings-dropdown-input-B6RL_mt0.js} +1 -1
- package/build/assets/settings-index-uAKHyijw.js +1 -0
- package/build/assets/{settings-input-BsgQWS5R.js → settings-input-ZoaAPNQh.js} +1 -1
- package/build/assets/{settings-list-classes-DSJJX99U.js → settings-list-classes-Dr8LgITi.js} +1 -1
- package/build/assets/settings-modal-BVX2G_IT.js +1 -0
- package/build/assets/{settings-service.api-DPTFyRXL.js → settings-service.api-BY7ncxIz.js} +1 -1
- package/build/assets/{settings-switch-Bes8dIlV.js → settings-switch-DUlGnP0B.js} +1 -1
- package/build/assets/{settings-utils-DzCVfiR3.js → settings-utils-kWEEvcdv.js} +1 -1
- package/build/assets/shared-conversation-CV4Rtdz2.js +1 -0
- package/build/assets/{sidebar-layout-Bm7pa3Vk.js → sidebar-layout-BhGooCga.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-BntOJphE.js +1 -0
- package/build/assets/{sidebar-nav-link-CHqyFXwV.js → sidebar-nav-link-DkA1XWV8.js} +1 -1
- package/build/assets/{sidebar-store-uiUXBU1N.js → sidebar-store-CF3b12-m.js} +1 -1
- package/build/assets/{skill-card-pill-row-BPYKQ3IN.js → skill-card-pill-row-_gWe1Tws.js} +1 -1
- package/build/assets/skill-icon-badge-C-zbaXbD.js +1 -0
- package/build/assets/skills-plugins-BwoXKtrR.js +1 -0
- package/build/assets/skills-settings-Crq-fZSt.js +2 -0
- package/build/assets/{styled-tooltip-B14i_Uac.js → styled-tooltip-CdnCJ67u.js} +1 -1
- package/build/assets/syntax-highlighter-CZK2ab-O.js +1 -0
- package/build/assets/{task-list-tab-DyfgG4MC.js → task-list-tab-CONOO9iI.js} +1 -1
- package/build/assets/telemetry-CC32dJYW.js +2 -0
- package/build/assets/{terminal-BDTa1HEr.js → terminal-CTkDpIU-.js} +1 -1
- package/build/assets/{toggle-switch-DX_k418f.js → toggle-switch-yVIzmJLM.js} +1 -1
- package/build/assets/{typography-CzfoD9DY.js → typography-BBVEW0un.js} +1 -1
- package/build/assets/{use-acp-credential-form-DHd_Id-q.js → use-acp-credential-form-CIsp8hJe.js} +1 -1
- package/build/assets/use-activate-agent-profile-BfcTTJJG.js +1 -0
- package/build/assets/{use-active-agent-profile-BMDTXsay.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
- package/build/assets/{use-active-conversation-BbeVgedA.js → use-active-conversation-Badxj8w4.js} +1 -1
- package/build/assets/{use-agent-profiles-Dn_S_Tkz.js → use-agent-profiles-BSWVN6hH.js} +1 -1
- package/build/assets/{use-agent-state-5qM3X30V.js → use-agent-state-BzRrhoPd.js} +1 -1
- package/build/assets/use-backends-health-BsZikyFW.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-CyYqfzeo.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BwMX7jHW.js → use-cloud-current-user-id-Cx3B_0-w.js} +1 -1
- package/build/assets/use-config-D9zUVw5b.js +1 -0
- package/build/assets/{use-create-conversation-CkKUQVbP.js → use-create-conversation-vvl0kvu7.js} +1 -1
- package/build/assets/{use-create-secret-DEgM0MXZ.js → use-create-secret-CB7Dvd4s.js} +1 -1
- package/build/assets/use-event-store-BlpSUF7N.js +4 -0
- package/build/assets/{use-handle-plan-click-BFcE0Xms.js → use-handle-plan-click-DDZkew9p.js} +1 -1
- package/build/assets/use-is-creating-conversation-fxSzN778.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-DJWEfVc5.js → use-launch-skill-in-chat-D6_n1fs3.js} +1 -1
- package/build/assets/use-llm-profiles-CNQm7HYS.js +1 -0
- package/build/assets/use-plugins-marketplace-CloojomS.js +1 -0
- package/build/assets/use-runtime-is-ready-Bx_4cfar.js +1 -0
- package/build/assets/{use-save-agent-profile-i4FcEP98.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
- package/build/assets/{use-save-settings-DiDEbIJw.js → use-save-settings-BMsb2wk_.js} +1 -1
- package/build/assets/use-settings-B9XEmh7i.js +1 -0
- package/build/assets/use-settings-nav-items-BGfBS0yL.js +16 -0
- package/build/assets/{use-skills-Blpg2BqE.js → use-skills-CSRbvPle.js} +1 -1
- package/build/assets/{use-task-list-CfisapBW.js → use-task-list-CTIVLrQA.js} +1 -1
- package/build/assets/use-tracking-DjdCssvp.js +1 -0
- package/build/assets/{use-user-conversation-BrN2xeQU.js → use-user-conversation-BCpFn-Ei.js} +1 -1
- package/build/assets/{useTranslation-Cbf5AGg_.js → useTranslation-CHm_6BRr.js} +1 -1
- package/build/assets/{utils-DB9LsAzA.js → utils-CrRpzbM2.js} +1 -1
- package/build/assets/vendor-markdown-DzO4uO_0.js +37 -0
- package/build/assets/{vendor~browser-wXQ-WZEC.js → vendor~browser-Byfuq5J-.js} +1 -1
- package/build/assets/{vendor~browser-tab-CsMb-pta.js → vendor~browser-tab-BLk3qxhw.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js} +2 -2
- package/build/assets/{vendor~files-tab-B-5fBohe.js → vendor~files-tab-XmnauIZI.js} +1 -1
- package/build/assets/{vendor~launch-_Km3J77E.js → vendor~launch-DeC8QhXQ.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js} +123 -3
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js} +1 -1
- package/build/assets/{verification-settings-C8KzAdAX.js → verification-settings-uwOfc16F.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +38 -4
- package/build/locales/ca/openhands.json +38 -4
- package/build/locales/de/openhands.json +38 -4
- package/build/locales/en/openhands.json +38 -4
- package/build/locales/es/openhands.json +38 -4
- package/build/locales/fr/openhands.json +38 -4
- package/build/locales/it/openhands.json +38 -4
- package/build/locales/ja/openhands.json +38 -4
- package/build/locales/ko-KR/openhands.json +38 -4
- package/build/locales/no/openhands.json +38 -4
- package/build/locales/pt/openhands.json +38 -4
- package/build/locales/tr/openhands.json +38 -4
- package/build/locales/uk/openhands.json +38 -4
- package/build/locales/zh-CN/openhands.json +38 -4
- package/build/locales/zh-TW/openhands.json +38 -4
- package/config/defaults.json +7 -3
- package/dist/api/agent-canvas-updates.cjs +2 -0
- package/dist/api/agent-canvas-updates.cjs.map +1 -0
- package/dist/api/agent-canvas-updates.d.ts +7 -0
- package/dist/api/agent-canvas-updates.js +19 -0
- package/dist/api/agent-canvas-updates.js.map +1 -0
- package/dist/api/agent-server-adapter.cjs +1 -1
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +3 -0
- package/dist/api/agent-server-adapter.js +1 -0
- package/dist/api/agent-server-adapter.js.map +1 -1
- 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.d.ts +5 -0
- package/dist/api/agent-server-compatibility.js +24 -15
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.js +11 -8
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +2 -0
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -0
- package/dist/api/automation-service/automation-service.api.d.ts +3 -0
- package/dist/api/automation-service/automation-service.api.js +283 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -0
- package/dist/api/client-source.cjs +1 -1
- package/dist/api/client-source.cjs.map +1 -1
- package/dist/api/client-source.d.ts +3 -0
- package/dist/api/client-source.js +4 -4
- package/dist/api/client-source.js.map +1 -1
- package/dist/api/cloud/settings-service.api.cjs.map +1 -1
- package/dist/api/cloud/settings-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.js +111 -109
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/mcp-health/mcp-health-store.cjs +2 -0
- package/dist/api/mcp-health/mcp-health-store.cjs.map +1 -0
- package/dist/api/mcp-health/mcp-health-store.d.ts +22 -0
- package/dist/api/mcp-health/mcp-health-store.js +45 -0
- package/dist/api/mcp-health/mcp-health-store.js.map +1 -0
- package/dist/api/mcp-health/probe-mcp-server-health.cjs +2 -0
- package/dist/api/mcp-health/probe-mcp-server-health.cjs.map +1 -0
- package/dist/api/mcp-health/probe-mcp-server-health.d.ts +31 -0
- package/dist/api/mcp-health/probe-mcp-server-health.js +57 -0
- package/dist/api/mcp-health/probe-mcp-server-health.js.map +1 -0
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +66 -46
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/plugins-management-service.cjs.map +1 -1
- package/dist/api/plugins-management-service.d.ts +6 -1
- package/dist/api/plugins-management-service.js.map +1 -1
- package/dist/api/plugins-service.d.ts +30 -2
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.d.ts +6 -6
- package/dist/api/secrets-service.js +8 -3
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +1 -1
- package/dist/api/settings-service/settings-service.api.js +1 -0
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +4 -1
- package/dist/components/features/backends/backend-form-modal.js +15 -16
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +103 -102
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +85 -73
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -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 +131 -129
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
- package/dist/components/features/chat/skill-install-restart-banner.cjs +2 -0
- package/dist/components/features/chat/skill-install-restart-banner.cjs.map +1 -0
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +11 -0
- package/dist/components/features/chat/skill-install-restart-banner.js +63 -0
- package/dist/components/features/chat/skill-install-restart-banner.js.map +1 -0
- package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
- package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
- package/dist/components/features/conversation/right-panel-toggle.js +1 -1
- package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +10 -10
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +78 -77
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.d.ts +4 -1
- package/dist/components/features/mcp-page/install-server-modal.js +135 -136
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.js +40 -34
- package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.cjs +2 -0
- package/dist/components/features/mcp-page/mcp-server-health.cjs.map +1 -0
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +18 -0
- package/dist/components/features/mcp-page/mcp-server-health.js +117 -0
- package/dist/components/features/mcp-page/mcp-server-health.js.map +1 -0
- package/dist/components/features/plugins/build-plugins-view-model.d.ts +10 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +13 -0
- package/dist/components/features/settings/agent-canvas-update-card.cjs +2 -0
- package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -0
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +7 -0
- package/dist/components/features/settings/agent-canvas-update-card.js +170 -0
- package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -0
- package/dist/components/features/settings/integrations-settings-link.cjs +2 -0
- package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -0
- package/dist/components/features/settings/integrations-settings-link.d.ts +5 -0
- package/dist/components/features/settings/integrations-settings-link.js +41 -0
- package/dist/components/features/settings/integrations-settings-link.js.map +1 -0
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.js +31 -21
- package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.js +40 -30
- package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +54 -33
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +7 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.js.map +1 -1
- 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 +169 -166
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-delete-llm-profile.js +1 -0
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -6
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-rename-llm-profile.js +1 -0
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.js +3 -3
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +11 -9
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +4 -0
- package/dist/hooks/query/query-keys.js +2 -2
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +2 -0
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -0
- package/dist/hooks/query/use-automation-sdk-version.d.ts +3 -0
- package/dist/hooks/query/use-automation-sdk-version.js +63 -0
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.cjs +2 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.cjs.map +1 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.d.ts +10 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.js +19 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.js.map +1 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +7 -0
- package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
- package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
- package/dist/hooks/query/use-resolved-workspaces.js +25 -26
- package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
- package/dist/hooks/query/use-search-subdirs.cjs +1 -1
- package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +5 -0
- package/dist/hooks/query/use-search-subdirs.js +16 -4
- package/dist/hooks/query/use-search-subdirs.js.map +1 -1
- package/dist/hooks/use-device-flow.cjs +1 -1
- package/dist/hooks/use-device-flow.js +6 -6
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.js +3 -3
- package/dist/hooks/use-mcp-server-health.cjs +2 -0
- package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
- package/dist/hooks/use-mcp-server-health.d.ts +11 -0
- package/dist/hooks/use-mcp-server-health.js +18 -0
- package/dist/hooks/use-mcp-server-health.js.map +1 -0
- package/dist/hooks/use-skill-installs.cjs +2 -0
- package/dist/hooks/use-skill-installs.cjs.map +1 -0
- package/dist/hooks/use-skill-installs.d.ts +10 -0
- package/dist/hooks/use-skill-installs.js +21 -0
- package/dist/hooks/use-skill-installs.js.map +1 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +3 -3
- package/dist/hooks/use-tracking.js +67 -52
- 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 +35 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +623 -45
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -2
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/locales/ar/openhands.json +38 -4
- package/dist/locales/ca/openhands.json +38 -4
- package/dist/locales/de/openhands.json +38 -4
- package/dist/locales/en/openhands.json +38 -4
- package/dist/locales/es/openhands.json +38 -4
- package/dist/locales/fr/openhands.json +38 -4
- package/dist/locales/it/openhands.json +38 -4
- package/dist/locales/ja/openhands.json +38 -4
- package/dist/locales/ko-KR/openhands.json +38 -4
- package/dist/locales/no/openhands.json +38 -4
- package/dist/locales/pt/openhands.json +38 -4
- package/dist/locales/tr/openhands.json +38 -4
- package/dist/locales/uk/openhands.json +38 -4
- package/dist/locales/zh-CN/openhands.json +38 -4
- package/dist/locales/zh-TW/openhands.json +38 -4
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +10 -3
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +113 -67
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js +1 -0
- package/dist/routes/mcp.js.map +1 -1
- package/dist/services/cloud-funnel-analytics.cjs +1 -1
- package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
- package/dist/services/cloud-funnel-analytics.d.ts +2 -2
- package/dist/services/cloud-funnel-analytics.js +18 -16
- package/dist/services/cloud-funnel-analytics.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +1 -0
- package/dist/services/settings.js.map +1 -1
- package/dist/services/telemetry-context.cjs +2 -0
- package/dist/services/telemetry-context.cjs.map +1 -0
- package/dist/services/telemetry-context.d.ts +17 -0
- package/dist/services/telemetry-context.js +27 -0
- package/dist/services/telemetry-context.js.map +1 -0
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +7 -5
- package/dist/services/telemetry.js +132 -123
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/skill-install-banner-store.cjs +2 -0
- package/dist/stores/skill-install-banner-store.cjs.map +1 -0
- package/dist/stores/skill-install-banner-store.d.ts +32 -0
- package/dist/stores/skill-install-banner-store.js +14 -0
- package/dist/stores/skill-install-banner-store.js.map +1 -0
- package/dist/stores/use-event-store.cjs +1 -1
- package/dist/stores/use-event-store.cjs.map +1 -1
- package/dist/stores/use-event-store.js +35 -35
- package/dist/stores/use-event-store.js.map +1 -1
- package/dist/types/mcp-health.cjs +2 -0
- package/dist/types/mcp-health.cjs.map +1 -0
- package/dist/types/mcp-health.d.ts +21 -0
- package/dist/types/mcp-health.js +6 -0
- package/dist/types/mcp-health.js.map +1 -0
- package/dist/types/settings.d.ts +1 -0
- package/dist/utils/handle-event-for-ui.cjs +1 -1
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.d.ts +5 -0
- package/dist/utils/handle-event-for-ui.js +71 -57
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mcp-credential-validation.cjs +1 -1
- package/dist/utils/mcp-credential-validation.cjs.map +1 -1
- package/dist/utils/mcp-credential-validation.js +32 -16
- package/dist/utils/mcp-credential-validation.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs +2 -0
- package/dist/utils/mcp-server-health-key.cjs.map +1 -0
- package/dist/utils/mcp-server-health-key.d.ts +16 -0
- package/dist/utils/mcp-server-health-key.js +23 -0
- package/dist/utils/mcp-server-health-key.js.map +1 -0
- package/dist/utils/mcp-test-error-message.cjs +2 -0
- package/dist/utils/mcp-test-error-message.cjs.map +1 -0
- package/dist/utils/mcp-test-error-message.d.ts +8 -0
- package/dist/utils/mcp-test-error-message.js +14 -0
- package/dist/utils/mcp-test-error-message.js.map +1 -0
- package/dist/utils/redact-mcp-secrets.cjs +2 -0
- package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
- package/dist/utils/redact-mcp-secrets.d.ts +13 -0
- package/dist/utils/redact-mcp-secrets.js +57 -0
- package/dist/utils/redact-mcp-secrets.js.map +1 -0
- package/dist/utils/settings-utils.cjs.map +1 -1
- package/dist/utils/settings-utils.js.map +1 -1
- package/dist/utils/skill-install-events.cjs +3 -0
- package/dist/utils/skill-install-events.cjs.map +1 -0
- package/dist/utils/skill-install-events.d.ts +16 -0
- package/dist/utils/skill-install-events.js +26 -0
- package/dist/utils/skill-install-events.js.map +1 -0
- package/dist/utils/title-llm-profile.cjs +2 -0
- package/dist/utils/title-llm-profile.cjs.map +1 -0
- package/dist/utils/title-llm-profile.d.ts +2 -0
- package/dist/utils/title-llm-profile.js +11 -0
- package/dist/utils/title-llm-profile.js.map +1 -0
- package/package.json +10 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +2 -0
- package/scripts/dev-process-utils.mjs +62 -1
- package/scripts/dev-safe.mjs +2 -2
- package/scripts/dev-static.mjs +5 -3
- package/scripts/dev-with-automation.mjs +98 -14
- package/scripts/download-node.mjs +382 -0
- package/scripts/download-uv.mjs +204 -0
- package/scripts/logger.mjs +64 -35
- package/build/assets/agent-server-compatibility-C0MtTTwb.js +0 -1
- package/build/assets/agent-server-conversation-service.api-lzc8dabY.js +0 -41
- package/build/assets/agent-settings-GwiXe_6k.js +0 -2
- package/build/assets/agent-settings-OdsyI2gX.js +0 -1
- package/build/assets/api-key-entry-screen-2gsoZAOK.js +0 -1
- package/build/assets/app-settings-CD9euh81.js +0 -1
- package/build/assets/automation-export-Djc8Tf0M.js +0 -2
- package/build/assets/automations-list-Dtiolk1h.js +0 -1
- package/build/assets/backend-form-modal-B8GtBA-J.js +0 -1
- package/build/assets/browser-store-BI6uklCG.js +0 -1
- package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
- package/build/assets/client-source-CtQjJEy6.js +0 -1
- package/build/assets/cloud-funnel-analytics-uzzLlLuj.js +0 -1
- package/build/assets/conversation-B8d8_Upd.js +0 -1
- package/build/assets/conversation-Lmqm6VJC.js +0 -89
- package/build/assets/conversation-panel-B8n40Swu.js +0 -1
- package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
- package/build/assets/declaration-BGsHjPEW.js +0 -1
- package/build/assets/extensions-hub-DqvwvpCi.js +0 -1
- package/build/assets/extensions-navigation-BMc9Nluv.js +0 -1
- package/build/assets/files-tab-BAkaV4aO.js +0 -1
- package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
- package/build/assets/git-provider-icon-xvbukHaT.js +0 -1
- package/build/assets/home-D01kSnmo.js +0 -1
- package/build/assets/home-NZO2bF4N.js +0 -1
- package/build/assets/index-home-BsI6i0TC.js +0 -1
- package/build/assets/install-server-modal-BYjqoRyX.js +0 -1
- package/build/assets/lesson-plan-cNUjpdFx.js +0 -4
- package/build/assets/llm-not-configured-banner-DUPyoFIZ.js +0 -27
- package/build/assets/llm-settings-Cs_iieFY.js +0 -1
- package/build/assets/llm-settings-J2ke2foG.js +0 -1
- package/build/assets/manage-backends-modal-nMoCZ2a0.js +0 -1
- package/build/assets/manifest-f1b46f62.js +0 -1
- package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
- package/build/assets/mcp-kZM-cAZw.js +0 -9
- package/build/assets/messages-CJAv5n4j.js +0 -40
- package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
- package/build/assets/onboarding-Dx8n8HFr.js +0 -1
- package/build/assets/onboarding-modal-Bxuxpfdz.js +0 -1
- package/build/assets/recommended-automations-launcher-BWRRvMPE.js +0 -58
- package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
- package/build/assets/root-CYWeTrWE.css +0 -1
- package/build/assets/root-layout-ClEl-JlJ.js +0 -2
- package/build/assets/root-oT83qVlk.js +0 -2
- package/build/assets/sdk-section-page-Cwj0T4gF.js +0 -1
- package/build/assets/secrets-settings-Bc_pBX6F.js +0 -1
- package/build/assets/settings-index-BzSIM1-N.js +0 -1
- package/build/assets/settings-modal-BnZ7mMu7.js +0 -1
- package/build/assets/settings-n9a395O0.js +0 -1
- package/build/assets/shared-conversation-CIDDti9I.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-CTX7J4wM.js +0 -1
- package/build/assets/skills-plugins-HZEbNDmX.js +0 -1
- package/build/assets/skills-settings-BdqijFlC.js +0 -2
- package/build/assets/telemetry-SHxpVxk8.js +0 -2
- package/build/assets/use-activate-agent-profile-BRDdSwQ0.js +0 -1
- package/build/assets/use-backends-health-BagmAE_W.js +0 -1
- package/build/assets/use-config-B39iHYFi.js +0 -1
- package/build/assets/use-event-store-Bbaz51GR.js +0 -4
- package/build/assets/use-llm-profiles-CgRtnj74.js +0 -1
- package/build/assets/use-plugins-marketplace-DOJp9rlE.js +0 -1
- package/build/assets/use-runtime-is-ready-ziHQvXZQ.js +0 -1
- package/build/assets/use-settings-BeJap6YL.js +0 -1
- package/build/assets/use-settings-nav-items-D5JJjFHJ.js +0 -16
- package/build/assets/use-tracking-DFoPQUSU.js +0 -1
- package/build/assets/useMutationState-OnAsCLA_.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
- package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
- package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
- package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
- package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
- /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
- /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
- /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
- /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
- /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
- /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
- /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
- /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
- /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
- /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
- /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
- /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
- /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
- /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
- /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
- /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
- /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
- /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
- /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
- /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
- /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
- /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
- /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
- /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
- /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
- /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
- /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
- /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
- /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
- /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
- /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
- /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
- /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
- /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
- /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
- /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
- /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
- /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
- /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
- /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
- /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
- /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
- /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
- /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
- /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
- /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
- /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
- /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
- /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
- /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
- /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
- /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
- /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,M as n,N as r,P as i,bt as a}from"./vendor-styling-CI0PQ3ab.js";import{n as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{d as s,l as c,m as l,r as u,s as d}from"./path-utils-DRgexxnX.js";import{t as f}from"./useMutation-u8UgRgDK.js";import{t as p}from"./Trans-52HCczKK.js";import{t as m}from"./useTranslation-CHm_6BRr.js";import{t as h}from"./declaration-_yumYLEx.js";import{C as g,I as _,n as v}from"./active-backend-context-Cd1qcZsb.js";import{t as y}from"./createLucideIcon-D4Tak8A1.js";import{t as b}from"./chevron-down-D7IvFMBM.js";import{t as x}from"./loader-circle-DGsqG5qw.js";import{C as S,M as C,t as w}from"./utils-CrRpzbM2.js";import{n as T}from"./common-CCuqQy_S.js";import{t as E}from"./use-config-D9zUVw5b.js";import{n as D}from"./navigation-context-cvyvI1WA.js";import{ot as ee,st as te}from"./vendor-markdown-DzO4uO_0.js";import{t as ne}from"./styled-tooltip-CdnCJ67u.js";import{n as re,o as O}from"./form-control-classes-BPUnoYyg.js";import{t as ie}from"./react-MKQOkha9.js";import{s as ae}from"./conversation-local-storage-BDjWPg0Z.js";import{t as k}from"./conversation-store-CyVqoa0d.js";import{t as oe}from"./agent-server-conversation-service.api-CI5-xmIX.js";import{t as se}from"./canvas-ui-CC4EJo-H.js";import{t as ce}from"./conversation-service.api-DbBvscJA.js";import{n as le}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js";import{t as ue}from"./skills-arUOHLcS.js";import{t as de}from"./close-BjSA0HWT.js";import{r as fe}from"./use-settings-B9XEmh7i.js";import{t as pe}from"./copy-to-clipboard-button-C54YRPMg.js";import{r as A}from"./typography-BBVEW0un.js";import{t as me}from"./u-check-circle-WGqHdtfO.js";import{n as he,r as j,t as ge}from"./use-active-conversation-Badxj8w4.js";import{t as _e}from"./file-tUAzhmJ3.js";import{t as ve}from"./use-agent-state-BzRrhoPd.js";import{d as ye,f as be,m as xe,p as Se,r as Ce,t as we}from"./lesson-plan-BSEUwflx.js";import{C as M,E as Te,a as Ee,b as De,c as N,h as Oe,i as ke,k as Ae,l as je,m as Me,o as Ne,s as Pe,t as Fe,w as Ie,x as Le}from"./use-event-store-BlpSUF7N.js";import{n as Re,t as P}from"./markdown-renderer-BlaJOAI2.js";import"./syntax-highlighter-CZK2ab-O.js";import{n as ze,r as Be,t as Ve}from"./plan-components-qkMiGs_-.js";import{n as He,t as Ue}from"./get-language-from-path-CPNnuVhI.js";import{n as We,t as Ge}from"./u-check-circle-half-LiwZkuFe.js";var Ke=y(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),F=e(t(),1);function qe(){!r.current&&n();let[e]=(0,F.useState)(i.current);return e}var I=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}=j(),t=Ce();return{send:(0,F.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 L=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,I.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`})}),R=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,I.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,I.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,I.jsx)(le,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function z({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let{t:s}=m(`openhands`),[c,l]=F.useState(r),u=t?(0,I.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`cursor-pointer text-left`,"aria-label":s(c?h.BUTTON$COLLAPSE:h.BUTTON$EXPAND),children:c?(0,I.jsx)(R,{className:w(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,I.jsx)(L,{className:w(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&u,o,(0,I.jsx)(`span`,{children:e}),i===`after`&&u]}),(0,I.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,I.jsx)(Ze,{status:n})]})]}),c&&(typeof t==`string`?(0,I.jsx)(P,{children:t}):t)]})}var Qe=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,I.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,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,I.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:h.GOAL$STATUS_RUNNING,complete:h.GOAL$STATUS_COMPLETE,capped:h.GOAL$STATUS_CAPPED,interrupted:h.GOAL$STATUS_INTERRUPTED};function tt({status:e}){let{t}=m(`openhands`),{conversationId:n}=j(),r=Se(e=>n?!!e.statusByConversation[n]?.active:!1),[i,a]=(0,F.useState)(!1),{active:o,objective:l,iteration:u,max_iterations:f,verdict:p}=e,_=p?Math.round(p.score*100):null,v=p?.missing?t(h.GOAL$MISSING,{missing:p.missing}):``,y=async(e,r)=>{if(!(!n||i)){a(!0);try{await e(n)}catch(e){g(e instanceof Error&&e.message?e.message:t(r))}finally{a(!1)}}},b=()=>y(async e=>{await s(e),await d(e)},h.GOAL$STOP_FAILED),x=()=>y(c,h.GOAL$RESUME_FAILED),S=null;return n&&o?S=(0,I.jsx)(`button`,{type:`button`,"data-testid":`goal-stop`,disabled:i,onClick:b,className:w(re,O),children:t(h.GOAL$STOP)}):n&&e.status===`interrupted`&&!r&&(S=(0,I.jsx)(`button`,{type:`button`,"data-testid":`goal-resume`,disabled:i,onClick:x,className:w(re,O),children:t(h.GOAL$RESUME)})),(0,I.jsx)(`div`,{"data-testid":`goal-status`,className:`flex flex-col w-full`,children:(0,I.jsx)(z,{title:(0,I.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$PREFIX)}),(0,I.jsx)(`span`,{children:l}),(0,I.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$ROUND,{iteration:u,max:f})}),(0,I.jsx)(`span`,{children:t(et[e.status])}),_!==null&&(0,I.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$SCORE,{score:_})}),o?(0,I.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,I.jsx)(`span`,{"data-testid":`goal-done`,className:`inline-flex ml-1`,children:(0,I.jsx)(Qe,{className:`w-3.5 h-3.5 fill-success`})}):(0,I.jsx)(`span`,{"data-testid":`goal-ended`,className:`inline-flex ml-1`,children:(0,I.jsx)($e,{className:`w-3.5 h-3.5 fill-[var(--oh-muted)]`})})]}),titleTrailing:S,details:v,initiallyExpanded:!o,chevronPosition:`before`})})}var nt=e=>(0,I.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,I.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,I.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,I.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,I.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,I.jsx)(`defs`,{children:(0,I.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,I.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function rt({profile:e}){let[t,n]=F.useState(!1);return(0,I.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,I.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,I.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,I.jsx)(b,{size:14}):(0,I.jsx)(l,{size:14})}),(0,I.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`hr`,{className:`border-neutral-700`}),(0,I.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function it({conversationId:e,anchorEventId:t}){let n=be(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,I.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,I.jsx)(z,{title:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,I.jsx)(nt,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,I.jsx)(p,{i18nKey:h.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,I.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,I.jsx)(z,{title:(0,I.jsx)(`span`,{children:t?(0,I.jsx)(p,{i18nKey:h.MODEL$NO_SAVED_PROFILES}):(0,I.jsx)(p,{i18nKey:h.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,I.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,I.jsx)(p,{i18nKey:h.MODEL$NO_PROFILES_HINT})}):(0,I.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,I.jsx)(rt,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var at=(0,F.createContext)(void 0);function ot({children:e,value:t}){let n=Be(F.useRef(null)),r=t||n;return(0,I.jsx)(at.Provider,{value:r,children:e})}function st(){let e=(0,F.useContext)(at);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function ct(){return(0,F.useContext)(at)}var lt=()=>{let{setConversationMode:e}=k(),{send:t}=Ye(),{conversationId:n}=j(),r=xe(e=>e.enqueuePendingMessage),i=xe(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,F.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])}},ut=`200%`,B=8,dt=B*2;function ft({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=qe(),c=`oh-text-shimmer-${(0,F.useId)().replace(/:/g,``)}`,l=(0,F.useMemo)(()=>Math.min(B/2-1,1+i/2),[i]),u=(0,F.useMemo)(()=>{let e=B/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) ${B}%)`,backgroundSize:`${ut} 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,I.jsx)(t,{className:w(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${dt}% center}to{background-position:0% center}}`}}),(0,I.jsx)(t,{className:w(`relative inline-block`,n),style:u,...o,children:e})]})}var pt=F.memo(ft);function mt({className:e}){return(0,I.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,I.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,I.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var ht=5,gt=360,_t={p:({children:e})=>(0,I.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function vt({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=m(`openhands`),a=F.useRef(null),[o,s]=F.useState(!1);F.useEffect(()=>{r(o)},[o,r]),F.useLayoutEffect(()=>{let t=a.current;if(!t||n){s(!1);return}let r=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),r=ht*(Number.isFinite(n)&&n>0?n:24),i=(e.match(/\n/g)??[]).length;s(t.scrollHeight>r+1||i>=ht||e.trim().length>gt)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e,n]);let c=o&&!n;return(0,I.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,I.jsx)(`div`,{ref:a,className:w(`text-sm leading-6 whitespace-normal [word-break:break-word]`,c&&`line-clamp-5`),children:(0,I.jsx)(P,{includeStandard:!0,includeHeadings:!0,allowHtml:!1,components:_t,children:e})}),c?(0,I.jsxs)(I.Fragment,{children:[(0,I.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,I.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:w(`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(h.COMMON$VIEW_MORE)})]}):null]})}function V({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:a,onRetry:o,onStop:s}){let{t:c}=m(`openhands`),[l,u]=F.useState(!1),[d,f]=F.useState(!1),[p,g]=F.useState(!1),[_,v]=F.useState(!1),[y,b]=F.useState(!0),x=F.useRef(null);F.useEffect(()=>{g(!1)},[t]);let S=async()=>{await navigator.clipboard.writeText(t),f(!0)};F.useEffect(()=>{let e;return d&&(e=setTimeout(()=>{f(!1)},2e3)),()=>{clearTimeout(e)}},[d]);let C=e===`user`&&(a===`error`||a===`sending`),T=a===`sending`&&s!=null,E=T&&l,D=e===`user`&&a==null,ee=D&&_&&!p,te=F.Children.count(n)>0;F.useLayoutEffect(()=>{if(!T||D)return;let e=x.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:24;b(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,T,D]);let re=D?(0,I.jsx)(vt,{message:t,isHovering:l,isExpanded:p,onTruncatableChange:v}):(0,I.jsx)(`div`,{ref:x,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,I.jsx)(P,{includeStandard:!0,includeHeadings:!0,allowHtml:e!==`user`,components:_t,children:t})}),O=(0,I.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:w(`rounded-xl relative w-fit max-w-full flex flex-col`,te&&`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`,!C&&`last:mb-4`),children:[(0,I.jsxs)(`div`,{className:w(`absolute -top-2.5 -right-2.5 z-10`,!l||a===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,I.jsx)(ne,{content:e.tooltip,placement:`top`,children:(0,I.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,I.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,I.jsx)(pe,{isHidden:!l,isDisabled:d,onClick:S,mode:d?`copied`:`copy`})]}),re,T?(0,I.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s?.()},"data-testid":`chat-message-stop`,"aria-label":c(h.BUTTON$STOP),"aria-hidden":!E,tabIndex:E?0:-1,className:w(`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`,y?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,E?`opacity-100`:`pointer-events-none opacity-0`),children:(0,I.jsx)(mt,{className:`block h-7 w-7 max-w-none`})}):null,ee?(0,I.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":c(h.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,I.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[O,(0,I.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,I.jsx)(`span`,{children:c(h.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),o?(0,I.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:c(h.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&a===`sending`?(0,I.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[O,(0,I.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,I.jsx)(pt,{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:c(h.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):O}function yt(){let{conversationId:e}=he(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=k(),{setSelectedTab:a}=ae(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 bt=300,xt=Ve(`shine-text`);function St({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=m(`openhands`),{navigateToTab:i}=yt(),{handleBuildPlanClick:a}=lt(),{scrollDomToBottom:o}=st(),s=()=>{i(`planner`)},c=(0,F.useCallback)(e=>{a(e),o()},[a,o]),l=(0,F.useMemo)(()=>e?e.length<=bt?e:`${e.slice(0,bt)}...`:``,[e]);return e?(0,I.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,I.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,I.jsx)(we,{width:18,height:18,color:`var(--oh-muted)`}),(0,I.jsx)(A.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(h.COMMON$PLAN_MD)}),(0,I.jsx)(`div`,{className:`flex-1`}),(0,I.jsxs)(`button`,{type:`button`,onClick:s,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,I.jsx)(A.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(h.COMMON$VIEW)}),(0,I.jsx)(Ke,{className:`text-white`,size:18})]})]}),(0,I.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:l&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(P,{includeStandard:!0,components:t?xt:ze,children:l}),e&&e.length>bt&&(0,I.jsx)(`button`,{type:`button`,onClick:s,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(h.COMMON$READ_MORE)})]})}),(0,I.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,I.jsx)(`button`,{type:`button`,onClick:c,disabled:n,className:w(`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,I.jsxs)(A.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(h.COMMON$BUILD),` `,(0,I.jsx)(A.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function Ct({errorId:e,defaultMessage:t}){let{t:n}=m(`openhands`),[r,i]=F.useState(!1);return(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,I.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&_.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,I.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,I.jsx)(R,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,I.jsx)(L,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,I.jsx)(P,{children:t})]})}function wt({event:e}){return je(e)?(0,I.jsx)(Ct,{errorId:e.id,defaultMessage:e.error}):null}function Tt({width:e=20,height:t=20,active:n}){return(0,I.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,I.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 Et({width:e=20,height:t=20,active:n}){return(0,I.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,I.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 Dt({onClick:e,className:t}){return(0,I.jsx)(`button`,{type:`button`,onClick:e,className:w(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,I.jsx)(de,{width:18,height:18})})}function Ot({src:e,size:t=`small`}){return(0,I.jsx)(`img`,{role:`img`,alt:``,src:e,className:w(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function kt({src:e,onRemove:t,size:n=`small`}){return(0,I.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,I.jsx)(Ot,{src:e,size:n}),t&&(0,I.jsx)(Dt,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function At({size:e=`small`,images:t,onRemove:n}){let r=F.useRef(null),[i,a]=F.useState(!1),[o,s]=F.useState(!0),[c,l]=F.useState(!1);return F.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,I.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,I.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,I.jsx)(Tt,{active:!o})}),(0,I.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:w(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,I.jsx)(kt,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,I.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,I.jsx)(Et,{active:!c})})]})}function jt({type:e,onClick:t}){let{t:n}=m(`openhands`),r=e===`confirm`,i=n(r?h.ACTION$CONFIRM:h.ACTION$REJECT),a=n(r?h.CHAT_INTERFACE$USER_CONFIRMED:h.CHAT_INTERFACE$USER_REJECTED),o=r?`${n(h.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(h.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,I.jsx)(ne,{closeDelay:100,content:a,children:(0,I.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:w(`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 Mt({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,I.jsxs)(`div`,{className:w(`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,I.jsx)(`span`,{className:``,children:n}),(0,I.jsx)(`span`,{className:`font-bold`,children:i}),(0,I.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var Nt=e=>(0,I.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,I.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,I.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,I.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`})]}),Pt=ie(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),Ft=()=>f({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return ye.respondToConfirmation(e,t,i,n)}});function It(){let e=Pt(e=>e.submittedEventIds),t=Pt(e=>e.addSubmittedEventId),{t:n}=m(`openhands`),{data:r}=ge(),{curAgentState:i}=ve(),{mutate:a}=Ft(),o=Fe(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===S.AWAITING_USER_CONFIRMATION:!1),s=(0,F.useCallback)(e=>{!o||!r||(t(o.id),a({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[o,r,t,a]);return(0,F.useEffect)(()=>{if(!o)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),s(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),s(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[o,s]),i!==S.AWAITING_USER_CONFIRMATION||!o||e.includes(o.id)?null:(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(N(o)?o.security_risk:T.UNKNOWN)===T.HIGH&&(0,I.jsx)(Mt,{content:n(h.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,I.jsx)(Nt,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(h.COMMON$HIGH_RISK)}),(0,I.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,I.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(h.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(jt,{type:`reject`,onClick:()=>s(!1)}),(0,I.jsx)(jt,{type:`confirm`,onClick:()=>s(!0)})]})]})]})}var Lt=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=_.t(h.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE);return n.split(r)[0]};function Rt(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function zt(e){let t=Math.round(e*5);return{filled:t,empty:5-t}}function Bt(e){return e>=.6?`text-green-400`:e>=.4?`text-yellow-400`:`text-red-400`}function Vt(e){return e>=.7?`text-red-400 font-semibold`:e>=.5?`text-yellow-400`:`text-neutral-400`}function Ht(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ut(e){let t=e?.verification;if(!Ht(t))return null;let n=t.enable_iterative_refinement;return typeof n==`boolean`?n:null}function Wt({feature:e}){let t=Math.round(e.probability*100),n=Vt(e.probability);return(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,I.jsx)(`span`,{className:`text-neutral-200`,children:e.display_name}),(0,I.jsxs)(`span`,{className:n,children:[`(`,t,`%)`]})]})}function H({label:e,features:t}){return!t||t.length===0?null:(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-1 text-xs`,children:[(0,I.jsx)(`span`,{className:`font-semibold text-neutral-300`,children:e}),t.map((e,t)=>(0,I.jsxs)(F.Fragment,{children:[t>0&&(0,I.jsx)(`span`,{className:`text-neutral-500`,children:`·`}),(0,I.jsx)(Wt,{feature:e})]},e.name))]})}function Gt({categorized:e}){let{t}=m(),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,I.jsxs)(`div`,{className:`flex flex-col gap-1 mt-1.5`,children:[n&&(0,I.jsx)(H,{label:t(h.CRITIC$POTENTIAL_ISSUES),features:e.agent_behavioral_issues}),i&&(0,I.jsx)(H,{label:t(h.CRITIC$INFRASTRUCTURE),features:e.infrastructure_issues}),r&&(0,I.jsx)(H,{label:t(h.CRITIC$LIKELY_FOLLOWUP),features:e.user_followup_patterns}),a&&(0,I.jsx)(H,{label:t(h.CRITIC$OTHER),features:e.other})]})}function Kt({criticResult:e}){let{t}=m(),{data:n}=fe(),[r,i]=F.useState(!1),a=Rt(e.score),{filled:o,empty:s}=zt(a),c=Bt(a),l=(a*100).toFixed(1),u=Ut(n?.agent_settings)===!1,d=e.metadata?.categorized_features,f=d!=null&&((d.agent_behavioral_issues??[]).length>0||(d.user_followup_patterns??[]).length>0||(d.infrastructure_issues??[]).length>0||(d.other??[]).length>0);return(0,I.jsxs)(`div`,{className:`border-l-2 border-neutral-600 pl-2 my-2 py-1.5 text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`span`,{className:`font-semibold text-neutral-300 text-xs`,children:t(h.CRITIC$SUCCESS_LIKELIHOOD_LABEL)}),(0,I.jsxs)(`span`,{className:`${c} text-xs tracking-wide`,"aria-label":`Score: ${l}%`,children:[`★`.repeat(o),`☆`.repeat(s)]}),(0,I.jsxs)(`span`,{className:`text-neutral-500 text-xs`,children:[`(`,l,`%)`]}),f&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer ml-1`,"aria-label":t(r?h.BUTTON$COLLAPSE_DETAILS:h.BUTTON$EXPAND_DETAILS),children:r?(0,I.jsx)(R,{className:`h-3 w-3 inline fill-neutral-400`}):(0,I.jsx)(L,{className:`h-3 w-3 inline fill-neutral-400`})})]}),r&&f&&(0,I.jsx)(Gt,{categorized:d}),u&&(0,I.jsx)(`p`,{className:`mt-1.5 text-xs leading-5 text-neutral-500`,"data-testid":`critic-iterative-refinement-hint`,children:t(h.CRITIC$ITERATIVE_REFINEMENT_HINT)})]})}function U({content:e}){let{t}=m(`openhands`),[n,r]=F.useState(!1);if(!e.trim())return null;let i=n?R:L;return(0,I.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`collapsible-thinking`,children:[(0,I.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,"aria-label":t(n?h.THINKING$COLLAPSE:h.THINKING$EXPAND),"data-testid":`collapsible-thinking-toggle`,className:`w-full flex items-center gap-2 text-left cursor-pointer`,children:[(0,I.jsx)(i,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,I.jsx)(He,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,I.jsx)(`span`,{className:`font-normal text-[var(--oh-muted)]`,children:t(h.THINKING$TITLE)})]}),n&&(0,I.jsx)(`div`,{className:`mt-1.5 pl-6`,"data-testid":`collapsible-thinking-content`,children:(0,I.jsx)(P,{children:e})})]})}var qt=()=>{let e=o();return f({mutationKey:[`fork-conversation`],mutationFn:async({sourceConversationId:e,eventId:t,editText:n,title:r})=>{let i=t,a=!1;if(n!=null){let n=await oe.getEventParentId(e,t);n&&(i=n,a=!0)}let o=await oe.forkConversation(e,i,r);return a&&o.leaf_event_id!==i&&(a=!1),{info:o,excluded:a}},onSuccess:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]})}})};function Jt({event:e,isLastMessage:t,isFromPlanningAgent:n}){let{t:r}=m(`openhands`),{navigate:i}=D(),{conversationId:a}=j(),o=v().backend.kind===`cloud`,{mutate:s,isPending:c}=qt(),l=k(e=>e.setMessageToSend),d=F.useRef(!1),f=Lt(e),{reasoning:p,message:_}=e.source===`agent`?Ne(f):{reasoning:``,message:f},y=[];Array.isArray(e.llm_message.content)&&e.llm_message.content.forEach(e=>{e.type===`image`&&y.push(...e.image_urls)});let b=!o&&a?[{icon:(0,I.jsx)(u,{width:15,height:15,"aria-hidden":!0}),onClick:()=>{if(!a||c||d.current)return;d.current=!0;let t=ce.getCurrentConversation(),n=t?.id===a?t.title:void 0,r=n?`${n} (branch)`:void 0,o=e.source===`user`&&_.length>0;s({sourceConversationId:a,eventId:e.id,...o?{editText:_}:{},...r?{title:r}:{}},{onSuccess:({info:e,excluded:t})=>{i(`/conversations/${e.id}`),t&&window.setTimeout(()=>l(_),0)},onError:e=>g(e instanceof Error?e.message:null),onSettled:()=>{d.current=!1}})},tooltip:r(h.CHAT_INTERFACE$BRANCH_FROM_HERE)}]:void 0;return(0,I.jsxs)(I.Fragment,{children:[p&&(0,I.jsx)(U,{content:p}),(0,I.jsxs)(V,{type:e.source,message:_,isFromPlanningAgent:n,actions:b,children:[y.length>0&&(0,I.jsx)(At,{size:`small`,images:y}),t&&(0,I.jsx)(It,{})]}),e.source===`agent`&&e.critic_result!=null&&(0,I.jsx)(Kt,{criticResult:e.critic_result})]})}var Yt=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 Zt(e){let{children:t}=e,n=e=>{try{return Xt(e)}catch(t){return Yt.error(String(t)),e}};return Array.isArray(t)?(0,I.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,I.jsx)(`strong`,{className:`font-mono`,children:n(t)}):(0,I.jsx)(`strong`,{className:`font-mono`,children:t})}var Qt=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},$t=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,en=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return $t(e)&&!n.endsWith(`/`)?`${n}/`:n};function tn(e){let{children:t}=e,n=e=>{try{let t=Qt(e);return(0,I.jsx)(`span`,{className:`font-mono`,title:t,children:en(t)})}catch(t){return Yt.error(String(t)),(0,I.jsx)(`span`,{className:`font-mono`,children:e})}};return Array.isArray(t)?(0,I.jsx)(`strong`,{className:`font-mono`,children:t.map((e,t)=>typeof e==`string`?(0,I.jsx)(`span`,{children:n(e)},`${e}-${t}`):e)}):typeof t==`string`?(0,I.jsx)(`strong`,{children:n(t)}):(0,I.jsx)(`strong`,{className:`font-mono`,children:t})}var W=1e3,nn=e=>`\`\`\`json\n${JSON.stringify(e,null,2)}\n\`\`\``,rn=e=>{switch(e){case T.LOW:return _.t(h.SECURITY$LOW_RISK);case T.MEDIUM:return _.t(h.SECURITY$MEDIUM_RISK);case T.HIGH:return _.t(h.SECURITY$HIGH_RISK);case T.UNKNOWN:default:return _.t(h.SECURITY$UNKNOWN_RISK)}},G=()=>``,an=e=>e.name?`**Skill:** \`${e.name}\``:G(),on=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
|
+
`):G()},sn=e=>{if(e.command!==`create`||!e.file_text)return G();let t=e.file_text;return t.length>1e3&&(t=`${t.slice(0,W)}...`),`${e.path}\n${t}`},cn=e=>{let t=`Command:\n\`${e.action.command}\``;return(e.security_risk===T.HIGH||e.security_risk===T.MEDIUM)&&(t+=`\n\n${rn(e.security_risk)}`),t},ln=e=>{let t=`**MCP Tool Call**
|
|
4
|
+
|
|
5
|
+
`;return t+=`**Arguments:**\n\`\`\`json\n${JSON.stringify(e.data,null,2)}\n\`\`\``,t},un=e=>e.thought,dn=e=>e.message.trim(),fn=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},pn=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`:G();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
|
+
`):G()}case`BrowserScrollAction`:return`**Direction:** ${e.direction}`;case`BrowserGoBackAction`:return G();case`BrowserListTabsAction`:return G();case`BrowserSwitchTabAction`:return`**Tab ID:** ${e.tab_id}`;case`BrowserCloseTabAction`:return`**Tab ID:** ${e.tab_id}`;default:return G()}},mn=e=>{let{action:t}=e;switch(t.kind){case`FileEditorAction`:case`StrReplaceEditorAction`:return sn(t);case`ExecuteBashAction`:case`TerminalAction`:return cn(e);case`MCPToolAction`:return ln(t);case`ThinkAction`:return un(t);case`FinishAction`:return dn(t);case`TaskTrackerAction`:return fn(t);case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:return pn(t);case`GrepAction`:case`GlobAction`:return on(e);case`InvokeSkillAction`:return an(t);default:return nn(e)}},hn=e=>{if(e.is_error||e.status===`failed`)return`error`;if(e.status===`completed`)return`success`},gn=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`}},_n=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 gn(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},vn=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,W)}...`);let r=``;return t.command&&(r+=`Command: \`${t.command}\`\n\n`),r+=`Output:\n\`\`\`sh\n${n.trim()||_.t(h.OBSERVATION$COMMAND_NO_OUTPUT)}\n\`\`\``,r},yn=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,W)}...(truncated)`),r},bn=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,W)}...`),r},xn=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,W)}...(truncated)`),r},Sn=e=>e.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
16
|
+
`),Cn=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
|
+
`)},wn=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},Tn=e=>{let{observation:t}=e;return t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
21
|
+
`)||``},En=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},Dn=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,W)}...(truncated)`),r},On=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,W)}...(truncated)`),r},kn=e=>{switch(e.observation.kind){case`FileEditorObservation`:case`StrReplaceEditorObservation`:return _n(e);case`ExecuteBashObservation`:case`TerminalObservation`:return vn(e);case`BrowserObservation`:return yn(e);case`MCPToolObservation`:return bn(e);case`TaskTrackerObservation`:return wn(e);case`ThinkObservation`:return Tn(e);case`FinishObservation`:return En(e);case`GlobObservation`:return Dn(e);case`GrepObservation`:return On(e);case`InvokeSkillObservation`:return xn(e);case`CanvasUIObservation`:return Sn(e);case`ClientToolObservation`:return e.tool_name===`canvas_ui_control`?Sn(e):nn(e);case`SwitchLLMObservation`:return Cn(e);default:return nn(e)}},An=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`}},jn={read:[`Read`],edit:[`Edit`,`Write`],execute:[`Bash`,`Run`],fetch:[`Fetch`,`WebFetch`]},Mn=e=>{let t=e.title,n=e.tool_kind;if(!t||!n)return t;let r=jn[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},Nn=e=>{if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}},Pn=e=>e.length>1e3?`${e.slice(0,W)}...`:e,Fn=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=Nn(n);e.trim()&&(a+=`Input:\n\`\`\`json\n${e}\n\`\`\`\n\n`)}let o=Pn(Nn(r).trim()),s=i?`**Error:**`:`Output:`,c=o||_.t(h.OBSERVATION$COMMAND_NO_OUTPUT);return a+=`${s}\n\`\`\`\n${c}\n\`\`\``,a};function In({task:e}){let{t}=m(`openhands`),n=(0,F.useMemo)(()=>{switch(e.status){case`todo`:return(0,I.jsx)(We,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,I.jsx)(Ge,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,I.jsx)(me,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,I.jsx)(We,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),r=e.status===`done`;return(0,I.jsxs)(`div`,{className:`flex gap-[14px] items-center px-4 py-2 w-full`,"data-name":`item`,children:[(0,I.jsx)(`div`,{className:`shrink-0`,children:n}),(0,I.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[20px] text-nowrap whitespace-pre font-normal`,children:[(0,I.jsx)(A.Text,{className:w(`text-[12px] text-white`,r&&`text-[var(--oh-muted)]`),children:e.title}),e.notes&&(0,I.jsxs)(A.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(h.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function Ln({taskList:e}){let{t}=m(`openhands`);return(0,I.jsxs)(`div`,{className:`flex flex-col overflow-clip bg-[var(--oh-surface)] border border-[var(--oh-border)] rounded-[12px] w-full`,children:[(0,I.jsxs)(`div`,{className:`flex gap-1 items-center border-b border-[var(--oh-border)] h-[41px] px-2 shrink-0`,children:[(0,I.jsx)(we,{className:`shrink-0 w-4.5 h-4.5 text-[var(--oh-muted)]`}),(0,I.jsx)(A.Text,{className:`text-[11px] text-nowrap text-white tracking-[0.11px] font-medium leading-[16px] whitespace-pre`,children:t(h.COMMON$TASKS)})]}),(0,I.jsx)(`div`,{children:e.map((e,t)=>(0,I.jsx)(In,{task:e},`task-${t}`))})]})}function Rn({event:e}){let{observation:t}=e,{command:n,task_list:r}=t;return(0,I.jsx)(`div`,{className:`flex flex-col gap-4`,children:n===`plan`&&r.length>0&&(0,I.jsx)(Ln,{taskList:r})})}var zn=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),Bn=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},Vn=(e,t)=>{let n=`\n\n- **${e}**`;return t&&t.trim().length>0&&(n+=`\n\n${t}`),n},Hn=(e,t)=>{let n=`
|
|
28
|
+
|
|
29
|
+
**Triggered Skill Knowledge:**`;return e.forEach((e,r)=>{let i=r<t.length?t[r]:void 0;n+=Vn(e,i)}),n},Un=e=>{let t=`
|
|
30
|
+
|
|
31
|
+
**Extended Content:**`;return e.forEach(e=>{e.trim().length>0&&(t+=`\n\n${e}`)}),t},Wn=e=>!e||e.length===0?[]:Bn(zn(e)),Gn=(e,t)=>{let n=Wn(t);return e&&e.length>0?Hn(e,n):n.length>0?Un(n):``},Kn=(e,t)=>{let n=Wn(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()})):[]},K=e=>typeof e==`object`&&!!e&&`_isSkillReadyEvent`in e&&e._isSkillReadyEvent===!0,qn=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=Gn(t,n),i=Kn(t,n);return{id:`${e.id}-skill-ready`,timestamp:e.timestamp,source:`agent`,_isSkillReadyEvent:!0,_skillReadyContent:r,_skillReadyItems:i}},q=e=>e,J=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
32
|
+
`);function Y({code:e,language:t,copy:n=!0,placeholder:r,expandable:i=!1,wrapLongLines:a=!1}){let{t:o}=m(`openhands`),[s,c]=F.useState(!1),l=e.length>W,u=(l&&!(i&&s)?`${e.slice(0,1e3)}…`:e).trim()||r||``,d=n&&e.trim().length>0,f=o(s?h.BUTTON$COLLAPSE:h.BUTTON$EXPAND),p=(0,I.jsx)(ee,{className:`rounded-lg text-xs`,style:te,language:t,PreTag:`div`,wrapLongLines:a,customStyle:a?{whiteSpace:`pre-wrap`}:void 0,codeTagProps:a?{style:{whiteSpace:`pre-wrap`}}:void 0,children:u});return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[d?(0,I.jsx)(Re,{text:e,children:p}):p,i&&l&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`self-start text-xs text-muted transition-colors hover:text-white hover:underline`,children:f})]})}function Jn({output:e,exitCode:t,copy:n=!0}){let{t:r}=m(`openhands`);return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t!=null&&t!==0&&t!==-1&&(0,I.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(h.OBSERVATION$EXIT_CODE,{code:t})}),(0,I.jsx)(Y,{code:e,language:`bash`,copy:n,placeholder:r(h.OBSERVATION$COMMAND_NO_OUTPUT),expandable:!0,wrapLongLines:!0})]})}var Yn=q({actionKinds:[`ExecuteBashAction`,`TerminalAction`],observationKinds:[`ExecuteBashObservation`,`TerminalObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=t?.observation.command??e?.action.command??``,i=e?.security_risk;return(0,I.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r&&(0,I.jsx)(Y,{code:r,language:`bash`}),(i===T.HIGH||i===T.MEDIUM)&&(0,I.jsx)(`span`,{className:`text-xs text-status-fail-text`,children:n(i===T.HIGH?h.SECURITY$HIGH_RISK:h.SECURITY$MEDIUM_RISK)}),t&&(0,I.jsx)(Jn,{output:J(t.observation.content),exitCode:t.observation.exit_code})]})}}),Xn=3,Zn=300,Qn=25e4,$n=(e,t)=>{if(e.length*t.length>Qn)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},er=(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-Xn),i),c=n.slice(a,Math.min(n.length,a+Xn));return[...s.map(e=>({type:`ctx`,text:e})),...$n(n.slice(i,a),r.slice(i,o)),...c.map(e=>({type:`ctx`,text:e}))]},tr={add:`bg-status-success-bg text-status-success-text`,del:`bg-status-fail-bg text-status-fail-text`,ctx:`text-muted`},nr={add:`+ `,del:`- `,ctx:` `};function rr({oldText:e,newText:t}){let{t:n}=m(`openhands`),r=er(e,t),i=r.length>Zn;return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,I.jsx)(`div`,{className:`overflow-auto rounded-lg border border-surface-raised font-mono text-xs`,children:(i?r.slice(0,Zn):r).map((e,t)=>(0,I.jsx)(`div`,{className:w(`whitespace-pre-wrap px-2`,tr[e.type]),children:`${nr[e.type]}${e.text}`},`${t}-${e.type}`))}),i&&(0,I.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$TRUNCATED)})]})}function ir({path:e,range:t}){return(0,I.jsxs)(`span`,{className:`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`,children:[(0,I.jsx)(_e,{className:`h-3.5 w-3.5 flex-shrink-0 text-muted`}),(0,I.jsx)(`span`,{className:`break-all`,children:t?`${e}:${t}`:e})]})}var ar=q({actionKinds:[`FileEditorAction`,`StrReplaceEditorAction`],observationKinds:[`FileEditorObservation`,`StrReplaceEditorObservation`],Body:function({action:e,observation:t}){let n=t?.observation.path??e?.action.path??``,r=t?.observation.command??e?.action.command,i=Ue(n),a=e?.action.view_range,o=r===`view`&&a?`${a[0]}-${a[1]}`:void 0,s=n?(0,I.jsx)(ir,{path:n,range:o}):null;if(t){let e=t.observation,n=null;if(e.error)n=(0,I.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,I.jsx)(rr,{oldText:e.old_content,newText:e.new_content});else{let t=e.new_content||e.output||(e.content?J(e.content):``);n=t?(0,I.jsx)(Y,{code:t,language:i}):null}return(0,I.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,n]})}if(e){let t=e.action,n=null;return t.command===`create`&&t.file_text?n=(0,I.jsx)(Y,{code:t.file_text,language:i}):(t.command===`str_replace`||t.command===`insert`)&&t.new_str!=null&&(n=(0,I.jsx)(rr,{oldText:t.old_str??``,newText:t.new_str})),(0,I.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,n]})}return null}});function or({rows:e}){return(0,I.jsx)(`div`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:e.map(({label:e,value:t})=>(0,I.jsxs)(F.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-muted`,children:e}),(0,I.jsx)(`span`,{className:`break-all font-mono text-foreground`,children:t})]},e))})}var sr=q({actionKinds:[`GrepAction`,`GlobAction`],observationKinds:[`GrepObservation`,`GlobObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=t?.observation,i=e?.action,a=r?.pattern??i?.pattern??``,o=r?.search_path??i?.path??``,s=r?`include_pattern`in r?r.include_pattern:null:i&&`include`in i?i.include:null,c=r?`matches`in r?r.matches:r.files:[];return(0,I.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,I.jsx)(or,{rows:[{label:n(h.COMMON$PATTERN),value:a},...o?[{label:n(h.COMMON$PATH),value:o}]:[],...s?[{label:n(h.COMMON$INCLUDE),value:s}]:[]]}),r&&(r.is_error?(0,I.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:J(r.content)}):c.length===0?(0,I.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$NO_RESULTS)}):(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,I.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$RESULTS,{count:c.length})}),(0,I.jsx)(`div`,{className:`flex flex-col gap-0.5 font-mono text-xs text-foreground`,children:c.map(e=>(0,I.jsx)(`span`,{className:`break-all`,children:e},e))}),r.truncated&&(0,I.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$TRUNCATED)})]}))]})}});function cr({label:e,text:t,isError:n=!1}){return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,I.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,I.jsx)(Re,{text:t,children:(0,I.jsx)(`div`,{className:`overflow-auto rounded border border-surface-raised bg-surface-raised p-2 text-xs ${n?`text-danger`:`text-foreground`}`,children:(0,I.jsx)(P,{includeStandard:!0,includeHeadings:!0,children:t})})})]})}var lr=[Yn,ar,sr,q({actionKinds:[`TaskAction`],observationKinds:[`TaskObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=e?.action,i=t?.observation,a=i?.subagent??r?.subagent_type??``,o=i?.task_id,s=r?.prompt?.trim()??``,c=i?J(i.content).trim():``,l=[...a?[{label:n(h.TASK$SUBAGENT),value:a}]:[],...o?[{label:n(h.TASK$TASK_ID),value:o}]:[]];return(0,I.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[l.length>0&&(0,I.jsx)(or,{rows:l}),s&&(0,I.jsx)(cr,{label:n(h.TASK$QUERY),text:s}),c&&(0,I.jsx)(cr,{label:n(h.TASK$RESULT),text:c,isError:i?.is_error})]})}})],ur=e=>new Map(lr.flatMap(t=>(e(t)??[]).map(e=>[e,t]))),dr=ur(e=>e.actionKinds),fr=ur(e=>e.observationKinds);function pr(e,t){if(N(e)){let t=dr.get(e.action.kind);if(t)return(0,I.jsx)(t.Body,{action:e})}else if(M(e)){let n=fr.get(e.observation.kind);if(n)return(0,I.jsx)(n.Body,{action:t,observation:e})}return null}var X=(e,t)=>e?e.length>t?`${e.substring(0,t)}...`:e:``,Z=(e,t)=>_.exists(e)?(0,I.jsx)(p,{ns:`openhands`,i18nKey:e,values:t,components:{path:(0,I.jsx)(tn,{}),cmd:(0,I.jsx)(Zt,{})}}):e,mr=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),hr=e=>{let t=e.summary?.trim().replace(/\s+/g,` `)||``;return!t||mr(t)?null:t},Q=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?X(n,t):n:null},gr=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=Q(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},_r=(e,t)=>{let n=t?.tool_name,r=e.observation,i=Q(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=Q((t?.action??{}).profile_name)??Q(r.profile_name)??Q(r.base_url,80)??Q(r.endpoint,80)??Q(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},vr=e=>{if(!N(e))return``;let t=gr(e);if(t)return t;let n=hr(e);if(n)return n;let r=e.action.kind,i=``,a={};switch(r){case`ExecuteBashAction`:case`TerminalAction`:i=`ACTION_MESSAGE$RUN`,a={command:X(e.action.command,80)};break;case`FileEditorAction`:case`StrReplaceEditorAction`:i=e.action.command===`view`?`ACTION_MESSAGE$READ`:e.action.command===`create`?`ACTION_MESSAGE$WRITE`:`ACTION_MESSAGE$EDIT`,a={path:e.action.path};break;case`MCPToolAction`:i=`ACTION_MESSAGE$CALL_TOOL_MCP`,a={mcp_tool_name:e.tool_name};break;case`InvokeSkillAction`:i=`ACTION_MESSAGE$INVOKE_SKILL`,a={name:e.action.name};break;case`TaskAction`:i=`ACTION_MESSAGE$TASK`,a={name:e.action.subagent_type};break;case`ThinkAction`:i=`ACTION_MESSAGE$THINK`;break;case`FinishAction`:i=`ACTION_MESSAGE$FINISH`;break;case`TaskTrackerAction`:i=`ACTION_MESSAGE$TASK_TRACKING`;break;case`GrepAction`:i=`ACTION_MESSAGE$GREP`,a={pattern:`pattern`in e.action&&e.action.pattern?X(String(e.action.pattern),50):``};break;case`GlobAction`:i=`ACTION_MESSAGE$GLOB`,a={pattern:`pattern`in e.action&&e.action.pattern?X(String(e.action.pattern),50):``};break;case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:i=`ACTION_MESSAGE$BROWSE`;break;case`CanvasUIAction`:case se:return`CANVASUI`;default:return String(r).replace(`Action`,``).toUpperCase()}return i?Z(i,a):r},yr=(e,t)=>{if(!M(e))return``;let n=_r(e,t);if(n)return n;if(t){let e=gr(t);if(e)return e;let n=hr(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?X(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:i=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:`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}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?X(e.observation.pattern,50):``};break;case`GrepObservation`:i=`OBSERVATION_MESSAGE$GREP`,a={pattern:e.observation.pattern?X(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return i?Z(i,a):r},br=(e,t)=>e.observation.kind!==`ClientToolObservation`||e.tool_name!==`canvas_ui_control`||!t||!Me(t)?null:`UI command '${t.action.command}' dispatched to the Agent Canvas frontend.`,xr=(e,t)=>{let n=``,r=``;if(K(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;n=_.exists(t)?Z(t,{}):`Skill Ready`,r=e._skillReadyContent}else N(e)?(n=vr(e),r=pr(e)??mn(e)):M(e)?(n=yr(e,t),r=e.observation.kind===`TaskTrackerObservation`?(0,I.jsx)(Rn,{event:e}):br(e,t)??pr(e,t)??kn(e)):Pe(e)?(n=Z(An(e),{title:Mn(e)}),r=Fn(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||_.t(h.EVENT$UNKNOWN_EVENT),details:r}};function Sr({event:e,isFromPlanningAgent:t=!1}){let n=xr(e);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V,{type:`agent`,message:typeof n.details==`string`?n.details:String(n.details),isFromPlanningAgent:t}),e.critic_result!=null&&(0,I.jsx)(Kt,{criticResult:e.critic_result})]})}var Cr=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 wr(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(C[0]))n=a.trim(),i=e+1;else if(a.startsWith(C[2]))r=a.replace(C[2],``).trim(),i=e+1;else if(a.startsWith(C[1])||a.startsWith(C[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 Tr(e){return e.replace(/<important>([\s\S]*?)<\/important>/gi,(e,t)=>`**${t.trim()}**`)}function Er({content:e}){let{t}=m(`openhands`),{matchInfo:n,filePath:r,body:i}=wr(e),a=n||r;return(0,I.jsxs)(`div`,{className:`pl-6 pr-2 pt-2 pb-2`,children:[a&&(0,I.jsxs)(`div`,{className:`mb-3 text-sm text-[var(--oh-muted)] space-y-1`,children:[n&&(0,I.jsx)(`p`,{children:n}),r&&(0,I.jsxs)(`p`,{children:[(0,I.jsxs)(A.Text,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.COMMON$PATH),` `]}),(0,I.jsx)(`code`,{className:`bg-[var(--oh-surface)] px-1.5 py-0.5 rounded text-[var(--oh-text-tertiary)]`,children:r})]})]}),a&&i&&(0,I.jsx)(`hr`,{className:`border-[var(--oh-border-subtle)] mb-3`}),i&&(0,I.jsx)(P,{children:Tr(i)})]})}function Dr({items:e,titleKey:t=h.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}){let{t:n}=m(`openhands`),[r,i]=F.useState({}),a=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1 mt-1`,children:[(0,I.jsx)(A.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,I.jsxs)(`div`,{className:`border border-[var(--oh-border-subtle)] rounded-md overflow-hidden`,children:[(0,I.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,I.jsx)(A.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,I.jsx)(b,{size:14}):(0,I.jsx)(l,{size:14})}),(0,I.jsx)(A.Text,{className:`font-normal text-[var(--oh-foreground)] text-sm`,children:e.name})]}),t&&e.content&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`hr`,{className:`border-[var(--oh-border-subtle)]`}),(0,I.jsx)(Er,{content:e.content})]})]},e.name)})]})}function Or(e){if(K(e))return e._skillReadyItems.length>0?{items:e._skillReadyItems,titleKey:h.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}:null;if(M(e)&&e.observation.kind===`InvokeSkillObservation`){let t=Cr(e);return t.length>0?{items:t,titleKey:h.SKILLS$INVOKED_SKILL_KNOWLEDGE}:null}return null}function $({event:e,isLastMessage:t,correspondingAction:n}){let{title:r,details:i}=xr(e,n);if(!K(e)&&M(e)&&e.observation.kind===`TaskTrackerObservation`)return(0,I.jsx)(`div`,{children:i});let a;K(e)?a=`success`:M(e)?a=gn(e):Pe(e)&&(a=hn(e));let o=Or(e);return(0,I.jsxs)(`div`,{children:[(0,I.jsx)(z,{title:r,details:o?(0,I.jsx)(Dr,{items:o.items,titleKey:o.titleKey}):i,success:a,initiallyExpanded:!1,titleIcon:o?(0,I.jsx)(ue,{className:`h-4 w-4 stroke-[var(--oh-muted)] flex-shrink-0 mr-2`}):void 0}),t&&(0,I.jsx)(It,{})]})}function kr({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,I.jsx)(V,{type:`agent`,message:r,actions:t,isFromPlanningAgent:n}):null}function Ar(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 jr(e){return e.length>80?`${e.slice(0,77)}...`:e}function Mr(e,t){return e?`blocked`:t?`ok`:`failed`}function Nr(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 Pr({event:e}){let{t}=m(`openhands`);if(!Le(e))return null;let n=Ar(e.hook_event_type,e.blocked),r=Mr(e.blocked,e.success),i=Nr(e.blocked,e.success),a=(()=>{if(!e.blocked)return e.success?`success`:`error`})();return(0,I.jsx)(z,{title:(0,I.jsxs)(`span`,{children:[n,` `,t(h.HOOK$HOOK_LABEL),`: `,e.hook_event_type,e.tool_name&&(0,I.jsxs)(`span`,{className:`text-[var(--oh-muted)] ml-2`,children:[`(`,e.tool_name,`)`]}),(0,I.jsx)(`span`,{className:w(`ml-2 px-1 py-0.5 rounded text-xs`,i),children:r})]}),details:(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 text-[var(--oh-muted)]`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$COMMAND),`:`]}),` `,(0,I.jsx)(`code`,{className:`text-xs bg-[var(--oh-surface)] px-1 py-0.5 rounded`,children:jr(e.hook_command)})]}),e.exit_code!==null&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$EXIT_CODE),`:`]}),` `,e.exit_code]}),e.blocked&&e.reason&&(0,I.jsxs)(`div`,{className:`text-amber-400`,children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$BLOCKED_REASON),`:`]}),` `,e.reason]}),e.additional_context&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$CONTEXT),`:`]}),` `,e.additional_context]}),e.error&&(0,I.jsxs)(`div`,{className:`text-red-400`,children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$ERROR),`:`]}),` `,e.error]}),e.stdout&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$OUTPUT),`:`]}),(0,I.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,I.jsxs)(`div`,{children:[(0,I.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$STDERR),`:`]}),(0,I.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 Fr(e){let t=[],n=[];for(let r of e)Ae(r)?(n.length>0&&t.push(n),n=[r]):n.push(r);return n.length>0&&t.push(n),t}var Ir=e=>e?.toUpperCase().endsWith(`PLAN.MD`)??!1;function Lr(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(Ie(n)&&Ir(n.observation.path))return n.id}return null}function Rr(e){return(0,F.useMemo)(()=>{let t=new Set;return Fr(e).forEach(e=>{let n=Lr(e);n&&t.add(n)}),t},[e])}function zr(e,t){return t.has(e)}var Br=e=>e.activated_skills||e.activated_microagents||[],Vr=e=>!e||e.length===0?!1:e.some(e=>e.type===`text`&&e.text.trim().length>0),Hr=e=>{let t=Br(e).length>0,n=Vr(e.extended_content);return t&&n},Ur=(e,t,n)=>{try{let r=qn(e);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Jt,{event:e,isLastMessage:!1,isFromPlanningAgent:t.isFromPlanningAgent}),(0,I.jsx)($,{event:r,isLastMessage:n})]})}catch{return(0,I.jsx)(Jt,{event:e,isLastMessage:n,isFromPlanningAgent:t.isFromPlanningAgent})}};function Wr({event:e,messages:t,isLastMessage:n,isInLast10Actions:r,planPreviewEventIds:i,suppressThought:a=!1}){let{data:o}=E(),{planContent:s}=k(),{curAgentState:c}=ve(),l=c===S.RUNNING||c===S.LOADING,u=e.isFromPlanningAgent||!1,d={isLastMessage:n,isInLast10Actions:r,config:o,isFromPlanningAgent:u};if(Oe(e)&&De(e))return(0,I.jsx)(tt,{status:e.value});if(je(e))return(0,I.jsx)(wt,{event:e,...d});if(Le(e))return(0,I.jsx)(Pr,{event:e});if(Pe(e))return(0,I.jsx)($,{event:e,isLastMessage:n});if(Te(e)){let{reasoning:t,message:n}=Ne(e.content??``,{streaming:!0}),r=[e.reasoning_content??``,t].filter(Boolean).join(`
|
|
39
|
+
|
|
40
|
+
`);return(0,I.jsxs)(I.Fragment,{children:[r&&(0,I.jsx)(U,{content:r}),n&&(0,I.jsx)(V,{type:`agent`,message:n,isFromPlanningAgent:u})]})}if(N(e)&&e.action.kind===`FinishAction`)return(0,I.jsx)(Sr,{event:e,...d});if(N(e)&&e.action.kind===`ThinkAction`)return(0,I.jsx)(U,{content:e.action.thought});if(N(e)){let t=ke(e);return(0,I.jsxs)(I.Fragment,{children:[t&&(0,I.jsx)(U,{content:t}),!a&&(0,I.jsx)(kr,{event:e,isFromPlanningAgent:u}),(0,I.jsx)($,{event:e,isLastMessage:n})]})}if(M(e)){if(Ie(e))return i&&zr(e.id,i)?(0,I.jsx)(St,{planContent:s,isStreaming:n&&c===S.RUNNING,isBuildDisabled:l}):null;let r=t.find(t=>N(t)&&t.id===e.action_id),o=!a&&r&&N(r)&&r.action.kind!==`ThinkAction`,d=r&&N(r)?ke(r):``;return(0,I.jsxs)(I.Fragment,{children:[d&&(0,I.jsx)(U,{content:d}),o&&(0,I.jsx)(kr,{event:r,isFromPlanningAgent:u}),(0,I.jsx)($,{event:e,isLastMessage:n,correspondingAction:r&&N(r)?r:void 0})]})}if(!N(e)&&!M(e)){let t=e;return Ae(e)&&Hr(t)?Ur(t,d,n):(0,I.jsx)(Jt,{event:t,...d,isLastMessage:n})}return(0,I.jsx)($,{event:e,isLastMessage:n})}var Gr=e=>{if(N(e)){let{kind:t}=e.action;return!(t===`FinishAction`||t===`ThinkAction`)}return M(e)?!(Ie(e)||e.observation.kind===`TaskTrackerObservation`):!1},Kr=(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(Gr(e)){let s=Ee(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},qr=(0,F.createContext)(!1);function Jr({events:e,allEvents:t,isFinalized:n=!1,children:r}){let{t:i}=m(`openhands`),[a,o]=F.useState(!1),s=F.useId(),c=`${s}-toggle`;if(e.length===0)return null;let l=e.find(e=>N(e)),u=e.filter(M).length,d=e.length,f=!!l,p=e[e.length-1],g=null;p&&(N(p)?g=xr(p).title:M(p)&&(g=xr(p,(t??e).find(e=>N(e)&&e.id===p.action_id)).title));let _=f?i(h.EVENT_GROUP$ACTIONS_PROGRESS,{completed:u,total:d}):i(h.EVENT_GROUP$ACTIONS_COMPLETED,{count:d}),v=a?R:L;return(0,I.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`event-group`,children:[(0,I.jsx)(`button`,{id:c,type:`button`,onClick:()=>o(e=>!e),"aria-controls":s,"aria-expanded":a,"aria-label":i(a?h.EVENT_GROUP$COLLAPSE:h.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,I.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,I.jsx)(v,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,I.jsx)(`span`,{className:`truncate`,children:_})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,I.jsx)(v,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,I.jsx)(`span`,{className:`truncate`,children:g??_})]}),(0,I.jsxs)(`span`,{className:`flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]`,children:[(0,I.jsx)(`span`,{className:`truncate`,children:_}),f?(0,I.jsx)(x,{"data-testid":`spinner-icon`,className:`h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]`}):null]})]})}),a&&(0,I.jsx)(`div`,{id:s,role:`region`,"aria-labelledby":c,className:`mt-1.5 flex flex-col`,"data-testid":`event-group-content`,children:(0,I.jsx)(qr.Provider,{value:!0,children:r})})]})}var Yr=e=>e.at(-1)?.id,Xr=e=>e.at(-1),Zr=F.memo(({messages:e,allEvents:t})=>{let{conversationId:n}=j(),r=Rr(t),i=be(e=>n?e.entriesByConversation[n]:void 0),a=F.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,I.jsx)(it,{conversationId:n,anchorEventId:t}):null},s=F.useMemo(()=>Kr(e,void 0,t),[e,t]),c=(n,i,a)=>(0,I.jsx)(Wr,{event:n,messages:t,isLastMessage:e.length-1===i,isInLast10Actions:e.length-1-i<10,planPreviewEventIds:r,suppressThought:a},n.id);return(0,I.jsx)(I.Fragment,{children:s.map((e,n)=>{if(e.kind===`single`)return(0,I.jsxs)(F.Fragment,{children:[c(e.event,e.index,!0),o(e.event.id)]},`single-${e.event.id}`);if(e.kind===`thought`)return(0,I.jsxs)(F.Fragment,{children:[(0,I.jsx)(kr,{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,I.jsxs)(F.Fragment,{children:[(0,I.jsx)(Jr,{events:e.events,allEvents:t,isFinalized:r,children:e.events.map((t,n)=>c(t,e.startIndex+n,!0))}),e.events.map(e=>(0,I.jsx)(F.Fragment,{children:o(e.id)},`model-${e.id}`))]},`group-${i}`)})})},(e,t)=>e.messages.length===t.messages.length&&e.allEvents.length===t.allEvents.length&&Yr(e.messages)===Yr(t.messages)&&Yr(e.allEvents)===Yr(t.allEvents)&&Xr(e.messages)===Xr(t.messages)&&Xr(e.allEvents)===Xr(t.allEvents));Zr.displayName=`Messages`;export{qe as S,Qe as _,kn as a,Ye as b,At as c,pt as d,lt as f,tt as g,it as h,Mn as i,yt as l,ct as m,Kr as n,mn as o,ot as p,Fn as r,Lt as s,Zr as t,V as u,z as v,Je as x,Xe as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-CrRpzbM2.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-CrRpzbM2.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-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-CHm_6BRr.js";import{t as r}from"./declaration-_yumYLEx.js";import{t as i}from"./utils-CrRpzbM2.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(r.BUTTON$CLOSE),className:i(`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{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,i as r,n as i,r as a}from"./vendor-styling-CI0PQ3ab.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,i as r,n as i,r as a}from"./vendor-styling-CI0PQ3ab.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-CHm_6BRr.js";import{t as c}from"./declaration-_yumYLEx.js";import{P as l,t as u}from"./utils-CrRpzbM2.js";import{p as d,y as f}from"./agent-server-compatibility-DMY0CihN.js";import{m as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{t as m}from"./proxy-DnnDqkwn.js";import{f as h}from"./form-control-classes-BPUnoYyg.js";import{i as g}from"./combobox-caret-kNZtp53R.js";import{n as _}from"./map-provider-BSvXvVR0.js";import{g as v}from"./sdk-settings-schema-B42JFr5Y.js";var y=e(t(),1),b=e=>{let[t,...n]=e.split(`/`);return!t||n.length===0?{provider:``,model:e,separator:``}:{provider:t,model:n.join(`/`),separator:`/`}};function x(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n))}function S(e,t){return t===void 0?e:e.filter(e=>e.verified===t)}function C(e,t){return!t||t<=0?e:e.slice(0,t)}function w(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}var T=class{static async searchModels(e={},t){let n=f();if(n.backend.kind===`cloud`){let t=w({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq,provider__eq:e.provider__eq});return m({backend:n.backend,method:`GET`,path:`/api/v1/config/models/search${t}`})}let r=new p(d()),i=t===void 0?r.getVerifiedModels():Promise.resolve(t),[a,o]=await Promise.all([r.getModels(),i]),s=e.provider__eq??null,c=new Set(s?o?.[s]??[]:[]),l=[...c].map(e=>({provider:s,name:e,verified:!0})),u=s?(a??[]).filter(e=>e.startsWith(`${s}/`)).map(e=>e.slice(s.length+1)).filter(e=>e.length>0&&!c.has(e)).map(e=>({provider:s,name:e,verified:!1})):[];return{items:C(S(x([...l,...u],e.query),e.verified__eq),e.limit),next_page_id:null}}static async searchProviders(e={},t){let n=f();if(n.backend.kind===`cloud`){let t=w({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq});return m({backend:n.backend,method:`GET`,path:`/api/v1/config/providers/search${t}`})}let r=new p(d()),i=t===void 0?r.getVerifiedModels():Promise.resolve(t),[a,o]=await Promise.all([r.getProviders(),i]),s=new Set(Object.keys(o??{}));return{items:C(S(x([...new Set([...s,...a??[]])].map(e=>({name:e,verified:s.has(e)})),e.query),e.verified__eq),e.limit),next_page_id:null}}},E=[`config`,`verified-models`],D=1e3*60*5,O=1e3*60*15;async function k(){return f().backend.kind===`cloud`?{}:await new p(d()).getVerifiedModels()??{}}var A=()=>o({queryKey:[`config`,`providers`],queryFn:async({client:e})=>{let t=await e.fetchQuery({queryKey:E,queryFn:k,staleTime:D});return(await T.searchProviders({limit:100},t)).items},staleTime:D,gcTime:O}),j=10;async function M(e,t,n,r=0){if(r>=j)throw Error(`Too many pagination requests for provider ${e}`);let i=await T.searchModels({provider__eq:e,limit:100,page_id:n},t);if(i.next_page_id){let n=await M(e,t,i.next_page_id,r+1);return[...i.items,...n]}return i.items}var N=e=>o({queryKey:[`config`,`models`,e],queryFn:async({client:t})=>M(e,await t.fetchQuery({queryKey:E,queryFn:k,staleTime:D})),enabled:!!e,staleTime:D,gcTime:O}),P=n();function F({isDisabled:e,currentModel:t,onChange:n,onDefaultValuesChanged:o,wrapperClassName:d,labelClassName:f}){let[,p]=y.useState(null),[m,x]=y.useState(null),[S,C]=y.useState(null),{data:w=[]}=A(),{data:T=[],isLoading:E,error:D}=N(m),O=y.useMemo(()=>w.filter(e=>e.verified),[w]),k=y.useMemo(()=>w.filter(e=>!e.verified),[w]),j=y.useMemo(()=>T.filter(e=>e.verified),[T]),M=y.useMemo(()=>T.filter(e=>!e.verified),[T]);y.useEffect(()=>{if(t){let{provider:e,model:n}=b(t);p(t),x(e||null),C(n),o?.(e||null,n)}},[t]);let F=e=>{x(e),C(null),p(`${e}/`),n?.(e,null)},I=e=>{let t=`${m}/${e}`;m===`openai`&&(t=e),p(t),C(e),n?.(m,e)},L=()=>{x(null),p(null)},{t:R}=s(`openhands`);return(0,P.jsxs)(`div`,{className:u(`flex flex-col md:flex-row w-full min-w-0 justify-between gap-4 md:gap-[46px]`,d),children:[(0,P.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,P.jsx)(`label`,{className:u(`text-sm`,f),children:R(c.LLM$PROVIDER)}),(0,P.jsxs)(i,{"data-testid":`llm-provider-input`,isRequired:!0,isVirtualized:!1,name:`llm-provider-input`,isDisabled:e,"aria-label":R(c.LLM$PROVIDER),isClearable:!1,onSelectionChange:e=>{e?.toString()&&F(e.toString())},onInputChange:e=>!e&&L(),defaultSelectedKey:m??void 0,selectedKey:m,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:g},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:h}},children:[(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:O.map(e=>(0,P.jsx)(r,{"data-testid":`provider-item-${e.name}`,children:_(e.name)},e.name))}),k.length>0?(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:k.map(e=>(0,P.jsx)(r,{children:_(e.name)},e.name))}):null]})]}),m===`openhands`&&(0,P.jsx)(v,{testId:`openhands-account-help`,text:R(c.SETTINGS$NEED_OPENHANDS_ACCOUNT),linkText:R(c.SETTINGS$CLICK_HERE),href:l.PRODUCTION,size:`settings`,linkColor:`white`}),(0,P.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,P.jsx)(`label`,{className:u(`text-sm`,f),children:R(c.LLM$MODEL)}),(0,P.jsxs)(i,{"data-testid":`llm-model-input`,isRequired:!0,isVirtualized:!1,isLoading:E,name:`llm-model-input`,"aria-label":R(c.LLM$MODEL),isClearable:!1,onSelectionChange:e=>{e?.toString()&&I(e.toString())},isDisabled:e||!m,selectedKey:S,defaultSelectedKey:S??void 0,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:g},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:h}},children:[(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:j.map(e=>(0,P.jsx)(r,{children:e.name},e.name))}),M.length>0?(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:M.map(e=>(0,P.jsx)(r,{"data-testid":`model-item-${e.name}`,children:e.name},e.name))}):null]}),D&&(0,P.jsx)(`p`,{"data-testid":`models-error`,className:`text-danger text-xs`,children:R(c.CONFIGURATION$ERROR_FETCH_MODELS)})]})]})}export{b as n,F as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./navigation-context-cvyvI1WA.js";var i=e(t(),1),a=n();function o(e){return e.metaKey||e.altKey||e.ctrlKey||e.shiftKey}function s(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}var c=i.forwardRef(({to:e,replace:t=!1,end:n=!1,onClick:i,className:c,children:l,target:u,rel:d,...f},p)=>{let{currentPath:m,navigate:h}=r(),g=s(m,e,n),_=typeof c==`function`?c({isActive:g}):c,v=n=>{i?.(n),!(n.defaultPrevented||n.button!==0||o(n)||u===`_blank`)&&(n.preventDefault(),h(e,{replace:t}))};return(0,a.jsx)(`a`,{...f,ref:p,href:e,target:u,rel:d,onClick:v,className:_,"aria-current":g?`page`:void 0,children:l})});c.displayName=`NavigationLink`;export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{k as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useQueries-BpIlT8Mt.js";import{t as s}from"./useQuery-D5pEZbY0.js";import{t as c}from"./useTranslation-CHm_6BRr.js";import{t as l}from"./declaration-_yumYLEx.js";import{n as u,u as d}from"./active-backend-context-Cd1qcZsb.js";import{t as f}from"./createLucideIcon-D4Tak8A1.js";import{t as p}from"./onboarding-modal-D4vqkJeT.js";import{t as m}from"./utils-CrRpzbM2.js";import{p as h}from"./agent-server-compatibility-DMY0CihN.js";import{g,h as _,o as v}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{t as y}from"./use-onboarding-completion-C0hPNGpw.js";import{t as b}from"./modal-backdrop-B7H42xHG.js";import{r as x,t as S}from"./modal-body-Bg9UCeoV.js";import{t as C}from"./brand-button-BulEFHr3.js";import{i as w}from"./modal-classes-H1KbJkeC.js";import{t as T}from"./confirmation-modal-108xng7X.js";import{r as E}from"./base-modal-Cw7enAHz.js";import{t as D}from"./folder-BabbYnbF.js";import{t as O}from"./close-BjSA0HWT.js";var k=f(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ee=f(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]);function A(){return new v(h())}function j(e){return{workspaces:e.workspaces.map(({parentPath:e,...t})=>({...t,...e?{parentPath:e}:{}})),workspaceParents:e.workspaceParents}}var M=class{static async listWorkspaces(){return j(await A().listWorkspaces())}static async addWorkspaces(e){return j(await A().addWorkspaces(e))}static async removeWorkspace(e){await A().deleteWorkspace(e)}static async addWorkspaceParents(e){return j(await A().addWorkspaceParents(e))}static async removeWorkspaceParent(e){await A().deleteWorkspaceParent(e)}};function N(){let e=i();return a({mutationFn:e=>M.addWorkspaces(e),onSuccess:()=>e.invalidateQueries({queryKey:d.all})})}function P(){let e=i();return a({mutationFn:e=>M.removeWorkspace(e),onSuccess:()=>e.invalidateQueries({queryKey:d.all})})}function F(){let e=i();return a({mutationFn:e=>M.addWorkspaceParents(e),onSuccess:()=>e.invalidateQueries({queryKey:d.all})})}function I(){let e=i();return a({mutationFn:e=>M.removeWorkspaceParent(e),onSuccess:()=>e.invalidateQueries({queryKey:d.all})})}var L=e(t(),1);function R({enabled:e=!0}={}){return s({queryKey:d.all,queryFn:()=>M.listWorkspaces(),enabled:e,retry:(e,t)=>!_(t)&&e<3,meta:{disableToast:!0},staleTime:6e4})}function z(){return new g(h())}async function B(e,t=z()){let n=[],r=new Set,i;for(;;){let a=await t.searchSubdirectories(e,i?{pageId:i}:void 0);if(n.push(...a.items),i=a.next_page_id,!i)return{items:n,next_page_id:null};if(r.has(i))throw Error(`File search returned a repeated page id`);r.add(i)}}var V=e=>{let t=u();return s({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>B(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},H=()=>{let e=u();return s({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>z().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})};function U(){let{data:e,isLoading:t,isError:n,error:r}=R(),i=_(r),a=e?.workspaces??[],s=e?.workspaceParents??[],c=(0,L.useMemo)(()=>{let e=new Set(s.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?s:[...s,...t]},[s,i]),l=o({queries:i?[]:c.map(e=>({queryKey:[`file`,`search_subdirs`,e.path],queryFn:()=>B(e.path),retry:!1,meta:{disableToast:!0}}))}),u=t||l.some(e=>e.isLoading),d=n||l.some(e=>e.isError);return{workspaces:(0,L.useMemo)(()=>{let e=new Map,t=new Map(c.map((e,t)=>[e.path,l[t]]));return c.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),a.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[a,c,l.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),parents:c,isLoading:u,isError:d,error:r}}function W(e,t){return _(e)?t(l.HOME$WORKSPACES_UNSUPPORTED_AGENT_SERVER,{actualVersion:e.actualVersion,requiredVersion:e.requiredVersion}):null}var G=n(),K=e=>(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.8227 16.6549L10.4043 12.6668L13.8227 8.67871L14.9615 9.6549L12.3799 12.6668L14.9615 15.6787L13.8227 16.6549Z`,fill:`currentColor`})}),q=`/projects`;function J({label:e,entries:t,currentPath:n,onPick:r}){return t.length===0?null:(0,G.jsxs)(`div`,{className:`px-2 pb-3`,children:[(0,G.jsx)(`div`,{className:`px-2 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:e}),(0,G.jsx)(`ul`,{children:t.map(e=>{let t=n===e.path;return(0,G.jsx)(`li`,{children:(0,G.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`folder-browser-sidebar-${e.label.toLowerCase()}`,className:m(`flex items-center gap-2 w-full px-2 py-1 rounded text-sm cursor-pointer`,t?`bg-tertiary text-white`:`text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,G.jsx)(D,{width:14,height:14,className:`shrink-0`}),(0,G.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.path)})})]})}function te(e){let t=X(e);if(!t||t===`/`||Y(t))return null;let n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));if(n<0)return null;if(n===0)return`/`;let r=t.slice(0,n);return/^[A-Za-z]:$/.test(r)?`${r}${t[n]}`:r}function Y(e){return/^[A-Za-z]:[\\/]?$/.test(e)}function X(e){let t=e.replace(/[\\/]+$/,``);return/^[A-Za-z]:$/.test(t)?`${t}${e.includes(`/`)&&!e.includes(`\\`)?`/`:`\\`}`:t}function Z(e){return e?.home===`/home/openhands`}function ne({isOpen:e,onClose:t,onAdd:n,onAddParent:r}){let{t:i}=c(`openhands`),[a,o]=(0,L.useState)(null),s=u(),{data:d}=H();(0,L.useEffect)(()=>{e&&d?.home&&a===null&&o(Z(d)?q:d.home),e||o(null)},[e,d?.home,a]),(0,L.useEffect)(()=>{o(null)},[s.backend.id,s.orgId]);let{data:f,isLoading:p,isError:h,error:g}=V(e?a:null),_=(0,L.useMemo)(()=>{if(!d?.home)return[];let e=[{label:`Home`,path:X(d.home)||d.home},...d.favorites??[]];return Z(d)&&!e.some(e=>e.path===q)&&e.push({label:q,path:q}),e},[d]),v=d?.locations??[];if(!e)return null;let y=f?.items??[],T=a?te(a):null,O=d?.home===`/home/openhands`&&(d?.favorites?.length??0)===0&&a===d?.home&&!p&&!h&&y.length===0,k=e=>{let t=X(e);if(!t)return`/`;if(t===`/`||Y(t))return t;let n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n>=0&&t.slice(n+1)||t};return(0,G.jsx)(b,{onClose:t,"aria-label":i(l.HOME$ADD_WORKSPACES_TITLE),children:(0,G.jsxs)(`div`,{"data-testid":`folder-browser-modal`,className:m(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,x(`xl`),S,`h-[480px]`),children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,G.jsx)(E,{className:w,title:i(l.HOME$ADD_WORKSPACES_TITLE)})}),(0,G.jsxs)(`div`,{className:`flex flex-1 min-h-0`,children:[(0,G.jsxs)(`aside`,{"data-testid":`folder-browser-sidebar`,className:`w-[180px] shrink-0 border-r border-[var(--oh-border-input)] bg-[var(--oh-surface)] py-3 overflow-y-auto`,children:[(0,G.jsx)(J,{label:i(l.HOME$FAVORITES),entries:_,currentPath:a,onPick:o}),(0,G.jsx)(J,{label:i(l.HOME$LOCATIONS),entries:v,currentPath:a,onPick:o})]}),(0,G.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 border-b border-[var(--oh-border-input)]`,children:[(0,G.jsx)(`button`,{type:`button`,"data-testid":`folder-browser-up`,onClick:()=>T&&o(T),disabled:!T,"aria-label":i(l.COMMON$UP),className:`p-1 rounded hover:bg-[var(--oh-interactive-hover)] text-white disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer`,children:(0,G.jsx)(K,{width:16,height:16})}),(0,G.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,"data-testid":`folder-browser-current-path`,children:a??``})]}),(0,G.jsxs)(`div`,{className:`grid grid-cols-[1fr_120px] px-4 py-1 border-b border-[var(--oh-border-input)] text-xs text-[var(--oh-text-secondary)] font-semibold`,children:[(0,G.jsx)(`span`,{children:i(l.HOME$NAME)}),(0,G.jsx)(`span`,{children:i(l.HOME$KIND)})]}),(0,G.jsxs)(`ul`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`folder-browser-list`,children:[p&&(0,G.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,children:i(l.HOME$LOADING)}),h&&(0,G.jsx)(`li`,{className:`px-4 py-2 text-sm text-red-400`,"data-testid":`folder-browser-error`,children:g?.message??i(l.COMMON$FAILED_TO_LOAD)}),!p&&!h&&y.length===0&&(0,G.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,"data-testid":O?`folder-browser-host-home-hint`:`folder-browser-empty`,children:i(O?l.HOME$HOST_HOME_NOT_MOUNTED_HINT:l.HOME$NO_WORKSPACES)}),y.map(e=>(0,G.jsx)(`li`,{children:(0,G.jsxs)(`button`,{type:`button`,onClick:()=>o(e.path),className:`grid grid-cols-[1fr_120px] items-center w-full text-left px-4 py-1.5 text-sm text-white hover:bg-[var(--oh-interactive-hover)] cursor-pointer`,"data-testid":`folder-browser-entry-${e.name}`,children:[(0,G.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,G.jsx)(D,{width:16,height:16,className:`shrink-0`}),(0,G.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,G.jsx)(`span`,{className:`text-[var(--oh-text-secondary)] text-xs`,children:i(l.HOME$FOLDER)})]})},e.path))]})]})]}),(0,G.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:[(0,G.jsx)(C,{type:`button`,variant:`secondary`,onClick:t,testId:`folder-browser-cancel`,children:i(l.HOME$CANCEL)}),r&&(0,G.jsx)(C,{type:`button`,variant:`secondary`,onClick:()=>{!a||!r||(r([{id:a,name:k(a),path:a}]),t())},isDisabled:!a||p,testId:`folder-browser-add-all-subdirs`,children:i(l.HOME$ADD_ALL_SUBDIRECTORIES)}),(0,G.jsx)(C,{type:`button`,variant:`primary`,onClick:()=>{a&&(n([{id:a,name:k(a),path:a}]),t())},isDisabled:!a||p,testId:`folder-browser-use`,children:i(l.HOME$ADD_THIS_DIRECTORY)})]})]})})}function re({isOpen:e,workspaces:t,workspaceParents:n=[],onClose:r,onRemove:i,onRemoveParent:a}){let{t:o}=c(`openhands`),[s,u]=L.useState(null);if(!e)return null;let d=t.filter(e=>!e.parentPath),f=new Map;t.forEach(e=>{if(!e.parentPath)return;let t=f.get(e.parentPath)??[];t.push(e),f.set(e.parentPath,t)});let p=d.length>0||n.length>0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(b,{onClose:r,"aria-label":o(l.HOME$MANAGE_WORKSPACES),children:(0,G.jsxs)(`div`,{"data-testid":`manage-workspaces-modal`,className:m(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,x(`lg`),S,`max-h-[70vh]`),children:[(0,G.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,G.jsx)(E,{className:w,title:o(l.HOME$MANAGE_WORKSPACES)})}),(0,G.jsxs)(`div`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`manage-workspaces-list`,children:[!p&&(0,G.jsx)(`p`,{className:`px-5 py-6 text-sm text-[var(--oh-text-secondary)] text-center`,children:o(l.HOME$MANAGE_WORKSPACES_EMPTY)}),d.length>0&&(0,G.jsx)(`ul`,{children:d.map(e=>(0,G.jsxs)(`li`,{className:`flex items-center gap-3 px-5 py-2 border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-row-${e.name}`,children:[(0,G.jsx)(D,{width:16,height:16,className:`shrink-0`}),(0,G.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,G.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),(0,G.jsxs)(`button`,{type:`button`,onClick:()=>u({type:`workspace`,path:e.path,text:o(l.HOME$REMOVE_WORKSPACE_CONFIRMATION,{name:e.name})}),"aria-label":o(l.HOME$REMOVE_WORKSPACE),"data-testid":`manage-workspaces-remove-${e.name}`,className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-interactive-hover)] hover:text-white cursor-pointer`,children:[(0,G.jsx)(O,{width:12,height:12}),(0,G.jsx)(`span`,{children:o(l.HOME$REMOVE_WORKSPACE)})]})]},e.id))}),n.length>0&&(0,G.jsxs)(`div`,{"data-testid":`manage-workspaces-parents-section`,children:[(0,G.jsx)(`div`,{className:`px-5 pt-3 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:o(l.HOME$WORKSPACE_PARENTS)}),(0,G.jsx)(`ul`,{children:n.map(e=>{let t=f.get(e.path)??[];return(0,G.jsxs)(`li`,{className:`border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-parent-row-${e.name}`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-2`,children:[(0,G.jsx)(D,{width:16,height:16,className:`shrink-0`}),(0,G.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,G.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,G.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),a&&(0,G.jsxs)(`button`,{type:`button`,onClick:()=>u({type:`parent`,path:e.path,text:o(l.HOME$REMOVE_WORKSPACE_PARENT_CONFIRMATION,{name:e.name,count:t.length})}),"aria-label":o(l.HOME$REMOVE_WORKSPACE_PARENT),"data-testid":`manage-workspaces-remove-parent-${e.name}`,className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-interactive-hover)] hover:text-white cursor-pointer`,children:[(0,G.jsx)(O,{width:12,height:12}),(0,G.jsx)(`span`,{children:o(l.HOME$REMOVE_WORKSPACE_PARENT)})]})]}),t.length>0&&(0,G.jsx)(`ul`,{className:`pb-2`,children:t.map(e=>(0,G.jsxs)(`li`,{className:`flex items-center gap-3 px-5 pl-10 py-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`manage-workspaces-child-${e.name}`,children:[(0,G.jsx)(D,{width:12,height:12,className:`shrink-0 opacity-70`}),(0,G.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id))})]},e.id)})})]})]}),(0,G.jsx)(`div`,{className:`flex justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:(0,G.jsx)(C,{type:`button`,variant:`primary`,onClick:r,testId:`manage-workspaces-done`,children:o(l.HOME$DONE)})})]})}),s&&(0,G.jsx)(T,{text:s.text,onConfirm:()=>{s&&(s.type===`workspace`?i(s.path):a?.(s.path),u(null))},onCancel:()=>u(null)})]})}var ie=`previewOnboardingStep`,ae=3;function Q(e=typeof window<`u`?window.location.search:``){let t=new URLSearchParams(e).get(ie);if(t==null)return null;let n=Number.parseInt(t,10);return!Number.isFinite(n)||n<0||n>ae?null:n}function $(e=typeof window<`u`?window.location.search:``){return Q(e)!=null}function oe(){let e=r(),t=Q(e.search),n=$(e.search),{isCompleted:i,markCompleted:a}=y();return!n&&i?null:(0,G.jsx)(p,{onClose:()=>{n||a()},initialStep:t??0,isPreview:n})}export{W as a,F as c,I as d,ee as f,ne as i,N as l,$ as n,U as o,k as p,re as r,R as s,oe as t,P as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,r as t}from"./rolldown-runtime-BFRubm34.js";import{Ct as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./use-is-creating-conversation-fxSzN778.js";import{t as a}from"./useTranslation-CHm_6BRr.js";import{t as o}from"./declaration-_yumYLEx.js";import{C as s,D as c,n as l,r as u,w as d}from"./active-backend-context-Cd1qcZsb.js";import{t as f}from"./createLucideIcon-D4Tak8A1.js";import{t as p}from"./chat-send-button-BchSSwuD.js";import{t as m}from"./check-TbOEtHKj.js";import{t as h}from"./circle-check-BXbQ5nEH.js";import{t as g}from"./loader-circle-DGsqG5qw.js";import{i as _,r as v,t as y}from"./llm-settings-0Bb97NCk.js";import{t as b}from"./utils-CrRpzbM2.js";import{B as x,L as S,N as C,O as w,R as T,w as E}from"./agent-server-compatibility-DMY0CihN.js";import{a as D}from"./use-backends-health-BsZikyFW.js";import{n as O}from"./navigation-context-cvyvI1WA.js";import{t as k}from"./openhands-logo-pEw0nKFP.js";import{c as A,s as j,t as M}from"./backend-form-modal-YcfpuBZo.js";import{t as N}from"./modal-backdrop-B7H42xHG.js";import{r as P,t as F}from"./modal-body-Bg9UCeoV.js";import{t as I}from"./brand-button-BulEFHr3.js";import{t as L}from"./use-tracking-DjdCssvp.js";import{c as R,i as z,n as B,o as V}from"./acp-providers-xACMK9ZP.js";import{n as H,r as U}from"./use-agent-profiles-BSWVN6hH.js";import{n as W}from"./use-create-conversation-vvl0kvu7.js";import{t as G}from"./terminal-a57bHgZs.js";import{r as ee}from"./use-settings-B9XEmh7i.js";import{t as te}from"./use-save-settings-BMsb2wk_.js";import{o as ne}from"./use-can-manage-org-profiles-Do6mYf6P.js";import{t as re}from"./use-save-agent-profile-Bj7N-1jS.js";import{n as ie}from"./use-activate-agent-profile-BfcTTJJG.js";import{a as ae,i as oe,n as se,r as ce,t as le}from"./use-acp-credential-form-CIsp8hJe.js";import{t as ue}from"./recommended-automations-launcher-B97vgHuN.js";var de=f(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),K=e(n(),1),q=r(),fe=`m19.6 66.5 19.7-11 .3-1-.3-.5h-1l-3.3-.2-11.2-.3L14 53l-9.5-.5-2.4-.5L0 49l.2-1.5 2-1.3 2.9.2 6.3.5 9.5.6 6.9.4L38 49.1h1.6l.2-.7-.5-.4-.4-.4L29 41l-10.6-7-5.6-4.1-3-2-1.5-2-.6-4.2 2.7-3 3.7.3.9.2 3.7 2.9 8 6.1L37 36l1.5 1.2.6-.4.1-.3-.7-1.1L33 25l-6-10.4-2.7-4.3-.7-2.6c-.3-1-.4-2-.4-3l3-4.2L28 0l4.2.6L33.8 2l2.6 6 4.1 9.3L47 29.9l2 3.8 1 3.4.3 1h.7v-.5l.5-7.2 1-8.7 1-11.2.3-3.2 1.6-3.8 3-2L61 2.6l2 2.9-.3 1.8-1.1 7.7L59 27.1l-1.5 8.2h.9l1-1.1 4.1-5.4 6.9-8.6 3-3.5L77 13l2.3-1.8h4.3l3.1 4.7-1.4 4.9-4.4 5.6-3.7 4.7-5.3 7.1-3.2 5.7.3.4h.7l12-2.6 6.4-1.1 7.6-1.3 3.5 1.6.4 1.6-1.4 3.4-8.2 2-9.6 2-14.3 3.3-.2.1.2.3 6.4.6 2.8.2h6.8l12.6 1 3.3 2 1.9 2.7-.3 2-5.1 2.6-6.8-1.6-16-3.8-5.4-1.3h-.8v.4l4.6 4.5 8.3 7.5L89 80.1l.5 2.4-1.3 2-1.4-.2-9.2-7-3.6-3-8-6.8h-.5v.7l1.8 2.7 9.8 14.7.5 4.5-.7 1.4-2.6 1-2.7-.6-5.8-8-6-9-4.7-8.2-.5.4-2.9 30.2-1.3 1.5-3 1.2-2.5-2-1.4-3 1.4-6.2 1.6-8 1.3-6.4 1.2-7.9.7-2.6v-.2H49L43 72l-9 12.3-7.2 7.6-1.7.7-3-1.5.3-2.8L24 86l10-12.8 6-7.9 4-4.6-.1-.5h-.3L17.2 77.4l-4.7.6-2-2 .2-3 1-1 8-5.5Z`,pe=`0 0 100 100`,me=`M4.04286 0.228393C4.52451 0.0304495 5.0488 -0.0409817 5.56586 0.0208928C6.23236 0.0973928 6.82636 0.380893 7.34786 0.870893C7.35488 0.877545 7.36344 0.882351 7.37278 0.884881C7.38212 0.887412 7.39194 0.887588 7.40136 0.885393C8.10536 0.712393 8.78236 0.773393 9.43186 1.06839L9.46336 1.08339L9.54036 1.12139C10.2189 1.47289 10.7054 2.00639 10.9994 2.72039C11.1384 3.05989 11.2084 3.41439 11.2099 3.78339C11.2197 4.05816 11.1893 4.33288 11.1199 4.59889C11.1164 4.61245 11.1165 4.62665 11.12 4.6402C11.1235 4.65374 11.1303 4.66618 11.1399 4.67639C11.5329 5.0749 11.8063 5.57572 11.9289 6.12189C12.1214 7.07239 11.9239 7.92939 11.3374 8.69189L11.2464 8.80189C10.8579 9.24669 10.3481 9.56836 9.77936 9.72739C9.76694 9.73097 9.75556 9.73747 9.74617 9.74634C9.73677 9.75521 9.72964 9.7662 9.72536 9.77839C9.59786 10.1464 9.46986 10.4604 9.23186 10.7744C8.63236 11.5654 7.75086 12.0054 6.75786 11.9999C5.96636 11.9959 5.26486 11.7064 4.65286 11.1319C4.64358 11.1234 4.63225 11.1174 4.61998 11.1146C4.6077 11.1118 4.59491 11.1123 4.58286 11.1159C4.32386 11.1994 4.06286 11.2114 3.78086 11.2084C3.33033 11.2048 2.88658 11.0984 2.48336 10.8974C2.0613 10.688 1.6939 10.3831 1.41036 10.0069C1.30886 9.87239 1.20836 9.74589 1.13486 9.59639C1.03349 9.39033 0.95066 9.17565 0.887357 8.95489C0.754446 8.45324 0.751521 7.92599 0.878857 7.42289C0.882974 7.41102 0.884341 7.39837 0.882857 7.38589C0.88038 7.37348 0.873877 7.36223 0.864357 7.35389C0.556147 7.04213 0.320543 6.66619 0.174357 6.25289C0.0775698 5.99842 0.0213841 5.73031 0.00785682 5.45839C-0.0163229 5.10033 0.0153902 4.74069 0.101857 4.39239C0.326857 3.65039 0.756357 3.06839 1.39036 2.64589C1.53136 2.55189 1.66536 2.47889 1.79136 2.42689C1.93436 2.36689 2.07786 2.31689 2.22186 2.27489C2.23216 2.27184 2.24153 2.26626 2.24913 2.25866C2.25672 2.25107 2.2623 2.24169 2.26536 2.23139C2.37455 1.83888 2.56235 1.47264 2.81736 1.15489C3.15736 0.731893 3.56586 0.422893 4.04286 0.228393ZM3.64086 4.15339C3.58503 4.05573 3.49269 3.98424 3.38415 3.95465C3.27562 3.92507 3.15977 3.93981 3.06211 3.99564C2.96444 4.05147 2.89295 4.14381 2.86337 4.25235C2.83378 4.36088 2.84853 4.47673 2.90436 4.57439L3.75136 6.05689L2.90736 7.48089C2.85561 7.57738 2.84315 7.69014 2.87257 7.7956C2.902 7.90106 2.97104 7.99108 3.06526 8.04684C3.15949 8.1026 3.27162 8.1198 3.37823 8.09484C3.48484 8.06988 3.57768 8.00469 3.63736 7.91289L4.60736 6.27689C4.64561 6.21237 4.66609 6.13887 4.66671 6.06386C4.66732 5.98886 4.64805 5.91503 4.61086 5.84989L3.64086 4.15339ZM6.36386 7.27339C6.25583 7.27982 6.15434 7.32727 6.08012 7.40603C6.00591 7.48479 5.96458 7.58892 5.96458 7.69714C5.96458 7.80536 6.00591 7.90949 6.08012 7.98826C6.15434 8.06702 6.25583 8.11446 6.36386 8.12089H8.78786C8.89675 8.1156 8.99943 8.06862 9.07462 7.98969C9.14982 7.91075 9.19176 7.80591 9.19176 7.69689C9.19176 7.58787 9.14982 7.48303 9.07462 7.4041C8.99943 7.32516 8.89675 7.27818 8.78786 7.27289H6.36386V7.27339Z`,he=`0 0 12 12`,ge=`M12 0C12.904 6.056 17.944 11.096 24 12C17.944 12.904 12.904 17.944 12 24C11.096 17.944 6.056 12.904 0 12C6.056 11.096 11.096 6.056 12 0Z`,_e=`0 0 24 24`,ve=3/2;function J({kind:e,size:t=12,className:n,"data-testid":r}){return e===`openhands`?(0,q.jsx)(k,{width:Math.round(t*ve),height:t,className:b(`shrink-0 [&_path:not([fill=transparent])]:fill-current`,n),"data-testid":r??`agent-brand-icon-openhands`,"aria-hidden":!0}):e===`claude-code`?(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:pe,width:t,height:t,className:b(`shrink-0`,n),"data-testid":r??`agent-brand-icon-claude-code`,"aria-hidden":!0,children:(0,q.jsx)(`path`,{fill:`currentColor`,d:fe})}):e===`codex`?(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:he,width:t,height:t,className:b(`shrink-0`,n),"data-testid":r??`agent-brand-icon-codex`,"aria-hidden":!0,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:me,fill:`currentColor`})}):e===`gemini`?(0,q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:_e,width:t,height:t,className:b(`shrink-0`,n),"data-testid":r??`agent-brand-icon-gemini`,"aria-hidden":!0,children:(0,q.jsx)(`path`,{fill:`currentColor`,d:ge})}):(0,q.jsx)(G,{width:t,height:t,className:b(`shrink-0`,n),"data-testid":r??`agent-brand-icon-generic`,"aria-hidden":!0})}function ye({currentStep:e,totalSteps:t,className:n}){return(0,q.jsx)(`div`,{role:`progressbar`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":e+1,"data-testid":`onboarding-progress-bar`,className:b(`flex w-full items-center gap-2`,n),children:Array.from({length:t},(t,n)=>{let r=n<e,i=n===e;return(0,q.jsx)(`div`,{"data-testid":`onboarding-progress-step-${n}`,"data-state":r?`completed`:i?`current`:`upcoming`,className:b(`h-1.5 flex-1 rounded-full transition-colors duration-300`,r||i?`bg-white`:`bg-white/15`)},n)})})}function be(e){return e===`openhands`?`openhands`:B.find(({key:t})=>t===e)?.icon??`cli-generic`}function xe({id:e,muted:t}){let n=be(e);return n===`openhands`?(0,q.jsx)(J,{kind:`openhands`,size:16,className:b(`text-white`,t&&`opacity-55`),"data-testid":`onboarding-agent-icon-openhands`}):(0,q.jsx)(J,{kind:n,size:18,className:t?`text-[var(--oh-muted)]`:`text-white`,"data-testid":`onboarding-agent-icon-${n}`})}function Se(){return[{id:`openhands`,label:`OpenHands`,descriptionKey:o.ONBOARDING$AGENT_OPENHANDS_DESCRIPTION},...B.map(e=>({id:e.key,label:e.display_name,descriptionKey:e.description_key}))]}function Ce({selectedAgentId:e,onSelect:t,onBack:n,onNext:r}){let{t:i}=a(`openhands`),{mutate:l,isPending:u}=te();return(0,q.jsxs)(`div`,{"data-testid":`onboarding-step-choose-agent`,className:`flex flex-col gap-6`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:i(o.ONBOARDING$AGENT_TITLE)}),(0,q.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:i(o.ONBOARDING$AGENT_SUBTITLE)})]}),(0,q.jsx)(`div`,{role:`radiogroup`,"aria-label":i(o.ONBOARDING$AGENT_TITLE),className:`flex flex-col gap-3`,children:Se().map(n=>{let r=n.id===e;return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-testid":`onboarding-agent-option-${n.id}`,"data-selected":r,onClick:()=>t(n.id),className:b(`flex items-start justify-between gap-4 rounded-xl border px-4 py-3 text-left transition-colors cursor-pointer`,r?`border-white/45 bg-white/[0.09] shadow-none hover:border-white/45 hover:bg-white/[0.09]`:`border-white/30 bg-white/5 hover:border-white/40 hover:bg-white/[0.08]`),children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,q.jsx)(xe,{id:n.id,muted:!1}),(0,q.jsx)(`span`,{className:`truncate text-base font-normal text-white`,children:n.label})]}),(0,q.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:i(n.descriptionKey)})]}),(0,q.jsx)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:r?(0,q.jsx)(m,{width:18,height:18,className:`mt-1 shrink-0 text-white`,"aria-hidden":!0}):null})]},n.id)})}),(0,q.jsxs)(`div`,{className:b(`sticky bottom-0 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,n?`justify-between`:`justify-end`),children:[n?(0,q.jsx)(I,{testId:`onboarding-agent-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:u,children:i(o.ONBOARDING$BACK)}):null,(0,q.jsx)(I,{testId:`onboarding-agent-next`,type:`button`,variant:`primary`,isDisabled:u,onClick:()=>{let t=z(e);if(!t){r();return}l({agent_settings_diff:t},{onError:e=>{s(c(e)||i(o.ERROR$GENERIC))},onSuccess:()=>{d(i(o.SETTINGS$SAVED)),r()}})},children:i(u?o.SETTINGS$SAVING:o.ONBOARDING$NEXT)})]})]})}function we({backend:e,isConnected:t,lastError:n}){let{t:r}=a(`openhands`);if(t===!0)return(0,q.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-connected`,className:b(`flex items-start gap-3 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3`),children:[(0,q.jsx)(h,{className:`mt-0.5 size-5 shrink-0 text-green-400`}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium text-green-200`,children:r(o.ONBOARDING$BACKEND_CONNECTED_TITLE)}),(0,q.jsx)(`span`,{className:`text-xs text-green-200/80`,children:r(o.ONBOARDING$BACKEND_CONNECTED_BODY)})]})]});if(t===!1){let i=j(r,e,{isConnected:t,lastError:n});return(0,q.jsxs)(`div`,{role:`alert`,"data-testid":`onboarding-backend-disconnected`,className:`flex items-start gap-3 rounded-xl border border-red-500/40 bg-red-500/10 px-4 py-3`,children:[(0,q.jsx)(de,{className:`mt-0.5 size-5 shrink-0 text-red-400`}),(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium text-red-200`,children:i}),(0,q.jsx)(`span`,{className:`text-xs text-red-200/80`,children:r(o.ONBOARDING$BACKEND_DISCONNECTED_BODY)})]})]})}return(0,q.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-checking`,className:`flex items-start gap-3 rounded-xl border border-white/10 bg-white/5 px-4 py-3`,children:[(0,q.jsx)(g,{className:`mt-0.5 size-5 shrink-0 animate-spin text-[var(--oh-text-tertiary)]`}),(0,q.jsx)(`span`,{className:`text-sm text-[var(--oh-text-tertiary)]`,children:r(o.ONBOARDING$BACKEND_CHECKING)})]})}function Te({onBack:e,onNext:t,onClose:n}){let{t:r}=a(`openhands`),{active:i,addBackend:s,setActive:c,updateBackend:l}=u(),{trackBackendAdded:d}=L(),{backend:f}=i,p=E(f),m=S(),h=m!==null&&!p&&!(f.kind===`cloud`&&x(f.host,m)),g=p||h,_=K.useMemo(()=>C(),[]),v=g?{id:`onboarding-local-backend-draft`,name:w,host:_.baseUrl,apiKey:_.sessionApiKey,kind:`local`}:f,y=D(p?[]:[f]),O=g?null:y[f.id]?.isConnected??null,k=g?null:y[f.id]?.lastError??null,[j,N]=K.useState(!1);K.useEffect(()=>{O===!0&&N(!1)},[O]);let P=O===!0&&!j,F=K.useCallback((e,r)=>{if(p)s(e);else{let t=e.host!==f.host;l(f.id,e),t&&i.orgId!==null&&c(f.id,null)}d({backendKind:e.kind,connectionMethod:r,hasApiKey:!!e.apiKey,source:`onboarding`}),m!==null&&e.kind===`cloud`&&n?n():t()},[i.orgId,s,f.host,f.id,m,p,n,t,c,d,l]),R=b(`sticky bottom-0 mt-2 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,e?`justify-between`:`justify-end`);return(0,q.jsxs)(`div`,{"data-testid":`onboarding-step-check-backend`,className:`flex flex-col gap-6`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:r(g?m?o.ONBOARDING$LOGIN_TO_CLOUD_TITLE:o.BACKEND$ADD_TITLE:o.ONBOARDING$BACKEND_TITLE)}),g?null:(0,q.jsx)(`p`,{"data-testid":`onboarding-backend-subtitle`,className:`text-sm text-[var(--oh-muted)]`,children:r(o.ONBOARDING$BACKEND_SUBTITLE)})]}),g?null:(0,q.jsx)(we,{backend:v,isConnected:O,lastError:k}),O===!0?(0,q.jsxs)(`button`,{type:`button`,onClick:()=>N(e=>!e),"aria-expanded":j,"data-testid":`onboarding-backend-show-configuration`,className:`flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2`,children:[(0,q.jsx)(`span`,{children:r(j?o.ONBOARDING$BACKEND_HIDE_CONFIGURATION:o.ONBOARDING$BACKEND_SHOW_CONFIGURATION)}),(0,q.jsx)(A,{className:b(`h-4 w-4 shrink-0 text-muted transition-transform`,j&&`rotate-180`),"aria-hidden":!0})]}):null,(0,q.jsx)(`div`,{"data-testid":`onboarding-backend-configuration-fields`,children:P?null:(0,q.jsx)(M,{onConnected:F,testIdRoot:`onboarding-backend`,initialManualBackend:v,requireManualApiKey:T(),manualSubmitLabel:r(o.ONBOARDING$NEXT),manualSubmittingLabel:r(o.SETTINGS$SAVING),manualSubmitTestId:`onboarding-backend-next`,analyticsSource:`onboarding`})}),P?(0,q.jsxs)(`div`,{className:R,children:[e?(0,q.jsx)(I,{testId:`onboarding-backend-back`,type:`button`,variant:`secondary`,onClick:e,children:r(o.ONBOARDING$BACK)}):null,(0,q.jsx)(I,{testId:`onboarding-backend-next`,type:`button`,variant:`primary`,onClick:t,children:r(o.ONBOARDING$NEXT)})]}):null]})}var Y=U;function X(){let e=re(),t=ie();return(0,K.useCallback)(async n=>{try{await e.mutateAsync({name:Y,profile:n});let r=(await H.getProfile(Y)).profile.id;r&&await t.mutateAsync(r)}catch(e){console.error(`Failed to configure onboarding agent profile:`,e)}},[e,t])}var Ee=`openai/gpt-5.5`;function De({onBack:e,onNext:t}){let{t:n}=a(`openhands`),{backend:r}=l(),i=r.kind===`local`,s=v(),c=_(),u=X(),[d,f]=K.useState(null),[p,m]=K.useState(!1),h=K.useCallback(async()=>{if(!i||!d)return null;let e=d.values,t=typeof e[`llm.model`]==`string`?e[`llm.model`]:``;if(!t)return null;let n=typeof e[`llm.api_key`]==`string`?e[`llm.api_key`]:``,r=typeof e[`llm.base_url`]==`string`?e[`llm.base_url`]:``,a=ne(t),o={model:t};n&&(o.api_key=n),r&&(o.base_url=r);try{return await s.mutateAsync({name:a,request:{llm:o,include_secrets:!0}}),await c.mutateAsync(a),a}catch(e){return console.error(`Failed to persist onboarding LLM as profile:`,e),null}},[i,d,s,c]),g=K.useCallback(async()=>{m(!0);try{let e=await h();e&&await u({agent_kind:`openhands`,llm_profile_ref:e})}finally{m(!1),t()}},[h,u,t]);return(0,q.jsxs)(`div`,{"data-testid":`onboarding-step-setup-llm`,className:`flex flex-col gap-6 max-h-[calc(90vh-7rem)]`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:n(o.ONBOARDING$LLM_TITLE)}),(0,q.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(o.ONBOARDING$LLM_SUBTITLE)})]}),(0,q.jsx)(`div`,{"data-testid":`onboarding-llm-settings`,className:`flex min-h-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always`,children:(0,q.jsx)(y,{embedded:!0,hideSaveButton:!0,suppressSuccessToast:!0,initialValueOverrides:{"llm.model":Ee},onSaveSuccess:g,onSaveControlChange:f})}),(0,q.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,q.jsx)(I,{testId:`onboarding-llm-back`,type:`button`,variant:`secondary`,onClick:e,children:n(o.ONBOARDING$BACK)}),(0,q.jsx)(I,{testId:`onboarding-llm-next`,type:`button`,variant:`primary`,isDisabled:(d?.isSaving??!1)||p,onClick:()=>{if(d?.isDirty){d.save();return}t()},children:n(o.ONBOARDING$NEXT)})]})]})}function Oe({providerKey:e,isActive:t,onBack:n,onNext:r}){let{t:i}=a(`openhands`),s=l(),{status:c,isChecking:u}=se(e,{enabled:t}),{fields:d,values:f,setValue:p,secretExists:m,hasValueFor:h,conflicts:g,consumesFileCredentials:_,save:v,isSaving:y}=le(e),b=X(),x=R(e)??e,S=c===`authenticated`,C=ke(s.backend.kind,c),w=S||d.some(e=>e.secret&&(!e.multiline||_)&&h(e.name)),T=C&&!w,E=y||T||u&&!w;return(0,q.jsxs)(`div`,{"data-testid":`onboarding-step-setup-acp-secrets`,className:`flex flex-col gap-6`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,q.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:i(o.ONBOARDING$ACP_SECRETS_TITLE)}),(0,q.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:i(o.ONBOARDING$ACP_SECRETS_SUBTITLE,{provider:x})}),C&&!S?(0,q.jsx)(`p`,{"data-testid":`onboarding-acp-secrets-required-note`,className:`text-sm text-[var(--oh-muted)]`,children:i(o.ONBOARDING$ACP_SECRETS_REQUIRED_NOTE,{provider:x})}):c!==`authenticated`&&(0,q.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:i(o.ONBOARDING$ACP_SECRETS_SUBSCRIPTION_NOTE)})]}),(0,q.jsx)(oe,{status:c,isChecking:u,providerName:x,testIdPrefix:`onboarding-acp-auth`}),(0,q.jsx)(`div`,{className:`flex flex-col gap-5`,children:d.map(e=>(0,q.jsx)(ce,{field:e,value:f[e.name]??``,onChange:t=>p(e.name,t),alreadySet:m(e.name),testId:`onboarding-acp-secret-${e.name}`,showOptionalTag:!0},e.name))}),(0,q.jsx)(ae,{conflicts:g}),T?(0,q.jsx)(`p`,{"data-testid":`onboarding-acp-secrets-blocked`,className:`text-sm text-amber-300`,children:i(o.ONBOARDING$ACP_SECRETS_REQUIRED_BLOCKED)}):null,(0,q.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,q.jsx)(I,{testId:`onboarding-acp-secrets-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:y,children:i(o.ONBOARDING$BACK)}),(0,q.jsx)(I,{testId:`onboarding-acp-secrets-next`,type:`button`,variant:`primary`,isDisabled:E,onClick:async()=>{await v()&&(e!==`openhands`&&await b({agent_kind:`acp`,acp_server:e,acp_model:V(e)??void 0}),r())},children:i(y?o.SETTINGS$SAVING:o.ONBOARDING$NEXT)})]})]})}function ke(e,t){return t===`authenticated`?!1:e===`cloud`?!0:t===`unauthenticated`}function Ae({onBack:e,onClose:t,onLaunched:n}){let{t:r}=a(`openhands`),{navigate:s}=O(),{backend:c}=l(),u=c.kind!==`cloud`,d=r(o.ONBOARDING$HELLO_DEFAULT_MESSAGE),[f,m]=K.useState(d),{mutate:h,isPending:g,isSuccess:_}=W(),v=i(),y=g||_||v,b=K.useRef(!1),x=f.trim().length>0&&!y&&!b.current,S=()=>{!x||b.current||(b.current=!0,h({query:f.trim(),entryPoint:`onboarding_say_hello`},{onSuccess:e=>{s(`/conversations/${e.conversation_id}`),n()},onError:()=>{b.current=!1}}))};return(0,q.jsxs)(`div`,{"data-testid":`onboarding-step-say-hello`,className:`flex max-h-[calc(90vh-7rem)] flex-col`,children:[(0,q.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-2`,children:[(0,q.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:r(o.ONBOARDING$HELLO_TITLE)}),(0,q.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:r(o.ONBOARDING$HELLO_SUBTITLE)})]}),(0,q.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),S()},"data-testid":`onboarding-hello-input-form`,className:`mt-6 box-border flex w-full shrink-0 flex-col items-start justify-center rounded-[15px] border border-[var(--oh-border)] bg-surface-raised p-4`,children:[(0,q.jsx)(`div`,{className:`relative w-full`,children:(0,q.jsx)(`div`,{className:`box-border flex w-full shrink-0 flex-row items-end justify-between gap-2 p-0 pb-[18px]`,children:(0,q.jsx)(`input`,{"data-testid":`onboarding-hello-input`,"aria-label":r(o.ONBOARDING$HELLO_TITLE),type:`text`,value:f,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),S())},placeholder:d,disabled:y,className:`min-h-[20px] w-full flex-1 bg-transparent text-[16px] font-normal leading-[20px] text-white outline-none placeholder:text-[var(--oh-text-tertiary)] disabled:cursor-not-allowed disabled:opacity-50`})})}),(0,q.jsx)(`div`,{className:`flex w-full min-w-0 items-center justify-end gap-2`,children:(0,q.jsx)(p,{buttonClassName:``,handleSubmit:S,disabled:!x})})]}),u?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{"data-testid":`onboarding-hello-or-separator`,className:`mt-6 flex w-full items-center gap-3`,children:[(0,q.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`}),(0,q.jsx)(`span`,{className:`text-xs uppercase text-[var(--oh-muted)]`,children:r(o.LANDING$OR)}),(0,q.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`})]}),(0,q.jsx)(`div`,{"data-testid":`onboarding-recommended-automations`,className:`flex min-h-0 flex-1 flex-col`,children:(0,q.jsx)(ue,{onLaunched:n,scrollableGrid:!0})})]}):null,(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 bg-base-secondary pt-7 pb-7`,children:[(0,q.jsx)(I,{testId:`onboarding-hello-back`,type:`button`,variant:`secondary`,onClick:e,isDisabled:y,children:r(o.ONBOARDING$BACK)}),(0,q.jsx)(I,{testId:`onboarding-hello-close`,type:`button`,variant:`secondary`,onClick:t,isDisabled:y,children:r(o.BUTTON$CLOSE)})]})]})}var je=t({OnboardingModal:()=>Ne}),Z=[`backend`,`agent`,`setup`,`hello`],Me=[`agent`,`setup`,`hello`],Q=`openhands-onboarding-started`;function $({index:e,currentStep:t,children:n}){let r=e===t,i=(e-t)*100;return(0,q.jsx)(`div`,{"data-testid":`onboarding-slide-${e}`,"data-active":r,"aria-hidden":!r,style:{transform:`translateX(${i}%)`},className:b(`w-full transition-transform duration-300 ease-out`,!r&&`pointer-events-none absolute inset-0`),children:n})}function Ne({onClose:e,initialStep:t=0,isPreview:n=!1}){let{t:r}=a(`openhands`),{data:i}=ee(),s=i?.user_consents_to_analytics===!0,{trackOnboardingStarted:c,trackOnboardingStepViewed:l,trackOnboardingCompleted:d,trackOnboardingSkipped:f}=L(),{active:p}=u(),{backend:m}=p,h=E(m),g=D(h?[]:[m]),_=S(),v=_!==null&&m.kind===`cloud`&&x(m.host,_),y=!h&&g[m.id]?.isConnected===!0&&(_===null||v),C=y?Me:Z,[w,T]=K.useState(()=>Z[Math.min(Math.max(t,0),Z.length-1)]),[O,k]=K.useState(`openhands`);K.useEffect(()=>{C.includes(w)||T(C[0])},[w,C]);let A=C.length,j=C.includes(w)?w:C[0],M=C.indexOf(j),I=h||g[m.id]?.isConnected!==void 0,R=O===`openhands`,z=M===0&&S()!==null,B=K.useCallback(()=>{T(e=>{let t=C,n=t.indexOf(e);return t[Math.min((n===-1?0:n)+1,t.length-1)]})},[C]),V=K.useCallback(()=>{T(e=>{let t=C,n=t.indexOf(e);return t[Math.max((n===-1?0:n)-1,0)]})},[C]),H=K.useRef(!1);K.useEffect(()=>{n||!s||H.current||window.sessionStorage.getItem(Q)||(H.current=!0,window.sessionStorage.setItem(Q,`1`),c())},[n,s]);let U=K.useRef(null);K.useEffect(()=>{n||!s||!I||U.current!==j&&(U.current=j,l({step:j,stepIndex:M,totalSteps:A,agent:O}))},[n,s,I,j,M,A,O]);let W=()=>{d({agent:O}),e()},G=()=>{f({step:j,stepIndex:M,totalSteps:A,agent:O}),e()};return(0,q.jsx)(N,{"aria-label":r(o.ONBOARDING$TITLE),children:(0,q.jsxs)(`div`,{className:`relative flex flex-col items-center gap-4`,children:[(0,q.jsxs)(`section`,{"data-testid":`onboarding-modal`,"data-current-step":M,"data-preview":n?`true`:void 0,className:b(`flex flex-col gap-6 overflow-hidden rounded-2xl border border-white/10 bg-base-secondary shadow-2xl`,P(`lg`),F,`max-h-[90vh]`),children:[(0,q.jsx)(`header`,{className:`flex flex-col gap-3 px-7 pt-7 shrink-0`,children:(0,q.jsx)(ye,{currentStep:M,totalSteps:A})}),(0,q.jsx)(`div`,{"data-testid":`onboarding-scroll-area`,className:`flex-1 min-h-0 overflow-y-auto custom-scrollbar-always px-7`,children:(0,q.jsxs)(`div`,{"data-testid":`onboarding-slide-rail`,"data-current-step":M,className:`relative overflow-clip`,children:[y?null:(0,q.jsx)($,{index:C.indexOf(`backend`),currentStep:M,children:(0,q.jsx)(Te,{onNext:B,onClose:e})}),(0,q.jsx)($,{index:C.indexOf(`agent`),currentStep:M,children:(0,q.jsx)(Ce,{selectedAgentId:O,onSelect:k,onBack:y?void 0:V,onNext:B})}),(0,q.jsx)($,{index:C.indexOf(`setup`),currentStep:M,children:R?(0,q.jsx)(De,{onBack:V,onNext:B}):(0,q.jsx)(Oe,{providerKey:O,isActive:j===`setup`,onBack:V,onNext:B})}),(0,q.jsx)($,{index:C.indexOf(`hello`),currentStep:M,children:(0,q.jsx)(Ae,{onBack:V,onClose:G,onLaunched:W})})]})})]}),M<A-1&&!z?(0,q.jsx)(`button`,{type:`button`,"data-testid":`onboarding-skip`,onClick:G,className:`rounded-md px-3 py-2 text-sm text-[var(--oh-muted)] transition-colors hover:bg-white/5 hover:text-white cursor-pointer`,children:r(o.ONBOARDING$SKIP)}):null]})})}export{je as n,J as r,Ne as t};
|
package/build/assets/{organization-service.api-Da2jiuBS.js → organization-service.api-CvfQugOt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{y as e}from"./agent-server-compatibility-DMY0CihN.js";import{S as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js";import{t as n}from"./proxy-DnnDqkwn.js";function r(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function i(t){if(t)return t;let n=e().backend;if(n.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return n}async function a(e){return r(await n({backend:i(e),method:`GET`,path:`/api/organizations`}))}async function o(e){let r=i(e);try{return{orgId:(await n({backend:r,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(e instanceof t&&e.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function s(e,t){let r=await n({backend:i(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:r?.org_id??e,userId:r?.user_id??``,role:r?.role??null,permissions:Array.isArray(r?.permissions)?r.permissions:null}}export{a as n,o as r,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{a as n,o as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{u as i}from"./suspense-DmZ3MSSh.js";import{n as a}from"./useQuery-D5pEZbY0.js";import{t as o}from"./createLucideIcon-D4Tak8A1.js";import{
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{a as n,o as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{u as i}from"./suspense-DmZ3MSSh.js";import{n as a}from"./useQuery-D5pEZbY0.js";import{t as o}from"./createLucideIcon-D4Tak8A1.js";import{p as s,y as c}from"./agent-server-compatibility-DMY0CihN.js";import{_ as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{r as u,t as d}from"./agent-server-conversation-service.api-CI5-xmIX.js";var f=class extends i{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:i}=e,a=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=i.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:n(t,i.data),hasPreviousPage:r(t,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function p(e,t){return a(e,f,t)}var m=o(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),h=async e=>{let t=(await d.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},g=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:r}=await h(e);if(c().backend.kind===`cloud`){if(!r)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await u(r),{success:!0}}return new l(s({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},_=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await h(e);return new l(s({conversationUrl:n,sessionApiKey:r})).askAgent(e,t)},v=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await h(e);await new l(s({conversationUrl:n,sessionApiKey:r})).startGoal(e,t)},y=async e=>{let{conversationUrl:t,sessionApiKey:n}=await h(e);await new l(s({conversationUrl:t,sessionApiKey:n})).stopGoal(e)},b=async e=>{let{conversationUrl:t,sessionApiKey:n}=await h(e);await new l(s({conversationUrl:t,sessionApiKey:n})).resumeGoal(e)},x=async e=>{let{conversationUrl:t,sessionApiKey:n}=await h(e);return new l(s({conversationUrl:t,sessionApiKey:n})).runConversation(e)},S=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},C=(e,t,n)=>S(e,t,{execution_status:n}),w=(e,t,n)=>S(e,t,{llm_model:n}),T=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})};e();var E=t(),D=e=>(0,E.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,E.jsx)(`path`,{d:`M21.0004 6.00001C21.0016 5.43668 20.8441 4.88442 20.5459 4.40644C20.2478 3.92846 19.8212 3.54406 19.3148 3.29726C18.8084 3.05046 18.2428 2.95122 17.6826 3.0109C17.1224 3.07059 16.5904 3.28678 16.1474 3.63473C15.7044 3.98269 15.3683 4.44835 15.1776 4.97841C14.9869 5.50848 14.9493 6.08152 15.0691 6.63197C15.1888 7.18241 15.4612 7.688 15.8549 8.09088C16.2487 8.49375 16.7479 8.77762 17.2954 8.91001V10.5C17.2978 10.6372 17.261 10.7722 17.1892 10.8891C17.1175 11.006 17.0138 11.1 16.8904 11.16L12.7354 13.32L8.59544 11.22C8.46356 11.1544 8.35443 11.0507 8.28221 10.9223C8.21 10.7939 8.17802 10.6468 8.19044 10.5V8.91001C8.89743 8.72746 9.51358 8.29333 9.92339 7.689C10.3332 7.08467 10.5085 6.35161 10.4165 5.62725C10.3245 4.90289 9.97149 4.23695 9.42361 3.75426C8.87573 3.27157 8.17062 3.00527 7.44044 3.00527C6.71026 3.00527 6.00514 3.27157 5.45726 3.75426C4.90938 4.23695 4.55635 4.90289 4.46435 5.62725C4.37234 6.35161 4.54768 7.08467 4.95749 7.689C5.36729 8.29333 5.98344 8.72746 6.69044 8.91001V10.5C6.6913 10.9156 6.80651 11.323 7.02346 11.6776C7.24041 12.0321 7.55073 12.3201 7.92044 12.51L12.0004 14.61V16.59C11.2934 16.7726 10.6773 17.2067 10.2675 17.811C9.85768 18.4153 9.68234 19.1484 9.77435 19.8728C9.86635 20.5971 10.2194 21.2631 10.7673 21.7457C11.3151 22.2284 12.0203 22.4947 12.7504 22.4947C13.4806 22.4947 14.1857 22.2284 14.7336 21.7457C15.2815 21.2631 15.6345 20.5971 15.7265 19.8728C15.8185 19.1484 15.6432 18.4153 15.2334 17.811C14.8236 17.2067 14.2074 16.7726 13.5004 16.59V14.61L17.5504 12.57C17.9317 12.3784 18.2501 12.0816 18.468 11.7148C18.686 11.348 18.7944 10.9265 18.7804 10.5V8.88001C19.4147 8.70922 19.9755 8.33496 20.3765 7.81469C20.7776 7.29442 20.9967 6.6569 21.0004 6.00001ZM6.00044 6.00001C6.00044 5.60218 6.15847 5.22065 6.43978 4.93934C6.72108 4.65804 7.10261 4.5 7.50044 4.5C7.89826 4.5 8.27979 4.65804 8.5611 4.93934C8.8424 5.22065 9.00044 5.60218 9.00044 6.00001C9.00044 6.39783 8.8424 6.77936 8.5611 7.06067C8.27979 7.34197 7.89826 7.50001 7.50044 7.50001C7.10261 7.50001 6.72108 7.34197 6.43978 7.06067C6.15847 6.77936 6.00044 6.39783 6.00044 6.00001ZM14.2054 19.5C14.2054 19.8978 14.0474 20.2794 13.7661 20.5607C13.4848 20.842 13.1033 21 12.7054 21C12.3076 21 11.9261 20.842 11.6448 20.5607C11.3635 20.2794 11.2054 19.8978 11.2054 19.5C11.2054 19.1022 11.3635 18.7207 11.6448 18.4393C11.9261 18.158 12.3076 18 12.7054 18C13.1033 18 13.4848 18.158 13.7661 18.4393C14.0474 18.7207 14.2054 19.1022 14.2054 19.5ZM18.0004 7.50001C17.6026 7.50001 17.2211 7.34197 16.9398 7.06067C16.6585 6.77936 16.5004 6.39783 16.5004 6.00001C16.5004 5.60218 16.6585 5.22065 16.9398 4.93934C17.2211 4.65804 17.6026 4.5 18.0004 4.5C18.3983 4.5 18.7798 4.65804 19.0611 4.93934C19.3424 5.22065 19.5004 5.60218 19.5004 6.00001C19.5004 6.39783 19.3424 6.77936 19.0611 7.06067C18.7798 7.34197 18.3983 7.50001 18.0004 7.50001Z`,fill:`currentColor`})}),O=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e},k=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n};export{T as a,x as c,y as d,C as f,p as h,_ as i,b as l,m,O as n,S as o,w as p,D as r,g as s,k as t,v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./utils-CrRpzbM2.js";var i=e(t(),1);function a(e){let[t,n]=(0,i.useState)(!0),[r,a]=(0,i.useState)(!0),o=(0,i.useRef)(0),s=(0,i.useCallback)(e=>e.scrollTop+e.clientHeight>=e.scrollHeight-20,[]),c=(0,i.useCallback)(e=>{let t=s(e);a(t);let r=e.scrollTop,i=r<o.current;o.current=r,i&&n(!1),t&&n(!0)},[s]);return{scrollRef:e,autoScroll:t,setAutoScroll:n,scrollDomToBottom:(0,i.useCallback)(()=>{let t=e.current;t&&requestAnimationFrame(()=>{n(!0),a(!0),t.scrollTop=t.scrollHeight})},[e]),hitBottom:r,setHitBottom:a,onChatBodyScroll:c}}var o=n();function s(e){return{h1:({children:t,className:n})=>(0,o.jsx)(`h1`,{className:r(`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,o.jsx)(`h2`,{className:r(`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,o.jsx)(`h3`,{className:r(`text-sm font-semibold text-white mb-1 mt-2 first:mt-0`,n,e),children:t}),h4:({children:t,className:n})=>(0,o.jsx)(`h4`,{className:r(`text-sm font-semibold text-white mb-1 mt-2 first:mt-0`,n,e),children:t}),h5:({children:t,className:n})=>(0,o.jsx)(`h5`,{className:r(`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,o.jsx)(`h6`,{className:r(`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,o.jsx)(`p`,{className:r(`py-2.5 first:pt-0 last:pb-0`,n,e),children:t}),ul:({children:t,className:n})=>(0,o.jsx)(`ul`,{className:r(`list-disc ml-5 pl-2 whitespace-normal`,n,e),children:t}),ol:({children:t,className:n,start:i})=>(0,o.jsx)(`ol`,{className:r(`list-decimal ml-5 pl-2 whitespace-normal`,n,e),start:i,children:t}),li:({children:t,className:n})=>(0,o.jsx)(`li`,{className:r(n,e),children:t}),a:({children:t,className:n,href:i})=>(0,o.jsx)(`a`,{className:r(`text-blue-500 hover:underline`,n,e),href:i,target:`_blank`,rel:`noopener noreferrer`,children:t}),code:({children:t,className:n})=>(0,o.jsx)(`code`,{className:r(`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 c=s();export{c as n,a as r,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CHm_6BRr.js";import{t as i}from"./declaration-_yumYLEx.js";import{t as a}from"./list-todo-6J6zc8oS.js";import{t as o}from"./conversation-store-CyVqoa0d.js";import{t as s}from"./brand-button-BulEFHr3.js";import{t as c}from"./use-handle-plan-click-DDZkew9p.js";import{t as l}from"./markdown-renderer-BlaJOAI2.js";import{n as u,r as d}from"./plan-components-qkMiGs_-.js";import{t as f}from"./conversation-tab-empty-state-2KYlk5Bh.js";var p=e(t(),1),m=n();function h(){let{t:e}=r(`openhands`),{scrollRef:t,onChatBodyScroll:n,autoScroll:h,scrollDomToBottom:g}=d(p.useRef(null)),{planContent:_,conversationMode:v}=o();p.useEffect(()=>{h&&g()},[_,h,g]);let y=v===`plan`,{handlePlanClick:b}=c();return _==null?(0,m.jsx)(f,{icon:(0,m.jsx)(a,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),action:(0,m.jsx)(s,{type:`button`,variant:`secondary`,onClick:b,isDisabled:y,className:`min-w-40 justify-center px-6`,children:e(i.COMMON$CREATE_A_PLAN)}),children:e(i.PLANNER$EMPTY_MESSAGE)}):(0,m.jsx)(`div`,{ref:t,onScroll:e=>n(e.currentTarget),className:`flex flex-col w-full h-full p-4 overflow-auto`,children:(0,m.jsx)(l,{includeStandard:!0,components:u,children:_})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,y as t}from"./agent-server-compatibility-DMY0CihN.js";import{l as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";function r(){return t().backend.kind===`cloud`}function i(){return new n(e())}var a=class{static async listInstalledPlugins(){if(r())return[];try{return(await i().listInstalledPlugins()).plugins??[]}catch{return[]}}static async installPlugin(e){if(r())throw Error(`Installing plugins is only available on a local backend.`);return i().installPlugin(e)}static async setPluginEnabled(e,t){if(r())throw Error(`Enabling and disabling plugins is only available on a local backend.`);return i().setPluginEnabled(e,t)}static async uninstallPlugin(e){if(r())throw Error(`Uninstalling plugins is only available on a local backend.`);return i().uninstallPlugin(e)}static async refreshPlugin(e){if(r())throw Error(`Refreshing plugins is only available on a local backend.`);return i().refreshPlugin(e)}};export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-D4Tak8A1.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e,y as t}from"./agent-server-compatibility-DMY0CihN.js";import{f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{t as r}from"./proxy-DnnDqkwn.js";var i=`/api/v1/settings/profiles`;function a(){let{backend:e,orgId:n}=t();if(e.kind!==`cloud`)throw Error(`Cloud profiles call requires a cloud backend.`);return{backend:e,base:n?`/api/organizations/${encodeURIComponent(n)}/profiles`:i}}async function o(){let{backend:e,base:t}=a();return r({backend:e,method:`GET`,path:t})}async function s(e){let{backend:t,base:n}=a(),i=await r({backend:t,method:`GET`,path:`${n}/${encodeURIComponent(e)}`});return{name:i.name,config:i.config??i.llm??{},api_key_set:i.api_key_set??!1}}async function c(e,t){let{backend:n,base:i}=a();return r({backend:n,method:`POST`,path:`${i}/${encodeURIComponent(e)}`,body:t})}async function l(e){let{backend:t,base:n}=a();return r({backend:t,method:`DELETE`,path:`${n}/${encodeURIComponent(e)}`})}async function u(e,t){let{backend:n,base:i}=a();return r({backend:n,method:`POST`,path:`${i}/${encodeURIComponent(e)}/rename`,body:{new_name:t}})}async function d(e){let{backend:t,base:n}=a(),i=await r({backend:t,method:`POST`,path:`${n}/${encodeURIComponent(e)}/activate`,body:{}});return{name:i.name,message:i.message,llm_applied:i.model!=null||i.llm!=null}}function f(){return t().backend.kind===`cloud`}var p=class{static async listProfiles(){return f()?o():new n(e()).listProfiles()}static async getProfile(t,r){if(f())return s(t);let i=r?{exposeSecrets:r}:{};return new n(e()).getProfile(t,i)}static async saveProfile(t,r){return f()?c(t,r):new n(e()).saveProfile(t,r)}static async deleteProfile(t){return f()?l(t):new n(e()).deleteProfile(t)}static async renameProfile(t,r){return f()?u(t,r):new n(e()).renameProfile(t,r)}static async activateProfile(t){return f()?d(t):new n(e()).activateProfile(t)}};export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{n as i}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{n as i}from"./declaration-_yumYLEx.js";import{F as a,L as o,N as s,P as c,_ as l,h as u,m as d,t as f}from"./active-backend-context-Cd1qcZsb.js";import{t as p}from"./utils-CrRpzbM2.js";import{c as m,n as h,r as g}from"./telemetry-CC32dJYW.js";import{n as _,t as v}from"./agent-server-ui-style-scope-BvSa9on7.js";var y=e(t());function b({i18n:e,defaultNS:t,children:n}){let r=(0,y.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,y.createElement)(i.Provider,{value:r},n)}var x=`posthog_bootstrap`;function S(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.distinctID==`string`&&typeof t.sessionID==`string`}function C(){if(typeof window>`u`||typeof sessionStorage>`u`)return;let e=new URLSearchParams(window.location.hash.slice(1)),t=e.get(`distinct_id`),n=e.get(`session_id`);if(t&&n){let e={distinctID:t,sessionID:n};try{sessionStorage.setItem(x,JSON.stringify(e))}catch{}try{window.history.replaceState(null,``,window.location.pathname+window.location.search)}catch{}return e}try{let e=sessionStorage.getItem(x);if(!e)return;sessionStorage.removeItem(x);let t=JSON.parse(e);return S(t)?t:void 0}catch{try{sessionStorage.removeItem(x)}catch{}return}}function w({children:e,config:t={}}){let n=y.useRef(!1),r=t!==!1,i=t===!1?void 0:t.apiKey,a=t===!1?void 0:t.apiHost,o=t===!1?void 0:t.uiHost;return y.useLayoutEffect(()=>{g(r?{apiKey:i,apiHost:a,uiHost:o}:!1),n.current||=(h(C()),!0)},[r,a,i,o]),y.useEffect(()=>{r&&m().catch(()=>{})},[r,a,i,o]),e}var T=n();function E({children:e,theme:t=_,className:n,style:r,styleOverrides:i,contentClassName:a,...o}){let s=y.useMemo(()=>({...v,...i,...r}),[r,i]);return(0,T.jsx)(`div`,{"data-agent-server-ui":``,...o,className:n,style:s,children:(0,T.jsx)(`div`,{className:p(t,a,`text-foreground`),"data-theme":t,children:e})})}var D={provider:`posthog`};function O({children:e,queryClient:t,analytics:n,i18n:i,className:p,contentClassName:m,style:h,styleOverrides:g,theme:_,withStyleRoot:v=!0}){let x=y.useMemo(()=>t??d(),[t]),S=y.useMemo(()=>i??c(),[i]),C=y.useRef(null);C.current||={queryClient:u(),i18n:a()},l(x),o(S),y.useEffect(()=>()=>{C.current&&(l(C.current.queryClient),o(C.current.i18n))},[]);let D=(0,T.jsx)(w,{config:n&&n.provider===`posthog`?{apiKey:n.apiKey,apiHost:n.apiHost,uiHost:n.uiHost}:!1,children:e});return(0,T.jsx)(b,{i18n:S,defaultNS:s,children:(0,T.jsx)(r,{client:x,children:(0,T.jsx)(f,{children:v?(0,T.jsx)(E,{className:p,contentClassName:m,style:h,styleOverrides:g,theme:_,children:D}):D})})})}export{D as n,E as r,O as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M as e,P as t,f as n,y as r}from"./agent-server-compatibility-DMY0CihN.js";import{t as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";function a(e){if(e)return e;let t=r().backend;if(t.kind!==`cloud`)throw Error(`Cloud calls require a cloud backend.`);return t}function o(e){let t=r();return t.backend.id===e.id?t.orgId:null}function s(n){let r=a(n),s=e(),c=s?t():{};return new i({host:r.host,apiKey:r.apiKey,orgId:o(r),timeout:3e4,...s?{proxy:{host:s,headers:c}}:{}})}function c(e){let t=s(e);if(!t.proxy)throw new n;return t}async function l(e){return(e.hostOverride?c(e.backend):s(e.backend)).request({method:e.method,path:e.path,body:e.body,headers:e.headers,timeoutSeconds:e.timeoutSeconds,hostOverride:e.hostOverride,authMode:e.authMode===void 0||e.authMode===`bearer`?`bearer`:e.authMode,sessionApiKey:e.sessionApiKey,responseType:e.responseType})}export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-D4Tak8A1.js";var t=e(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]);export{t};
|