@openhands/agent-canvas 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-C921BlYB.js → acp-providers-BkL3HWa3.js} +1 -1
- package/build/assets/active-backend-context-BBvP-bI2.js +2 -0
- package/build/assets/agent-context-settings-Bno1nwPL.js +1 -0
- package/build/assets/{agent-profiles-settings-BymJf3EP.js → agent-profiles-settings-DqoS7RL3.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-0RztSdJJ.js +86 -0
- package/build/assets/agent-settings-BJHryp65.js +1 -0
- package/build/assets/{agent-settings-WzqXk6B4.js → agent-settings-h8hQz-IU.js} +2 -2
- package/build/assets/alert-banner-lrK-2_0Y.js +1 -0
- package/build/assets/{api-key-entry-screen-DI0I04O3.js → api-key-entry-screen-Qsb83VX1.js} +1 -1
- package/build/assets/{app-settings-DGistSFV.js → app-settings-r1RUbgGi.js} +1 -1
- package/build/assets/automation-detail-7LkL91j9.js +3 -0
- package/build/assets/automation-export-U2QNyNy6.js +2 -0
- package/build/assets/automation-setup-route-Bel9_Lue.js +1 -0
- package/build/assets/automation-templates-CRLDssaI.js +1 -0
- package/build/assets/automations-list-B2iV3ZKW.js +1 -0
- package/build/assets/{back-nav-button-D4ngzpSh.js → back-nav-button-B3pYwmUJ.js} +1 -1
- package/build/assets/backend-form-modal-OroTqnAv.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BnzI8Ysj.js → backend-synced-settings-badge-DB4717Iu.js} +1 -1
- package/build/assets/{badge-1Mf1iPcX.js → badge-yR53enbU.js} +1 -1
- package/build/assets/{base-modal-BBuy0WQQ.js → base-modal-3NmIOKDm.js} +1 -1
- package/build/assets/bot-DuN83i3p.js +1 -0
- package/build/assets/{brand-button-DGN6Y9o6.js → brand-button-CJcwjnfb.js} +1 -1
- package/build/assets/{browser-D_ekTlTS.js → browser--eoQOo4M.js} +2 -2
- package/build/assets/{browser-tab-D4a4Ou_w.js → browser-tab-A94o33Vn.js} +1 -1
- package/build/assets/{chat-send-button-CgbcjD97.js → chat-send-button-B8n6-DQA.js} +1 -1
- package/build/assets/check-DLOKoFU9.js +1 -0
- package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
- package/build/assets/chevron-down-CnIbtM6i.js +1 -0
- package/build/assets/circle-check-CxCYJrpZ.js +1 -0
- package/build/assets/{circle-plus-check-toggle-yTAS-nX3.js → circle-plus-check-toggle-BVzv5EkZ.js} +1 -1
- package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CEOl5Gxr.js → cloud-funnel-analytics-CBQdPZl_.js} +1 -1
- package/build/assets/{combobox-caret-Bd2yySnF.js → combobox-caret-BlmRwiM8.js} +1 -1
- package/build/assets/command-menu-PsRXVBz2.js +1 -0
- package/build/assets/condenser-settings-w7L3EFvm.js +1 -0
- package/build/assets/{confirmation-modal-NCUPr2-O.js → confirmation-modal-DAH0XtOp.js} +1 -1
- package/build/assets/context-menu-list-item-BQhmFVEK.js +1 -0
- package/build/assets/{conversation-CUJ0Vo8g.js → conversation-BUzBZAc-.js} +7 -7
- package/build/assets/conversation-panel-pzAKsSDb.js +1 -0
- package/build/assets/conversation-pzAKsSDb.js +1 -0
- package/build/assets/{conversation-state-store-F62HvuI1.js → conversation-state-store-Bs8gA263.js} +1 -1
- package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-BCZ7rUMH.js → conversation-tab-empty-state-C9sfDOlt.js} +1 -1
- package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-D_Lp6-Fl.js → copy-to-clipboard-button-DatoElj8.js} +1 -1
- package/build/assets/{device-verify-DLmolX8Q.js → device-verify-BIjXeW9N.js} +1 -1
- package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
- package/build/assets/{dropdown-classes-BB8rzqXL.js → dropdown-classes-zFW7qPSK.js} +1 -1
- package/build/assets/entry.client-DzbDyLkV.js +2 -0
- package/build/assets/enum-filter-dropdown-CctILg5t.js +1 -0
- package/build/assets/{environment-switch-overlay-BepBBX66.js → environment-switch-overlay-Cvmo6clk.js} +1 -1
- package/build/assets/{extensions-hub-R3KNv-5V.js → extensions-hub-DOmHPGTA.js} +1 -1
- package/build/assets/{extensions-navigation-CfWFmI1I.js → extensions-navigation-6zU5M1pa.js} +1 -1
- package/build/assets/{external-link-BdBSg8rk.js → external-link-zWbg5KXS.js} +1 -1
- package/build/assets/file-text-RecuaId_.js +1 -0
- package/build/assets/files-tab-BzofBmF4.js +1 -0
- package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
- package/build/assets/{form-control-classes-DAfsCJTe.js → form-control-classes-DLN3Qgub.js} +1 -1
- package/build/assets/format-relative-time-DGPQlPx0.js +1 -0
- package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
- package/build/assets/{git-provider-icon-BZqqUPlm.js → git-provider-icon-BLMlwy02.js} +1 -1
- package/build/assets/{git-repo-dropdown-DEpOwUez.js → git-repo-dropdown-B7RvO70z.js} +1 -1
- package/build/assets/git-repo-dropdown-B_PTq4ol.js +1 -0
- package/build/assets/{highlighted-source-view-CX9oIoVT.js → highlighted-source-view-CgJfD5VT.js} +1 -1
- package/build/assets/home-DEZaZqYv.js +1 -0
- package/build/assets/home-r89Vj2td.js +1 -0
- package/build/assets/{home-store-Ch1ErdBc.js → home-store-D7CjMN_-.js} +1 -1
- package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
- package/build/assets/index-home-r89Vj2td.js +1 -0
- package/build/assets/install-server-modal-BTwK5lbi.js +1 -0
- package/build/assets/kebab-menu-item-content-C4CkeiJO.js +1 -0
- package/build/assets/{launch-B1POpHuP.js → launch-DVlx4v9o.js} +1 -1
- package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
- package/build/assets/{list-todo-DtiL3lTp.js → list-todo-CheUtB7F.js} +1 -1
- package/build/assets/llm-not-configured-banner-CwKu8C6g.js +27 -0
- package/build/assets/llm-settings-BJotLQND.js +1 -0
- package/build/assets/llm-settings-CDM-5H2A.js +1 -0
- package/build/assets/{llm-subscription-service-DBJbfd8Z.js → llm-subscription-service-7eVfDIE1.js} +1 -1
- package/build/assets/loader-circle-C5AnEN8r.js +1 -0
- package/build/assets/{loading-spinner-DfZ_bhV7.js → loading-spinner-CN3riY7k.js} +1 -1
- package/build/assets/{manage-backends-modal-CwyWsiag.js → manage-backends-modal-HNWKLYhq.js} +1 -1
- package/build/assets/manifest-2a36a8f8.js +1 -0
- package/build/assets/manifest-subpage-layout-D-m-h8_t.js +1 -0
- package/build/assets/map-provider-7Bp2aih5.js +1 -0
- package/build/assets/markdown-renderer-BiiiIznl.js +8 -0
- package/build/assets/mcp-gLgPP7AS.js +9 -0
- package/build/assets/mcp-marketplace-utils-Dr_HG_ol.js +1 -0
- package/build/assets/messages-D1cbVhRK.js +40 -0
- package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
- package/build/assets/{modal-body-CMsDpalT.js → modal-body-duRaxj_K.js} +1 -1
- package/build/assets/{modal-classes-B6PDrxXo.js → modal-classes-CLEXO6dj.js} +1 -1
- package/build/assets/{modal-close-button-DyxBZaAb.js → modal-close-button-D0aT02hs.js} +1 -1
- package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
- package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
- package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
- package/build/assets/npm-DRzJF5Zn.js +1 -0
- package/build/assets/onboarding-DSr8hOpk.js +1 -0
- package/build/assets/onboarding-modal-C6Euf7N4.js +1 -0
- package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
- package/build/assets/{organization-service.api-UDy63-oC.js → organization-service.api-C4GYWwj9.js} +1 -1
- package/build/assets/{pencil-BjgtZmWp.js → pencil-Bl3GWhgq.js} +1 -1
- package/build/assets/{planner-tab-BWk8885v.js → planner-tab-CZcguxTK.js} +1 -1
- package/build/assets/{plugins-management-service-CjkgF2dd.js → plugins-management-service-BmDzOQsd.js} +1 -1
- package/build/assets/plus-CtzlyAoF.js +1 -0
- package/build/assets/{profiles-service.api-CukSFLzz.js → profiles-service.api-CoLTwjc1.js} +1 -1
- package/build/assets/{providers-CqUWC85T.js → providers-tBzTpz1w.js} +1 -1
- package/build/assets/{proxy-BBUG3sd2.js → proxy-DCI9S-LA.js} +1 -1
- package/build/assets/{puzzle-BoNc6zZ8.js → puzzle-B3v361yY.js} +1 -1
- package/build/assets/recommended-automations-launcher-BbJAJVED.js +1 -0
- package/build/assets/{refresh-cw-BrM5ZAZD.js → refresh-cw-B9GhC3QC.js} +1 -1
- package/build/assets/root-BfM_kC_d.css +1 -0
- package/build/assets/root-gstBEjty.js +2 -0
- package/build/assets/root-layout-BIAFLP9p.js +2 -0
- package/build/assets/{schema-field-nImDoY6-.js → schema-field-zhsVDllR.js} +1 -1
- package/build/assets/{sdk-section-page-BxMrtUNV.js → sdk-section-page-CS4GWn0y.js} +1 -1
- package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
- package/build/assets/search-CYaiKHRp.js +1 -0
- package/build/assets/{secrets-service-Dhjh3HhH.js → secrets-service-DjgGduXk.js} +1 -1
- package/build/assets/{secrets-settings-CPdxceT_.js → secrets-settings-f-qahfbi.js} +1 -1
- package/build/assets/{segmented-toggle-Do6oyepX.js → segmented-toggle-SmvsR3jW.js} +1 -1
- package/build/assets/settings-CWFxymAf.js +1 -0
- package/build/assets/settings-DQd0xLEw.js +1 -0
- package/build/assets/{settings-dropdown-input-DYCULKpp.js → settings-dropdown-input-TWIeiG02.js} +1 -1
- package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
- package/build/assets/{settings-index-C9o2NBO0.js → settings-index-BVwy9JEp.js} +1 -1
- package/build/assets/{settings-input-B-q2gkVy.js → settings-input-D61Vzp9e.js} +1 -1
- package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
- package/build/assets/{settings-list-classes-WpQi0q1L.js → settings-list-classes-sE0ASr1s.js} +1 -1
- package/build/assets/{settings-modal-CEK0AIx6.js → settings-modal-D6D5ngET.js} +1 -1
- package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
- package/build/assets/settings-service.api-DZp7E7A9.js +1 -0
- package/build/assets/{settings-switch-LqKdGxHL.js → settings-switch-Drt-rF5s.js} +1 -1
- package/build/assets/{settings-utils-BL_Z9uIe.js → settings-utils-gw2ppAvw.js} +1 -1
- package/build/assets/{shared-conversation-Bu-dQlgp.js → shared-conversation-DIxZjElr.js} +1 -1
- package/build/assets/shield-check-D2cpEpv3.js +1 -0
- package/build/assets/{sidebar-layout-oHBGQmLh.js → sidebar-layout-Dxg6zc2K.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-OoZBHxaT.js +1 -0
- package/build/assets/{sidebar-nav-link-CrujNA09.js → sidebar-nav-link-CxLoG-dG.js} +1 -1
- package/build/assets/sidebar-store-BJeYY-E9.js +1 -0
- package/build/assets/{skill-card-pill-row-CZBI7OqH.js → skill-card-pill-row-B_BYBONu.js} +1 -1
- package/build/assets/{skill-icon-badge-BOov_phZ.js → skill-icon-badge-CN41Hy9l.js} +1 -1
- package/build/assets/skill-scope-B1Per5XI.js +1 -0
- package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
- package/build/assets/{skills-plugins-D0PiHWAD.js → skills-plugins-B3AO6sMz.js} +1 -1
- package/build/assets/skills-settings-DmmgJ6CT.js +2 -0
- package/build/assets/sparkles-g7y3r-Ut.js +1 -0
- package/build/assets/{styled-tooltip-C7grwnOX.js → styled-tooltip-C5C07RQC.js} +1 -1
- package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
- package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
- package/build/assets/{task-list-tab-R3ac6m7O.js → task-list-tab-C19Q_JNf.js} +1 -1
- package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
- package/build/assets/{terminal-yqkNdEAx.js → terminal-CbuMRYal.js} +1 -1
- package/build/assets/{toggle-switch-BeSrbgCg.js → toggle-switch-CIioisto.js} +1 -1
- package/build/assets/{trash-2-wW5TWcdN.js → trash-2-CzDVN-Iw.js} +1 -1
- package/build/assets/{typography-iYhzLlHO.js → typography-D9tiHct7.js} +1 -1
- package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
- package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
- package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
- package/build/assets/{use-acp-credential-form-DUxbxmbq.js → use-acp-credential-form-DJmmJKMo.js} +1 -1
- package/build/assets/{use-activate-agent-profile-CDHA52tC.js → use-activate-agent-profile-CeFfYwu_.js} +1 -1
- package/build/assets/{use-agent-profiles-TsOdIyw5.js → use-agent-profiles-BHLkLbRR.js} +1 -1
- package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-Bt1M71u5.js → use-can-manage-org-profiles-Bu4y8gSx.js} +1 -1
- package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-DWt7HCgf.js → use-cloud-current-user-id-QD9x3ySO.js} +1 -1
- package/build/assets/{use-config-CxlEdf_v.js → use-config-CPwqciXN.js} +1 -1
- package/build/assets/{use-create-conversation-nOJ6Um5h.js → use-create-conversation-DWaSVUOB.js} +1 -1
- package/build/assets/{use-create-secret-Dj5ang9x.js → use-create-secret-BsOfOLvg.js} +1 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
- package/build/assets/{use-is-creating-conversation-CAggrM75.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
- package/build/assets/use-llm-profiles-CU8ah1pz.js +1 -0
- package/build/assets/use-manifest-capabilities-DBYPjyV6.js +1 -0
- package/build/assets/{use-onboarding-completion-gxQlcEy2.js → use-onboarding-completion-CtNJxkXG.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CVO7sXYR.js → use-plugins-marketplace-ZEA-gyM9.js} +1 -1
- package/build/assets/use-save-agent-profile-DgI_Uz9a.js +1 -0
- package/build/assets/{use-save-settings-L3aMaDeS.js → use-save-settings-pSjRhD_m.js} +1 -1
- package/build/assets/{use-settings-8nt3DGxW.js → use-settings-BHWsOcIG.js} +1 -1
- package/build/assets/use-settings-nav-items-CQgkxUbV.js +16 -0
- package/build/assets/use-tracking-CGCsBWhg.js +3 -0
- package/build/assets/{use-user-conversation-BIIpGUgM.js → use-user-conversation-DRfEU8x0.js} +1 -1
- package/build/assets/{useInfiniteQuery-BLRVmVPU.js → useInfiniteQuery-DbCv0Jzd.js} +1 -1
- package/build/assets/{useMutation-CaSHLnX0.js → useMutation-ChpkYxI5.js} +1 -1
- package/build/assets/{useQueries--d_WWAzc.js → useQueries-Cjv3E8_1.js} +1 -1
- package/build/assets/useQuery-BCnzy4LX.js +1 -0
- package/build/assets/utils-DPQfkd-7.js +1 -0
- package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
- package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
- package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
- package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
- package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
- package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
- package/build/assets/{vendor~entry.client-BcYIVQvB.js → vendor~entry.client-zSIea5EO.js} +2 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
- package/build/assets/{vendor~files-tab-C7RmQJwN.js → vendor~files-tab-C87pjSpi.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
- package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
- package/build/assets/vendor~module-DyG7x7JT.js +2 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js → vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~dufan6ng-Dtdw8H0q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +162 -54
- package/build/assets/{verification-settings-DBsnSXC3.js → verification-settings-BItwt998.js} +1 -1
- package/build/assets/wrench-B1_H-tL1.js +1 -0
- package/build/assets/x-RYDBg-e2.js +1 -0
- package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
- package/build/assets/zap-tbKDzCe3.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +108 -5
- package/build/locales/ca/openhands.json +108 -5
- package/build/locales/de/openhands.json +108 -5
- package/build/locales/en/openhands.json +108 -5
- package/build/locales/es/openhands.json +108 -5
- package/build/locales/fr/openhands.json +108 -5
- package/build/locales/it/openhands.json +108 -5
- package/build/locales/ja/openhands.json +108 -5
- package/build/locales/ko-KR/openhands.json +108 -5
- package/build/locales/no/openhands.json +108 -5
- package/build/locales/pt/openhands.json +108 -5
- package/build/locales/tr/openhands.json +108 -5
- package/build/locales/uk/openhands.json +108 -5
- package/build/locales/zh-CN/openhands.json +108 -5
- package/build/locales/zh-TW/openhands.json +108 -5
- package/build/mockServiceWorker.js +21 -9
- package/config/defaults.json +3 -3
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +32 -5
- package/dist/api/agent-server-adapter.js +120 -91
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +5 -0
- package/dist/api/automation-service/automation-service.api.js +11 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.js +36 -31
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/url-selection.cjs +2 -0
- package/dist/api/backend-registry/url-selection.cjs.map +1 -0
- package/dist/api/backend-registry/url-selection.d.ts +31 -0
- package/dist/api/backend-registry/url-selection.js +29 -0
- package/dist/api/backend-registry/url-selection.js.map +1 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +19 -2
- package/dist/api/cloud/conversation-service.api.js +51 -47
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/conversation-file-upload.api.cjs +1 -1
- package/dist/api/conversation-file-upload.api.js +10 -10
- 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 +55 -61
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.js +12 -12
- package/dist/api/launch-child-conversation-client-tool.cjs +47 -0
- package/dist/api/launch-child-conversation-client-tool.cjs.map +1 -0
- package/dist/api/launch-child-conversation-client-tool.d.ts +3 -0
- package/dist/api/launch-child-conversation-client-tool.js +93 -0
- package/dist/api/launch-child-conversation-client-tool.js.map +1 -0
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
- package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
- package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
- 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 +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/open-hands.types.d.ts +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 +10 -0
- package/dist/api/settings-service/settings-service.api.js +90 -100
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.js +1 -0
- package/dist/api/skills-service.js.map +1 -1
- package/dist/api/workspace-upload-path.cjs +1 -1
- package/dist/api/workspace-upload-path.js +8 -8
- package/dist/assets/chevron-left.d.ts +1 -1
- package/dist/assets/chevron-right.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +24 -18
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +5 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +2 -2
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +11 -7
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/alerts/alert-banner.d.ts +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
- package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
- package/dist/components/features/automations/automation-card.d.ts +9 -1
- package/dist/components/features/automations/automation-group.d.ts +9 -1
- package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
- package/dist/components/features/automations/automation-list-row.d.ts +3 -1
- package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
- package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
- package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
- package/dist/components/features/automations/create-instructions.d.ts +2 -2
- package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
- package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
- package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
- package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
- package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
- package/dist/components/features/automations/detail/back-link.d.ts +1 -1
- package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/config-field.d.ts +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
- package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
- package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
- package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
- package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
- package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
- package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
- package/dist/components/features/automations/detail/section-card.d.ts +1 -1
- package/dist/components/features/automations/empty-state.d.ts +1 -1
- package/dist/components/features/automations/error-state.d.ts +1 -1
- package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu.d.ts +1 -1
- package/dist/components/features/automations/metadata-chip.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-section.d.ts +1 -1
- package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
- package/dist/components/features/automations/search-input.d.ts +1 -1
- package/dist/components/features/automations/status-badge.d.ts +1 -1
- package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
- package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
- package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
- package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
- package/dist/components/features/backends/backend-row.d.ts +1 -1
- package/dist/components/features/backends/backend-selector.d.ts +2 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
- package/dist/components/features/backends/backend-version.d.ts +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +1 -1
- package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
- package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
- package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
- package/dist/components/features/browser/browser.d.ts +1 -1
- package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
- package/dist/components/features/chat/btw-messages.d.ts +1 -1
- package/dist/components/features/chat/change-agent-button.d.ts +2 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
- package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
- package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.d.ts +2 -1
- package/dist/components/features/chat/chat-message.d.ts +1 -1
- package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
- package/dist/components/features/chat/chat-play-button.d.ts +1 -1
- package/dist/components/features/chat/chat-send-button.d.ts +1 -1
- package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
- package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
- package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
- package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
- package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
- package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
- package/dist/components/features/chat/drag-over.d.ts +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +2 -1
- package/dist/components/features/chat/error-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar.d.ts +1 -1
- package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
- package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
- package/dist/components/features/chat/goal-status-content.d.ts +1 -1
- package/dist/components/features/chat/got-it-button.d.ts +1 -1
- package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
- package/dist/components/features/chat/model-messages.d.ts +2 -1
- package/dist/components/features/chat/mono-component.d.ts +1 -1
- package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
- package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
- package/dist/components/features/chat/path-component.d.ts +1 -1
- package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
- package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
- package/dist/components/features/chat/plan-preview.d.ts +1 -1
- package/dist/components/features/chat/remove-file-button.d.ts +1 -1
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
- package/dist/components/features/chat/success-indicator.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
- package/dist/components/features/chat/typing-indicator.d.ts +1 -1
- package/dist/components/features/chat/uploaded-file.d.ts +1 -1
- package/dist/components/features/chat/uploaded-files.d.ts +1 -1
- package/dist/components/features/chat/uploaded-image.d.ts +2 -1
- package/dist/components/features/chat/user-message-body.d.ts +2 -2
- package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
- package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
- package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-loading.d.ts +1 -1
- package/dist/components/features/controls/agent-status.d.ts +1 -1
- package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
- package/dist/components/features/controls/macros-submenu.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
- package/dist/components/features/controls/server-status.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
- package/dist/components/features/controls/tools.d.ts +2 -1
- package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name.d.ts +2 -1
- package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
- package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
- package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
- package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
- package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -2
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +3 -9
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +48 -51
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.d.ts +12 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.js +6 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-meta-chip.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +16 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +95 -78
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.js +40 -38
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +14 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +167 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +63 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +66 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.d.ts +15 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.js +117 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-icons.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/no-repository.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.js +30 -19
- package/dist/components/features/conversation-panel/conversation-card/no-repository.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +7 -2
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +146 -104
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +20 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +53 -27
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +169 -155
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
- package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
- package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
- package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
- package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
- package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
- package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
- package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
- package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
- package/dist/components/features/files/file-item.d.ts +1 -1
- package/dist/components/features/files/file-list.d.ts +2 -1
- package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
- package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
- package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
- package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
- package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +1 -1
- package/dist/components/features/files-tab/tree-node.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
- package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
- package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
- package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
- package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
- package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
- package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
- package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
- package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header.d.ts +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
- package/dist/components/features/home/new-conversation.d.ts +1 -1
- package/dist/components/features/home/open-launcher-button.d.ts +1 -1
- package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
- package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
- package/dist/components/features/home/repo-selection-form.d.ts +2 -1
- package/dist/components/features/home/shared/clear-button.d.ts +2 -1
- package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
- package/dist/components/features/home/shared/empty-state.d.ts +2 -1
- package/dist/components/features/home/shared/error-message.d.ts +2 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
- package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
- package/dist/components/features/home/tasks/task-card.d.ts +1 -1
- package/dist/components/features/home/tasks/task-group.d.ts +1 -1
- package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
- package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
- package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
- package/dist/components/features/images/image-carousel.d.ts +2 -1
- package/dist/components/features/images/image-preview.d.ts +1 -1
- package/dist/components/features/images/thumbnail.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
- package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +1 -1
- package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
- package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
- package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-setup-dialog.d.ts +1 -1
- package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
- package/dist/components/features/markdown/anchor.d.ts +1 -1
- package/dist/components/features/markdown/blockquote.d.ts +1 -1
- package/dist/components/features/markdown/code.d.ts +1 -1
- package/dist/components/features/markdown/headings.d.ts +6 -6
- package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
- package/dist/components/features/markdown/list.d.ts +3 -3
- package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
- package/dist/components/features/markdown/paragraph.d.ts +1 -1
- package/dist/components/features/markdown/plan-components.d.ts +36 -36
- package/dist/components/features/markdown/table.d.ts +3 -3
- package/dist/components/features/mcp-logo-badge.d.ts +1 -1
- 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.d.ts +2 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
- 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 +2 -1
- package/dist/components/features/mcp-page/install-server-modal.js +117 -118
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
- package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
- package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
- package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
- package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
- package/dist/components/features/plugins/plugin-card.d.ts +2 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
- package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
- package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
- package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
- package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
- package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
- package/dist/components/features/settings/agent-canvas-update-card.cjs +1 -1
- package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -1
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +10 -5
- package/dist/components/features/settings/agent-canvas-update-card.js +223 -149
- package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -1
- package/dist/components/features/settings/agent-canvas-version-modal.cjs +2 -0
- package/dist/components/features/settings/agent-canvas-version-modal.cjs.map +1 -0
- package/dist/components/features/settings/agent-canvas-version-modal.d.ts +11 -0
- package/dist/components/features/settings/agent-canvas-version-modal.js +166 -0
- package/dist/components/features/settings/agent-canvas-version-modal.js.map +1 -0
- package/dist/components/features/settings/agent-canvas-version-tile.cjs +2 -0
- package/dist/components/features/settings/agent-canvas-version-tile.cjs.map +1 -0
- package/dist/components/features/settings/agent-canvas-version-tile.d.ts +13 -0
- package/dist/components/features/settings/agent-canvas-version-tile.js +60 -0
- package/dist/components/features/settings/agent-canvas-version-tile.js.map +1 -0
- package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
- package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
- package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
- package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
- package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
- package/dist/components/features/settings/banner-message.d.ts +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
- package/dist/components/features/settings/input-skeleton.d.ts +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
- package/dist/components/features/settings/key-status-icon.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
- package/dist/components/features/settings/mobile-header.d.ts +1 -1
- package/dist/components/features/settings/optional-tag.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
- package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.js +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
- package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
- package/dist/components/features/settings/settings-layout.d.ts +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.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.js +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
- package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
- package/dist/components/features/settings/settings-navigation.d.ts +1 -1
- package/dist/components/features/settings/settings-switch.d.ts +1 -1
- package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
- package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
- package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
- package/dist/components/features/settings/upgrade-button.d.ts +1 -1
- package/dist/components/features/sidebar/avatar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +109 -108
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.d.ts +2 -1
- package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
- package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
- package/dist/components/features/skills/extensions-mobile-hub.d.ts +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.d.ts +1 -1
- package/dist/components/features/skills/extensions-navigation.js +9 -9
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
- package/dist/components/features/skills/skill-card.d.ts +2 -1
- package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
- package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
- package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
- package/dist/components/features/skills/skill-filter.d.ts +34 -0
- package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
- package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
- package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
- package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
- package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.d.ts +1 -1
- package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
- package/dist/components/features/terminal/terminal.d.ts +1 -1
- package/dist/components/features/tips/random-tip.d.ts +2 -1
- package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
- package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
- package/dist/components/providers/telemetry-provider.d.ts +1 -1
- package/dist/components/shared/action-tooltip.d.ts +1 -1
- package/dist/components/shared/agent-brand-icon.d.ts +1 -1
- package/dist/components/shared/badge.d.ts +1 -1
- package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
- package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
- package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
- package/dist/components/shared/buttons/modal-button.d.ts +1 -1
- package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +1 -1
- package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
- package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/git-provider-icon.d.ts +1 -1
- package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
- package/dist/components/shared/loading-spinner.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
- package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
- package/dist/components/shared/modals/modal-body.d.ts +1 -1
- package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
- package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
- package/dist/components/shared/navigation-link.cjs +1 -1
- package/dist/components/shared/navigation-link.cjs.map +1 -1
- package/dist/components/shared/navigation-link.js +11 -7
- package/dist/components/shared/navigation-link.js.map +1 -1
- package/dist/components/shared/risk-alert.d.ts +1 -1
- package/dist/components/shared/text-shimmer.d.ts +1 -1
- package/dist/components/ui/resize-handle.d.ts +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/child-conversation.cjs +2 -0
- package/dist/constants/child-conversation.cjs.map +1 -0
- package/dist/constants/child-conversation.d.ts +29 -0
- package/dist/constants/child-conversation.js +6 -0
- package/dist/constants/child-conversation.js.map +1 -0
- package/dist/context/navigation-context.d.ts +1 -1
- package/dist/context/scroll-context.d.ts +1 -1
- package/dist/contexts/active-backend-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.js +189 -188
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/contexts/settings-section-header-context.d.ts +1 -1
- package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
- package/dist/fixtures/home-automations-demo.d.ts +19 -0
- package/dist/hooks/chat/use-model-interceptor.cjs +1 -1
- package/dist/hooks/chat/use-model-interceptor.js +6 -6
- package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
- package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +6 -6
- 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.d.ts +2 -7
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.js +8 -4
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.d.ts +1 -1
- package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
- package/dist/hooks/query/use-app-installations.d.ts +1 -1
- package/dist/hooks/query/use-automation-detail.d.ts +2 -2
- package/dist/hooks/query/use-automation-health.d.ts +2 -0
- package/dist/hooks/query/use-automations.d.ts +5 -1
- package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
- package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
- package/dist/hooks/query/use-commit-changes.d.ts +1 -1
- package/dist/hooks/query/use-config.d.ts +1 -1
- package/dist/hooks/query/use-conversation-history.d.ts +1 -1
- package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
- package/dist/hooks/query/use-get-secrets.d.ts +1 -1
- package/dist/hooks/query/use-home-automations.d.ts +20 -0
- package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
- package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
- package/dist/hooks/query/use-local-git-info.d.ts +1 -1
- package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
- package/dist/hooks/query/use-manifest-capabilities.d.ts +2 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
- package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
- package/dist/hooks/query/use-provider-models.d.ts +1 -1
- package/dist/hooks/query/use-search-branches.d.ts +1 -1
- package/dist/hooks/query/use-search-providers.d.ts +1 -1
- package/dist/hooks/query/use-search-repositories.d.ts +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
- package/dist/hooks/query/use-settings.d.ts +2 -2
- package/dist/hooks/query/use-skills.d.ts +1 -1
- package/dist/hooks/query/use-start-tasks.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
- package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +2 -2
- package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
- package/dist/hooks/query/use-user-conversation.d.ts +1 -1
- package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
- package/dist/hooks/use-backend-scoped-path.cjs +2 -0
- package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
- package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
- package/dist/hooks/use-backend-scoped-path.js +13 -0
- package/dist/hooks/use-backend-scoped-path.js.map +1 -0
- package/dist/hooks/use-home-automation-actions.d.ts +23 -0
- package/dist/hooks/use-home-pinned-automations.d.ts +26 -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 +4 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +105 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1813 -62
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/code-pill.d.ts +1 -1
- package/dist/icons/docker.cjs +2 -0
- package/dist/icons/docker.cjs.map +1 -0
- package/dist/icons/docker.js +19 -0
- package/dist/icons/docker.js.map +1 -0
- package/dist/icons/npm.cjs +2 -0
- package/dist/icons/npm.cjs.map +1 -0
- package/dist/icons/npm.js +19 -0
- package/dist/icons/npm.js.map +1 -0
- package/dist/locales/ar/openhands.json +108 -5
- package/dist/locales/ca/openhands.json +108 -5
- package/dist/locales/de/openhands.json +108 -5
- package/dist/locales/en/openhands.json +108 -5
- package/dist/locales/es/openhands.json +108 -5
- package/dist/locales/fr/openhands.json +108 -5
- package/dist/locales/it/openhands.json +108 -5
- package/dist/locales/ja/openhands.json +108 -5
- package/dist/locales/ko-KR/openhands.json +108 -5
- package/dist/locales/no/openhands.json +108 -5
- package/dist/locales/pt/openhands.json +108 -5
- package/dist/locales/tr/openhands.json +108 -5
- package/dist/locales/uk/openhands.json +108 -5
- package/dist/locales/zh-CN/openhands.json +108 -5
- package/dist/locales/zh-TW/openhands.json +108 -5
- package/dist/manifests/automation-insights.d.ts +64 -0
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +33 -1
- package/dist/manifests/automation-interface.js +2 -1
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/manifests/interface-validation.cjs +1 -1
- package/dist/manifests/interface-validation.cjs.map +1 -1
- package/dist/manifests/interface-validation.js +228 -50
- package/dist/manifests/interface-validation.js.map +1 -1
- package/dist/manifests/manifest-template.d.ts +2 -0
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +128 -0
- package/dist/manifests/types.js +35 -2
- package/dist/manifests/types.js.map +1 -1
- package/dist/mockServiceWorker.js +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +6 -4
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +126 -5
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +161 -53
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +112 -50
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
- package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/briefcase.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/building-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-arrow-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-user-round.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-cog.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/earth.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/flag.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-git-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/folder-key.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.js +30 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-pull-request.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.js +35 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/hash.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/house.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.js +33 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/id-card.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/key-round.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link-2.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/mails.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/messages-square.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/plug.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/square-kanban.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ticket.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/users-round.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/waypoints.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/webhook.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/workflow.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/wrench.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/zap.js.map +1 -0
- package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
- package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
- package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +39 -35
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +3 -2
- package/dist/routes/app-settings.d.ts +2 -1
- package/dist/routes/browser-tab.d.ts +1 -1
- package/dist/routes/changes-tab.d.ts +2 -1
- package/dist/routes/commits-tab.d.ts +1 -1
- package/dist/routes/conversation.d.ts +2 -1
- package/dist/routes/files-tab.d.ts +1 -1
- package/dist/routes/llm-settings.d.ts +3 -2
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +2 -1
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/planner-tab.d.ts +2 -1
- package/dist/routes/secrets-settings.d.ts +2 -1
- package/dist/routes/task-list-tab.d.ts +1 -1
- package/dist/services/child-conversation-launch.cjs +2 -0
- package/dist/services/child-conversation-launch.cjs.map +1 -0
- package/dist/services/child-conversation-launch.d.ts +41 -0
- package/dist/services/child-conversation-launch.js +182 -0
- package/dist/services/child-conversation-launch.js.map +1 -0
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -7
- package/dist/services/settings.js.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +5 -1
- package/dist/stores/conversation-panel-preferences-store.js +8 -2
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/types/agent-server/core/base/action.d.ts +17 -1
- package/dist/types/agent-server/core/base/base.d.ts +2 -1
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +8 -1
- package/dist/types/agent-server/type-guards.js +4 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/automation.d.ts +30 -1
- package/dist/types/mcp-auth.cjs.map +1 -1
- package/dist/types/mcp-auth.d.ts +5 -41
- package/dist/types/mcp-auth.js.map +1 -1
- package/dist/types/mcp-server.d.ts +17 -32
- package/dist/types/settings.d.ts +8 -28
- package/dist/ui/card-title.d.ts +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/combobox-caret.d.ts +3 -3
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.ts +3 -2
- package/dist/ui/context-menu.js +10 -9
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/divider.d.ts +1 -1
- package/dist/ui/dropdown/clear-button.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
- package/dist/ui/dropdown/toggle-button.d.ts +1 -1
- package/dist/ui/help-link.d.ts +1 -1
- package/dist/ui/pre.d.ts +1 -1
- package/dist/ui/toggle-switch.d.ts +2 -2
- package/dist/ui/typography.d.ts +7 -7
- package/dist/utils/automation-activity-log-export.d.ts +17 -0
- package/dist/utils/automation-timeout.d.ts +4 -6
- package/dist/utils/custom-toast-handlers.cjs +1 -1
- package/dist/utils/custom-toast-handlers.cjs.map +1 -1
- package/dist/utils/custom-toast-handlers.d.ts +2 -2
- package/dist/utils/custom-toast-handlers.js +18 -1
- package/dist/utils/custom-toast-handlers.js.map +1 -1
- package/dist/utils/format-relative-time.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +12 -29
- package/dist/utils/mcp-config.js +161 -143
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.d.ts +2 -2
- package/dist/utils/mcp-installed-servers.js +21 -32
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs.map +1 -1
- package/dist/utils/mcp-server-health-key.d.ts +2 -4
- package/dist/utils/mcp-server-health-key.js.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
- package/dist/utils/settings-like-page-layout-classes.js +1 -1
- package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
- package/dist/utils/skill-category.d.ts +12 -0
- package/package.json +41 -35
- package/scripts/brand-dev-electron.mjs +244 -0
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +4 -0
- package/scripts/dev-safe.mjs +2 -2
- package/scripts/dev-with-automation.mjs +3 -2
- package/scripts/generate-icons.mjs +109 -0
- package/build/assets/Trans-Bwpzk1wT.js +0 -1
- package/build/assets/active-backend-context-BiwzkzDy.js +0 -2
- package/build/assets/agent-context-settings-DXNT_dcw.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CYSWw-2g.js +0 -41
- package/build/assets/agent-settings-BjgQQe-_.js +0 -1
- package/build/assets/alert-banner-DR8EVyZM.js +0 -1
- package/build/assets/api-error-message-e16L1kwH.js +0 -1
- package/build/assets/automation-detail-DY6x2FW1.js +0 -2
- package/build/assets/automation-export-C09f-Lua.js +0 -2
- package/build/assets/automation-setup-route-CqKp0717.js +0 -1
- package/build/assets/automations-list-CqWJ7qXW.js +0 -1
- package/build/assets/backend-form-modal-B8D5hBzK.js +0 -1
- package/build/assets/check-CPLXgluF.js +0 -1
- package/build/assets/chevron-down-CP4QHvyc.js +0 -1
- package/build/assets/circle-check-Dpy2_xSI.js +0 -1
- package/build/assets/command-menu-Bj6X4ckE.js +0 -1
- package/build/assets/condenser-settings-EAXQNR2E.js +0 -1
- package/build/assets/context-menu-list-item-CrCrYuPF.js +0 -1
- package/build/assets/conversation-BzyIcSwr.js +0 -1
- package/build/assets/conversation-panel-BzyIcSwr.js +0 -1
- package/build/assets/copy-DCmZtz6n.js +0 -1
- package/build/assets/entry.client-BbIYOsIg.js +0 -2
- package/build/assets/enum-filter-dropdown-C08-srev.js +0 -1
- package/build/assets/files-tab-DEq8MbHu.js +0 -1
- package/build/assets/format-time-delta-CxfPJpzC.js +0 -1
- package/build/assets/git-repo-dropdown-9WKINV6J.js +0 -1
- package/build/assets/home-CY0JaxiY.js +0 -1
- package/build/assets/home-CaNWlVvB.js +0 -1
- package/build/assets/index-home-CaNWlVvB.js +0 -1
- package/build/assets/info-CmWQXtRQ.js +0 -1
- package/build/assets/install-server-modal-BWrudmZU.js +0 -1
- package/build/assets/llm-not-configured-banner-3tMsM4K6.js +0 -27
- package/build/assets/llm-settings-CXo8iPNW.js +0 -1
- package/build/assets/llm-settings-D0W8mJDk.js +0 -1
- package/build/assets/loader-circle-B4QDBARx.js +0 -1
- package/build/assets/manifest-39f4789d.js +0 -1
- package/build/assets/map-provider-CXU6issd.js +0 -1
- package/build/assets/markdown-renderer-DgiLLhW6.js +0 -8
- package/build/assets/mcp-DXG9LWrI.js +0 -9
- package/build/assets/mcp-marketplace-utils-DFmhKc5s.js +0 -1
- package/build/assets/messages-kBjKaAeA.js +0 -40
- package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
- package/build/assets/onboarding-47hh2IHA.js +0 -1
- package/build/assets/onboarding-modal-9BuvvROo.js +0 -1
- package/build/assets/plus-DrKuuvMe.js +0 -1
- package/build/assets/recommended-automations-launcher-ejxy1P27.js +0 -1
- package/build/assets/root-5S-M8SYa.js +0 -2
- package/build/assets/root-DZ39lS5f.css +0 -1
- package/build/assets/root-layout-BPqoa0gv.js +0 -3
- package/build/assets/search-Dc2qR4O2.js +0 -1
- package/build/assets/settings-BRbnfKEm.js +0 -1
- package/build/assets/settings-Chfn5xTD.js +0 -1
- package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
- package/build/assets/settings-service.api-CZiPD8__.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-ND-hgygu.js +0 -1
- package/build/assets/sidebar-store-Bui-WNEr.js +0 -1
- package/build/assets/skills-settings-B43KArIz.js +0 -2
- package/build/assets/use-is-authed-BT7Iud4U.js +0 -1
- package/build/assets/use-llm-profiles-2Wc2db8u.js +0 -1
- package/build/assets/use-save-agent-profile-D0wC5ExW.js +0 -1
- package/build/assets/use-settings-nav-items-DHAAD-zk.js +0 -16
- package/build/assets/use-skills-CE6miQ3r.js +0 -1
- package/build/assets/use-tracking-BGboadaZ.js +0 -68
- package/build/assets/useQuery-DiPh8LRJ.js +0 -1
- package/build/assets/utils-BgGG1znF.js +0 -1
- package/build/assets/v4-DDdyfk2q.js +0 -1
- package/build/assets/vendor~browser-IVYgIgG1.js +0 -47
- package/build/assets/vendor~entry.client-CXM9oiAk.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js +0 -26
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js +0 -1
- package/build/assets/vendor~module-BZXjBMvd.js +0 -2
- package/build/assets/x-omAzpXkl.js +0 -1
- package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
- package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +0 -1
- package/dist/node_modules/void-elements/index.cjs +0 -2
- package/dist/node_modules/void-elements/index.cjs.map +0 -1
- package/dist/node_modules/void-elements/index.js +0 -25
- package/dist/node_modules/void-elements/index.js.map +0 -1
- /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js → vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{E as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{t as o,z as s}from"./utils-DPQfkd-7.js";import{t as c}from"./bot-DuN83i3p.js";import{t as l}from"./wrench-B1_H-tL1.js";import{a as u,i as d,n as f,r as p,t as m}from"./sidebar-store-BJeYY-E9.js";import{t as h}from"./list-todo-CheUtB7F.js";import{t as g}from"./search-CYaiKHRp.js";import{t as _}from"./shield-check-D2cpEpv3.js";import{t as v}from"./sparkles-g7y3r-Ut.js";import{t as y}from"./x-RYDBg-e2.js";import{t as b}from"./zap-tbKDzCe3.js";import{m as x,x as S}from"./use-tracking-CGCsBWhg.js";import{n as C}from"./navigation-context-CQZwH_tC.js";var w=a(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),T=a(`panels-top-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),E=e(n(),1),D=e(t(),1),O=r(),k=18,A={conversations:`/conversations`,customize:`/customize`,automations:x(),mcp:`/mcp`,settings:`/settings`,agentSettings:`/settings/agents`,llmSettings:`/settings/llm`,condenserSettings:`/settings/condenser`,verificationSettings:`/settings/verification`,appSettings:`/settings/app`,secretsSettings:`/settings/secrets`},j={navigation:s.COMMAND_MENU$GROUP_NAVIGATION,settings:s.COMMAND_MENU$GROUP_SETTINGS,actions:s.COMMAND_MENU$GROUP_ACTIONS},M=[`navigation`,`settings`,`actions`],N=({toggleSidebar:e})=>[{id:`new-chat`,group:`navigation`,titleKey:s.COMMAND_MENU$NEW_CHAT_TITLE,descriptionKey:s.COMMAND_MENU$NEW_CHAT_DESCRIPTION,keywordsKey:s.COMMAND_MENU$NEW_CHAT_KEYWORDS,icon:(0,O.jsx)(u,{size:k}),to:A.conversations},{id:`customize`,group:`navigation`,titleKey:s.COMMAND_MENU$CUSTOMIZE_TITLE,descriptionKey:s.COMMAND_MENU$CUSTOMIZE_DESCRIPTION,keywordsKey:s.COMMAND_MENU$CUSTOMIZE_KEYWORDS,icon:(0,O.jsx)(v,{size:k}),to:A.customize},{id:`automations`,group:`navigation`,titleKey:s.COMMAND_MENU$AUTOMATIONS_TITLE,descriptionKey:s.COMMAND_MENU$AUTOMATIONS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$AUTOMATIONS_KEYWORDS,title:S().commandMenuTitle??void 0,description:S().commandMenuDescription??void 0,keywords:S().commandMenuKeywords??void 0,icon:(0,O.jsx)(b,{size:k}),to:A.automations},{id:`mcp`,group:`navigation`,titleKey:s.COMMAND_MENU$MCP_TITLE,descriptionKey:s.COMMAND_MENU$MCP_DESCRIPTION,keywordsKey:s.COMMAND_MENU$MCP_KEYWORDS,icon:(0,O.jsx)(l,{size:k}),to:A.mcp},{id:`settings`,group:`settings`,titleKey:s.COMMAND_MENU$SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$SETTINGS_KEYWORDS,icon:(0,O.jsx)(p,{size:k}),to:A.settings},{id:`agent-settings`,group:`settings`,titleKey:s.COMMAND_MENU$AGENT_SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$AGENT_SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$AGENT_SETTINGS_KEYWORDS,icon:(0,O.jsx)(c,{size:k}),to:A.agentSettings},{id:`llm-settings`,group:`settings`,titleKey:s.COMMAND_MENU$LLM_SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$LLM_SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$LLM_SETTINGS_KEYWORDS,icon:(0,O.jsx)(g,{size:k}),to:A.llmSettings},{id:`condenser-settings`,group:`settings`,titleKey:s.COMMAND_MENU$CONDENSER_SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$CONDENSER_SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$CONDENSER_SETTINGS_KEYWORDS,icon:(0,O.jsx)(h,{size:k}),to:A.condenserSettings},{id:`verification-settings`,group:`settings`,titleKey:s.COMMAND_MENU$VERIFICATION_SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$VERIFICATION_SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$VERIFICATION_SETTINGS_KEYWORDS,icon:(0,O.jsx)(_,{size:k}),to:A.verificationSettings},{id:`app-settings`,group:`settings`,titleKey:s.COMMAND_MENU$APP_SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$APP_SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$APP_SETTINGS_KEYWORDS,icon:(0,O.jsx)(T,{size:k}),to:A.appSettings},{id:`secrets-settings`,group:`settings`,titleKey:s.COMMAND_MENU$SECRETS_SETTINGS_TITLE,descriptionKey:s.COMMAND_MENU$SECRETS_SETTINGS_DESCRIPTION,keywordsKey:s.COMMAND_MENU$SECRETS_SETTINGS_KEYWORDS,icon:(0,O.jsx)(d,{size:k}),to:A.secretsSettings},{id:`toggle-sidebar`,group:`actions`,titleKey:s.COMMAND_MENU$TOGGLE_SIDEBAR_TITLE,descriptionKey:s.COMMAND_MENU$TOGGLE_SIDEBAR_DESCRIPTION,keywordsKey:s.COMMAND_MENU$TOGGLE_SIDEBAR_KEYWORDS,icon:(0,O.jsx)(w,{size:k}),perform:e}],P=`command-menu-search`,F=`command-menu-results`,I=`command-menu-option`,L=`command-menu`,R=`k`,z=`ArrowDown`,B=`ArrowUp`,V=`Enter`,H=`Escape`,U=``,W=-1;function G(e){return`${I}-${e.id}`}function K({item:e,query:t,translate:n}){let r=t.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let i=[e.title??n(e.titleKey),e.description??n(e.descriptionKey),e.keywords??n(e.keywordsKey)].join(` `).toLocaleLowerCase();return r.every(e=>i.includes(e))}function q(){let{t:e}=i(`openhands`),{navigate:t}=C(),n=f(e=>e.isOpen),r=f(e=>e.open),a=f(e=>e.close),[c,l]=D.useState(U),[u,d]=D.useState(0),p=D.useRef(null),h=D.useRef(new Map);D.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===R&&(e.preventDefault(),r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),D.useEffect(()=>{if(!n){l(U),d(0),h.current.clear();return}let e=requestAnimationFrame(()=>p.current?.focus());return()=>cancelAnimationFrame(e)},[n]);let _=D.useMemo(()=>N({toggleSidebar:()=>m.getState().toggleCollapsed()}),[]),v=D.useMemo(()=>_.filter(t=>K({item:t,query:c,translate:t=>e(t)})),[_,c,e]);D.useEffect(()=>{d(e=>v.length===0?W:Math.min(Math.max(e,0),v.length-1))},[v.length]),D.useEffect(()=>{let e=v[u];if(!e)return;let t=h.current.get(e.id);typeof t?.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})},[u,v]);let b=D.useCallback(e=>{if(e){if(a(),e.to){t(e.to);return}e.perform?.()}},[a,t]),x=e=>{if(e.key===z){e.preventDefault(),d(e=>v.length===0?e:(e+1)%v.length);return}if(e.key===B){e.preventDefault(),d(e=>v.length===0?e:(e-1+v.length)%v.length);return}if(e.key===V){e.preventDefault(),b(v[u]);return}e.key===H&&(e.preventDefault(),a())};if(!n||typeof document>`u`)return null;let S=v[u];return(0,E.createPortal)((0,O.jsxs)(`div`,{className:`fixed inset-0 z-[70] flex items-start justify-center px-3 pt-[10vh] sm:px-6`,"data-testid":L,role:`dialog`,"aria-modal":`true`,"aria-label":e(s.COMMAND_MENU$ARIA_LABEL),children:[(0,O.jsx)(`button`,{type:`button`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,"aria-label":e(s.COMMAND_MENU$CLOSE_LABEL),onClick:a}),(0,O.jsxs)(`div`,{className:o(`relative flex max-h-[min(720px,78vh)] w-full max-w-2xl flex-col overflow-hidden rounded-2xl`,`border border-[var(--oh-border)] bg-[var(--oh-surface)]`,`shadow-[0_24px_90px_rgba(0,0,0,0.52),0_0_0_1px_rgba(255,255,255,0.03)_inset]`),children:[(0,O.jsxs)(`div`,{className:`relative flex items-center gap-3 border-b border-[var(--oh-border)] px-4 py-3`,children:[(0,O.jsx)(g,{className:`size-5 shrink-0 text-[var(--oh-text-dim)]`}),(0,O.jsx)(`input`,{ref:p,id:P,className:`h-11 min-w-0 flex-1 bg-transparent text-base text-white outline-none placeholder:text-[var(--oh-text-dim)]`,placeholder:e(s.COMMAND_MENU$PLACEHOLDER),"aria-label":e(s.COMMAND_MENU$SEARCH_LABEL),role:`combobox`,"aria-expanded":`true`,"aria-controls":F,"aria-activedescendant":S?G(S):void 0,value:c,onChange:e=>l(e.target.value),onKeyDown:x}),c?(0,O.jsx)(`button`,{type:`button`,className:`inline-flex size-8 items-center justify-center rounded-lg text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white`,"aria-label":e(s.COMMAND_MENU$CLEAR_SEARCH_LABEL),onClick:()=>{l(U),p.current?.focus()},children:(0,O.jsx)(y,{className:`size-4`})}):null,(0,O.jsx)(`kbd`,{className:`hidden rounded-md border border-[var(--oh-border)] bg-black/25 px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(s.COMMAND_MENU$SHORTCUT)})]}),(0,O.jsx)(`div`,{id:F,role:`listbox`,className:`relative min-h-0 flex-1 overflow-y-auto px-2 py-2 custom-scrollbar`,children:v.length===0?(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[(0,O.jsx)(`div`,{className:`flex size-11 items-center justify-center rounded-2xl border border-dashed border-[var(--oh-border)] text-[var(--oh-text-dim)]`,children:(0,O.jsx)(g,{className:`size-5`})}),(0,O.jsx)(`p`,{className:`text-sm font-medium text-white`,children:e(s.COMMAND_MENU$NO_RESULTS_TITLE)}),(0,O.jsx)(`p`,{className:`max-w-sm text-xs leading-5 text-[var(--oh-muted)]`,children:e(s.COMMAND_MENU$NO_RESULTS_DESCRIPTION)})]}):M.map(t=>{let n=v.filter(e=>e.group===t);return n.length===0?null:(0,O.jsxs)(`section`,{className:`py-1`,children:[(0,O.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)]`,children:e(j[t])}),(0,O.jsx)(`div`,{className:`space-y-1`,children:n.map(t=>{let n=v.indexOf(t),r=n===u,i=t.to,a=e=>{e?h.current.set(t.id,e):h.current.delete(t.id)},c=o(`group flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors duration-150`,r?`bg-white/[0.09] text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset]`:`text-[var(--oh-muted)] hover:bg-white/[0.05] hover:text-white`),l=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:o(`flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors duration-150`,r?`border-[var(--oh-accent)] bg-[var(--oh-accent)]/15 text-white`:`border-[var(--oh-border)] bg-black/15 text-[var(--oh-text-dim)] group-hover:text-white`),"aria-hidden":`true`,children:t.icon}),(0,O.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`span`,{className:`block truncate text-sm font-medium text-current`,children:t.title??e(t.titleKey)}),(0,O.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-[var(--oh-text-dim)]`,children:t.description??e(t.descriptionKey)})]}),(0,O.jsx)(`span`,{className:`hidden shrink-0 rounded-md border border-[var(--oh-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(i?s.COMMAND_MENU$GO_HINT:s.COMMAND_MENU$RUN_HINT)})]});return i?(0,O.jsx)(`a`,{ref:a,id:G(t),href:i,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),b(t))},className:c,children:l},t.id):(0,O.jsx)(`button`,{ref:a,id:G(t),type:`button`,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:()=>b(t),className:c,children:l},t.id)})})]},t)})}),(0,O.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-4 py-2.5 text-[11px] text-[var(--oh-text-dim)]`,children:e(s.COMMAND_MENU$FOOTER_HINT)})]})]}),document.body)}export{q as CommandMenu};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as n}from"./sdk-section-page-CS4GWn0y.js";var r=e();function i(){return(0,r.jsx)(n,{settingsSources:[{settingsSource:`agent_settings`,sectionKeys:[`condenser`]}],testId:`condenser-settings-screen`})}var a=t(i);export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{z as n}from"./utils-DPQfkd-7.js";import{t as r}from"./modal-backdrop-BSzNhM4r.js";import{t as i}from"./brand-button-CJcwjnfb.js";var a=e();function o({text:e,onConfirm:o,onCancel:s,isConfirming:c=!1}){let{t:l}=t(`openhands`);return(0,a.jsx)(r,{onClose:c?void 0:s,closeOnEscape:!c,children:(0,a.jsxs)(`div`,{"data-testid":`confirmation-modal`,className:`bg-base-secondary p-4 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,children:[(0,a.jsx)(`p`,{children:e}),(0,a.jsxs)(`div`,{className:`w-full flex justify-end gap-2`,children:[(0,a.jsx)(i,{testId:`cancel-button`,type:`button`,onClick:s,variant:`secondary`,isDisabled:c,children:l(n.BUTTON$CANCEL)}),(0,a.jsx)(i,{testId:`confirm-button`,type:`button`,onClick:o,variant:`primary`,isDisabled:c,children:l(n.BUTTON$CONFIRM)})]})]})})}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-DPQfkd-7.js";import{a as r,s as i}from"./dropdown-classes-zFW7qPSK.js";import{t as a}from"./dist-Bl64nBZL.js";e();var o=t(),s=a(`z-50 overflow-hidden text-[var(--oh-foreground)]`,{variants:{theme:{default:`absolute rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`,naked:`relative`,popover:`relative rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`},size:{compact:`py-1 px-1`,default:``},layout:{vertical:n(`flex flex-col`,r)},position:{top:`bottom-full`,bottom:`top-full`,none:``},spacing:{default:`mt-2`,none:``},alignment:{left:`left-0`,right:`right-0`,none:``}},compoundVariants:[{theme:`naked`,className:`shadow-none`}],defaultVariants:{theme:`default`,size:`default`,layout:`vertical`,spacing:`default`}});function c({testId:e,children:t,className:r,style:i,onKeyDown:a,ref:c,theme:l,size:u,layout:d,position:f,spacing:p,alignment:m}){return(0,o.jsx)(`ul`,{"data-testid":e,"data-position":f,ref:c,style:i,onKeyDown:a,className:n(s({theme:l,size:u,layout:d,position:f,spacing:p,alignment:m}),r),children:t})}function l({children:e,testId:t,onClick:r,isDisabled:a,className:s,ref:c}){return(0,o.jsx)(`button`,{ref:c,"data-testid":t||`context-menu-list-item`,type:`button`,onClick:r,disabled:a,className:n(i,`text-nowrap`,s),children:e})}export{c as n,l as t};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/files-tab-
|
|
2
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{$ as t,St as n,a as r,bt as i,gt as a,ht as o,m as s,xt as c,yt as l}from"./vendor-styling-Bcgpimp9.js";import{I as u,L as d,W as f,z as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js";import{n as m}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js";import{t as h}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js";import{E as g,T as _,w as v}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";import{t as y}from"./useMutation-CaSHLnX0.js";import{t as b}from"./useQuery-DiPh8LRJ.js";import{t as x}from"./use-is-creating-conversation-CAggrM75.js";import{t as S}from"./Trans-Bwpzk1wT.js";import{At as C,Ht as w,Ot as T,ct as E,kt as D,n as O,tt as k}from"./active-backend-context-BiwzkzDy.js";import{C as ee,D as A,E as j,M,O as N,R as P,S as te,T as F,b as I,c as L,d as ne,h as re,i as ie,l as ae,o as oe,t as R,u as se,x as ce,z}from"./utils-BgGG1znF.js";import{A as le,C as ue,D as de,E as fe,M as B,N as pe,O as me,S as he,T as ge,_ as _e,b as ve,f as ye,g as be,h as xe,j as Se,k as Ce,l as we,m as Te,n as Ee,o as De,p as Oe,s as ke,t as Ae,u as je,v as Me,w as Ne,x as Pe,y as Fe}from"./messages-kBjKaAeA.js";import{t as Ie}from"./check-CPLXgluF.js";import{n as Le,t as V}from"./vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js";import{t as Re}from"./copy-DCmZtz6n.js";import{t as ze}from"./external-link-BdBSg8rk.js";import{a as Be,c as Ve,o as He,u as Ue}from"./git-provider-icon-BZqqUPlm.js";import{i as We}from"./cloud-funnel-analytics-CEOl5Gxr.js";import{t as Ge}from"./list-todo-DtiL3lTp.js";import{t as Ke}from"./loader-circle-B4QDBARx.js";import{t as qe}from"./x-omAzpXkl.js";import{t as Je}from"./proxy-BBUG3sd2.js";import{t as Ye}from"./loading-spinner-DfZ_bhV7.js";import{t as Xe}from"./use-tracking-BGboadaZ.js";import{n as Ze}from"./use-settings-8nt3DGxW.js";import{t as Qe}from"./modal-backdrop-X-vKo61e.js";import{n as $e}from"./modal-body-CMsDpalT.js";import{n as et,r as tt}from"./base-modal-BBuy0WQQ.js";import{t as nt}from"./brand-button-DGN6Y9o6.js";import{n as rt}from"./navigation-context-BOGzIng3.js";import{t as it}from"./styled-tooltip-C7grwnOX.js";import{r as at,u as ot}from"./dropdown-classes-BB8rzqXL.js";import{a as st,c as ct,f as lt,t as H,u as ut}from"./conversation-store-C6hSXHw0.js";import{t as dt}from"./modal-close-button-DyxBZaAb.js";import{t as ft}from"./v4-DDdyfk2q.js";import{l as pt,t as mt,u as ht}from"./agent-server-conversation-service.api-CYSWw-2g.js";import{t as gt}from"./use-is-authed-BT7Iud4U.js";import{a as _t,c as vt,f as yt,g as bt,l as xt,m as St,s as Ct,t as wt}from"./conversation-state-store-F62HvuI1.js";import{c as Tt,d as Et,f as Dt,i as Ot,l as kt,n as At,r as jt,s as Mt,t as Nt,u as Pt}from"./sidebar-mobile-menu-toggle-ND-hgygu.js";import{t as Ft}from"./use-click-outside-element-DKqpqEEm.js";import{n as It}from"./use-create-conversation-nOJ6Um5h.js";import{n as Lt,t as U}from"./context-menu-list-item-CrCrYuPF.js";import{a as W,i as Rt,n as zt}from"./use-can-manage-org-profiles-Bt1M71u5.js";import{t as Bt}from"./u-edit-809W9D9T.js";import{t as Vt}from"./skills-CYFLsN5U.js";import{s as Ht,t as Ut}from"./home-store-Ch1ErdBc.js";import{t as Wt}from"./use-user-conversation-BIIpGUgM.js";import{t as Gt}from"./copy-z7idLzWO.js";import{r as Kt}from"./typography-iYhzLlHO.js";import{A as qt,C as Jt,D as Yt,E as Xt,F as Zt,L as Qt,M as $t,P as en,S as tn,_ as nn,a as rn,b as an,c as on,f as sn,g as cn,h as ln,i as un,j as dn,k as fn,l as pn,m as mn,n as hn,o as gn,p as _n,r as vn,s as yn,t as bn,u as xn,v as Sn,w as Cn,x as wn,y as Tn,z as En}from"./llm-not-configured-banner-3tMsM4K6.js";import{A as Dn,B as On,C as kn,D as An,E as jn,F as Mn,G,I as Nn,J as Pn,K,L as Fn,M as In,N as Ln,O as Rn,P as zn,S as Bn,V as Vn,W as Hn,a as Un,b as Wn,d as Gn,f as Kn,g as qn,i as Jn,k as Yn,l as Xn,m as Zn,p as Qn,q,s as $n,u as er,v as tr,w as nr,x as J,y as Y,z as rr}from"./markdown-renderer-DgiLLhW6.js";import{t as ir}from"./git-repo-dropdown-DEpOwUez.js";import{t as ar}from"./use-breakpoint-DA7JqsRN.js";import{t as or}from"./vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js";var sr=g(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),cr=g(`square-chevron-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m10 8 4 4-4 4`,key:`1wy4r4`}]]),lr=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ur(){let e=new Set,t=new WeakMap,n=()=>e.forEach(lr);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var X=l(),Z=e(n(),1),dr=(0,Z.createContext)(null);function fr(){let e=(0,Z.useRef)(!1);return o(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function pr(){let e=fr(),[n,r]=(0,Z.useState)(0),i=(0,Z.useCallback)(()=>{e.current&&r(n+1)},[n]);return[(0,Z.useCallback)(()=>t.postRender(i),[i]),n]}var mr=e=>e===!0,hr=e=>mr(e===!0)||e===`id`,gr=({children:e,id:t,inherit:n=!0})=>{let r=(0,Z.useContext)(a),i=(0,Z.useContext)(dr),[o,s]=pr(),c=(0,Z.useRef)(null),l=r.id||i;c.current===null&&(hr(n)&&l&&(t=t?l+`-`+t:l),c.current={id:t,group:mr(n)&&r.group||ur()});let u=(0,Z.useMemo)(()=>({...c.current,forceRender:o}),[s]);return(0,X.jsx)(a.Provider,{value:u,children:e})},_r={curAgentState:F.LOADING},vr=lt(e=>({..._r,setCurrentAgentState:t=>e({curAgentState:t}),reset:()=>e(_r)})),yr=`openhands-last-conversation-by-backend`;function br(e,t){return t?`${e}::${t}`:e}function xr(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(yr);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof r==`string`&&r.length>0&&(n[e]=r);return n}catch{return{}}}function Sr(e){if(!(typeof window>`u`))try{window.localStorage.setItem(yr,JSON.stringify(e))}catch{}}function Cr(e,t,n){if(!n)return;let r=xr();r[br(e,t)]=n,Sr(r)}function wr(e,t){let n=xr(),r=br(e,t);r in n&&(delete n[r],Sr(n))}var Tr=e=>({action:B.CHANGE_AGENT_STATE,args:{agent_state:e}}),Er=e=>`error`in e,Dr=e=>`type`in e&&e.type===`error`,Or=()=>{let{send:e}=Se(),t=J(e=>e.events);Z.useEffect(()=>{if(!t.length)return;let n=t[t.length-1];if(!(Dn(n)&&Yn(n))){if(Er(n)){if(n.error_code===401){D(`Session expired.`);return}typeof n.error==`string`?D(n.error):D(n.message);return}Dr(n)&&`${n.message??``}`.startsWith(`Agent reached maximum`)&&e(Tr(F.PAUSED))}},[t.length])},kr=()=>{let{curAgentState:e}=G();return{runtimeActive:!j.includes(e)}};function Ar({children:e}){return Or(),kr(),e}var jr=`ACPAuthRequired`,Mr={ACPAuthRequired:z.ERROR$ACP_AUTH_REQUIRED_TITLE,ACPSpawnError:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPInitError:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPPromptError:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,UsagePolicyRefusal:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE};function Nr(e){return e?Mr[e]??null:null}function Pr(e){return e===jr}var Fr={entriesByConversation:{}},Ir=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:n(e.entriesByConversation[t]??[])}}),Lr=lt()(ut(e=>({...Fr,addPending:(t,n)=>{let r=ft();return e(e=>Ir(e,t,e=>[...e,{id:r,question:n,status:`pending`}])),r},resolve:(t,n,r)=>e(e=>Ir(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`done`}:e))),fail:(t,n,r)=>e(e=>Ir(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`error`}:e))),dismiss:(t,n)=>e(e=>Ir(e,t,e=>e.filter(e=>e.id!==n)))}),{name:`BtwStore`}));function Rr({onClick:e}){let{t}=h(`openhands`);return(0,X.jsxs)(`button`,{type:`button`,onClick:e,className:`flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-normal text-success bg-success/10 hover:bg-success/20 border border-success/30 transition-colors`,children:[(0,X.jsx)(me,{className:`w-3.5 h-3.5 fill-success`}),(0,X.jsx)(`span`,{children:t(z.CHAT_INTERFACE$BTW_GOT_IT)})]})}function zr({conversationId:e}){let{t}=h(`openhands`),n=Lr(e=>e.entriesByConversation),r=Lr(e=>e.dismiss),i=e?n[e]??[]:[];return!e||i.length===0?null:(0,X.jsx)(`div`,{"data-testid":`btw-messages`,className:`flex flex-col w-full`,children:i.map(n=>{let i=n.status===`pending`;return(0,X.jsx)(Ce,{title:(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`opacity-60`,children:t(z.CHAT_INTERFACE$BTW_PREFIX)}),(0,X.jsx)(`span`,{children:n.question}),i&&(0,X.jsx)(`span`,{"data-testid":`btw-spinner`,className:`inline-block w-3.5 h-3.5 ml-2 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin`})]}),details:i?t(z.CHAT_INTERFACE$BTW_WAITING_FOR_ANSWER):n.response??``,initiallyExpanded:!i,chevronPosition:`before`,titleTrailing:!i&&(0,X.jsx)(Rr,{onClick:()=>r(e,n.id)})},n.id)})})}function Br({conversationId:e}){let t=qn(e=>e.statusByConversation),n=e?t[e]:void 0;return n?.active?(0,X.jsx)(de,{status:n}):null}var Vr=`${N} `,Hr=(e,t)=>{let n=Lr(e=>e.addPending),r=Lr(e=>e.resolve),i=Lr(e=>e.fail);return(0,Z.useCallback)(a=>{let o=a.trim(),s=o===`/btw`||o.startsWith(Vr);if(!e||!s){t(a);return}let c=o.slice(N.length).trim();if(!c)return;let l=n(e,c);vt(e,c).then(({response:t})=>r(e,l,t)).catch(t=>i(e,l,t?.message??`Failed to ask agent`))},[e,t,n,r,i])},Ur=`${M} `,Wr=/^--max(?:=|\s+)(\d+)\s*/,Gr=(e,t)=>{let{t:n}=h();return(0,Z.useCallback)(r=>{let i=r.trim(),a=i===`/goal`||i.startsWith(Ur);if(!e||!a){t(r);return}let o=i.slice(M.length).trim(),s,c=o.match(Wr);c&&(s=parseInt(c[1],10),o=o.slice(c[0].length).trim());let l=o;if(!l){D(n(z.GOAL$OBJECTIVE_REQUIRED));return}let u={objective:l};s&&s>=1&&(u.max_iterations=s),St(e,u).catch(e=>{let t=n(z.GOAL$START_FAILED);D(e instanceof Error&&e.message?e.message:t)})},[e,t,n])},Kr=`flex flex-row gap-1 items-center justify-center rounded-[100px]`;function qr(e){return R(Kr,e?`bg-[var(--oh-surface)] hover:bg-tertiary cursor-pointer text-white`:`bg-[var(--oh-surface)] cursor-not-allowed opacity-50 text-[var(--oh-muted)]`)}function Jr(e){return e?`white`:`var(--oh-muted)`}var Yr=`font-normal text-sm leading-5 truncate`;function Xr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,isConversationReady:r=!0}){let{t:i}=h(`openhands`),{trackPullButtonClick:a}=Xe(),o=n&&t&&r;return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{a(),e(L())},disabled:!o,className:R(qr(o),`px-0.5 py-1 w-[76px] min-w-[76px]`),children:[(0,X.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,X.jsx)(tn,{width:12,height:12,color:Jr(o)})}),(0,X.jsx)(`div`,{className:R(Yr,`max-w-[76px]`),title:i(z.COMMON$PULL),children:i(z.COMMON$PULL)})]})}function Zr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=h(`openhands`),{trackPushButtonClick:o}=Xe(),s=n&&t&&i;return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(ae(r))},disabled:!s,className:R(qr(s),`px-2 py-1 w-[77px] min-w-[77px]`),children:[(0,X.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,X.jsx)(Jt,{width:12,height:12,color:Jr(s)})}),(0,X.jsx)(`div`,{className:R(Yr,`max-w-[77px]`),title:a(z.COMMON$PUSH),children:a(z.COMMON$PUSH)})]})}function Qr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=h(`openhands`),{trackCreatePrButtonClick:o}=Xe(),s=n&&t&&i;return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(oe(r))},disabled:!s,className:R(qr(s),`px-2 py-1 w-[126px] min-w-[126px] h-7`),children:[(0,X.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,X.jsx)(wn,{width:12,height:12,color:Jr(s)})}),(0,X.jsx)(`div`,{className:R(Yr,`max-w-[126px]`),title:a(z.COMMON$PULL_REQUEST),children:a(z.COMMON$PULL_REQUEST)})]})}var $r=({allowAgentError:e=!1}={})=>{let{data:t}=K(),{curAgentState:n}=G(),r=e?A:j;return I(t?.execution_status)&&!r.includes(n)};function ei(e){return e.kind===`BashCommand`}function ti(e){return e.kind===`BashOutput`}function ni(e){return e.kind===`BashError`}function ri(e,t,n){let r=(0,Z.useRef)(null),i=(0,Z.useRef)(null),a=(0,Z.useRef)([]),o=(0,Z.useRef)([]),s=(0,Z.useRef)(new Map);return(0,Z.useEffect)(()=>{if(!n)return;let c=k(e),l=new WebSocket(c);r.current=l,i.current=null,l.onopen=()=>{Hn(l,t),i.current=l;for(let{command:e,cwd:t,timeout:n,resolve:r,reject:i}of a.current)o.current.push({resolve:r,reject:i}),l.send(JSON.stringify({command:e,cwd:t,timeout:n}));a.current=[]},l.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}if(ei(t)){let e=o.current.shift();e&&s.current.set(t.id,{...e,stdout:[],stderr:[]})}else if(ti(t)&&t.command_id){let e=s.current.get(t.command_id);e&&(t.stdout&&e.stdout.push(t.stdout),t.stderr&&e.stderr.push(t.stderr),t.exit_code!=null&&(s.current.delete(t.command_id),e.resolve({exit_code:t.exit_code,stdout:e.stdout.join(``),stderr:e.stderr.join(``)})))}else ni(t)&&u(`Bash error: ${t.code}: ${t.detail}`)};function u(e){let t=Error(e);for(let{reject:e}of a.current)e(t);a.current=[];for(let e of o.current)e.reject(t);o.current=[];for(let e of s.current.values())e.reject(t);s.current.clear()}return l.onclose=()=>{r.current=null,i.current=null,u(`Bash WebSocket closed`)},l.onerror=()=>{r.current=null,i.current=null,u(`Bash WebSocket error`)},()=>{l.onclose=null,l.onerror=null,l.close(),r.current=null,i.current=null,u(`Bash WebSocket unmounted`)}},[n,e,t]),(0,Z.useCallback)((e,t,n)=>new Promise((s,c)=>{let l=r.current;if(!l||l.readyState===WebSocket.CLOSED||l.readyState===WebSocket.CLOSING){c(Error(`Bash WebSocket not available`));return}l.readyState!==WebSocket.OPEN||i.current!==l?a.current.push({command:e,cwd:t,timeout:n,resolve:s,reject:c}):(o.current.push({resolve:s,reject:c}),l.send(JSON.stringify({command:e,cwd:t,timeout:n})))}),[])}var ii={"github.com":`github`,"gitlab.com":`gitlab`,"bitbucket.org":`bitbucket`,"dev.azure.com":`azure_devops`};function ai(e){return e.replace(/\.git$/,``)}function oi(e){return e?ii[e.toLowerCase()]??null:null}function si(e){let t=e.split(`/`).filter(Boolean),n=t.indexOf(`_git`);return n===-1?t.join(`/`):[...t.slice(0,n),...t.slice(n+1)].join(`/`)}function ci(e,t,n){let r=ai(n.replace(/^\/+/,``)),i=oi(t);return{url:e,host:t,repository:(i===`azure_devops`?si(r):r)||null,provider:i}}function li(e){let t=e?.trim();if(!t)return null;let n=t.match(/^[^@\s]+@([^:\s]+):(.+)$/);if(n){let e=n[1];return ci(t,e,n[2])}try{let e=new URL(t);return ci(t,e.hostname||null,e.pathname)}catch{return null}}var ui={repository:null,branch:null,provider:null,remoteUrl:null},di=[`r=$(git remote get-url origin 2>/dev/null)`,`b=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)`,`if [ -z "$r$b" ]; then`,`n=$(find . -mindepth 2 -maxdepth 4 -name .git 2>/dev/null | cut -c3- | sed 's|/.git$||' | sort -u)`,`c=$(printf '%s\\n' "$n" | grep -c '[^[:space:]]')`,`if [ "$c" = "1" ] && [ -n "$n" ]; then`,`r=$(git -C "$n" remote get-url origin 2>/dev/null)`,`b=$(git -C "$n" rev-parse --abbrev-ref HEAD 2>/dev/null)`,`fi`,`fi`,`printf '%s\\n%s' "$r" "$b"`].join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/files-tab-BzofBmF4.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Ck5D_A2Q.js","assets/active-backend-context-BBvP-bI2.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js","assets/utils-DPQfkd-7.js","assets/vendor~files-tab-C87pjSpi.js","assets/iconBase-C2sR-uAp.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js","assets/useQuery-BCnzy4LX.js","assets/messages-D1cbVhRK.js","assets/vendor-markdown-j0kYzV48.js","assets/useMutation-ChpkYxI5.js","assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js","assets/markdown-renderer-BiiiIznl.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js","assets/agent-server-conversation-service.api-0RztSdJJ.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js","assets/proxy-DCI9S-LA.js","assets/profiles-service.api-CoLTwjc1.js","assets/settings-service.api-DZp7E7A9.js","assets/settings-CWFxymAf.js","assets/llm-subscription-service-7eVfDIE1.js","assets/llm-subscription-DTqtBCWz.js","assets/acp-providers-BkL3HWa3.js","assets/conversation-store-B8Eahyeg.js","assets/conversation-state-store-Bs8gA263.js","assets/syntax-highlighter-BGDg_7w9.js","assets/copy-to-clipboard-button-DatoElj8.js","assets/checkmark-XZyokq_Y.js","assets/copy-Drmhc2jD.js","assets/navigation-context-CQZwH_tC.js","assets/use-user-conversation-DRfEU8x0.js","assets/chevron-down-CnIbtM6i.js","assets/loader-circle-C5AnEN8r.js","assets/vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js","assets/use-config-CPwqciXN.js","assets/styled-tooltip-C5C07RQC.js","assets/use-settings-BHWsOcIG.js","assets/close-ScPlnwyq.js","assets/skills-B0IliMxw.js","assets/u-check-circle-BKn1spCL.js","assets/typography-D9tiHct7.js","assets/dist-Bl64nBZL.js","assets/form-control-classes-DLN3Qgub.js","assets/mouse-pointer-click-Px-dXWcS.js","assets/home-store-D7CjMN_-.js","assets/useInfiniteQuery-DbCv0Jzd.js","assets/use-is-authed-Bka89Xmm.js","assets/llm-not-configured-banner-CwKu8C6g.js","assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js","assets/use-is-creating-conversation-CVefC9Ns.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js","assets/chat-send-button-B8n6-DQA.js","assets/check-DLOKoFU9.js","assets/circle-check-CxCYJrpZ.js","assets/git-provider-icon-BLMlwy02.js","assets/use-tracking-CGCsBWhg.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js","assets/cloud-funnel-analytics-CBQdPZl_.js","assets/plus-CtzlyAoF.js","assets/refresh-cw-B9GhC3QC.js","assets/use-agent-profiles-BHLkLbRR.js","assets/skill-scope-B1Per5XI.js","assets/context-menu-list-item-BQhmFVEK.js","assets/dropdown-classes-zFW7qPSK.js","assets/use-can-manage-org-profiles-Bu4y8gSx.js","assets/organization-service.api-C4GYWwj9.js","assets/git-repo-dropdown-B7RvO70z.js","assets/combobox-caret-BlmRwiM8.js","assets/merge-agent-profile-save-input-WcFmQVKK.js","assets/brand-button-CJcwjnfb.js","assets/base-modal-3NmIOKDm.js","assets/modal-body-duRaxj_K.js","assets/modal-classes-CLEXO6dj.js","assets/loading-spinner-CN3riY7k.js","assets/modal-backdrop-BSzNhM4r.js","assets/modal-close-button-D0aT02hs.js","assets/navigation-link-Bxo3-4vo.js","assets/use-activate-agent-profile-CeFfYwu_.js","assets/use-create-conversation-DWaSVUOB.js","assets/plugins-management-service-BmDzOQsd.js","assets/use-llm-profiles-CU8ah1pz.js","assets/use-click-outside-element-W6Os4Nlb.js","assets/link-external-BNZzCM1I.js","assets/settings-gear-DaJj6Pde.js","assets/u-robot-BvAOA2ZD.js","assets/settings-utils-gw2ppAvw.js","assets/map-provider-7Bp2aih5.js","assets/conversation-tab-empty-state-C9sfDOlt.js","assets/highlighted-source-view-CgJfD5VT.js","assets/folder-C1ou4_DT.js","assets/segmented-toggle-SmvsR3jW.js","assets/format-time-delta-BIR5Os7T.js","assets/browser-tab-A94o33Vn.js","assets/external-link-zWbg5KXS.js","assets/vendor~browser-tab-C5uuAxZX.js","assets/planner-tab-CZcguxTK.js","assets/list-todo-CheUtB7F.js","assets/task-list-tab-C19Q_JNf.js","assets/terminal-CbuMRYal.js","assets/vendor~terminal-BVSbSr6V.js","assets/vendor~terminal-T4IDBjWs.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{$ as t,St as n,a as r,bt as i,gt as a,ht as o,m as s,xt as c,yt as l}from"./vendor-styling-Ck5D_A2Q.js";import{F as u,I as d,R as f,U as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{n as m}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as h}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{E as g,T as _,w as v}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{t as y}from"./useMutation-ChpkYxI5.js";import{t as b}from"./useQuery-BCnzy4LX.js";import{t as x}from"./use-is-creating-conversation-CVefC9Ns.js";import{t as S}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js";import{At as C,Ut as w,ct as T,jt as E,kt as D,n as O,tt as k}from"./active-backend-context-BBvP-bI2.js";import{C as ee,D as A,E as j,M,O as N,R as P,S as te,T as F,b as I,c as L,d as ne,h as re,i as ie,l as ae,o as oe,t as R,u as se,x as ce,z}from"./utils-DPQfkd-7.js";import{A as le,C as ue,D as de,E as fe,M as B,N as pe,O as me,S as he,T as ge,_ as _e,b as ve,f as ye,g as be,h as xe,j as Se,k as Ce,l as we,m as Te,n as Ee,o as De,p as Oe,s as ke,t as Ae,u as je,v as Me,w as Ne,x as Pe,y as Fe}from"./messages-D1cbVhRK.js";import{t as Ie}from"./check-DLOKoFU9.js";import{n as Le,t as V}from"./vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js";import{r as Re}from"./map-provider-7Bp2aih5.js";import{t as ze}from"./external-link-zWbg5KXS.js";import{a as Be,c as Ve,o as He,u as Ue}from"./git-provider-icon-BLMlwy02.js";import{i as We}from"./cloud-funnel-analytics-CBQdPZl_.js";import{t as Ge}from"./list-todo-CheUtB7F.js";import{t as Ke}from"./loader-circle-C5AnEN8r.js";import{t as qe}from"./x-RYDBg-e2.js";import{t as Je}from"./proxy-DCI9S-LA.js";import{t as Ye}from"./loading-spinner-CN3riY7k.js";import{t as Xe}from"./use-tracking-CGCsBWhg.js";import{n as Ze}from"./use-settings-BHWsOcIG.js";import{t as Qe}from"./modal-backdrop-BSzNhM4r.js";import{n as $e}from"./modal-body-duRaxj_K.js";import{n as et,r as tt}from"./base-modal-3NmIOKDm.js";import{t as nt}from"./brand-button-CJcwjnfb.js";import{n as rt}from"./navigation-context-CQZwH_tC.js";import{t as it}from"./styled-tooltip-C5C07RQC.js";import{r as at,u as ot}from"./dropdown-classes-zFW7qPSK.js";import{a as st,c as ct,f as lt,t as H,u as ut}from"./conversation-store-B8Eahyeg.js";import{t as dt}from"./modal-close-button-D0aT02hs.js";import{T as ft,b as pt,t as mt,x as ht}from"./agent-server-conversation-service.api-0RztSdJJ.js";import{t as gt}from"./use-is-authed-Bka89Xmm.js";import{a as _t,c as vt,f as yt,g as bt,l as xt,m as St,s as Ct,t as wt}from"./conversation-state-store-Bs8gA263.js";import{c as Tt,d as Et,f as Dt,i as Ot,l as kt,n as At,r as jt,s as Mt,t as Nt,u as Pt}from"./sidebar-mobile-menu-toggle-OoZBHxaT.js";import{t as Ft}from"./use-click-outside-element-W6Os4Nlb.js";import{n as It}from"./use-create-conversation-DWaSVUOB.js";import{n as Lt,t as U}from"./context-menu-list-item-BQhmFVEK.js";import{a as W,i as Rt,n as zt}from"./use-can-manage-org-profiles-Bu4y8gSx.js";import{t as Bt}from"./u-edit-DAkcF52u.js";import{t as Vt}from"./skills-B0IliMxw.js";import{s as Ht,t as Ut}from"./home-store-D7CjMN_-.js";import{t as Wt}from"./use-user-conversation-DRfEU8x0.js";import{t as Gt}from"./copy-Drmhc2jD.js";import{r as Kt}from"./typography-D9tiHct7.js";import{A as qt,C as Jt,D as Yt,E as Xt,F as Zt,L as Qt,M as $t,P as en,S as tn,_ as nn,a as rn,b as an,c as on,f as sn,g as cn,h as ln,i as un,j as dn,k as fn,l as pn,m as mn,n as hn,o as gn,p as _n,r as vn,s as yn,t as bn,u as xn,v as Sn,w as Cn,x as wn,y as Tn,z as En}from"./llm-not-configured-banner-CwKu8C6g.js";import{A as Dn,B as On,C as kn,D as An,E as jn,F as Mn,G,I as Nn,J as Pn,K,L as Fn,M as In,N as Ln,O as Rn,P as zn,S as Bn,V as Vn,W as Hn,a as Un,b as Wn,d as Gn,f as Kn,g as qn,i as Jn,k as Yn,l as Xn,m as Zn,p as Qn,q,s as $n,u as er,v as tr,w as nr,x as J,y as Y,z as rr}from"./markdown-renderer-BiiiIznl.js";import{t as ir}from"./vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js";import{t as ar}from"./git-repo-dropdown-B7RvO70z.js";import{t as or}from"./use-breakpoint-DWtihr9g.js";var sr=g(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),cr=g(`square-chevron-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m10 8 4 4-4 4`,key:`1wy4r4`}]]),lr=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ur(){let e=new Set,t=new WeakMap,n=()=>e.forEach(lr);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var X=l(),Z=e(n(),1),dr=(0,Z.createContext)(null);function fr(){let e=(0,Z.useRef)(!1);return o(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function pr(){let e=fr(),[n,r]=(0,Z.useState)(0),i=(0,Z.useCallback)(()=>{e.current&&r(n+1)},[n]);return[(0,Z.useCallback)(()=>t.postRender(i),[i]),n]}var mr=e=>e===!0,hr=e=>mr(e===!0)||e===`id`,gr=({children:e,id:t,inherit:n=!0})=>{let r=(0,Z.useContext)(a),i=(0,Z.useContext)(dr),[o,s]=pr(),c=(0,Z.useRef)(null),l=r.id||i;c.current===null&&(hr(n)&&l&&(t=t?l+`-`+t:l),c.current={id:t,group:mr(n)&&r.group||ur()});let u=(0,Z.useMemo)(()=>({...c.current,forceRender:o}),[s]);return(0,X.jsx)(a.Provider,{value:u,children:e})},_r={curAgentState:F.LOADING},vr=lt(e=>({..._r,setCurrentAgentState:t=>e({curAgentState:t}),reset:()=>e(_r)})),yr=`openhands-last-conversation-by-backend`;function br(e,t){return t?`${e}::${t}`:e}function xr(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(yr);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof r==`string`&&r.length>0&&(n[e]=r);return n}catch{return{}}}function Sr(e){if(!(typeof window>`u`))try{window.localStorage.setItem(yr,JSON.stringify(e))}catch{}}function Cr(e,t,n){if(!n)return;let r=xr();r[br(e,t)]=n,Sr(r)}function wr(e,t){let n=xr(),r=br(e,t);r in n&&(delete n[r],Sr(n))}var Tr=e=>({action:B.CHANGE_AGENT_STATE,args:{agent_state:e}}),Er=e=>`error`in e,Dr=e=>`type`in e&&e.type===`error`,Or=()=>{let{send:e}=Se(),t=J(e=>e.events);Z.useEffect(()=>{if(!t.length)return;let n=t[t.length-1];if(!(Dn(n)&&Yn(n))){if(Er(n)){if(n.error_code===401){C(`Session expired.`);return}typeof n.error==`string`?C(n.error):C(n.message);return}Dr(n)&&`${n.message??``}`.startsWith(`Agent reached maximum`)&&e(Tr(F.PAUSED))}},[t.length])},kr=()=>{let{curAgentState:e}=G();return{runtimeActive:!j.includes(e)}};function Ar({children:e}){return Or(),kr(),e}var jr=`ACPAuthRequired`,Mr={ACPAuthRequired:z.ERROR$ACP_AUTH_REQUIRED_TITLE,ACPSpawnError:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPInitError:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPPromptError:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,UsagePolicyRefusal:z.CHAT_INTERFACE$AGENT_ERROR_MESSAGE};function Nr(e){return e?Mr[e]??null:null}function Pr(e){return e===jr}var Fr={entriesByConversation:{}},Ir=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:n(e.entriesByConversation[t]??[])}}),Lr=lt()(ut(e=>({...Fr,addPending:(t,n)=>{let r=ft();return e(e=>Ir(e,t,e=>[...e,{id:r,question:n,status:`pending`}])),r},resolve:(t,n,r)=>e(e=>Ir(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`done`}:e))),fail:(t,n,r)=>e(e=>Ir(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`error`}:e))),dismiss:(t,n)=>e(e=>Ir(e,t,e=>e.filter(e=>e.id!==n)))}),{name:`BtwStore`}));function Rr({onClick:e}){let{t}=h(`openhands`);return(0,X.jsxs)(`button`,{type:`button`,onClick:e,className:`flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-normal text-success bg-success/10 hover:bg-success/20 border border-success/30 transition-colors`,children:[(0,X.jsx)(me,{className:`w-3.5 h-3.5 fill-success`}),(0,X.jsx)(`span`,{children:t(z.CHAT_INTERFACE$BTW_GOT_IT)})]})}function zr({conversationId:e}){let{t}=h(`openhands`),n=Lr(e=>e.entriesByConversation),r=Lr(e=>e.dismiss),i=e?n[e]??[]:[];return!e||i.length===0?null:(0,X.jsx)(`div`,{"data-testid":`btw-messages`,className:`flex flex-col w-full`,children:i.map(n=>{let i=n.status===`pending`;return(0,X.jsx)(Ce,{title:(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`opacity-60`,children:t(z.CHAT_INTERFACE$BTW_PREFIX)}),(0,X.jsx)(`span`,{children:n.question}),i&&(0,X.jsx)(`span`,{"data-testid":`btw-spinner`,className:`inline-block w-3.5 h-3.5 ml-2 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin`})]}),details:i?t(z.CHAT_INTERFACE$BTW_WAITING_FOR_ANSWER):n.response??``,initiallyExpanded:!i,chevronPosition:`before`,titleTrailing:!i&&(0,X.jsx)(Rr,{onClick:()=>r(e,n.id)})},n.id)})})}function Br({conversationId:e}){let t=qn(e=>e.statusByConversation),n=e?t[e]:void 0;return n?.active?(0,X.jsx)(de,{status:n}):null}var Vr=`${N} `,Hr=(e,t)=>{let n=Lr(e=>e.addPending),r=Lr(e=>e.resolve),i=Lr(e=>e.fail);return(0,Z.useCallback)(a=>{let o=a.trim(),s=o===`/btw`||o.startsWith(Vr);if(!e||!s){t(a);return}let c=o.slice(N.length).trim();if(!c)return;let l=n(e,c);vt(e,c).then(({response:t})=>r(e,l,t)).catch(t=>i(e,l,t?.message??`Failed to ask agent`))},[e,t,n,r,i])},Ur=`${M} `,Wr=/^--max(?:=|\s+)(\d+)\s*/,Gr=(e,t)=>{let{t:n}=h();return(0,Z.useCallback)(r=>{let i=r.trim(),a=i===`/goal`||i.startsWith(Ur);if(!e||!a){t(r);return}let o=i.slice(M.length).trim(),s,c=o.match(Wr);c&&(s=parseInt(c[1],10),o=o.slice(c[0].length).trim());let l=o;if(!l){C(n(z.GOAL$OBJECTIVE_REQUIRED));return}let u={objective:l};s&&s>=1&&(u.max_iterations=s),St(e,u).catch(e=>{let t=n(z.GOAL$START_FAILED);C(e instanceof Error&&e.message?e.message:t)})},[e,t,n])},Kr=`flex flex-row gap-1 items-center justify-center rounded-[100px]`;function qr(e){return R(Kr,e?`bg-[var(--oh-surface)] hover:bg-tertiary cursor-pointer text-white`:`bg-[var(--oh-surface)] cursor-not-allowed opacity-50 text-[var(--oh-muted)]`)}function Jr(e){return e?`white`:`var(--oh-muted)`}var Yr=`font-normal text-sm leading-5 truncate`;function Xr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,isConversationReady:r=!0}){let{t:i}=h(`openhands`),{trackPullButtonClick:a}=Xe(),o=n&&t&&r;return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{a(),e(L())},disabled:!o,className:R(qr(o),`px-0.5 py-1 w-[76px] min-w-[76px]`),children:[(0,X.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,X.jsx)(tn,{width:12,height:12,color:Jr(o)})}),(0,X.jsx)(`div`,{className:R(Yr,`max-w-[76px]`),title:i(z.COMMON$PULL),children:i(z.COMMON$PULL)})]})}function Zr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=h(`openhands`),{trackPushButtonClick:o}=Xe(),s=n&&t&&i;return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(ae(r))},disabled:!s,className:R(qr(s),`px-2 py-1 w-[77px] min-w-[77px]`),children:[(0,X.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,X.jsx)(Jt,{width:12,height:12,color:Jr(s)})}),(0,X.jsx)(`div`,{className:R(Yr,`max-w-[77px]`),title:a(z.COMMON$PUSH),children:a(z.COMMON$PUSH)})]})}function Qr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=h(`openhands`),{trackCreatePrButtonClick:o}=Xe(),s=n&&t&&i;return(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(oe(r))},disabled:!s,className:R(qr(s),`px-2 py-1 w-[126px] min-w-[126px] h-7`),children:[(0,X.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,X.jsx)(wn,{width:12,height:12,color:Jr(s)})}),(0,X.jsx)(`div`,{className:R(Yr,`max-w-[126px]`),title:a(z.COMMON$PULL_REQUEST),children:a(z.COMMON$PULL_REQUEST)})]})}var $r=({allowAgentError:e=!1}={})=>{let{data:t}=K(),{curAgentState:n}=G(),r=e?A:j;return I(t?.execution_status)&&!r.includes(n)};function ei(e){return e.kind===`BashCommand`}function ti(e){return e.kind===`BashOutput`}function ni(e){return e.kind===`BashError`}function ri(e,t,n){let r=(0,Z.useRef)(null),i=(0,Z.useRef)(null),a=(0,Z.useRef)([]),o=(0,Z.useRef)([]),s=(0,Z.useRef)(new Map);return(0,Z.useEffect)(()=>{if(!n)return;let c=k(e),l=new WebSocket(c);r.current=l,i.current=null,l.onopen=()=>{Hn(l,t),i.current=l;for(let{command:e,cwd:t,timeout:n,resolve:r,reject:i}of a.current)o.current.push({resolve:r,reject:i}),l.send(JSON.stringify({command:e,cwd:t,timeout:n}));a.current=[]},l.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}if(ei(t)){let e=o.current.shift();e&&s.current.set(t.id,{...e,stdout:[],stderr:[]})}else if(ti(t)&&t.command_id){let e=s.current.get(t.command_id);e&&(t.stdout&&e.stdout.push(t.stdout),t.stderr&&e.stderr.push(t.stderr),t.exit_code!=null&&(s.current.delete(t.command_id),e.resolve({exit_code:t.exit_code,stdout:e.stdout.join(``),stderr:e.stderr.join(``)})))}else ni(t)&&u(`Bash error: ${t.code}: ${t.detail}`)};function u(e){let t=Error(e);for(let{reject:e}of a.current)e(t);a.current=[];for(let e of o.current)e.reject(t);o.current=[];for(let e of s.current.values())e.reject(t);s.current.clear()}return l.onclose=()=>{r.current=null,i.current=null,u(`Bash WebSocket closed`)},l.onerror=()=>{r.current=null,i.current=null,u(`Bash WebSocket error`)},()=>{l.onclose=null,l.onerror=null,l.close(),r.current=null,i.current=null,u(`Bash WebSocket unmounted`)}},[n,e,t]),(0,Z.useCallback)((e,t,n)=>new Promise((s,c)=>{let l=r.current;if(!l||l.readyState===WebSocket.CLOSED||l.readyState===WebSocket.CLOSING){c(Error(`Bash WebSocket not available`));return}l.readyState!==WebSocket.OPEN||i.current!==l?a.current.push({command:e,cwd:t,timeout:n,resolve:s,reject:c}):(o.current.push({resolve:s,reject:c}),l.send(JSON.stringify({command:e,cwd:t,timeout:n})))}),[])}var ii={"github.com":`github`,"gitlab.com":`gitlab`,"bitbucket.org":`bitbucket`,"dev.azure.com":`azure_devops`};function ai(e){return e.replace(/\.git$/,``)}function oi(e){return e?ii[e.toLowerCase()]??null:null}function si(e){let t=e.split(`/`).filter(Boolean),n=t.indexOf(`_git`);return n===-1?t.join(`/`):[...t.slice(0,n),...t.slice(n+1)].join(`/`)}function ci(e,t,n){let r=ai(n.replace(/^\/+/,``)),i=oi(t);return{url:e,host:t,repository:(i===`azure_devops`?si(r):r)||null,provider:i}}function li(e){let t=e?.trim();if(!t)return null;let n=t.match(/^[^@\s]+@([^:\s]+):(.+)$/);if(n){let e=n[1];return ci(t,e,n[2])}try{let e=new URL(t);return ci(t,e.hostname||null,e.pathname)}catch{return null}}var ui={repository:null,branch:null,provider:null,remoteUrl:null},di=[`r=$(git remote get-url origin 2>/dev/null)`,`b=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)`,`if [ -z "$r$b" ]; then`,`n=$(find . -mindepth 2 -maxdepth 4 -name .git 2>/dev/null | cut -c3- | sed 's|/.git$||' | sort -u)`,`c=$(printf '%s\\n' "$n" | grep -c '[^[:space:]]')`,`if [ "$c" = "1" ] && [ -n "$n" ]; then`,`r=$(git -C "$n" remote get-url origin 2>/dev/null)`,`b=$(git -C "$n" rev-parse --abbrev-ref HEAD 2>/dev/null)`,`fi`,`fi`,`printf '%s\\n%s' "$r" "$b"`].join(`
|
|
3
3
|
`);async function fi(e,t){let n=await e(di,t,10);if(n.exit_code!==0)return ui;let r=n.stdout.indexOf(`
|
|
4
|
-
`),i=(r>=0?n.stdout.slice(0,r):n.stdout).trim(),a=(r>=0?n.stdout.slice(r+1):``).trim(),o=a&&a!==`HEAD`?a:null;if(!i&&!o)return ui;let s=li(i);return{repository:s?.repository??null,provider:s?.provider??null,remoteUrl:i||null,branch:o}}var pi=()=>{let{data:e}=K(),t=$r(),{backend:n}=O(),r=n.kind===`local`,i=e?.id,a=e?.conversation_url,o=e?.session_api_key,s=e?.workspace?.working_dir?.trim(),c=!!e?.selected_repository,l=!!e?.git_provider,u=!!e?.selected_branch,d=r&&t&&!!i&&!!s&&(!c||!l||!u),f=ri(a,o,d),p=(0,Z.useRef)(f);return p.current=f,b({queryKey:[`local-git-info`,i,a,o,s],queryFn:async()=>fi((e,t,n)=>p.current(e,t,n),s),enabled:d,retry:!1,staleTime:1e4,refetchInterval:1e4,gcTime:1e3*60*5,meta:{disableToast:!0}})},mi=()=>{let e=m(),{t}=h(`openhands`);return y({mutationFn:e=>mt.updateConversationRepository(e.conversationId,e.repository,e.branch,e.gitProvider),onMutate:async t=>{let n=[`user`,`conversation`,t.conversationId];await e.cancelQueries({queryKey:n});let r=e.getQueriesData({queryKey:n});return e.setQueriesData({queryKey:n},e=>e&&{...e,selected_repository:t.repository,selected_branch:t.branch??null,git_provider:t.gitProvider??null}),{previousEntries:r}},onError:(n,r,i)=>{i?.previousEntries.forEach(([t,n])=>{e.setQueryData(t,n)}),D(t(z.CONVERSATION$FAILED_TO_UPDATE_REPOSITORY))},onSuccess:()=>{C(t(z.CONVERSATION$REPOSITORY_UPDATED))},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`local-git-info`,r.conversationId]})}})};function hi({children:e,tooltipMessage:t,testId:n,shouldShowTooltip:r}){return r?(0,X.jsx)(it,{content:t,placement:`top`,showArrow:!0,tooltipClassName:`bg-white text-black`,children:(0,X.jsx)(`span`,{"data-testid":n,className:`hover:opacity-100`,children:e})}):e}function gi({isOpen:e,onClose:t,onLaunch:n,defaultProvider:r=`github`}){let{t:i}=h(`openhands`),{providers:a}=Ht(),[o,s]=(0,Z.useState)(null),[c,l]=(0,Z.useState)(null),[u,d]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{a.length===1&&!o?s(a[0]):a.length>1&&!o&&r&&a.includes(r)&&s(r)},[a,o,r]);let f=(0,Z.useCallback)(e=>{e!==o&&(s(e),l(null),d(null))},[o]),p=(0,Z.useCallback)(e=>{e?(l(e),d(null)):(l(null),d(null))},[]),m=(0,Z.useCallback)(e=>{d(e)},[]),g=()=>{!c||!u||(n(c,u),l(null),d(null),t())},_=()=>{s(null),l(null),d(null),t()};if(!e)return null;let v=c?.git_provider||o||r,y=!!c&&!!u;return(0,X.jsx)(Qe,{onClose:_,children:(0,X.jsxs)($e,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,X.jsx)(dt,{onClose:_,testId:`close-open-repository-modal`}),(0,X.jsx)(`div`,{className:`w-full pr-6`,children:(0,X.jsx)(tt,{title:i(z.CONVERSATION$OPEN_REPOSITORY)})}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-4 w-full`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,X.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:i(z.CONVERSATION$SELECT_OR_INSERT_LINK)}),a.length>1&&(0,X.jsx)(rn,{providers:a,value:o,onChange:f})]}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-[10px] w-full`,children:[(0,X.jsx)(ir,{provider:v,value:c?.id||null,repositoryName:c?.full_name||null,onChange:p,className:`w-full`}),(0,X.jsx)(un,{repository:c?.full_name||null,provider:v,selectedBranch:u,onBranchSelect:m,defaultBranch:c?.main_branch||null,disabled:!c,className:`w-full`})]})]}),(0,X.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,X.jsx)(nt,{type:`button`,variant:`secondary`,onClick:_,children:i(z.BUTTON$CANCEL)}),(0,X.jsx)(nt,{type:`button`,variant:`primary`,onClick:g,isDisabled:!y,children:i(z.BUTTON$LAUNCH)})]})]})})}function _i({onSuggestionsClick:e}){let{t}=h(`openhands`),{conversationId:n}=q(),[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(!1),s=(0,Z.useRef)(null),{addRecentRepository:c}=Ut(),l=Y(e=>e.enqueuePendingMessage),u=Y(e=>e.markPendingMessageError),{backend:d}=O(),f=d.kind===`local`,{providers:p}=Ht(),m=f||p.length>0,{data:g}=K(),{repositoryInfo:_}=qt(),{data:v}=pi(),y=Qt(),b=Un()?.isLoadingHistory??!1,x=(0,Z.useRef)(y);(0,Z.useEffect)(()=>{x.current=y},[y]);let{send:S}=Se(),C=(0,Z.useRef)(S);(0,Z.useEffect)(()=>{C.current=S},[S]);let w=Ne(),{mutate:T}=mi(),{mutate:E,isPending:k}=It(),ee=g?.selected_repository||_?.selectedRepository,A=g?.git_provider||_?.gitProvider,j=g?.selected_branch||_?.selectedBranch,M=ee||v?.repository||void 0,N=A||v?.provider,P=j||v?.branch||void 0,te=(g?.id?ht(g.id):null)?.selected_workspace??null,F=te&&te.replace(/\/+$/,``).split(`/`).pop()||null,I=!!M&&!!N,L=!!g&&y===`OPEN`&&!b;(0,Z.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[a]),(0,Z.useEffect)(()=>{if(!a)return;let e=e=>{e.key===`Escape`&&o(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let ne=(e,r)=>{n&&(c(e),T({conversationId:n,repository:e.full_name,branch:r.name,gitProvider:e.git_provider},{onSuccess:()=>{if(x.current!==`OPEN`){D(t(z.CONVERSATION$CLONE_COMMAND_FAILED_DISCONNECTED));return}let i=e.git_provider.charAt(0).toUpperCase()+e.git_provider.slice(1),a=`Clone ${e.full_name} from ${i} and checkout branch ${r.name}.`,o=n?l({conversationId:n,text:a}):null;w?.scrollDomToBottom(),Promise.resolve(C.current({action:`message`,args:{content:a,timestamp:new Date().toISOString()}})).catch(e=>{o&&u(o,e instanceof Error?e.message:t(z.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))})}}))},re=!f||!!M||!!F,ie=f&&!I;return re||P||I?(0,X.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,X.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center overflow-x-auto flex-nowrap relative scrollbar-hide`,children:[re?(0,X.jsx)(vn,{selectedRepository:M,gitProvider:N,workspaceName:F,onClick:()=>i(!0),disabled:!L||ie}):null,P?(0,X.jsx)(hn,{selectedBranch:P,selectedRepository:M,gitProvider:N}):null,I?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(hi,{tooltipMessage:t(z.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pull-button-tooltip`,shouldShowTooltip:!I,children:(0,X.jsx)(Xr,{onSuggestionsClick:e,hasRepository:I,providerTokensReady:m,isConversationReady:L})}),(0,X.jsx)(hi,{tooltipMessage:t(z.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-push-button-tooltip`,shouldShowTooltip:!I,children:(0,X.jsx)(Zr,{onSuggestionsClick:e,hasRepository:I,providerTokensReady:m,currentGitProvider:N,isConversationReady:L})}),(0,X.jsx)(hi,{tooltipMessage:t(z.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pr-button-tooltip`,shouldShowTooltip:!I,children:(0,X.jsx)(Qr,{onSuggestionsClick:e,hasRepository:I,providerTokensReady:m,currentGitProvider:N,isConversationReady:L})})]}):null]}),(0,X.jsx)(gi,{isOpen:r,onClose:()=>i(!1),onLaunch:ne,defaultProvider:N})]}):null}function vi({onSubmit:e,disabled:t=!1,hasStartedConversation:n}){let{images:r,files:i,imagesMarkedUploadAsFile:a,clearAllFiles:o,subConversationTaskId:s}=H(),{curAgentState:c}=G(),{data:l}=K(),{conversationId:u}=Pn(),d=u??l?.id??null,{taskStatus:f}=fn(s,l?.id||null),{handleUpload:p}=gn(),m=on(d,Gr(d,Hr(d,t=>{let{imagesToEmbed:n,imagesAsFiles:s}=En(r,a);e(t,n,[...i,...s]),o()})));return(0,X.jsxs)(`div`,{"data-testid":`interactive-chat-box`,children:[(0,X.jsx)(pn,{disabled:t||c===F.AWAITING_USER_CONFIRMATION||re(f),isNewConversationPending:t,hasStartedConversation:n,onSubmit:m,onFilesPaste:p}),(0,X.jsx)(`div`,{className:`mt-3 pb-3`,children:(0,X.jsx)(_i,{onSuggestionsClick:e=>{m(e)}})})]})}function yi(){let e=J(e=>e.events),t=J(e=>e.uiEvents),n=Z.useMemo(()=>t.filter(er),[t]),r=Z.useMemo(()=>e,[e]),i=Z.useMemo(()=>n.length,[n]),a=Z.useMemo(()=>r.some(e=>e.source===`agent`&&!Vn(e)&&!In(e)),[r]),o=Xn(r);return{storeEvents:e,uiEvents:t,renderableEvents:n,allConversationEvents:r,totalEvents:i,hasSubstantiveAgentActions:a,conversationUserEventsExist:o,userEventsExist:o}}var bi=e=>`timestamp`in e?e.timestamp:void 0,xi=e=>{let t=!!e&&st(e),n=t?void 0:e,{data:r}=Wt(e??null),{data:i,isFetched:a}=Gn(n??void 0),o=J(e=>e.addEvents),[s,c]=Z.useState(!1),[l,u]=Z.useState(!0),d=Z.useRef(!1),f=Z.useRef(!0);return Z.useEffect(()=>{if(d.current=!1,c(!1),t){f.current=!1,u(!1);return}f.current=!0,u(!0)},[e,t]),Z.useEffect(()=>{t||!a||!i||i.hasMore||(f.current=!1,u(!1))},[t,a,i?.hasMore,n]),{isLoading:s,hasMore:l,loadOlder:Z.useCallback(async()=>{if(!e||st(e)||d.current||!f.current||!r)return;let{events:t}=J.getState(),n=t[0];if(!n)return;let i=bi(n);if(!i){f.current=!1,u(!1);return}d.current=!0,c(!0);try{let t=await Qn.searchEvents(e,r?.conversation_url??null,r?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`,timestampLt:i});if(!Array.isArray(t.items))throw Error(`Invalid older-events response: expected page.items to be an array.`);let n=[...t.items].reverse();n.length>0&&(o(n),$n(e,J.getState().uiEvents)),(!t.next_page_id||t.items.length<50)&&(f.current=!1,u(!1))}finally{d.current=!1,c(!1)}},[e,r,r?.conversation_url,r?.session_api_key,o])}},Si={kind:`translation`,key:`ACTION_MESSAGE$THINK`,values:{}},Ci=new Set([`ExecuteBashAction`,`TerminalAction`,`FileEditorAction`,`StrReplaceEditorAction`,`MCPToolAction`,`InvokeSkillAction`,`TaskAction`,`ThinkAction`,`TaskTrackerAction`,`GrepAction`,`GlobAction`,`BrowserNavigateAction`,`BrowserClickAction`,`BrowserTypeAction`,`BrowserGetStateAction`,`BrowserGetContentAction`,`BrowserScrollAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserSwitchTabAction`,`BrowserCloseTabAction`]),wi=e=>{if(!Rn(e))return null;let t=Fe(e);return t?{kind:`text`,text:t}:Ci.has(e.action.kind)?Me(e):null},Ti=e=>e.source===`environment`&&`rejection_reason`in e,Ei=e=>{let t=new Set,n=new Set;for(let r=e.length-1;r>=0;--r){let i=e[r];if(!i.isFromPlanningAgent){if(Fn(i)||Ti(i)){t.add(i.action_id),n.add(i.tool_call_id);continue}if(Yn(i)){n.add(i.tool_call_id);continue}if(An(i)){if(!(i.status===`pending`||i.status===`in_progress`)){n.add(i.tool_call_id);continue}if(n.has(i.tool_call_id))continue;let e=he(i);return e?{kind:`translation`,key:Pe(i),values:{title:e}}:Si}if(Rn(i)&&!t.has(i.id)&&!n.has(i.tool_call_id))return wi(i)??Si}}return Si};function Di({events:e}){let t=Ei(e);return(0,X.jsxs)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2 rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-1.5 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`live-activity-chip`,role:`status`,"aria-live":`polite`,children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 shrink-0 animate-pulse rounded-full bg-[var(--oh-status-success)] motion-reduce:animate-none`}),(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:t.kind===`text`?t.text:(0,X.jsx)(S,{ns:`openhands`,i18nKey:t.key,values:t.values,components:{path:(0,X.jsx)(be,{}),cmd:(0,X.jsx)(_e,{})}})})]})}function Oi({suggestion:e,onClick:t}){let{t:n}=h(`openhands`);return(0,X.jsxs)(`button`,{type:`button`,className:`list-none border border-[var(--oh-border)] rounded-[15px] hover:bg-surface-raised hover:border-[var(--oh-interactive-hover)] transition-colors flex-1 flex items-center justify-center cursor-pointer gap-[10px] h-[55px] px-4`,onClick:()=>t(e.value),children:[(0,Z.useMemo)(()=>{switch(e.label){case`INCREASE_TEST_COVERAGE`:return(0,X.jsx)(an,{width:24,height:24,color:`#fff`});case`AUTO_MERGE_PRS`:return(0,X.jsx)(Tn,{width:19,height:20,color:`#fff`});case`FIX_README`:return(0,X.jsx)(Sn,{width:24,height:24,color:`#fff`});case`CLEAN_DEPENDENCIES`:return(0,X.jsx)(nn,{width:24,height:24,color:`#fff`});default:return null}},[e]),(0,X.jsx)(`span`,{"data-testid":`suggestion`,className:`text-[15px] font-normal leading-5 text-white text-center cursor-pointer`,children:n(e.label)})]})}function ki({suggestions:e,onSuggestionClick:t}){return(0,X.jsx)(`div`,{"data-testid":`suggestions`,className:`grid grid-cols-2 gap-5 max-w-fit`,children:e.map((e,n)=>(0,X.jsx)(Oi,{suggestion:e,onClick:t},n))})}var Ai=z.SUGGESTIONS$HACKER_NEWS,ji=`Please write a bash script which displays the top story on Hacker News. It should show the title, the link, and the number of points.
|
|
4
|
+
`),i=(r>=0?n.stdout.slice(0,r):n.stdout).trim(),a=(r>=0?n.stdout.slice(r+1):``).trim(),o=a&&a!==`HEAD`?a:null;if(!i&&!o)return ui;let s=li(i);return{repository:s?.repository??null,provider:s?.provider??null,remoteUrl:i||null,branch:o}}var pi=()=>{let{data:e}=K(),t=$r(),{backend:n}=O(),r=n.kind===`local`,i=e?.id,a=e?.conversation_url,o=e?.session_api_key,s=e?.workspace?.working_dir?.trim(),c=!!e?.selected_repository,l=!!e?.git_provider,u=!!e?.selected_branch,d=r&&t&&!!i&&!!s&&(!c||!l||!u),f=ri(a,o,d),p=(0,Z.useRef)(f);return p.current=f,b({queryKey:[`local-git-info`,i,a,o,s],queryFn:async()=>fi((e,t,n)=>p.current(e,t,n),s),enabled:d,retry:!1,staleTime:1e4,refetchInterval:1e4,gcTime:1e3*60*5,meta:{disableToast:!0}})},mi=()=>{let e=m(),{t}=h(`openhands`);return y({mutationFn:e=>mt.updateConversationRepository(e.conversationId,e.repository,e.branch,e.gitProvider),onMutate:async t=>{let n=[`user`,`conversation`,t.conversationId];await e.cancelQueries({queryKey:n});let r=e.getQueriesData({queryKey:n});return e.setQueriesData({queryKey:n},e=>e&&{...e,selected_repository:t.repository,selected_branch:t.branch??null,git_provider:t.gitProvider??null}),{previousEntries:r}},onError:(n,r,i)=>{i?.previousEntries.forEach(([t,n])=>{e.setQueryData(t,n)}),C(t(z.CONVERSATION$FAILED_TO_UPDATE_REPOSITORY))},onSuccess:()=>{E(t(z.CONVERSATION$REPOSITORY_UPDATED))},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`local-git-info`,r.conversationId]})}})};function hi({children:e,tooltipMessage:t,testId:n,shouldShowTooltip:r}){return r?(0,X.jsx)(it,{content:t,placement:`top`,showArrow:!0,tooltipClassName:`bg-white text-black`,children:(0,X.jsx)(`span`,{"data-testid":n,className:`hover:opacity-100`,children:e})}):e}function gi({isOpen:e,onClose:t,onLaunch:n,defaultProvider:r=`github`}){let{t:i}=h(`openhands`),{providers:a}=Ht(),[o,s]=(0,Z.useState)(null),[c,l]=(0,Z.useState)(null),[u,d]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{a.length===1&&!o?s(a[0]):a.length>1&&!o&&r&&a.includes(r)&&s(r)},[a,o,r]);let f=(0,Z.useCallback)(e=>{e!==o&&(s(e),l(null),d(null))},[o]),p=(0,Z.useCallback)(e=>{e?(l(e),d(null)):(l(null),d(null))},[]),m=(0,Z.useCallback)(e=>{d(e)},[]),g=()=>{!c||!u||(n(c,u),l(null),d(null),t())},_=()=>{s(null),l(null),d(null),t()};if(!e)return null;let v=c?.git_provider||o||r,y=!!c&&!!u;return(0,X.jsx)(Qe,{onClose:_,children:(0,X.jsxs)($e,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,X.jsx)(dt,{onClose:_,testId:`close-open-repository-modal`}),(0,X.jsx)(`div`,{className:`w-full pr-6`,children:(0,X.jsx)(tt,{title:i(z.CONVERSATION$OPEN_REPOSITORY)})}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-4 w-full`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,X.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:i(z.CONVERSATION$SELECT_OR_INSERT_LINK)}),a.length>1&&(0,X.jsx)(rn,{providers:a,value:o,onChange:f})]}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-[10px] w-full`,children:[(0,X.jsx)(ar,{provider:v,value:c?.id||null,repositoryName:c?.full_name||null,onChange:p,className:`w-full`}),(0,X.jsx)(un,{repository:c?.full_name||null,provider:v,selectedBranch:u,onBranchSelect:m,defaultBranch:c?.main_branch||null,disabled:!c,className:`w-full`})]})]}),(0,X.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,X.jsx)(nt,{type:`button`,variant:`secondary`,onClick:_,children:i(z.BUTTON$CANCEL)}),(0,X.jsx)(nt,{type:`button`,variant:`primary`,onClick:g,isDisabled:!y,children:i(z.BUTTON$LAUNCH)})]})]})})}function _i({onSuggestionsClick:e}){let{t}=h(`openhands`),{conversationId:n}=q(),[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(!1),s=(0,Z.useRef)(null),{addRecentRepository:c}=Ut(),l=Y(e=>e.enqueuePendingMessage),u=Y(e=>e.markPendingMessageError),{backend:d}=O(),f=d.kind===`local`,{providers:p}=Ht(),m=f||p.length>0,{data:g}=K(),{repositoryInfo:_}=qt(),{data:v}=pi(),y=Qt(),b=Un()?.isLoadingHistory??!1,x=(0,Z.useRef)(y);(0,Z.useEffect)(()=>{x.current=y},[y]);let{send:S}=Se(),w=(0,Z.useRef)(S);(0,Z.useEffect)(()=>{w.current=S},[S]);let T=Ne(),{mutate:E}=mi(),{mutate:D,isPending:k}=It(),ee=g?.selected_repository||_?.selectedRepository,A=g?.git_provider||_?.gitProvider,j=g?.selected_branch||_?.selectedBranch,M=ee||v?.repository||void 0,N=A||v?.provider,P=j||v?.branch||void 0,te=(g?.id?ht(g.id):null)?.selected_workspace??null,F=te&&te.replace(/\/+$/,``).split(`/`).pop()||null,I=!!M&&!!N,L=!!g&&y===`OPEN`&&!b;(0,Z.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[a]),(0,Z.useEffect)(()=>{if(!a)return;let e=e=>{e.key===`Escape`&&o(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let ne=(e,r)=>{n&&(c(e),E({conversationId:n,repository:e.full_name,branch:r.name,gitProvider:e.git_provider},{onSuccess:()=>{if(x.current!==`OPEN`){C(t(z.CONVERSATION$CLONE_COMMAND_FAILED_DISCONNECTED));return}let i=e.git_provider.charAt(0).toUpperCase()+e.git_provider.slice(1),a=`Clone ${e.full_name} from ${i} and checkout branch ${r.name}.`,o=n?l({conversationId:n,text:a}):null;T?.scrollDomToBottom(),Promise.resolve(w.current({action:`message`,args:{content:a,timestamp:new Date().toISOString()}})).catch(e=>{o&&u(o,e instanceof Error?e.message:t(z.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))})}}))},re=!f||!!M||!!F,ie=f&&!I;return re||P||I?(0,X.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,X.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center overflow-x-auto flex-nowrap relative scrollbar-hide`,children:[re?(0,X.jsx)(vn,{selectedRepository:M,gitProvider:N,workspaceName:F,onClick:()=>i(!0),disabled:!L||ie}):null,P?(0,X.jsx)(hn,{selectedBranch:P,selectedRepository:M,gitProvider:N}):null,I?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(hi,{tooltipMessage:t(z.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pull-button-tooltip`,shouldShowTooltip:!I,children:(0,X.jsx)(Xr,{onSuggestionsClick:e,hasRepository:I,providerTokensReady:m,isConversationReady:L})}),(0,X.jsx)(hi,{tooltipMessage:t(z.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-push-button-tooltip`,shouldShowTooltip:!I,children:(0,X.jsx)(Zr,{onSuggestionsClick:e,hasRepository:I,providerTokensReady:m,currentGitProvider:N,isConversationReady:L})}),(0,X.jsx)(hi,{tooltipMessage:t(z.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pr-button-tooltip`,shouldShowTooltip:!I,children:(0,X.jsx)(Qr,{onSuggestionsClick:e,hasRepository:I,providerTokensReady:m,currentGitProvider:N,isConversationReady:L})})]}):null]}),(0,X.jsx)(gi,{isOpen:r,onClose:()=>i(!1),onLaunch:ne,defaultProvider:N})]}):null}function vi({onSubmit:e,disabled:t=!1,hasStartedConversation:n}){let{images:r,files:i,imagesMarkedUploadAsFile:a,clearAllFiles:o,subConversationTaskId:s}=H(),{curAgentState:c}=G(),{data:l}=K(),{conversationId:u}=Pn(),d=u??l?.id??null,{taskStatus:f}=fn(s,l?.id||null),{handleUpload:p}=gn(),m=on(d,Gr(d,Hr(d,t=>{let{imagesToEmbed:n,imagesAsFiles:s}=En(r,a);e(t,n,[...i,...s]),o()})));return(0,X.jsxs)(`div`,{"data-testid":`interactive-chat-box`,children:[(0,X.jsx)(pn,{disabled:t||c===F.AWAITING_USER_CONFIRMATION||re(f),isNewConversationPending:t,hasStartedConversation:n,onSubmit:m,onFilesPaste:p}),(0,X.jsx)(`div`,{className:`mt-3 pb-3`,children:(0,X.jsx)(_i,{onSuggestionsClick:e=>{m(e)}})})]})}function yi(){let e=J(e=>e.events),t=J(e=>e.uiEvents),n=Z.useMemo(()=>t.filter(er),[t]),r=Z.useMemo(()=>e,[e]),i=Z.useMemo(()=>n.length,[n]),a=Z.useMemo(()=>r.some(e=>e.source===`agent`&&!Vn(e)&&!In(e)),[r]),o=Xn(r);return{storeEvents:e,uiEvents:t,renderableEvents:n,allConversationEvents:r,totalEvents:i,hasSubstantiveAgentActions:a,conversationUserEventsExist:o,userEventsExist:o}}var bi=e=>`timestamp`in e?e.timestamp:void 0,xi=e=>{let t=!!e&&st(e),n=t?void 0:e,{data:r}=Wt(e??null),{data:i,isFetched:a}=Gn(n??void 0),o=J(e=>e.addEvents),[s,c]=Z.useState(!1),[l,u]=Z.useState(!0),d=Z.useRef(!1),f=Z.useRef(!0);return Z.useEffect(()=>{if(d.current=!1,c(!1),t){f.current=!1,u(!1);return}f.current=!0,u(!0)},[e,t]),Z.useEffect(()=>{t||!a||!i||i.hasMore||(f.current=!1,u(!1))},[t,a,i?.hasMore,n]),{isLoading:s,hasMore:l,loadOlder:Z.useCallback(async()=>{if(!e||st(e)||d.current||!f.current||!r)return;let{events:t}=J.getState(),n=t[0];if(!n)return;let i=bi(n);if(!i){f.current=!1,u(!1);return}d.current=!0,c(!0);try{let t=await Qn.searchEvents(e,r?.conversation_url??null,r?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`,timestampLt:i});if(!Array.isArray(t.items))throw Error(`Invalid older-events response: expected page.items to be an array.`);let n=[...t.items].reverse();n.length>0&&(o(n),$n(e,J.getState().uiEvents)),(!t.next_page_id||t.items.length<50)&&(f.current=!1,u(!1))}finally{d.current=!1,c(!1)}},[e,r,r?.conversation_url,r?.session_api_key,o])}},Si={kind:`translation`,key:`ACTION_MESSAGE$THINK`,values:{}},Ci=new Set([`ExecuteBashAction`,`TerminalAction`,`FileEditorAction`,`StrReplaceEditorAction`,`MCPToolAction`,`InvokeSkillAction`,`TaskAction`,`ThinkAction`,`TaskTrackerAction`,`GrepAction`,`GlobAction`,`BrowserNavigateAction`,`BrowserClickAction`,`BrowserTypeAction`,`BrowserGetStateAction`,`BrowserGetContentAction`,`BrowserScrollAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserSwitchTabAction`,`BrowserCloseTabAction`]),wi=e=>{if(!Rn(e))return null;let t=Fe(e);return t?{kind:`text`,text:t}:Ci.has(e.action.kind)?Me(e):null},Ti=e=>e.source===`environment`&&`rejection_reason`in e,Ei=e=>{let t=new Set,n=new Set;for(let r=e.length-1;r>=0;--r){let i=e[r];if(!i.isFromPlanningAgent){if(Fn(i)||Ti(i)){t.add(i.action_id),n.add(i.tool_call_id);continue}if(Yn(i)){n.add(i.tool_call_id);continue}if(An(i)){if(!(i.status===`pending`||i.status===`in_progress`)){n.add(i.tool_call_id);continue}if(n.has(i.tool_call_id))continue;let e=he(i);return e?{kind:`translation`,key:Pe(i),values:{title:e}}:Si}if(Rn(i)&&!t.has(i.id)&&!n.has(i.tool_call_id))return wi(i)??Si}}return Si};function Di({events:e}){let t=Ei(e);return(0,X.jsxs)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2 rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-1.5 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`live-activity-chip`,role:`status`,"aria-live":`polite`,children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 shrink-0 animate-pulse rounded-full bg-[var(--oh-status-success)] motion-reduce:animate-none`}),(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:t.kind===`text`?t.text:(0,X.jsx)(S,{ns:`openhands`,i18nKey:t.key,values:t.values,components:{path:(0,X.jsx)(be,{}),cmd:(0,X.jsx)(_e,{})}})})]})}function Oi({suggestion:e,onClick:t}){let{t:n}=h(`openhands`);return(0,X.jsxs)(`button`,{type:`button`,className:`list-none border border-[var(--oh-border)] rounded-[15px] hover:bg-surface-raised hover:border-[var(--oh-interactive-hover)] transition-colors flex-1 flex items-center justify-center cursor-pointer gap-[10px] h-[55px] px-4`,onClick:()=>t(e.value),children:[(0,Z.useMemo)(()=>{switch(e.label){case`INCREASE_TEST_COVERAGE`:return(0,X.jsx)(an,{width:24,height:24,color:`#fff`});case`AUTO_MERGE_PRS`:return(0,X.jsx)(Tn,{width:19,height:20,color:`#fff`});case`FIX_README`:return(0,X.jsx)(Sn,{width:24,height:24,color:`#fff`});case`CLEAN_DEPENDENCIES`:return(0,X.jsx)(nn,{width:24,height:24,color:`#fff`});default:return null}},[e]),(0,X.jsx)(`span`,{"data-testid":`suggestion`,className:`text-[15px] font-normal leading-5 text-white text-center cursor-pointer`,children:n(e.label)})]})}function ki({suggestions:e,onSuggestionClick:t}){return(0,X.jsx)(`div`,{"data-testid":`suggestions`,className:`grid grid-cols-2 gap-5 max-w-fit`,children:e.map((e,n)=>(0,X.jsx)(Oi,{suggestion:e,onClick:t},n))})}var Ai=z.SUGGESTIONS$HACKER_NEWS,ji=`Please write a bash script which displays the top story on Hacker News. It should show the title, the link, and the number of points.
|
|
5
5
|
The script should only use tools that are widely available on unix systems, like curl and grep.`,Mi=z.SUGGESTIONS$HELLO_WORLD,Ni=`I want to create a Hello World app in Javascript that:
|
|
6
6
|
* Displays Hello World in the middle.
|
|
7
7
|
* Has a button that when clicked, changes the greeting with a bouncing animation to fun versions of Hello.
|
|
@@ -14,10 +14,10 @@ The script should only use tools that are widely available on unix systems, like
|
|
|
14
14
|
* change the text of an item
|
|
15
15
|
* set a due date on the item
|
|
16
16
|
|
|
17
|
-
This should be a client-only app with no backend. The list should persist in localStorage.`,Ii={repo:cn,"non-repo":{[Ai]:ji,[Mi]:Ni,[Pi]:Fi}};function Li({onSuggestionsClick:e}){let{t}=h(`openhands`),{shouldHideSuggestions:n}=H();return(0,X.jsx)(s,{children:!n&&(0,X.jsxs)(V.div,{"data-testid":`chat-suggestions`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:`easeInOut`},className:`pointer-events-auto absolute inset-x-4 bottom-[151px] top-0 flex flex-col items-center justify-center md:inset-x-8`,children:[(0,X.jsx)(`div`,{className:`flex flex-col items-center p-4 rounded-xl w-full`,children:(0,X.jsx)(`span`,{className:`pb-6 text-[32px] font-medium leading-5 text-white`,children:t(z.LANDING$TITLE)})}),(0,X.jsx)(ki,{suggestions:Object.entries(Ii.repo).slice(0,4).map(([e,t])=>({label:e,value:t})),onSuggestionClick:e})]})})}var Ri={files:[],initialPrompt:null,selectedRepository:null,selectedRepositoryProvider:null,replayJson:null},zi=lt(e=>({...Ri,addFile:t=>e(e=>({files:[...e.files,t]})),removeFile:t=>e(e=>({files:e.files.filter((e,n)=>n!==t)})),clearFiles:()=>e(()=>({files:[]})),setInitialPrompt:t=>e(()=>({initialPrompt:t})),clearInitialPrompt:()=>e(()=>({initialPrompt:null})),setSelectedRepository:t=>e(()=>({selectedRepository:t})),clearSelectedRepository:()=>e(()=>({selectedRepository:null})),setSelectedRepositoryProvider:t=>e(()=>({selectedRepositoryProvider:t})),setReplayJson:t=>e(()=>({replayJson:t})),reset:()=>e(()=>Ri)})),Bi=e=>(0,X.jsx)(`svg`,{width:12,height:17,viewBox:`0 0 12 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.5304 6.46978L10.4697 7.53044L6.75006 3.81077L6.75006 17.0001H5.25006L5.25006 3.81077L1.53039 7.53044L0.469727 6.46978L6.00006 0.939453L11.5304 6.46978Z`,fill:`currentColor`})});function Vi({onClick:e}){return(0,X.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`scroll-to-bottom`,className:`flex items-center justify-center size-8 rounded-full bg-[var(--oh-surface)] text-[var(--oh-muted)] hover:bg-tertiary hover:text-white rotate-180 cursor-pointer transition-colors`,children:(0,X.jsx)(Bi,{width:15,height:15})})}var Hi=[{width:`w-[25%]`,height:`h-4`,align:`justify-end`},{width:`w-[60%]`,height:`h-4`,align:`justify-start`},{width:`w-[45%]`,height:`h-4`,align:`justify-start`},{width:`w-[65%]`,height:`h-20`,align:`justify-start`},{width:`w-[35%]`,height:`h-4`,align:`justify-end`},{width:`w-[50%]`,height:`h-4`,align:`justify-start`},{width:`w-[30%]`,height:`h-4`,align:`justify-end`},{width:`w-[75%]`,height:`h-4`,align:`justify-start`},{width:`w-[55%]`,height:`h-4`,align:`justify-start`}];function Ui({width:e,height:t}){return(0,X.jsx)(`div`,{className:R(`rounded-md bg-foreground/5 animate-pulse`,e,t)})}function Wi(){let{t:e}=h(`openhands`);return(0,X.jsx)(`div`,{className:`flex flex-col gap-6 p-4 w-full h-full overflow-hidden`,"data-testid":`chat-messages-skeleton`,"aria-label":e(z.CHAT_INTERFACE$LOADING_CONVERSATION),children:Hi.map((e,t)=>(0,X.jsx)(`div`,{className:R(`flex w-full`,e.align),children:(0,X.jsx)(Ui,{width:e.width,height:e.height})},t))})}var Gi=220;function Ki({message:e,code:t,onDismiss:n,onRetry:r,onReauth:i}){let{t:a,i18n:o}=h(`openhands`),s=Nr(t),[c,l]=Z.useState(!1),[u,d]=Z.useState(!1),[f,p]=Z.useState(!1),m=Z.useRef(null),g=o.exists(e,{ns:`openhands`}),v=g?String(a(e)):e,y=v.length>Gi,b=y&&!c;return Z.useEffect(()=>{if(!f)return;let e=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(e)},[f]),Z.useEffect(()=>{p(!1)},[v]),Z.useLayoutEffect(()=>{let e=m.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){d(!1);return}d(e.getBoundingClientRect().height>t*1.5)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[v,b,c,e]),(0,X.jsxs)(`div`,{className:R(`flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,u?`items-start`:`items-center`),"data-testid":`error-message-banner`,children:[(0,X.jsx)(_,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:P},"data-testid":`error-message-banner-icon`}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[s&&(0,X.jsx)(`div`,{className:`text-sm font-medium text-[var(--oh-foreground)]`,"data-testid":`error-message-banner-header`,children:a(s)}),(0,X.jsx)(`div`,{ref:m,className:R(`whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]`,b&&`line-clamp-3`),"data-testid":`error-message-banner-content`,children:g?(0,X.jsx)(S,{ns:`openhands`,i18nKey:e}):e}),i&&(0,X.jsx)(`button`,{type:`button`,onClick:i,className:`mt-2 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":`error-message-banner-reauth`,children:a(z.ERROR$ACP_UPDATE_CREDENTIALS)}),y&&(0,X.jsx)(`button`,{type:`button`,className:`mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline`,onClick:()=>l(e=>!e),"data-testid":`error-message-banner-toggle`,children:a(c?z.COMMON$VIEW_LESS:z.COMMON$VIEW_MORE)})]}),(0,X.jsxs)(`div`,{className:R(`flex shrink-0 gap-1`,u?`self-start`:`items-center`),children:[r&&(0,X.jsx)(`button`,{type:`button`,onClick:r,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":`error-message-banner-retry`,children:a(z.CHAT_INTERFACE$MESSAGE_RETRY)}),(0,X.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(v),p(!0)}catch{
|
|
18
|
-
`).match(Yi);if(!e)continue;let r=e[1],i=e[2].replace(/\\/g,`/`).replace(/\/+$/,``),a=`/.agents/skills/${r}`;if(!i.endsWith(a))continue;let o=i.slice(0,-a.length);if(!o)continue;let s=`${o}::${r}`;t.delete(s),t.set(s,{eventId:n.id,skillName:r,workspacePath:o})}return[...t.values()]}var Zi=e=>{let t=J(e=>e.events),n=J(e=>e.loadedConversationId),r=Ji(e=>e.dismissedEventIds),i=Ji(e=>e.dismiss),a=(0,Z.useMemo)(()=>!e||e!==n?[]:Xi(t).filter(e=>!r[e.eventId]),[e,n,t,r]);return{installs:a,dismissAll:(0,Z.useCallback)(()=>i(a.map(e=>e.eventId)),[i,a])}};function Qi({conversationId:e}){let{t}=h(`openhands`),{installs:n,dismissAll:r}=Zi(e),{backend:i}=O(),{mutate:a,isPending:o}=It(),s=x(),{navigate:c}=rt(),{data:l}=K();if(i.kind!==`local`||n.length===0)return null;let u=n[n.length-1],d=n.filter(e=>e.workspacePath===u.workspacePath).map(e=>e.skillName);return(0,X.jsxs)(`div`,{className:`flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,"data-testid":`skill-install-restart-banner`,children:[(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-foreground)]`,children:t(z.SKILLS$INSTALL_BANNER_MESSAGE,{skills:d.join(`, `)})}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>{o||s||a({workingDir:u.workspacePath,workspaceMode:`local_repo`,repository:l?.selected_repository&&l?.git_provider?{name:l.selected_repository,gitProvider:l.git_provider,branch:l.selected_branch??void 0}:void 0,entryPoint:`skill_install_restart_banner`},{onSuccess:e=>c(`/conversations/${e.conversation_id}`),onError:e=>
|
|
17
|
+
This should be a client-only app with no backend. The list should persist in localStorage.`,Ii={repo:cn,"non-repo":{[Ai]:ji,[Mi]:Ni,[Pi]:Fi}};function Li({onSuggestionsClick:e}){let{t}=h(`openhands`),{shouldHideSuggestions:n}=H();return(0,X.jsx)(s,{children:!n&&(0,X.jsxs)(V.div,{"data-testid":`chat-suggestions`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:`easeInOut`},className:`pointer-events-auto absolute inset-x-4 bottom-[151px] top-0 flex flex-col items-center justify-center md:inset-x-8`,children:[(0,X.jsx)(`div`,{className:`flex flex-col items-center p-4 rounded-xl w-full`,children:(0,X.jsx)(`span`,{className:`pb-6 text-[32px] font-medium leading-5 text-white`,children:t(z.LANDING$TITLE)})}),(0,X.jsx)(ki,{suggestions:Object.entries(Ii.repo).slice(0,4).map(([e,t])=>({label:e,value:t})),onSuggestionClick:e})]})})}var Ri={files:[],initialPrompt:null,selectedRepository:null,selectedRepositoryProvider:null,replayJson:null},zi=lt(e=>({...Ri,addFile:t=>e(e=>({files:[...e.files,t]})),removeFile:t=>e(e=>({files:e.files.filter((e,n)=>n!==t)})),clearFiles:()=>e(()=>({files:[]})),setInitialPrompt:t=>e(()=>({initialPrompt:t})),clearInitialPrompt:()=>e(()=>({initialPrompt:null})),setSelectedRepository:t=>e(()=>({selectedRepository:t})),clearSelectedRepository:()=>e(()=>({selectedRepository:null})),setSelectedRepositoryProvider:t=>e(()=>({selectedRepositoryProvider:t})),setReplayJson:t=>e(()=>({replayJson:t})),reset:()=>e(()=>Ri)})),Bi=e=>(0,X.jsx)(`svg`,{width:12,height:17,viewBox:`0 0 12 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.5304 6.46978L10.4697 7.53044L6.75006 3.81077L6.75006 17.0001H5.25006L5.25006 3.81077L1.53039 7.53044L0.469727 6.46978L6.00006 0.939453L11.5304 6.46978Z`,fill:`currentColor`})});function Vi({onClick:e}){return(0,X.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`scroll-to-bottom`,className:`flex items-center justify-center size-8 rounded-full bg-[var(--oh-surface)] text-[var(--oh-muted)] hover:bg-tertiary hover:text-white rotate-180 cursor-pointer transition-colors`,children:(0,X.jsx)(Bi,{width:15,height:15})})}var Hi=[{width:`w-[25%]`,height:`h-4`,align:`justify-end`},{width:`w-[60%]`,height:`h-4`,align:`justify-start`},{width:`w-[45%]`,height:`h-4`,align:`justify-start`},{width:`w-[65%]`,height:`h-20`,align:`justify-start`},{width:`w-[35%]`,height:`h-4`,align:`justify-end`},{width:`w-[50%]`,height:`h-4`,align:`justify-start`},{width:`w-[30%]`,height:`h-4`,align:`justify-end`},{width:`w-[75%]`,height:`h-4`,align:`justify-start`},{width:`w-[55%]`,height:`h-4`,align:`justify-start`}];function Ui({width:e,height:t}){return(0,X.jsx)(`div`,{className:R(`rounded-md bg-foreground/5 animate-pulse`,e,t)})}function Wi(){let{t:e}=h(`openhands`);return(0,X.jsx)(`div`,{className:`flex flex-col gap-6 p-4 w-full h-full overflow-hidden`,"data-testid":`chat-messages-skeleton`,"aria-label":e(z.CHAT_INTERFACE$LOADING_CONVERSATION),children:Hi.map((e,t)=>(0,X.jsx)(`div`,{className:R(`flex w-full`,e.align),children:(0,X.jsx)(Ui,{width:e.width,height:e.height})},t))})}var Gi=220;function Ki({message:e,code:t,onDismiss:n,onRetry:r,onReauth:i}){let{t:a,i18n:o}=h(`openhands`),s=Nr(t),[c,l]=Z.useState(!1),[u,d]=Z.useState(!1),[f,p]=Z.useState(!1),m=Z.useRef(null),g=o.exists(e,{ns:`openhands`}),v=g?String(a(e)):e,y=v.length>Gi,b=y&&!c;return Z.useEffect(()=>{if(!f)return;let e=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(e)},[f]),Z.useEffect(()=>{p(!1)},[v]),Z.useLayoutEffect(()=>{let e=m.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){d(!1);return}d(e.getBoundingClientRect().height>t*1.5)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[v,b,c,e]),(0,X.jsxs)(`div`,{className:R(`flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,u?`items-start`:`items-center`),"data-testid":`error-message-banner`,children:[(0,X.jsx)(_,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:P},"data-testid":`error-message-banner-icon`}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[s&&(0,X.jsx)(`div`,{className:`text-sm font-medium text-[var(--oh-foreground)]`,"data-testid":`error-message-banner-header`,children:a(s)}),(0,X.jsx)(`div`,{ref:m,className:R(`whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]`,b&&`line-clamp-3`),"data-testid":`error-message-banner-content`,children:g?(0,X.jsx)(S,{ns:`openhands`,i18nKey:e}):e}),i&&(0,X.jsx)(`button`,{type:`button`,onClick:i,className:`mt-2 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":`error-message-banner-reauth`,children:a(z.ERROR$ACP_UPDATE_CREDENTIALS)}),y&&(0,X.jsx)(`button`,{type:`button`,className:`mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline`,onClick:()=>l(e=>!e),"data-testid":`error-message-banner-toggle`,children:a(c?z.COMMON$VIEW_LESS:z.COMMON$VIEW_MORE)})]}),(0,X.jsxs)(`div`,{className:R(`flex shrink-0 gap-1`,u?`self-start`:`items-center`),children:[r&&(0,X.jsx)(`button`,{type:`button`,onClick:r,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":`error-message-banner-retry`,children:a(z.CHAT_INTERFACE$MESSAGE_RETRY)}),(0,X.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(v),p(!0)}catch{C(a(z.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED))}},className:`shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,"aria-label":a(f?z.BUTTON$COPIED:z.BUTTON$COPY),"data-testid":`error-message-banner-copy`,children:f?(0,X.jsx)(Ie,{className:`h-4 w-4`,"aria-hidden":!0}):(0,X.jsx)(Re,{className:`h-4 w-4`,"aria-hidden":!0})}),n&&(0,X.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,"aria-label":a(z.BUTTON$CLOSE),"data-testid":`error-message-banner-dismiss`,children:(0,X.jsx)(qe,{className:`h-4 w-4`,"aria-hidden":!0})})]})]})}var qi={dismissedEventIds:{}},Ji=lt()(ut(e=>({...qi,dismiss:t=>e(e=>({dismissedEventIds:{...e.dismissedEventIds,...Object.fromEntries(t.map(e=>[e,!0]))}}))}),{name:`SkillInstallBannerStore`})),Yi=/^✅ Successfully installed '([^']+)' to (.+)$/m;function Xi(e){let t=new Map;for(let n of e){if(!Ln(n))continue;let e=n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
18
|
+
`).match(Yi);if(!e)continue;let r=e[1],i=e[2].replace(/\\/g,`/`).replace(/\/+$/,``),a=`/.agents/skills/${r}`;if(!i.endsWith(a))continue;let o=i.slice(0,-a.length);if(!o)continue;let s=`${o}::${r}`;t.delete(s),t.set(s,{eventId:n.id,skillName:r,workspacePath:o})}return[...t.values()]}var Zi=e=>{let t=J(e=>e.events),n=J(e=>e.loadedConversationId),r=Ji(e=>e.dismissedEventIds),i=Ji(e=>e.dismiss),a=(0,Z.useMemo)(()=>!e||e!==n?[]:Xi(t).filter(e=>!r[e.eventId]),[e,n,t,r]);return{installs:a,dismissAll:(0,Z.useCallback)(()=>i(a.map(e=>e.eventId)),[i,a])}};function Qi({conversationId:e}){let{t}=h(`openhands`),{installs:n,dismissAll:r}=Zi(e),{backend:i}=O(),{mutate:a,isPending:o}=It(),s=x(),{navigate:c}=rt(),{data:l}=K();if(i.kind!==`local`||n.length===0)return null;let u=n[n.length-1],d=n.filter(e=>e.workspacePath===u.workspacePath).map(e=>e.skillName);return(0,X.jsxs)(`div`,{className:`flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,"data-testid":`skill-install-restart-banner`,children:[(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-foreground)]`,children:t(z.SKILLS$INSTALL_BANNER_MESSAGE,{skills:d.join(`, `)})}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>{o||s||a({workingDir:u.workspacePath,workspaceMode:`local_repo`,repository:l?.selected_repository&&l?.git_provider?{name:l.selected_repository,gitProvider:l.git_provider,branch:l.selected_branch??void 0}:void 0,entryPoint:`skill_install_restart_banner`},{onSuccess:e=>c(`/conversations/${e.conversation_id}`),onError:e=>C(e.message)})},disabled:o||s,className:`mt-2 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)] disabled:cursor-not-allowed disabled:opacity-50`,"data-testid":`skill-install-restart-action`,children:t(z.SKILLS$INSTALL_BANNER_ACTION)})]}),(0,X.jsx)(`button`,{type:`button`,onClick:r,className:`shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,"aria-label":t(z.BUTTON$CLOSE),"data-testid":`skill-install-restart-dismiss`,children:(0,X.jsx)(qe,{className:`h-4 w-4`,"aria-hidden":!0})})]})}function $i(){let{t:e}=h(`openhands`),{conversationId:t}=Pn(),n=Y(e=>e.pendingMessages),r=Y(e=>e.markPendingMessageError),i=Y(e=>e.markPendingMessageSending),a=Y(e=>e.removePendingMessage),o=H(e=>e.restoreMessageToInputIfEmpty),{send:s}=Se(),c=Z.useMemo(()=>t?n.filter(e=>$t(t,e.conversationId)):[],[n,t]),l=Z.useCallback(async t=>{let n=Y.getState().pendingMessages.find(e=>e.id===t);if(n){i(t);try{await s(le(n.text,n.imageUrls,n.fileUrls,n.timestamp))}catch(n){r(t,n instanceof Error?n.message:e(z.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}}},[s,r,i,e]),u=Z.useCallback((e,t)=>{o(t),a(e)},[o,a]),d=Z.useCallback(e=>{a(e)},[a]);return c.length===0?null:(0,X.jsx)(X.Fragment,{children:c.map(e=>(0,X.jsx)(Oe,{type:`user`,message:e.text,pendingStatus:e.status,onRetry:e.status===`error`?()=>l(e.id):void 0,onDismiss:e.status===`error`?()=>d(e.id):void 0,onStop:e.status===`sending`?()=>u(e.id,e.text):void 0,children:e.imageUrls.length>0&&(0,X.jsx)(je,{size:`small`,images:e.imageUrls})},e.id))})}var ea=()=>{let{data:e}=K();return y({mutationKey:[`unified-upload-files`],mutationFn:async t=>{let{conversationId:n,files:r}=t;return Ct(n,r,e)},meta:{disableToast:!0}})},ta=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3.25C9.92893 3.25 8.25 4.92893 8.25 7V10H7C6.44772 10 6 10.4477 6 11V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V11C18 10.4477 17.5523 10 17 10H15.75V7C15.75 4.92893 14.0711 3.25 12 3.25ZM14.25 10V7C14.25 5.75736 13.2426 4.75 12 4.75C10.7574 4.75 9.75 5.75736 9.75 7V10H14.25Z`,fill:`currentColor`})});function na(){let{t:e}=h(`openhands`),{data:t}=Ze();return t?.confirmation_mode?(0,X.jsx)(it,{closeDelay:100,content:e(z.COMMON$CONFIRMATION_MODE_ENABLED),tooltipClassName:`bg-white text-black hover:bg-transparent`,children:(0,X.jsx)(`div`,{className:`flex items-center justify-center w-[26px] h-[26px] rounded-lg bg-[var(--oh-surface)]`,children:(0,X.jsx)(ta,{width:15,height:15})})}):null}var ra=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{d:`M15 12C15 12.7956 14.6839 13.5587 14.1213 14.1213C13.5587 14.6839 12.7956 15 12 15C11.2044 15 10.4413 14.6839 9.87868 14.1213C9.31607 13.5587 9 12.7956 9 12C9 11.2044 9.31607 10.4413 9.87868 9.87868C10.4413 9.31607 11.2044 9 12 9C12.7956 9 13.5587 9.31607 14.1213 9.87868C14.6839 10.4413 15 11.2044 15 12Z`,fill:`currentColor`})});function ia({status:e,statusColor:t}){return(0,X.jsx)(`div`,{"data-testid":`chat-status-indicator`,className:r(`w-full max-w-full rounded-[100px] p-1 bg-[var(--oh-surface)] flex items-center gap-1`),children:(0,X.jsxs)(s,{mode:`wait`,children:[(0,X.jsx)(V.span,{className:`flex-shrink-0 animate-[pulse_1.2s_ease-in-out_infinite]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,X.jsx)(ra,{className:`w-4 h-4`,color:t})},`dot-${e}`),(0,X.jsx)(V.span,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.3},className:`pr-1.5 font-normal text-[11px] leading-[16px] normal-case break-words whitespace-normal`,children:e},`text-${e}`)]})})}var aa=()=>{let e=m(),{navigate:t}=rt(),{t:n}=h(`openhands`),{data:r}=K(),{trackConversationCreated:i}=Xe();return y({mutationFn:async()=>{if(!r?.id)throw Error(`No active conversation`);let e=await mt.createConversation(void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,r.sandbox_id??void 0);if(e.status===`ERROR`)throw Error(e.detail||`Failed to create new conversation`);return{newConversationId:e.app_conversation_id?e.app_conversation_id:`task-${e.id}`,oldConversationId:r.id,taskId:e.id}},onMutate:()=>{v.loading(n(z.CONVERSATION$CLEARING),{...D,id:`clear-conversation`})},onSuccess:r=>{i({conversationId:r.newConversationId,taskId:r.taskId,hasRepository:!1,hasWorkspace:!1,hasInitialQuery:!1,hasParentConversation:!1,entryPoint:`new_command`}),v.dismiss(`clear-conversation`),E(n(z.CONVERSATION$CLEAR_SUCCESS)),t(`/conversations/${r.newConversationId}`),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]})},onError:e=>{v.dismiss(`clear-conversation`);let t=n(z.CONVERSATION$CLEAR_UNKNOWN_ERROR);e instanceof Error?t=e.message:typeof e==`string`&&(t=e),C(n(z.CONVERSATION$CLEAR_FAILED,{error:t}))}})};function oa(e,t){return e?`github`:t?`replay`:`direct`}function sa(){let{trackInitialQuerySubmitted:e,trackUserMessageSent:t}=Xe(),{setMessageToSend:n}=H(),{errorMessage:r,errorCode:i,removeErrorMessage:a,setErrorMessage:o}=Wn(),s=f(),{isTask:c,taskStatus:l,taskDetail:u}=qt(),d=c,p=Un(),{send:m}=Se(),{renderableEvents:g,allConversationEvents:_,totalEvents:v,hasSubstantiveAgentActions:y,userEventsExist:b}=yi(),x=Y(e=>e.enqueuePendingMessage),S=Y(e=>e.markPendingMessageError),w=Y(e=>e.pendingMessages),{t:T}=h(`openhands`),E=Z.useRef(null),{scrollDomToBottom:D,onChatBodyScroll:O,hitBottom:k,autoScroll:ee,setAutoScroll:A,setHitBottom:j}=ge(E),{mutate:M,isPending:N}=aa(),{curAgentState:P}=G(),{handleBuildPlanClick:te}=xe(),{data:I}=K(),L=I?.sandbox_status??null,re=mn(),{isConfigured:ie,isLoading:ae}=yn(),oe=!ae&&!ie,R=P===F.RUNNING||P===F.LOADING;Z.useEffect(()=>{if(R)return;let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),te(e),D())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[R,te,D]);let{selectedRepository:ce,replayJson:de}=zi(),{conversationId:B}=Pn(),pe=qn(e=>{let t=B?e.statusByConversation[B]:void 0;return t?.active?`${t.iteration}:${t.status}`:null}),{mutateAsync:me}=ea(),{isLoading:he,hasMore:_e,loadOlder:ve}=xi(B),ye=Z.useRef(null),be=Z.useCallback(e=>{if(d||he||!_e)return;let t=e.scrollTop<=80,n=e.scrollHeight<=e.clientHeight+80;!t&&!n||(ye.current={scrollHeight:e.scrollHeight,scrollTop:e.scrollTop},ve().catch(e=>{ye.current=null,o(e instanceof Error&&e.message?e.message:T(z.ERROR$GENERIC))}))},[_e,he,d,ve,o,T]),Ce=Z.useCallback(e=>{e.deltaY<0&&e.currentTarget.scrollTop<=0&&be(e.currentTarget)},[be]),we=Z.useMemo(()=>B?w.some(e=>$t(B,e.conversationId)):!1,[w,B]),Te=Zn(e=>B?(e.entriesByConversation[B]?.length??0)>0:!1),Ee=Yt({isLoadingHistory:p?.isLoadingHistory===!0,hasUserEvents:b,hasPendingUserMessages:we,hasSubstantiveAgentActions:y,hasModelEntries:Te}),De=_.length>0||we||!p?.isLoadingHistory,Oe=!!B,ke=!De&&!c,je=async(r,i,a)=>{if(r.trim()===`/new`){if(!B){C(T(z.CONVERSATION$CLEAR_NO_ID));return}if(v===0){C(T(z.CONVERSATION$CLEAR_EMPTY));return}if(N)return;M();return}let o=[...i],s=[...a];v===0?e({entryPoint:oa(ce!==null,de!==null),queryCharacterLength:r.length,replayJsonSize:de?.length}):t({sessionMessageCount:v,currentMessageLength:r.length});let c=en([...o,...s]);if(!c.isValid){C(`Error: ${c.errorMessage}`);return}let l=o.map(e=>Zt(e)),u=await Promise.all(l),d=new Date().toISOString(),{skipped_files:f,uploaded_files:p}=s.length>0?await me({conversationId:B,files:s}):{skipped_files:[],uploaded_files:[]};f.forEach(e=>C(e.reason));let h=`${T(z.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE)}: ${p.join(`
|
|
19
19
|
|
|
20
|
-
`)}`,g=p.length>0?`${r}\n\n${h}`:r,_=x({conversationId:B,text:r,content:g,imageUrls:u,fileUrls:p,timestamp:d});E(),n(``);try{await m(le(g,u,p,d))}catch(e){S(_,e instanceof Error?e.message:w(z.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}};Z.useEffect(()=>{if(ye.current&&T.current){let{scrollHeight:e,scrollTop:t}=ye.current,n=T.current,r=n.scrollHeight-e;r>0&&(n.scrollTop=t+r),ye.current=null;return}ee&&E()},[g.length,we,pe,E]);let Me=Z.useRef(be);Z.useEffect(()=>{Me.current=be}),Z.useEffect(()=>{let e=T.current;e&&Me.current(e)},[g.length,_e]);let Ne={scrollRef:T,autoScroll:ee,setAutoScroll:A,scrollDomToBottom:E,hitBottom:k,setHitBottom:j,onChatBodyScroll:O},Pe=P===F.LOADING||P===F.INIT,Fe=P===F.STOPPED,Ie=P===F.PAUSED,Le=se({isPausing:Ie,isTask:c,taskStatus:l,isStartingStatus:Pe,isStopStatus:Fe,curAgentState:P}),V=ne({isPausing:Ie,isTask:c,taskStatus:l,taskDetail:u,isStartingStatus:Pe,isStopStatus:Fe,curAgentState:P,errorMessage:r,t:w});return(0,X.jsx)(ue,{value:Ne,children:(0,X.jsxs)(`div`,{className:`relative flex h-full flex-col justify-between px-4`,"data-testid":`chat-interface`,children:[!y&&!we&&!b&&!Te&&!ke&&!d&&v===0&&!re&&!oe&&(0,X.jsx)(Li,{onSuggestionsClick:e=>n(e)}),(0,X.jsxs)(`div`,{ref:T,"data-testid":`chat-scroll-container`,onScroll:e=>{O(e.currentTarget),be(e.currentTarget)},onWheel:Ce,className:`custom-scrollbar-always flex min-h-0 grow flex-col gap-2 overflow-x-hidden overflow-y-auto px-0 pt-4 pb-8 md:px-4`,children:[ke&&Oe&&(0,X.jsx)(Wi,{}),ke&&!Oe&&(0,X.jsx)(`div`,{className:`flex justify-center`,"data-testid":`loading-spinner`,children:(0,X.jsx)(Ye,{size:`small`})}),he&&(0,X.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-3 text-sm text-neutral-400`,"data-testid":`loading-older-events`,children:[(0,X.jsx)(Ye,{size:`small`}),(0,X.jsx)(`span`,{children:w(z.CHAT_INTERFACE$FETCHING_OLDER_MESSAGES)})]}),(0,X.jsx)(fe,{conversationId:B,anchorEventId:null}),De&&g.length>0&&(0,X.jsx)(Ae,{messages:g,allEvents:_}),(0,X.jsx)($i,{}),(0,X.jsx)(Br,{conversationId:B})]}),(0,X.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-[6px] pb-4`,children:[(0,X.jsx)(Qi,{conversationId:B}),(0,X.jsx)(zr,{conversationId:B}),r&&(0,X.jsx)(Ki,{message:r,code:i,onDismiss:a,onRetry:r===`Unable to connect to server`?()=>f?.reconnect():void 0,onReauth:Pr(i)?()=>s(`/settings/agents`):void 0}),oe&&!re&&(0,X.jsx)(bn,{}),re?(0,X.jsxs)(`div`,{"data-testid":`archived-conversation-banner`,className:`mx-1 px-4 py-3 rounded-lg bg-[var(--oh-surface)] border border-[var(--oh-border-subtle)]`,children:[(0,X.jsx)(`p`,{className:`text-xs font-semibold text-[var(--oh-foreground)]`,children:w(L===`ERROR`?z.CHAT_INTERFACE$ERROR_SANDBOX_TITLE:z.CHAT_INTERFACE$ARCHIVED_SANDBOX_TITLE)}),(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] mt-0.5`,children:w(L===`ERROR`?z.CHAT_INTERFACE$ERROR_SANDBOX_DESCRIPTION:z.CHAT_INTERFACE$ARCHIVED_SANDBOX_DESCRIPTION)})]}):(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-full mb-1 z-20`,children:(0,X.jsxs)(`div`,{className:`flex justify-between relative`,children:[(0,X.jsxs)(`div`,{className:`flex items-end gap-1 pointer-events-auto`,children:[(0,X.jsx)(na,{}),Pe&&(0,X.jsx)(ia,{statusColor:Le,status:V})]}),k?P===F.RUNNING&&(0,X.jsx)(`div`,{className:`pointer-events-none absolute inset-x-9 bottom-0 flex justify-center`,children:(0,X.jsx)(Di,{events:_})}):(0,X.jsx)(`div`,{className:`absolute left-1/2 transform -translate-x-1/2 bottom-0 pointer-events-auto`,children:(0,X.jsx)(Vi,{onClick:E})})]})}),(0,X.jsx)(vi,{onSubmit:je,disabled:N||oe,hasStartedConversation:Ee})]})]})]})})}function ca({isRightPanelShown:e}){return(0,X.jsx)(`div`,{className:`flex justify-center w-full h-full`,children:(0,X.jsx)(`div`,{className:`w-full min-w-0 max-w-[800px] h-full flex flex-col min-h-0 transition-all duration-300 ease-in-out`,children:(0,X.jsx)(sa,{})})})}function la({children:e}){return(0,X.jsx)(`div`,{className:`absolute inset-0`,children:e})}function ua({children:e}){return(0,X.jsx)(`div`,{className:`flex flex-col h-full w-full`,children:e})}function da({children:e}){return(0,X.jsx)(`div`,{className:`overflow-hidden flex-grow h-full w-full relative`,children:e})}function fa({className:e}){let{t}=h(`openhands`);return(0,X.jsxs)(`div`,{className:R(`bg-[var(--oh-surface)] flex h-full w-full flex-col items-center justify-center gap-3`,e),children:[(0,X.jsx)(Ke,{className:`h-8 w-8 shrink-0 animate-spin text-tertiary-light`,"aria-hidden":!0}),(0,X.jsx)(Te,{as:`p`,role:`status`,"aria-live":`polite`,className:`block w-full text-center text-base font-normal leading-5`,duration:1,spread:2,children:t(z.HOME$LOADING)})]})}function pa({children:e,onReady:t}){return(0,Z.useLayoutEffect)(()=>{t()},[t]),e}function ma({onPending:e}){return(0,Z.useLayoutEffect)(()=>{e()},[e]),(0,X.jsx)(fa,{})}var ha={duration:.35,ease:`easeInOut`};function ga({showAgentLoading:e,tabKey:t,children:n}){let r=pe(),[i,a]=(0,Z.useState)(!1);(0,Z.useLayoutEffect)(()=>{a(!1)},[t]);let o=(0,Z.useCallback)(()=>{a(!0)},[]),c=(0,Z.useCallback)(()=>{a(!1)},[]),l=e||i;return r?(0,X.jsx)(`div`,{className:`relative h-full w-full overflow-hidden`,children:l?(0,X.jsx)(fa,{}):(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsx)(ma,{onPending:o}),children:(0,X.jsx)(pa,{onReady:c,children:n})})}):(0,X.jsxs)(`div`,{className:`relative h-full w-full overflow-hidden`,children:[(0,X.jsx)(V.div,{className:`absolute inset-0 h-full w-full`,initial:!1,animate:{opacity:+!l},transition:ha,"aria-hidden":l,children:(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsx)(ma,{onPending:o}),children:(0,X.jsx)(pa,{onReady:c,children:n})})}),(0,X.jsx)(s,{children:l?(0,X.jsx)(V.div,{className:`absolute inset-0 z-10 h-full w-full`,initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:ha,children:(0,X.jsx)(fa,{})},`conversation-tab-loading-overlay`):null})]})}var _a=(0,Z.lazy)(()=>c(()=>import(`./files-tab-DEq8MbHu.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95]))),va=(0,Z.lazy)(()=>c(()=>import(`./browser-tab-D4a4Ou_w.js`),__vite__mapDeps([96,2,1,11,5,6,17,3,4,7,14,10,15,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,97,98,92]))),ya=(0,Z.lazy)(()=>c(()=>import(`./planner-tab-BWk8885v.js`),__vite__mapDeps([99,1,2,11,5,6,13,3,4,7,14,15,16,17,10,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,100,53,54,51,55,56,57,58,59,60,61,62,63,64,65,50,52,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92]))),ba=(0,Z.lazy)(()=>c(()=>import(`./task-list-tab-R3ac6m7O.js`),__vite__mapDeps([101,1,2,11,5,6,13,3,4,7,14,15,16,17,10,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,92]))),xa=(0,Z.lazy)(()=>c(()=>import(`./terminal-yqkNdEAx.js`),__vite__mapDeps([102,1,2,11,5,6,103,104,17,3,4,7,14,10,15,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,53,54,51,55,47,56,57,58,37,59,60,61,62,38,63,64,65,50,52,42,66,40,67,68,48,69,70,71,72,46,73,74,75,76,77,41,78,79,80,81,82,83,84,85,86,87,88,44,89,90,91,92]))),Sa={tasklist:{component:ba},files:{component:_a},browser:{component:va},terminal:{component:xa},planner:{component:ya}};function Ca(){let{selectedTab:e,shouldShownAgentLoading:t}=H(),{conversationId:n}=q(),r=(0,Z.useMemo)(()=>Sa[e]??Sa.files,[e]).component,i=e===`terminal`?`${e}-${n}`:e??`files`;return(0,X.jsx)(ua,{children:(0,X.jsx)(da,{children:(0,X.jsx)(ga,{showAgentLoading:t,tabKey:i,children:(0,X.jsx)(la,{children:(0,X.jsx)(r,{})},i)})})})}var wa=()=>{let e=m(),t=Wn(e=>e.removeErrorMessage);return y({mutationKey:[`start-conversation`],mutationFn:async e=>yt(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{xt(e,r.conversationId)},onSuccess:(n,r)=>{t(),bt(e,r.conversationId,ee.RUNNING)}})},Ta=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM10 9H14A1 1 0 0 1 15 10V14A1 1 0 0 1 14 15H10A1 1 0 0 1 9 14V10A1 1 0 0 1 10 9Z`,fill:`currentColor`})}),Ea=e=>(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.9 1.50004C15.3 1.65004 17.55 2.85004 19.2 4.50004C21.15 6.60004 22.2 9.15004 22.2 12.15C22.2 14.55 21.3 16.8 19.8 18.75C18.3 20.55 16.2 21.9 13.8 22.35C11.4 22.8 9 22.5 6.9 21.3C4.8 20.1 3.15 18.3 2.25 16.05C1.35 13.8 1.2 11.25 1.95 9.00004C2.7 6.60004 4.05 4.65004 6.15 3.30004C8.1 1.95004 10.5 1.35004 12.9 1.50004ZM13.65 20.85C15.6 20.4 17.4 19.35 18.75 17.7C19.95 16.05 20.7 14.1 20.55 12C20.55 9.60004 19.65 7.20004 18 5.55004C16.5 4.05004 14.7 3.15004 12.6 3.00004C10.65 2.85004 8.55 3.30004 6.9 4.50004C5.25 5.70004 4.05 7.35004 3.45 9.45004C2.85 11.4 2.85 13.5 3.75 15.45C4.65 17.4 6 18.9 7.8 19.95C9.6 21 11.7 21.3 13.65 20.85Z`,fill:`currentColor`}),(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9 7.49998L10.1655 6.87598L16.9155 11.376V12.624L10.1655 17.124L9 16.5V7.49998ZM10.5 8.90098V15.099L15.1485 12L10.5 8.90098Z`,fill:`currentColor`})]});function Da({icon:e,text:t,onClick:n,testId:r}){return(0,X.jsx)(U,{testId:r,onClick:n,children:(0,X.jsxs)(`div`,{className:`flex min-w-0 w-full items-center justify-between gap-2`,children:[(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,X.jsx)(`span`,{className:ot,"aria-hidden":!0,children:e})]})})}function Oa({className:e=``,executionStatus:t,isPausing:n=!1}){let{curAgentState:r}=G(),{isTask:i,taskStatus:a,taskDetail:o}=qt(),{t:s}=h(`openhands`),{errorMessage:c}=Wn(),l=r===F.LOADING||r===F.INIT,u=ce(t)||te(t),d=se({isPausing:n,isTask:i,taskStatus:a,isStartingStatus:l,isStopStatus:u,curAgentState:r}),f=ne({isPausing:n,isTask:i,taskStatus:a,taskDetail:o,isStartingStatus:l,isStopStatus:u,curAgentState:r,errorMessage:c,t:s});return(0,X.jsx)(`div`,{className:e,"data-testid":`server-status`,children:(0,X.jsxs)(`div`,{className:`flex items-center`,children:[(0,X.jsx)(ra,{className:`w-6 h-6 shrink-0`,color:d}),(0,X.jsx)(`span`,{className:`text-[13px] text-white font-normal`,children:f})]})})}function ka({onClose:e,onStopServer:t,onStartServer:n,executionStatus:r,position:i=`top`,className:a=``,isPausing:o=!1}){let{t:s}=h(`openhands`),c=Ft(e),l=I(r),u=te(r),d=l||u;return(0,X.jsxs)(Lt,{ref:c,testId:`server-status-context-menu`,position:i,alignment:`left`,size:`default`,className:R(`left-2 w-fit min-w-42`,a),children:[(0,X.jsx)(Oa,{executionStatus:r,isPausing:o,className:`pl-0 pr-2 py-1`}),d&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ue,{inset:`menu`}),l&&t&&(0,X.jsx)(Da,{icon:(0,X.jsx)(Ta,{width:18,height:18}),text:s(z.COMMON$STOP_RUNTIME),onClick:t,testId:`stop-server-button`}),u&&n&&(0,X.jsx)(Da,{icon:(0,X.jsx)(Ea,{width:18,height:18}),text:s(z.COMMON$START_RUNTIME),onClick:n,testId:`start-server-button`})]})]})}var Aa=e(i(),1);function ja({isPublic:e,onToggle:t,ariaLabel:n}){return(0,X.jsxs)(`label`,{className:`relative inline-flex shrink-0 cursor-pointer items-center`,children:[(0,X.jsx)(`input`,{hidden:!0,type:`checkbox`,"data-testid":`share-publicly-button`,checked:e,"aria-label":n,onChange:e=>t(e.target.checked)}),(0,X.jsx)(`span`,{"aria-hidden":!0,className:R(`inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out`,e?`bg-white`:`bg-base-secondary`),children:(0,X.jsx)(`span`,{className:R(`block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out`,e?`translate-x-[calc(1rem-1px)] bg-base-secondary`:`translate-x-px bg-tertiary-light`)})})]})}function Ma({onClose:e,onRename:t,onDelete:n,onStop:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onShowHooks:s,onTogglePublic:c,onCopyShareLink:l,onExportTranscript:u,onDownloadConversation:d,shareUrl:f,position:p=`bottom`,anchorRef:m}){let g=ar(),{t:_}=h(`openhands`),{backend:v}=O(),{data:y}=K(),b=mn(),x=Ft(e),S=m?.current??null,[C,w]=Z.useState();Z.useLayoutEffect(()=>{if(!S)return;let e=()=>{let e=S.getBoundingClientRect();if(!e)return;let t={position:`fixed`,zIndex:9999};p===`top`?t.bottom=window.innerHeight-e.top+8:t.top=e.bottom+8,t.left=e.left,w(t)};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[S,p]);let T=!!(a||o||s),E=!!i,D=!!(r||n),k=v.kind===`cloud`?z.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:z.COMMON$STOP_CONVERSATION,ee=v.kind===`cloud`&&!!c,A=y?.public||!1,j=!!S,M=(0,X.jsxs)(Lt,{ref:x,testId:`conversation-name-context-menu`,position:p,alignment:`left`,className:R(g?`right-0 translate-x-[34%] left-auto`:``,j?`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`:``),children:[t&&(0,X.jsx)(U,{testId:`rename-button`,onClick:t,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Bt,{width:16,height:16}),text:_(z.BUTTON$RENAME)})}),T&&(0,X.jsx)(Ue,{testId:`separator-tools`,inset:`menu`}),o&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`show-skills-button`,onClick:o,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Vt,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:_(z.CONVERSATION$SHOW_SKILLS)})})}),s&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`show-hooks-button`,onClick:s,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Cn,{width:16,height:16,"aria-hidden":!0}),text:_(z.CONVERSATION$SHOW_HOOKS)})})}),a&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`show-agent-tools-button`,onClick:a,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(He,{width:16,height:16}),text:_(z.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),u&&(0,X.jsx)(U,{testId:`export-transcript-button`,onClick:u,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Tt,{width:16,height:16}),text:_(z.BUTTON$EXPORT_TRANSCRIPT)})}),d&&(0,X.jsx)(U,{testId:`download-trajectory-button`,onClick:d,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Tt,{width:16,height:16}),text:_(z.BUTTON$DOWNLOAD_CONVERSATION_DATA)})}),(E||D)&&(0,X.jsx)(Ue,{testId:`separator-info-control`,inset:`menu`}),i&&(0,X.jsx)(U,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Mt,{width:16,height:16}),text:_(z.BUTTON$DISPLAY_COST)})}),ee&&c&&(0,X.jsxs)(`li`,{className:`flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]`,children:[(0,X.jsx)(`span`,{className:`flex shrink-0 items-center text-[var(--oh-muted)]`,"aria-hidden":!0,children:(0,X.jsx)(sr,{size:16})}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:_(z.CONVERSATION$SHARE_PUBLICLY)}),(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center`,children:[A&&f&&l&&(0,X.jsxs)(`div`,{className:`mr-2 flex items-center gap-0.5`,children:[(0,X.jsx)(`button`,{type:`button`,"data-testid":`copy-share-link-button`,onClick:l,className:`rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:_(z.BUTTON$COPY_TO_CLIPBOARD),children:(0,X.jsx)(Gt,{width:14,height:14})}),(0,X.jsx)(`a`,{"data-testid":`open-share-link-button`,href:f,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),className:`rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:_(z.BUTTON$OPEN_IN_NEW_TAB),children:(0,X.jsx)(ze,{size:14,"aria-hidden":!0})})]}),(0,X.jsx)(ja,{isPublic:A,onToggle:c,ariaLabel:_(z.CONVERSATION$SHARE_PUBLICLY)})]})]}),r&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`stop-button`,onClick:r,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Be,{width:16,height:16}),text:_(k)})})}),n&&(0,X.jsx)(U,{testId:`delete-button`,onClick:n,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Rt,{width:16,height:16}),text:_(z.COMMON$DELETE_CONVERSATION)})})]});return j?typeof document>`u`||!C?null:Aa.createPortal((0,X.jsx)(`div`,{style:C,children:M}),document.body):M}function Na({onClose:e}){let{t}=h(`openhands`);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(dt,{onClose:e,testId:`close-metrics-modal`}),(0,X.jsx)(`div`,{className:`w-full pr-6`,children:(0,X.jsx)(tt,{title:t(z.CONVERSATION$METRICS_INFO)})})]})}function Pa({currentCost:e,maxBudget:t}){let n=e/t*100;return(0,X.jsx)(`div`,{className:`w-full h-1.5 bg-tertiary rounded-full overflow-hidden mt-1`,children:(0,X.jsx)(`div`,{className:R(`h-full transition-all duration-300`,n>80?`bg-red-500`:`bg-blue-500`),style:{width:`${Math.min(100,n)}%`}})})}function Fa({currentCost:e,maxBudget:t}){let{t:n}=h(`openhands`),r=e/t*100;return(0,X.jsx)(`div`,{className:`flex justify-end`,children:(0,X.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(z.CONVERSATION$BUDGET_USAGE_FORMAT,{currentCost:`$${e.toFixed(4)}`,maxBudget:`$${t.toFixed(4)}`,usagePercentage:r.toFixed(2),used:n(z.CONVERSATION$USED)})})})}function Ia({cost:e,maxBudgetPerTask:t}){let{t:n}=h(`openhands`);return e===null?null:(0,X.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)]`,children:t!==null&&t>0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Pa,{currentCost:e,maxBudget:t}),(0,X.jsx)(Fa,{currentCost:e,maxBudget:t})]}):(0,X.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(z.CONVERSATION$NO_BUDGET_LIMIT)})})}function La({cost:e,maxBudgetPerTask:t}){let{t:n}=h(`openhands`);return e===null?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex justify-between items-center pb-2`,children:[(0,X.jsx)(`span`,{className:`text-lg font-semibold`,children:n(z.CONVERSATION$TOTAL_COST)}),(0,X.jsxs)(`span`,{className:`font-semibold`,children:[`$`,e.toFixed(4)]})]}),(0,X.jsx)(Ia,{cost:e,maxBudgetPerTask:t})]})}function Ra({label:e,value:t,labelClassName:n=``,valueClassName:r=`font-semibold`}){return(0,X.jsxs)(`div`,{className:`flex justify-between items-center border-b border-[var(--oh-border-subtle)] pb-2`,children:[(0,X.jsx)(`span`,{className:n,children:e}),(0,X.jsx)(`span`,{className:r,children:t})]})}function za({usage:e}){let{t}=h(`openhands`);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ra,{label:t(z.CONVERSATION$INPUT),value:e.prompt_tokens.toLocaleString()}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 pl-4 text-sm`,children:[(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(z.CONVERSATION$CACHE_HIT)}),(0,X.jsx)(`span`,{className:`text-right`,children:e.cache_read_tokens.toLocaleString()}),(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(z.CONVERSATION$CACHE_WRITE)}),(0,X.jsx)(`span`,{className:`text-right`,children:e.cache_write_tokens.toLocaleString()})]}),(0,X.jsx)(Ra,{label:t(z.CONVERSATION$OUTPUT),value:e.completion_tokens.toLocaleString()}),(0,X.jsx)(Ra,{label:t(z.CONVERSATION$TOTAL),value:(e.prompt_tokens+e.completion_tokens).toLocaleString(),labelClassName:`font-semibold`,valueClassName:`font-bold`})]})}function Ba({perTurnToken:e,contextWindow:t}){let{t:n}=h(`openhands`),r=t>0?e/t*100:0,i=Math.min(100,r);return(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,X.jsx)(`span`,{className:`font-semibold`,children:n(z.CONVERSATION$CONTEXT_WINDOW)})}),(0,X.jsx)(`div`,{className:`w-full h-1.5 bg-tertiary rounded-full overflow-hidden`,children:(0,X.jsx)(`div`,{className:`h-full bg-foreground transition-all duration-300`,style:{width:`${i}%`}})}),(0,X.jsx)(`div`,{className:`flex justify-end`,children:(0,X.jsxs)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:[e.toLocaleString(),` / `,t.toLocaleString(),` (`,r.toFixed(2),`% `,n(z.CONVERSATION$USED),`)`]})})]})}function Va(){let{t:e}=h(`openhands`);return(0,X.jsx)(`div`,{className:`text-center`,children:(0,X.jsx)(`p`,{className:`text-[var(--oh-muted)]`,children:e(z.CONVERSATION$NO_METRICS)})})}function Ha(e){let{stats:t}=e;if(!t?.usage_to_metrics)return{accumulated_cost:0,max_budget_per_task:null,accumulated_token_usage:null};let n=0,r=null,i=null;for(let e of Object.values(t.usage_to_metrics))n+=e.accumulated_cost,r===null&&e.max_budget_per_task!==null&&(r=e.max_budget_per_task),e.accumulated_token_usage&&(i=i===null?{...e.accumulated_token_usage}:{prompt_tokens:i.prompt_tokens+e.accumulated_token_usage.prompt_tokens,completion_tokens:i.completion_tokens+e.accumulated_token_usage.completion_tokens,cache_read_tokens:i.cache_read_tokens+e.accumulated_token_usage.cache_read_tokens,cache_write_tokens:i.cache_write_tokens+e.accumulated_token_usage.cache_write_tokens,context_window:Math.max(i.context_window,e.accumulated_token_usage.context_window),per_turn_token:Math.max(i.per_turn_token,e.accumulated_token_usage.per_turn_token)});return{accumulated_cost:n,max_budget_per_task:r,accumulated_token_usage:i}}var Ua=(e,t,n,r=!0)=>{let i=b({queryKey:[`conversation-metrics`,e,t,n],queryFn:async()=>{if(!e)throw Error(`Conversation ID is required`);return Ha(await mt.getRuntimeConversation(e,t,n))},enabled:r&&!!e&&!!t,staleTime:1e3*30,gcTime:1e3*60*5,refetchInterval:1e3*30,retry:!1});return{data:i.data,isLoading:i.isLoading,error:i.error}};function Wa({isOpen:e,onOpenChange:t}){let n=Kn(),{data:r}=K(),i=r?.id,a=r?.conversation_url,o=r?.session_api_key,{data:s}=Ua(i,a,o,e),c=(0,Z.useMemo)(()=>s?{cost:s.accumulated_cost,max_budget_per_task:s.max_budget_per_task,usage:s.accumulated_token_usage?{prompt_tokens:s.accumulated_token_usage.prompt_tokens??0,completion_tokens:s.accumulated_token_usage.completion_tokens??0,cache_read_tokens:s.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:s.accumulated_token_usage.cache_write_tokens??0,context_window:s.accumulated_token_usage.context_window??0,per_turn_token:s.accumulated_token_usage.per_turn_token??0}:null}:n,[s,n]);return e?(0,X.jsx)(Qe,{onClose:()=>t(!1),children:(0,X.jsxs)($e,{testID:`metrics-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,X.jsx)(Na,{onClose:()=>t(!1)}),(0,X.jsxs)(`div`,{className:`w-full`,children:[(c?.cost!==null||c?.usage!==null)&&(0,X.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,X.jsxs)(`div`,{className:`grid gap-3`,children:[(0,X.jsx)(La,{cost:c?.cost??null,maxBudgetPerTask:c?.max_budget_per_task??null}),c?.usage!==null&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(za,{usage:c.usage}),(0,X.jsx)(Ba,{perTurnToken:c.usage.per_turn_token,contextWindow:c.usage.context_window})]})]})}),!c?.cost&&!c?.usage&&(0,X.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,X.jsx)(Va,{})})]})]})}):null}var Ga=new Set([`BrowserClickAction`,`BrowserCloseTabAction`,`BrowserGetContentAction`,`BrowserGetStateAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserNavigateAction`,`BrowserScrollAction`,`BrowserSwitchTabAction`,`BrowserTypeAction`,`ExecuteBashAction`,`FileEditorAction`,`GlobAction`,`GrepAction`,`InvokeSkillAction`,`MCPToolAction`,`StrReplaceEditorAction`,`TaskAction`,`TaskTrackerAction`,`TerminalAction`,`ThinkAction`]),Ka=new Set([`BrowserObservation`,`CanvasUIObservation`,`ExecuteBashObservation`,`FileEditorObservation`,`GlobObservation`,`GrepObservation`,`InvokeSkillObservation`,`MCPToolObservation`,`StrReplaceEditorObservation`,`SwitchLLMObservation`,`TaskTrackerObservation`,`TaskObservation`,`TerminalObservation`]),Q=e=>e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim(),qa=(e,t=100)=>e.length>t?`${e.slice(0,t)}…`:e,Ja=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString()},$=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`),Ya=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replace(/(!?)\[([^\]]*)\]\(\s*((?:javascript|data|vbscript):[^)]*)\)/gi,`$1\\[$2\\]($3)`).replace(/^(\s{0,3})\[([^\]]+)\]:(\s*<?(?:javascript|data|vbscript):)/gim,`$1\\[$2\\]:$3`),Xa=e=>Q(e||w.t(z.TRANSCRIPT_EXPORT$DEFAULT_TITLE))||w.t(z.TRANSCRIPT_EXPORT$DEFAULT_TITLE),Za=(e,t)=>Q(w.t(e,t).replace(/<\/?(?:cmd|path)>/g,``)),Qa=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),$a=e=>e.replace(/(?:Action|Observation)$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).trim(),eo=e=>{let t=Q(e.summary||``);return t&&!Qa(t)?t:Q(e.tool_name)||$a(e.action.kind)},to=(e,t)=>t?eo(t):Q(e.tool_name)||$a(e.observation.kind),no=e=>e.filter(e=>e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(`
|
|
20
|
+
`)}`,g=p.length>0?`${r}\n\n${h}`:r,_=x({conversationId:B,text:r,content:g,imageUrls:u,fileUrls:p,timestamp:d});D(),n(``);try{await m(le(g,u,p,d))}catch(e){S(_,e instanceof Error?e.message:T(z.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}};Z.useEffect(()=>{if(ye.current&&E.current){let{scrollHeight:e,scrollTop:t}=ye.current,n=E.current,r=n.scrollHeight-e;r>0&&(n.scrollTop=t+r),ye.current=null;return}ee&&D()},[g.length,we,pe,D]);let Me=Z.useRef(be);Z.useEffect(()=>{Me.current=be}),Z.useEffect(()=>{let e=E.current;e&&Me.current(e)},[g.length,_e]);let Ne={scrollRef:E,autoScroll:ee,setAutoScroll:A,scrollDomToBottom:D,hitBottom:k,setHitBottom:j,onChatBodyScroll:O},Pe=P===F.LOADING||P===F.INIT,Fe=P===F.STOPPED,Ie=P===F.PAUSED,Le=se({isPausing:Ie,isTask:c,taskStatus:l,isStartingStatus:Pe,isStopStatus:Fe,curAgentState:P}),V=ne({isPausing:Ie,isTask:c,taskStatus:l,taskDetail:u,isStartingStatus:Pe,isStopStatus:Fe,curAgentState:P,errorMessage:r,t:T});return(0,X.jsx)(ue,{value:Ne,children:(0,X.jsxs)(`div`,{className:`relative flex h-full flex-col justify-between px-4`,"data-testid":`chat-interface`,children:[!y&&!we&&!b&&!Te&&!ke&&!d&&v===0&&!re&&!oe&&(0,X.jsx)(Li,{onSuggestionsClick:e=>n(e)}),(0,X.jsxs)(`div`,{ref:E,"data-testid":`chat-scroll-container`,onScroll:e=>{O(e.currentTarget),be(e.currentTarget)},onWheel:Ce,className:`custom-scrollbar-always flex min-h-0 grow flex-col gap-2 overflow-x-hidden overflow-y-auto px-0 pt-4 pb-8 md:px-4`,children:[ke&&Oe&&(0,X.jsx)(Wi,{}),ke&&!Oe&&(0,X.jsx)(`div`,{className:`flex justify-center`,"data-testid":`loading-spinner`,children:(0,X.jsx)(Ye,{size:`small`})}),he&&(0,X.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-3 text-sm text-neutral-400`,"data-testid":`loading-older-events`,children:[(0,X.jsx)(Ye,{size:`small`}),(0,X.jsx)(`span`,{children:T(z.CHAT_INTERFACE$FETCHING_OLDER_MESSAGES)})]}),(0,X.jsx)(fe,{conversationId:B,anchorEventId:null}),De&&g.length>0&&(0,X.jsx)(Ae,{messages:g,allEvents:_}),(0,X.jsx)($i,{}),(0,X.jsx)(Br,{conversationId:B})]}),(0,X.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-[6px] pb-4`,children:[(0,X.jsx)(Qi,{conversationId:B}),(0,X.jsx)(zr,{conversationId:B}),r&&(0,X.jsx)(Ki,{message:r,code:i,onDismiss:a,onRetry:r===`Unable to connect to server`?()=>p?.reconnect():void 0,onReauth:Pr(i)?()=>s(`/settings/agents`):void 0}),oe&&!re&&(0,X.jsx)(bn,{}),re?(0,X.jsxs)(`div`,{"data-testid":`archived-conversation-banner`,className:`mx-1 px-4 py-3 rounded-lg bg-[var(--oh-surface)] border border-[var(--oh-border-subtle)]`,children:[(0,X.jsx)(`p`,{className:`text-xs font-semibold text-[var(--oh-foreground)]`,children:T(L===`ERROR`?z.CHAT_INTERFACE$ERROR_SANDBOX_TITLE:z.CHAT_INTERFACE$ARCHIVED_SANDBOX_TITLE)}),(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] mt-0.5`,children:T(L===`ERROR`?z.CHAT_INTERFACE$ERROR_SANDBOX_DESCRIPTION:z.CHAT_INTERFACE$ARCHIVED_SANDBOX_DESCRIPTION)})]}):(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-full mb-1 z-20`,children:(0,X.jsxs)(`div`,{className:`flex justify-between relative`,children:[(0,X.jsxs)(`div`,{className:`flex items-end gap-1 pointer-events-auto`,children:[(0,X.jsx)(na,{}),Pe&&(0,X.jsx)(ia,{statusColor:Le,status:V})]}),k?P===F.RUNNING&&(0,X.jsx)(`div`,{className:`pointer-events-none absolute inset-x-9 bottom-0 flex justify-center`,children:(0,X.jsx)(Di,{events:_})}):(0,X.jsx)(`div`,{className:`absolute left-1/2 transform -translate-x-1/2 bottom-0 pointer-events-auto`,children:(0,X.jsx)(Vi,{onClick:D})})]})}),(0,X.jsx)(vi,{onSubmit:je,disabled:N||oe,hasStartedConversation:Ee})]})]})]})})}function ca({isRightPanelShown:e}){return(0,X.jsx)(`div`,{className:`flex justify-center w-full h-full`,children:(0,X.jsx)(`div`,{className:`w-full min-w-0 max-w-[800px] h-full flex flex-col min-h-0 transition-all duration-300 ease-in-out`,children:(0,X.jsx)(sa,{})})})}function la({children:e}){return(0,X.jsx)(`div`,{className:`absolute inset-0`,children:e})}function ua({children:e}){return(0,X.jsx)(`div`,{className:`flex flex-col h-full w-full`,children:e})}function da({children:e}){return(0,X.jsx)(`div`,{className:`overflow-hidden flex-grow h-full w-full relative`,children:e})}function fa({className:e}){let{t}=h(`openhands`);return(0,X.jsxs)(`div`,{className:R(`bg-[var(--oh-surface)] flex h-full w-full flex-col items-center justify-center gap-3`,e),children:[(0,X.jsx)(Ke,{className:`h-8 w-8 shrink-0 animate-spin text-tertiary-light`,"aria-hidden":!0}),(0,X.jsx)(Te,{as:`p`,role:`status`,"aria-live":`polite`,className:`block w-full text-center text-base font-normal leading-5`,duration:1,spread:2,children:t(z.HOME$LOADING)})]})}function pa({children:e,onReady:t}){return(0,Z.useLayoutEffect)(()=>{t()},[t]),e}function ma({onPending:e}){return(0,Z.useLayoutEffect)(()=>{e()},[e]),(0,X.jsx)(fa,{})}var ha={duration:.35,ease:`easeInOut`};function ga({showAgentLoading:e,tabKey:t,children:n}){let r=pe(),[i,a]=(0,Z.useState)(!1);(0,Z.useLayoutEffect)(()=>{a(!1)},[t]);let o=(0,Z.useCallback)(()=>{a(!0)},[]),c=(0,Z.useCallback)(()=>{a(!1)},[]),l=e||i;return r?(0,X.jsx)(`div`,{className:`relative h-full w-full overflow-hidden`,children:l?(0,X.jsx)(fa,{}):(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsx)(ma,{onPending:o}),children:(0,X.jsx)(pa,{onReady:c,children:n})})}):(0,X.jsxs)(`div`,{className:`relative h-full w-full overflow-hidden`,children:[(0,X.jsx)(V.div,{className:`absolute inset-0 h-full w-full`,initial:!1,animate:{opacity:+!l},transition:ha,"aria-hidden":l,children:(0,X.jsx)(Z.Suspense,{fallback:(0,X.jsx)(ma,{onPending:o}),children:(0,X.jsx)(pa,{onReady:c,children:n})})}),(0,X.jsx)(s,{children:l?(0,X.jsx)(V.div,{className:`absolute inset-0 z-10 h-full w-full`,initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:ha,children:(0,X.jsx)(fa,{})},`conversation-tab-loading-overlay`):null})]})}var _a=(0,Z.lazy)(()=>c(()=>import(`./files-tab-BzofBmF4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96]))),va=(0,Z.lazy)(()=>c(()=>import(`./browser-tab-A94o33Vn.js`),__vite__mapDeps([97,2,1,11,5,6,17,3,4,7,14,10,15,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,98,99,92]))),ya=(0,Z.lazy)(()=>c(()=>import(`./planner-tab-CZcguxTK.js`),__vite__mapDeps([100,1,2,11,5,6,13,3,4,7,14,15,16,17,10,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,101,52,53,50,54,55,56,57,58,59,60,61,62,63,64,65,49,51,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92]))),ba=(0,Z.lazy)(()=>c(()=>import(`./task-list-tab-C19Q_JNf.js`),__vite__mapDeps([102,1,2,11,5,6,13,3,4,7,14,15,16,17,10,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,92]))),xa=(0,Z.lazy)(()=>c(()=>import(`./terminal-CbuMRYal.js`),__vite__mapDeps([103,1,2,11,5,6,104,105,17,3,4,7,14,10,15,12,18,9,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,52,53,50,54,46,55,56,57,36,58,59,60,61,62,37,63,64,65,49,51,41,66,39,67,68,47,69,70,71,72,45,73,74,75,76,77,40,78,79,80,81,82,83,84,85,86,87,88,43,89,90,91,92]))),Sa={tasklist:{component:ba},files:{component:_a},browser:{component:va},terminal:{component:xa},planner:{component:ya}};function Ca(){let{selectedTab:e,shouldShownAgentLoading:t}=H(),{conversationId:n}=q(),r=(0,Z.useMemo)(()=>Sa[e]??Sa.files,[e]).component,i=e===`terminal`?`${e}-${n}`:e??`files`;return(0,X.jsx)(ua,{children:(0,X.jsx)(da,{children:(0,X.jsx)(ga,{showAgentLoading:t,tabKey:i,children:(0,X.jsx)(la,{children:(0,X.jsx)(r,{})},i)})})})}var wa=()=>{let e=m(),t=Wn(e=>e.removeErrorMessage);return y({mutationKey:[`start-conversation`],mutationFn:async e=>yt(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{xt(e,r.conversationId)},onSuccess:(n,r)=>{t(),bt(e,r.conversationId,ee.RUNNING)}})},Ta=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM10 9H14A1 1 0 0 1 15 10V14A1 1 0 0 1 14 15H10A1 1 0 0 1 9 14V10A1 1 0 0 1 10 9Z`,fill:`currentColor`})}),Ea=e=>(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.9 1.50004C15.3 1.65004 17.55 2.85004 19.2 4.50004C21.15 6.60004 22.2 9.15004 22.2 12.15C22.2 14.55 21.3 16.8 19.8 18.75C18.3 20.55 16.2 21.9 13.8 22.35C11.4 22.8 9 22.5 6.9 21.3C4.8 20.1 3.15 18.3 2.25 16.05C1.35 13.8 1.2 11.25 1.95 9.00004C2.7 6.60004 4.05 4.65004 6.15 3.30004C8.1 1.95004 10.5 1.35004 12.9 1.50004ZM13.65 20.85C15.6 20.4 17.4 19.35 18.75 17.7C19.95 16.05 20.7 14.1 20.55 12C20.55 9.60004 19.65 7.20004 18 5.55004C16.5 4.05004 14.7 3.15004 12.6 3.00004C10.65 2.85004 8.55 3.30004 6.9 4.50004C5.25 5.70004 4.05 7.35004 3.45 9.45004C2.85 11.4 2.85 13.5 3.75 15.45C4.65 17.4 6 18.9 7.8 19.95C9.6 21 11.7 21.3 13.65 20.85Z`,fill:`currentColor`}),(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9 7.49998L10.1655 6.87598L16.9155 11.376V12.624L10.1655 17.124L9 16.5V7.49998ZM10.5 8.90098V15.099L15.1485 12L10.5 8.90098Z`,fill:`currentColor`})]});function Da({icon:e,text:t,onClick:n,testId:r}){return(0,X.jsx)(U,{testId:r,onClick:n,children:(0,X.jsxs)(`div`,{className:`flex min-w-0 w-full items-center justify-between gap-2`,children:[(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,X.jsx)(`span`,{className:ot,"aria-hidden":!0,children:e})]})})}function Oa({className:e=``,executionStatus:t,isPausing:n=!1}){let{curAgentState:r}=G(),{isTask:i,taskStatus:a,taskDetail:o}=qt(),{t:s}=h(`openhands`),{errorMessage:c}=Wn(),l=r===F.LOADING||r===F.INIT,u=ce(t)||te(t),d=se({isPausing:n,isTask:i,taskStatus:a,isStartingStatus:l,isStopStatus:u,curAgentState:r}),f=ne({isPausing:n,isTask:i,taskStatus:a,taskDetail:o,isStartingStatus:l,isStopStatus:u,curAgentState:r,errorMessage:c,t:s});return(0,X.jsx)(`div`,{className:e,"data-testid":`server-status`,children:(0,X.jsxs)(`div`,{className:`flex items-center`,children:[(0,X.jsx)(ra,{className:`w-6 h-6 shrink-0`,color:d}),(0,X.jsx)(`span`,{className:`text-[13px] text-white font-normal`,children:f})]})})}function ka({onClose:e,onStopServer:t,onStartServer:n,executionStatus:r,position:i=`top`,className:a=``,isPausing:o=!1}){let{t:s}=h(`openhands`),c=Ft(e),l=I(r),u=te(r),d=l||u;return(0,X.jsxs)(Lt,{ref:c,testId:`server-status-context-menu`,position:i,alignment:`left`,size:`default`,className:R(`left-2 w-fit min-w-42`,a),children:[(0,X.jsx)(Oa,{executionStatus:r,isPausing:o,className:`pl-0 pr-2 py-1`}),d&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ue,{inset:`menu`}),l&&t&&(0,X.jsx)(Da,{icon:(0,X.jsx)(Ta,{width:18,height:18}),text:s(z.COMMON$STOP_RUNTIME),onClick:t,testId:`stop-server-button`}),u&&n&&(0,X.jsx)(Da,{icon:(0,X.jsx)(Ea,{width:18,height:18}),text:s(z.COMMON$START_RUNTIME),onClick:n,testId:`start-server-button`})]})]})}var Aa=e(i(),1);function ja({isPublic:e,onToggle:t,ariaLabel:n}){return(0,X.jsxs)(`label`,{className:`relative inline-flex shrink-0 cursor-pointer items-center`,children:[(0,X.jsx)(`input`,{hidden:!0,type:`checkbox`,"data-testid":`share-publicly-button`,checked:e,"aria-label":n,onChange:e=>t(e.target.checked)}),(0,X.jsx)(`span`,{"aria-hidden":!0,className:R(`inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out`,e?`bg-white`:`bg-base-secondary`),children:(0,X.jsx)(`span`,{className:R(`block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out`,e?`translate-x-[calc(1rem-1px)] bg-base-secondary`:`translate-x-px bg-tertiary-light`)})})]})}function Ma({onClose:e,onRename:t,onDelete:n,onStop:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onShowHooks:s,onTogglePublic:c,onCopyShareLink:l,onExportTranscript:u,onDownloadConversation:d,shareUrl:f,position:p=`bottom`,anchorRef:m}){let g=or(),{t:_}=h(`openhands`),{backend:v}=O(),{data:y}=K(),b=mn(),x=Ft(e),S=m?.current??null,[C,w]=Z.useState();Z.useLayoutEffect(()=>{if(!S)return;let e=()=>{let e=S.getBoundingClientRect();if(!e)return;let t={position:`fixed`,zIndex:9999};p===`top`?t.bottom=window.innerHeight-e.top+8:t.top=e.bottom+8,t.left=e.left,w(t)};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[S,p]);let T=!!(a||o||s),E=!!i,D=!!(r||n),k=v.kind===`cloud`?z.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:z.COMMON$STOP_CONVERSATION,ee=v.kind===`cloud`&&!!c,A=y?.public||!1,j=!!S,M=(0,X.jsxs)(Lt,{ref:x,testId:`conversation-name-context-menu`,position:p,alignment:`left`,className:R(g?`right-0 translate-x-[34%] left-auto`:``,j?`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`:``),children:[t&&(0,X.jsx)(U,{testId:`rename-button`,onClick:t,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Bt,{width:16,height:16}),text:_(z.BUTTON$RENAME)})}),T&&(0,X.jsx)(Ue,{testId:`separator-tools`,inset:`menu`}),o&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`show-skills-button`,onClick:o,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Vt,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:_(z.CONVERSATION$SHOW_SKILLS)})})}),s&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`show-hooks-button`,onClick:s,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Cn,{width:16,height:16,"aria-hidden":!0}),text:_(z.CONVERSATION$SHOW_HOOKS)})})}),a&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`show-agent-tools-button`,onClick:a,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(He,{width:16,height:16}),text:_(z.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),u&&(0,X.jsx)(U,{testId:`export-transcript-button`,onClick:u,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Tt,{width:16,height:16}),text:_(z.BUTTON$EXPORT_TRANSCRIPT)})}),d&&(0,X.jsx)(U,{testId:`download-trajectory-button`,onClick:d,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Tt,{width:16,height:16}),text:_(z.BUTTON$DOWNLOAD_CONVERSATION_DATA)})}),(E||D)&&(0,X.jsx)(Ue,{testId:`separator-info-control`,inset:`menu`}),i&&(0,X.jsx)(U,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Mt,{width:16,height:16}),text:_(z.BUTTON$DISPLAY_COST)})}),ee&&c&&(0,X.jsxs)(`li`,{className:`flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]`,children:[(0,X.jsx)(`span`,{className:`flex shrink-0 items-center text-[var(--oh-muted)]`,"aria-hidden":!0,children:(0,X.jsx)(sr,{size:16})}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:_(z.CONVERSATION$SHARE_PUBLICLY)}),(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center`,children:[A&&f&&l&&(0,X.jsxs)(`div`,{className:`mr-2 flex items-center gap-0.5`,children:[(0,X.jsx)(`button`,{type:`button`,"data-testid":`copy-share-link-button`,onClick:l,className:`rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:_(z.BUTTON$COPY_TO_CLIPBOARD),children:(0,X.jsx)(Gt,{width:14,height:14})}),(0,X.jsx)(`a`,{"data-testid":`open-share-link-button`,href:f,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),className:`rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:_(z.BUTTON$OPEN_IN_NEW_TAB),children:(0,X.jsx)(ze,{size:14,"aria-hidden":!0})})]}),(0,X.jsx)(ja,{isPublic:A,onToggle:c,ariaLabel:_(z.CONVERSATION$SHARE_PUBLICLY)})]})]}),r&&(0,X.jsx)(ln,{isDisabled:b,children:(0,X.jsx)(U,{testId:`stop-button`,onClick:r,isDisabled:b,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Be,{width:16,height:16}),text:_(k)})})}),n&&(0,X.jsx)(U,{testId:`delete-button`,onClick:n,children:(0,X.jsx)(W,{icon:(0,X.jsx)(Rt,{width:16,height:16}),text:_(z.COMMON$DELETE_CONVERSATION)})})]});return j?typeof document>`u`||!C?null:Aa.createPortal((0,X.jsx)(`div`,{style:C,children:M}),document.body):M}function Na({onClose:e}){let{t}=h(`openhands`);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(dt,{onClose:e,testId:`close-metrics-modal`}),(0,X.jsx)(`div`,{className:`w-full pr-6`,children:(0,X.jsx)(tt,{title:t(z.CONVERSATION$METRICS_INFO)})})]})}function Pa({currentCost:e,maxBudget:t}){let n=e/t*100;return(0,X.jsx)(`div`,{className:`w-full h-1.5 bg-tertiary rounded-full overflow-hidden mt-1`,children:(0,X.jsx)(`div`,{className:R(`h-full transition-all duration-300`,n>80?`bg-red-500`:`bg-blue-500`),style:{width:`${Math.min(100,n)}%`}})})}function Fa({currentCost:e,maxBudget:t}){let{t:n}=h(`openhands`),r=e/t*100;return(0,X.jsx)(`div`,{className:`flex justify-end`,children:(0,X.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(z.CONVERSATION$BUDGET_USAGE_FORMAT,{currentCost:`$${e.toFixed(4)}`,maxBudget:`$${t.toFixed(4)}`,usagePercentage:r.toFixed(2),used:n(z.CONVERSATION$USED)})})})}function Ia({cost:e,maxBudgetPerTask:t}){let{t:n}=h(`openhands`);return e===null?null:(0,X.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)]`,children:t!==null&&t>0?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Pa,{currentCost:e,maxBudget:t}),(0,X.jsx)(Fa,{currentCost:e,maxBudget:t})]}):(0,X.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(z.CONVERSATION$NO_BUDGET_LIMIT)})})}function La({cost:e,maxBudgetPerTask:t}){let{t:n}=h(`openhands`);return e===null?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex justify-between items-center pb-2`,children:[(0,X.jsx)(`span`,{className:`text-lg font-semibold`,children:n(z.CONVERSATION$TOTAL_COST)}),(0,X.jsxs)(`span`,{className:`font-semibold`,children:[`$`,e.toFixed(4)]})]}),(0,X.jsx)(Ia,{cost:e,maxBudgetPerTask:t})]})}function Ra({label:e,value:t,labelClassName:n=``,valueClassName:r=`font-semibold`}){return(0,X.jsxs)(`div`,{className:`flex justify-between items-center border-b border-[var(--oh-border-subtle)] pb-2`,children:[(0,X.jsx)(`span`,{className:n,children:e}),(0,X.jsx)(`span`,{className:r,children:t})]})}function za({usage:e}){let{t}=h(`openhands`);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ra,{label:t(z.CONVERSATION$INPUT),value:e.prompt_tokens.toLocaleString()}),(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 pl-4 text-sm`,children:[(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(z.CONVERSATION$CACHE_HIT)}),(0,X.jsx)(`span`,{className:`text-right`,children:e.cache_read_tokens.toLocaleString()}),(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(z.CONVERSATION$CACHE_WRITE)}),(0,X.jsx)(`span`,{className:`text-right`,children:e.cache_write_tokens.toLocaleString()})]}),(0,X.jsx)(Ra,{label:t(z.CONVERSATION$OUTPUT),value:e.completion_tokens.toLocaleString()}),(0,X.jsx)(Ra,{label:t(z.CONVERSATION$TOTAL),value:(e.prompt_tokens+e.completion_tokens).toLocaleString(),labelClassName:`font-semibold`,valueClassName:`font-bold`})]})}function Ba({perTurnToken:e,contextWindow:t}){let{t:n}=h(`openhands`),r=t>0?e/t*100:0,i=Math.min(100,r);return(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,X.jsx)(`span`,{className:`font-semibold`,children:n(z.CONVERSATION$CONTEXT_WINDOW)})}),(0,X.jsx)(`div`,{className:`w-full h-1.5 bg-tertiary rounded-full overflow-hidden`,children:(0,X.jsx)(`div`,{className:`h-full bg-foreground transition-all duration-300`,style:{width:`${i}%`}})}),(0,X.jsx)(`div`,{className:`flex justify-end`,children:(0,X.jsxs)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:[e.toLocaleString(),` / `,t.toLocaleString(),` (`,r.toFixed(2),`% `,n(z.CONVERSATION$USED),`)`]})})]})}function Va(){let{t:e}=h(`openhands`);return(0,X.jsx)(`div`,{className:`text-center`,children:(0,X.jsx)(`p`,{className:`text-[var(--oh-muted)]`,children:e(z.CONVERSATION$NO_METRICS)})})}function Ha(e){let{stats:t}=e;if(!t?.usage_to_metrics)return{accumulated_cost:0,max_budget_per_task:null,accumulated_token_usage:null};let n=0,r=null,i=null;for(let e of Object.values(t.usage_to_metrics))n+=e.accumulated_cost,r===null&&e.max_budget_per_task!==null&&(r=e.max_budget_per_task),e.accumulated_token_usage&&(i=i===null?{...e.accumulated_token_usage}:{prompt_tokens:i.prompt_tokens+e.accumulated_token_usage.prompt_tokens,completion_tokens:i.completion_tokens+e.accumulated_token_usage.completion_tokens,cache_read_tokens:i.cache_read_tokens+e.accumulated_token_usage.cache_read_tokens,cache_write_tokens:i.cache_write_tokens+e.accumulated_token_usage.cache_write_tokens,context_window:Math.max(i.context_window,e.accumulated_token_usage.context_window),per_turn_token:Math.max(i.per_turn_token,e.accumulated_token_usage.per_turn_token)});return{accumulated_cost:n,max_budget_per_task:r,accumulated_token_usage:i}}var Ua=(e,t,n,r=!0)=>{let i=b({queryKey:[`conversation-metrics`,e,t,n],queryFn:async()=>{if(!e)throw Error(`Conversation ID is required`);return Ha(await mt.getRuntimeConversation(e,t,n))},enabled:r&&!!e&&!!t,staleTime:1e3*30,gcTime:1e3*60*5,refetchInterval:1e3*30,retry:!1});return{data:i.data,isLoading:i.isLoading,error:i.error}};function Wa({isOpen:e,onOpenChange:t}){let n=Kn(),{data:r}=K(),i=r?.id,a=r?.conversation_url,o=r?.session_api_key,{data:s}=Ua(i,a,o,e),c=(0,Z.useMemo)(()=>s?{cost:s.accumulated_cost,max_budget_per_task:s.max_budget_per_task,usage:s.accumulated_token_usage?{prompt_tokens:s.accumulated_token_usage.prompt_tokens??0,completion_tokens:s.accumulated_token_usage.completion_tokens??0,cache_read_tokens:s.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:s.accumulated_token_usage.cache_write_tokens??0,context_window:s.accumulated_token_usage.context_window??0,per_turn_token:s.accumulated_token_usage.per_turn_token??0}:null}:n,[s,n]);return e?(0,X.jsx)(Qe,{onClose:()=>t(!1),children:(0,X.jsxs)($e,{testID:`metrics-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,X.jsx)(Na,{onClose:()=>t(!1)}),(0,X.jsxs)(`div`,{className:`w-full`,children:[(c?.cost!==null||c?.usage!==null)&&(0,X.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,X.jsxs)(`div`,{className:`grid gap-3`,children:[(0,X.jsx)(La,{cost:c?.cost??null,maxBudgetPerTask:c?.max_budget_per_task??null}),c?.usage!==null&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(za,{usage:c.usage}),(0,X.jsx)(Ba,{perTurnToken:c.usage.per_turn_token,contextWindow:c.usage.context_window})]})]})}),!c?.cost&&!c?.usage&&(0,X.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,X.jsx)(Va,{})})]})]})}):null}var Ga=new Set([`BrowserClickAction`,`BrowserCloseTabAction`,`BrowserGetContentAction`,`BrowserGetStateAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserNavigateAction`,`BrowserScrollAction`,`BrowserSwitchTabAction`,`BrowserTypeAction`,`ExecuteBashAction`,`FileEditorAction`,`GlobAction`,`GrepAction`,`InvokeSkillAction`,`MCPToolAction`,`StrReplaceEditorAction`,`TaskAction`,`TaskTrackerAction`,`TerminalAction`,`ThinkAction`]),Ka=new Set([`BrowserObservation`,`CanvasUIObservation`,`ExecuteBashObservation`,`FileEditorObservation`,`GlobObservation`,`GrepObservation`,`InvokeSkillObservation`,`MCPToolObservation`,`StrReplaceEditorObservation`,`SwitchLLMObservation`,`TaskTrackerObservation`,`TaskObservation`,`TerminalObservation`]),Q=e=>e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim(),qa=(e,t=100)=>e.length>t?`${e.slice(0,t)}…`:e,Ja=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString()},$=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`),Ya=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replace(/(!?)\[([^\]]*)\]\(\s*((?:javascript|data|vbscript):[^)]*)\)/gi,`$1\\[$2\\]($3)`).replace(/^(\s{0,3})\[([^\]]+)\]:(\s*<?(?:javascript|data|vbscript):)/gim,`$1\\[$2\\]:$3`),Xa=e=>Q(e||w.t(z.TRANSCRIPT_EXPORT$DEFAULT_TITLE))||w.t(z.TRANSCRIPT_EXPORT$DEFAULT_TITLE),Za=(e,t)=>Q(w.t(e,t).replace(/<\/?(?:cmd|path)>/g,``)),Qa=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),$a=e=>e.replace(/(?:Action|Observation)$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).trim(),eo=e=>{let t=Q(e.summary||``);return t&&!Qa(t)?t:Q(e.tool_name)||$a(e.action.kind)},to=(e,t)=>t?eo(t):Q(e.tool_name)||$a(e.observation.kind),no=e=>e.filter(e=>e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(`
|
|
21
21
|
`),ro=e=>[`${w.t(z.TASK$SUBAGENT)}: ${e.subagent_type}`,`${w.t(z.TASK$QUERY)}:\n${e.prompt}`].join(`
|
|
22
22
|
|
|
23
23
|
`),io=(e,t)=>{let n=t?.action.kind===`TaskAction`?t.action:void 0;return[`${w.t(z.TASK$SUBAGENT)}: ${e.subagent}`,`${w.t(z.TASK$TASK_ID)}: ${e.task_id}`,n?`${w.t(z.TASK$QUERY)}:\n${n.prompt}`:``,`${w.t(z.TASK$RESULT)}:\n${no(e.content)}`].filter(Boolean).join(`
|
|
@@ -87,4 +87,4 @@ This should be a client-only app with no backend. The list should persist in loc
|
|
|
87
87
|
</main>
|
|
88
88
|
</body>
|
|
89
89
|
</html>
|
|
90
|
-
`},_o=(e,t)=>e.timestamp.localeCompare(t.timestamp),vo=async(e,t,n)=>{let r=[],i=new Set,a=new Set,o,s,c=!1,l=!1;for(;;){let e=await t({limit:100,sortOrder:`TIMESTAMP_DESC`,strictPagination:!0,...s?{pageId:s}:{},...o?{timestampLt:o}:{}});if(!Array.isArray(e.items))throw Error(`Invalid transcript history response: expected page.items to be an array.`);r.push(...e.items);let u,d=!1;if(e.items.forEach(e=>{i.has(e.id)||(i.add(e.id),d=!0),(!u||e.timestamp<u)&&(u=e.timestamp)}),e.next_page_id){if(a.has(e.next_page_id))throw Error(`Transcript history pagination repeated a page cursor.`);a.add(e.next_page_id),s=e.next_page_id,o=void 0,c=!0;continue}if(c&&!l||e.items.length<100)break;if(n===void 0)throw Error(`Transcript history pagination cannot prove that all events were loaded.`);if(!u||o&&(!d||u>=o))throw Error(`Transcript history pagination did not advance.`);s=void 0,o=u,l=!0}let u=new Map;r.slice().reverse().forEach(e=>{u.has(e.id)||u.set(e.id,e)}),e.forEach(e=>{u.has(e.id)||u.set(e.id,e)});let d=[...u.values()].sort(_o);if(n!==void 0&&i.size<n)throw Error(`Transcript history is incomplete: expected ${n} persisted events, received ${i.size}.`);return d},yo=`transcript-export-format`;function bo({conversationId:e,conversationUrl:t,sessionApiKey:n,conversationTitle:r,model:i,onClose:a}){let{t:o}=h(`openhands`),{trackConversationExported:s}=Xe(),[c,l]=Z.useState(`markdown`),[u,d]=Z.useState(!0),[f,p]=Z.useState(!0),[m,g]=Z.useState(!1),_=Z.useRef(!1),v=Z.useRef(!1),y=Z.useRef(!0);Z.useEffect(()=>(y.current=!0,()=>{y.current=!1,v.current=!0}),[]);let b=()=>{_.current&&(v.current=!0),a()};return(0,X.jsx)(Qe,{onClose:b,"aria-label":o(z.TRANSCRIPT_EXPORT$TITLE),children:(0,X.jsxs)($e,{testID:`transcript-export-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,X.jsx)(dt,{onClose:b,testId:`close-transcript-export-modal`,className:`absolute right-4 top-4`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 pr-8`,children:[(0,X.jsx)(tt,{title:o(z.TRANSCRIPT_EXPORT$TITLE)}),(0,X.jsx)(et,{description:o(z.TRANSCRIPT_EXPORT$DESCRIPTION)})]}),(0,X.jsxs)(`fieldset`,{className:`flex w-full flex-col gap-2`,children:[(0,X.jsx)(`legend`,{className:`mb-2 text-sm font-medium text-white`,children:o(z.TRANSCRIPT_EXPORT$FORMAT)}),(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-md border border-[var(--oh-border)] px-3 py-2 text-sm text-white`,children:[(0,X.jsx)(`input`,{type:`radio`,name:yo,value:`markdown`,disabled:m,checked:c===`markdown`,onChange:()=>l(`markdown`)}),o(z.TRANSCRIPT_EXPORT$MARKDOWN)]}),(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-md border border-[var(--oh-border)] px-3 py-2 text-sm text-white`,children:[(0,X.jsx)(`input`,{type:`radio`,name:yo,value:`html`,disabled:m,checked:c===`html`,onChange:()=>l(`html`)}),o(z.TRANSCRIPT_EXPORT$HTML)]})]}),(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-sm text-white`,children:[(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,X.jsx)(`input`,{type:`checkbox`,disabled:m,checked:u,onChange:e=>d(e.target.checked)}),o(z.TRANSCRIPT_EXPORT$INCLUDE_TOOL_DETAILS)]}),(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,X.jsx)(`input`,{type:`checkbox`,disabled:m,checked:f,onChange:e=>p(e.target.checked)}),o(z.TRANSCRIPT_EXPORT$INCLUDE_TIMESTAMPS)]})]}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(nt,{type:`button`,variant:`secondary`,onClick:b,testId:`cancel-transcript-export`,children:o(z.BUTTON$CANCEL)}),(0,X.jsx)(nt,{type:`button`,variant:`primary`,onClick:async()=>{if(!_.current){v.current=!1,_.current=!0,g(!0);try{let o=await Qn.getEventCount(e,t??``,n).catch(()=>void 0);if(v.current)return;let l=J.getState(),d=await vo(l.loadedConversationId===e?l.events:[],r=>Qn.searchEvents(e,t,n,r),o);if(v.current)return;let p={includeToolDetails:u,includeTimestamps:f,title:r,model:i},m=c===`markdown`,h=m?mo(d,p):go(d,p),g=m?`md`:`html`;ie(new Blob([h],{type:m?`text/markdown;charset=utf-8`:`text/html;charset=utf-8`}),`conversation-${e}.${g}`),s(c),a()}catch{v.current||D(o(z.ERROR$GENERIC))}finally{_.current=!1,y.current&&g(!1)}}},testId:`confirm-transcript-export`,isDisabled:m,"aria-busy":m,children:o(z.BUTTON$EXPORT_CONVERSATION)})]})]})})}function xo(){let{t:e}=h(`openhands`),{conversationId:t}=q(),{data:n}=K(),{mutate:r}=Pt(),[i,a]=Z.useState(`view`),[o,s]=Z.useState(!1),[c,l]=Z.useState(!1),u=Z.useRef(null),d=Z.useRef(null),{handleDelete:f,handleStop:p,handleDownloadConversation:m,handleDisplayCost:g,handleShowAgentTools:_,handleShowSkills:v,handleShowHooks:y,handleTogglePublic:b,handleCopyShareLink:x,shareUrl:S,handleConfirmDelete:w,handleConfirmStop:T,metricsModalVisible:E,setMetricsModalVisible:D,systemModalVisible:O,setSystemModalVisible:k,skillsModalVisible:ee,setSkillsModalVisible:A,hooksModalVisible:j,setHooksModalVisible:M,confirmDeleteModalVisible:N,setConfirmDeleteModalVisible:P,confirmStopModalVisible:te,setConfirmStopModalVisible:F,systemMessage:I,shouldShowStop:L,shouldShowDownloadConversation:ne,shouldShowDisplayCost:re,shouldShowAgentTools:ie,shouldShowSkills:ae,shouldShowHooks:oe}=Xt({conversationId:t,executionStatus:n?.execution_status,showOptions:!0,onContextMenuToggle:s});return Z.useEffect(()=>{i===`edit`&&u.current?.focus()},[i]),n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 h-[22px] text-base font-normal text-left pl-0 lg:pl-1 min-w-0`,"data-testid":`conversation-name`,children:[i===`edit`?(0,X.jsx)(`input`,{ref:u,"data-testid":`conversation-name-input`,onClick:e=>{i===`edit`&&(e.preventDefault(),e.stopPropagation())},onBlur:()=>{if(u.current?.value&&t){let i=u.current.value.trim();i!==n?.title&&r({conversationId:t,newTitle:i},{onSuccess:()=>{C(e(z.CONVERSATION$TITLE_UPDATED))}})}else u.current&&(u.current.value=n?.title??``);a(`view`)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:n.title||``,className:`text-white leading-5 bg-transparent border-none outline-none text-base font-normal w-fit max-w-fit field-sizing-content`}):(0,X.jsx)(`div`,{className:`text-white leading-5 truncate`,"data-testid":`conversation-name-title`,onDoubleClick:()=>{a(`edit`)},title:n.title||``,children:n.title}),i!==`edit`&&(0,X.jsxs)(`div`,{ref:d,className:`relative flex items-center shrink-0`,children:[(0,X.jsx)(zt,{onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!o)}}),o&&(0,X.jsx)(Ma,{onClose:()=>s(!1),onRename:e=>{e.preventDefault(),e.stopPropagation(),a(`edit`),s(!1)},onDelete:f,onStop:L?p:void 0,onDisplayCost:re?g:void 0,onShowAgentTools:ie?_:void 0,onShowSkills:ae?v:void 0,onShowHooks:oe?y:void 0,onTogglePublic:b,onCopyShareLink:x,shareUrl:S,onExportTranscript:e=>{e.preventDefault(),e.stopPropagation(),l(!0),s(!1)},onDownloadConversation:ne?m:void 0,position:`bottom`,anchorRef:d})]})]}),(0,X.jsx)(Wa,{isOpen:E,onOpenChange:D}),c&&t&&(0,X.jsx)(bo,{conversationId:t,conversationUrl:n.conversation_url,sessionApiKey:n.session_api_key,conversationTitle:n.title,model:n.llm_model,onClose:()=>l(!1)}),(0,X.jsx)(_n,{isOpen:O,onClose:()=>k(!1),systemMessage:I||null}),ee&&(0,X.jsx)(sn,{onClose:()=>A(!1)}),j&&(0,X.jsx)(xn,{onClose:()=>M(!1)}),N&&(0,X.jsx)(Dt,{onConfirm:w,onCancel:()=>P(!1),conversationTitle:n?.title||``}),te&&(0,X.jsx)(Et,{onConfirm:T,onCancel:()=>F(!1)})]}):null}function So({children:e,tooltip:t,ariaLabel:n}){return(0,X.jsx)(it,{content:t,placement:`bottom`,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,X.jsx)(`span`,{"data-aria-label":n,children:e})})}function Co({className:e}){let{t}=h(`openhands`),n=ar(),r=mn(),i=p(),{conversationId:a}=q(),{isRightPanelShown:o,setHasRightPanelToggled:s,setIsRightPanelShown:c,setSelectedTab:l}=H(),u=()=>{if(r)return;if(n){if(!a)return;s(!0),c(!0);let{selectedTab:e}=H.getState();e||l(`files`),i(`/conversations/${a}/panel`);return}let e=!o;if(s(e),c(e),e){let{selectedTab:e}=H.getState();e||l(`files`)}},d=t(r?z.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:n?z.COMMON$SHOW_PANEL:o?z.COMMON$HIDE_PANEL:z.COMMON$SHOW_PANEL),f=n?!1:o;return(0,X.jsx)(So,{tooltip:d,ariaLabel:d,children:(0,X.jsx)(`button`,{type:`button`,onClick:u,disabled:r,className:R(jt,r&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,e),"aria-label":d,"aria-pressed":f,"aria-disabled":r,"data-testid":`right-panel-toggle`,children:(0,X.jsx)(At,{className:`w-5 h-5 -scale-x-100`})})})}function wo(){let{conversationId:e}=q(),{data:t}=K(),{curAgentState:n}=G(),{isTask:r,taskStatus:i}=qt(),{mutate:a}=Ve(),{mutate:o}=wa(),{providers:s}=Ht(),c=t?.execution_status??null,l=se({isPausing:!1,isTask:r,taskStatus:i,isStartingStatus:n===F.LOADING||n===F.INIT,isStopStatus:ce(c),curAgentState:n});return(0,X.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,X.jsxs)(`div`,{className:`flex items-center min-w-0`,children:[(0,X.jsxs)(`div`,{className:`group relative shrink-0`,children:[(0,X.jsx)(ra,{className:`ml-[3.5px] w-6 h-6 cursor-pointer`,color:l}),(0,X.jsx)(ka,{onClose:()=>{},onStopServer:I(c)?t=>{t.preventDefault(),t.stopPropagation(),e&&a({conversationId:e})}:void 0,onStartServer:te(c)?t=>{t.preventDefault(),t.stopPropagation(),e&&o({conversationId:e,providers:s})}:void 0,executionStatus:c,position:`bottom`,className:`opacity-0 invisible pointer-events-none group-hover:opacity-100 group-hover:visible group-hover:pointer-events-auto bottom-full left-0 mt-0 min-h-fit`,isPausing:!1})]}),(0,X.jsx)(xo,{})]}),(0,X.jsx)(Co,{className:`mr-2`})]})}var To=e=>(0,X.jsxs)(`svg`,{width:20,height:20,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,X.jsx)(`path`,{d:`M3 10.5L6.5 14L14 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M7 10.5L10.5 14L18 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`})]}),Eo=160,Do={duration:.22,ease:[.4,0,.2,1]};function Oo({tabValue:e,icon:t,onClick:n,isActive:r,label:i,className:a,measureOnly:o,suppressLayoutAnimation:s=!1}){let c=pe(),l=o||c||!1,u=!l&&!s,d=R(`flex items-center rounded-md cursor-pointer`,`pl-1.5 pr-2 py-1 lg:py-1.5`,`text-[var(--oh-muted)] bg-transparent`,r&&`bg-[var(--oh-interactive-active)] text-white`,r?`hover:text-white hover:bg-[var(--oh-interactive-hover)]`:`hover:text-white hover:bg-white/5`,r?`focus-within:text-white`:`focus-within:text-[var(--oh-muted)]`,a),f=(0,X.jsx)(t,{className:R(`h-4 w-4 shrink-0 text-inherit`)}),p=i&&r?(0,X.jsx)(`span`,{className:`whitespace-nowrap text-sm font-normal`,children:i}):null,m=i?(0,X.jsx)(V.span,{initial:!1,animate:{maxWidth:r?Eo:0,opacity:+!!r,marginLeft:r?8:0},transition:Do,className:`block overflow-hidden whitespace-nowrap text-sm font-normal`,"aria-hidden":!r,children:i}):null;return l?(0,X.jsxs)(`button`,{type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:R(d,`gap-2`),children:[f,p]}):(0,X.jsxs)(V.button,{layout:u?`position`:!1,type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:d,transition:u?{layout:Do}:void 0,children:[f,m]})}var ko=e=>(0,X.jsx)(`svg`,{viewBox:`0 0 128 128`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,X.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M90.767 127.126a7.968 7.968 0 0 0 6.35-.244l26.353-12.681a8 8 0 0 0 4.53-7.209V21.009a8 8 0 0 0-4.53-7.21L97.117 1.12a7.97 7.97 0 0 0-9.093 1.548l-50.45 46.026L15.6 32.013a5.328 5.328 0 0 0-6.807.302l-7.048 6.411a5.335 5.335 0 0 0-.006 7.888L20.796 64 1.74 81.387a5.336 5.336 0 0 0 .006 7.887l7.048 6.411a5.327 5.327 0 0 0 6.807.303l21.974-16.68 50.45 46.025a7.96 7.96 0 0 0 2.743 1.793Zm5.252-92.183L57.74 64l38.28 29.058V34.943Z`})});function Ao(){let e=E().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function jo(e){if(e.length===0)return[];let t=Ao(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await Je({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var Mo=e=>{let t=O(),n=t.backend.kind===`cloud`;return b({queryKey:[`cloud`,`sandbox`,t.backend.id,t.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await jo([e]);return t??null},enabled:n&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},No=`VSCODE`,Po=()=>{let{t:e}=h(`openhands`),{conversationId:t}=q(),n=$r({allowAgentError:!0}),{data:r}=K(),i=O(),a=r?.conversation_url??null,o=r?.session_api_key??null,s=r?.sandbox_id??null,c=i.backend.kind===`cloud`,l=Mo(c?s:null),u=b({queryKey:[`unified`,`vscode_url`,`local`,t,a,o],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return{url:kt((await mt.getVSCodeUrl(t,a,o).catch(()=>_t.getVSCodeUrl(t))).vscode_url)}},enabled:!c&&n&&!!t,refetchOnMount:!0,retry:3}),d,f,p,m,g,_,v;if(c){let e=l.data?.exposed_urls?.find(e=>e.name===No)?.url??null;d=l.isSuccess?{url:kt(e)}:void 0,f=l.isLoading,p=l.isError,m=l.isSuccess,g=l.status,_=l.error,v=async()=>{let e=await l.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===No)?.url??null;return{data:e.data?{url:kt(t)}:void 0}}}else d=u.data,f=u.isLoading,p=u.isError,m=u.isSuccess,g=u.status,_=u.error,v=async()=>({data:(await u.refetch()).data});let y=d&&!d.url?e(z.VSCODE$URL_NOT_AVAILABLE):null;return{data:d?{...d,error:y}:void 0,error:_,isLoading:f,isError:p,isSuccess:m,status:g,refetch:v}};function Fo(){let{t:e}=h(`openhands`),{curAgentState:t}=G(),{data:n,refetch:r,isLoading:i}=Po(),a=A.includes(t);return(0,X.jsxs)(`button`,{type:`button`,onClick:async()=>{let e=n?.url;e||=(await r()).data?.url??null,e&&window.open(e,`_blank`,`noopener,noreferrer`)},disabled:i||a,"aria-label":e(z.VSCODE$OPEN),title:e(z.VSCODE$OPEN),"data-testid":`drawer-vscode-link`,className:R(`inline-flex items-center gap-1.5 rounded-[7px] border border-[var(--oh-border)] bg-base-secondary px-2 py-1 text-xs`,`text-[var(--oh-muted)] transition-colors hover:enabled:bg-surface-raised hover:enabled:text-white`,`cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`),children:[(0,X.jsx)(ko,{className:`h-[15px] w-[15px] shrink-0`,"aria-hidden":!0}),(0,X.jsx)(`span`,{children:e(z.FILES$VSCODE)}),(0,X.jsx)(ze,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})]})}var Io=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.13832 8.76476C8.25957 8.17949 9.52697 7.9727 10.7515 8.14436L14.9025 2.52826L21.4717 9.09737L15.8555 13.2484C16.0272 14.4729 15.8204 15.7403 15.2351 16.8616C15.1872 16.9535 15.1366 17.0444 15.0836 17.1343C14.8318 17.5605 14.5228 17.9624 14.1566 18.3286L10.4443 14.6163L4.75207 20.3085H3.69141V19.2478L9.38361 13.5556L5.6713 9.84332C6.03755 9.47708 6.43936 9.16808 6.86562 8.91632C6.95547 8.86326 7.04641 8.81274 7.13832 8.76476ZM15.0735 4.82054L19.1794 8.92641L14.2461 12.5727L14.3701 13.4567C14.492 14.3266 14.3596 15.2233 13.9758 16.0265L7.97338 10.0241C8.77665 9.64035 9.67335 9.50789 10.5432 9.62984L11.4272 9.75376L15.0735 4.82054Z`,fill:`currentColor`})}),Lo=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{d:`M10.9706 10.1586C10.2819 10.0621 9.56905 10.1784 8.93842 10.5075C8.88672 10.5345 8.83557 10.5629 8.78504 10.5928C8.54529 10.7344 8.3193 10.9082 8.11331 11.1142L9.83702 12.8372L7.00054 15.75L7 17H8.25064L11.1628 14.1632L12.8857 15.8865C13.0917 15.6805 13.2655 15.4545 13.4071 15.2147C13.437 15.1642 13.4654 15.1131 13.4924 15.0614C13.8215 14.4308 13.9378 13.718 13.8413 13.0293L17 10.6946L13.3053 7L10.9706 10.1586Z`,fill:`currentColor`})});function Ro(e){if(Fn(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function zo(){let e=J(e=>e.events);return(0,Z.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=Ro(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}function Bo({isOpen:e,onClose:t,ignoreOutsideClickRef:n,anchorRef:r}){let i=Ft(t,n),[a,o]=(0,Z.useState)();(0,Z.useLayoutEffect)(()=>{if(!e||!r?.current){o(void 0);return}let t=()=>{let e=r.current?.getBoundingClientRect();e&&o({position:`fixed`,zIndex:9999,top:e.bottom+8,left:e.left})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[e,r]);let{t:s}=h(`openhands`),{conversationId:c}=q(),{state:l,setUnpinnedTabs:u,setSelectedTab:d}=ct(c),{selectedTab:f,isRightPanelShown:p,setSelectedTab:m}=H(),{navigateToTab:g}=ye(),{hasTaskList:_}=zo(),{backend:v}=O(),y=mn(),b=[{tab:`planner`,icon:Ge,i18nKey:z.COMMON$PLANNER},{tab:`files`,icon:Sn,i18nKey:z.COMMON$FILES},{tab:`terminal`,icon:cr,i18nKey:z.COMMON$TERMINAL},{tab:`browser`,icon:We,i18nKey:z.COMMON$BROWSER}];_&&b.unshift({tab:`tasklist`,icon:To,i18nKey:z.COMMON$TASK_LIST});let x=b.filter(({tab:e})=>e!==`planner`||v.kind===`cloud`),S=e=>{y||(g(e),t())},C=(e,t)=>{if(y){t.preventDefault(),t.stopPropagation();return}if(t.preventDefault(),t.stopPropagation(),l.unpinnedTabs.includes(e))u(l.unpinnedTabs.filter(t=>t!==e));else{let t=[...l.unpinnedTabs,e];if(u(t),f===e&&p){let n=x.find(({tab:n})=>n!==e&&!t.includes(n));n&&(m(n.tab),d(n.tab))}}};if(!e)return null;let w=!!(r?.current&&a),T=(0,X.jsx)(Lt,{ref:i,theme:w?`popover`:`default`,position:w?`none`:`bottom`,alignment:w?`none`:`left`,spacing:w?`none`:`default`,className:R(`z-[9999] w-fit`,w?`mt-0`:`mt-2`),children:x.map(({tab:e,icon:t,i18nKey:n})=>{let r=!l.unpinnedTabs.includes(e);return(0,X.jsx)(`li`,{className:`list-none`,children:(0,X.jsx)(ln,{isDisabled:y,children:(0,X.jsxs)(`div`,{className:R(`group flex h-[30px] w-full min-w-0 items-stretch rounded`,!y&&`hover:bg-[var(--oh-interactive-hover)]`,y&&`opacity-50`),children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-open-${e}`,disabled:y,className:R(`flex min-w-0 flex-1 items-center gap-2 rounded-l p-2 text-start text-white`,at,y?`cursor-not-allowed`:`cursor-pointer`),onClick:()=>S(e),children:[(0,X.jsx)(`span`,{className:ot,"aria-hidden":!0,children:(0,X.jsx)(t,{className:`h-4 w-4`})}),(0,X.jsx)(`span`,{className:`text-sm`,children:s(n)})]}),(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-pin-${e}`,disabled:y,className:R(`flex shrink-0 items-center justify-center rounded-r px-2 text-white`,at,y?`cursor-not-allowed`:`cursor-pointer hover:bg-white/10`),"aria-pressed":r,"aria-label":s(r?z.CONVERSATION$UNPIN_TAB:z.CONVERSATION$PIN_TAB),onClick:t=>C(e,t),children:r?(0,X.jsx)(`span`,{className:R(`-mr-[5px] ml-auto`,ot),"aria-hidden":!0,children:(0,X.jsx)(Lo,{className:`h-7 w-7`})}):(0,X.jsx)(`span`,{className:R(`ml-auto`,ot),"aria-hidden":!0,children:(0,X.jsx)(Io,{className:`h-4.5 w-4.5`})})})]})})},e)})});return w&&a&&typeof document<`u`?Aa.createPortal((0,X.jsx)(`div`,{style:a,children:T}),document.body):T}function Vo({variant:e=`default`,isPanelResizing:t=!1}){let{conversationId:n}=q(),{setSelectedTab:r,planContent:i}=H(),[a,o]=(0,Z.useState)(!1),{state:s}=ct(n),{hasTaskList:c}=zo(),{backend:l}=O(),{handleBuildPlanClick:u}=xe(),{curAgentState:d}=G(),{selectTab:f,isTabActive:p,onTabChange:m,selectedTab:g,isRightPanelShown:_}=ye();(0,Z.useEffect)(()=>{r(s.selectedTab)},[r,s.selectedTab]),(0,Z.useEffect)(()=>{_&&(g||m(`files`))},[_,g,m]);let{t:v,i18n:y}=h(`openhands`),b=[{tabValue:`files`,isActive:p(`files`),icon:Sn,onClick:()=>f(`files`),tooltipContent:v(z.COMMON$FILES),tooltipAriaLabel:v(z.COMMON$FILES),label:v(z.COMMON$FILES)},{tabValue:`planner`,isActive:p(`planner`),icon:Ge,onClick:()=>f(`planner`),tooltipContent:v(z.COMMON$PLANNER),tooltipAriaLabel:v(z.COMMON$PLANNER),label:v(z.COMMON$PLANNER)},{tabValue:`terminal`,isActive:p(`terminal`),icon:cr,onClick:()=>f(`terminal`),tooltipContent:v(z.COMMON$TERMINAL),tooltipAriaLabel:v(z.COMMON$TERMINAL),label:v(z.COMMON$TERMINAL),className:`pl-2`},{tabValue:`browser`,isActive:p(`browser`),icon:We,onClick:()=>f(`browser`),tooltipContent:v(z.COMMON$BROWSER),tooltipAriaLabel:v(z.COMMON$BROWSER),label:v(z.COMMON$BROWSER)}];c&&b.splice(1,0,{tabValue:`tasklist`,isActive:p(`tasklist`),icon:To,onClick:()=>f(`tasklist`),tooltipContent:v(z.COMMON$TASK_LIST),tooltipAriaLabel:v(z.COMMON$TASK_LIST),label:v(z.COMMON$TASK_LIST)});let x=b.filter(e=>e.tabValue===`planner`&&l.kind!==`cloud`?!1:s.unpinnedTabs.includes(e.tabValue)?g===e.tabValue:!0),S=s.unpinnedTabs.join(`,`),C=d===F.RUNNING||d===F.LOADING||!i,w=(0,Z.useRef)(null),T=(0,Z.useRef)(null),E=(0,Z.useRef)(null),D=(0,Z.useRef)(null),k=(0,Z.useRef)(null),[ee,A]=(0,Z.useState)(x.length);(0,Z.useLayoutEffect)(()=>{let e=w.current,t=T.current,n=E.current,r=D.current;if(!e||!t||!n||!r)return;let i=()=>{let i=t.querySelectorAll(`[data-tab-measure="true"]`),a=i.length,o=e.getBoundingClientRect().width;if(o===0){A(a);return}let s=Array.from(i).map(e=>e.getBoundingClientRect().width);if(s.length!==a||a===0){A(Math.max(0,a));return}let c=n.getBoundingClientRect().width,l=r.getBoundingClientRect().width,u=getComputedStyle(e).columnGap||getComputedStyle(e).gap,d=parseFloat(u)||6,f=0;for(let e=a;e>=0;--e){let t=c+l;for(let n=0;n<e;n+=1)t+=s[n]??0;if(e>0&&(t+=e*d),t<=o+.5){f=e;break}}A(e=>e===f?e:f)};if(i(),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(i);return a.observe(e),()=>a.disconnect()},[S,x.length,c,l.kind,g,_,y.language]);let j=Math.min(ee,x.length);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:R(`relative w-full min-w-0`,e===`compact`?`flex h-full min-h-0 items-center py-0 pl-0 pr-1`:`min-h-10 p-1`),children:[(0,X.jsx)(`div`,{ref:T,"aria-hidden":!0,className:`pointer-events-none absolute top-0 left-[-10000px] flex flex-nowrap items-center gap-1.5`,children:x.map(({tabValue:e,icon:t,isActive:n,tooltipContent:r,tooltipAriaLabel:i,label:a,className:o},s)=>(0,X.jsx)(So,{tooltip:r,ariaLabel:i,children:(0,X.jsx)(Oo,{tabValue:e,icon:t,onClick:()=>{},isActive:n,label:a,className:R(o,`shrink-0`),measureOnly:!0})},`measure-${e}-${s}`))}),(0,X.jsxs)(`div`,{ref:w,className:`flex w-full min-w-0 flex-nowrap items-center justify-start`,children:[(0,X.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center justify-start overflow-hidden`,children:(0,X.jsxs)(`div`,{className:`flex w-fit max-w-full min-w-0 items-center gap-1.5`,children:[(0,X.jsx)(gr,{id:`conversation-drawer-tabs`,children:(0,X.jsx)(`div`,{className:`flex w-fit max-w-full min-w-0 flex-nowrap items-center gap-1.5 overflow-x-hidden`,children:x.slice(0,j).map(({tabValue:e,icon:n,onClick:r,isActive:i,tooltipContent:a,tooltipAriaLabel:o,label:s,className:c},l)=>(0,X.jsx)(So,{tooltip:a,ariaLabel:o,children:(0,X.jsx)(Oo,{tabValue:e,icon:n,onClick:r,isActive:i,label:s,className:R(c,`shrink-0`),suppressLayoutAnimation:t})},`${e}-${l}`))})}),(0,X.jsxs)(`div`,{ref:E,className:`relative shrink-0`,children:[(0,X.jsx)(zt,{ref:k,onClick:()=>o(!a),ariaLabel:v(z.COMMON$MORE_OPTIONS),iconClassName:e===`compact`?Ot:void 0}),(0,X.jsx)(Bo,{isOpen:a,onClose:()=>o(!1),ignoreOutsideClickRef:k,anchorRef:k})]})]})}),(0,X.jsx)(`div`,{ref:D,className:R(`ml-auto shrink-0`,l.kind===`cloud`&&`pr-1`),children:l.kind===`cloud`&&(0,X.jsx)(Fo,{})})]})]}),p(`planner`)&&(0,X.jsx)(`div`,{className:R(`flex h-10 min-h-10 shrink-0 items-center border-t border-[var(--oh-border)] pl-[10px] pr-1`),children:(0,X.jsx)(`button`,{type:`button`,onClick:u,disabled:C,className:R(`flex h-5 min-w-17 items-center justify-center rounded bg-white px-2 transition-opacity`,C?`cursor-not-allowed opacity-50`:`cursor-pointer hover:opacity-90`),"data-testid":`planner-tab-build-button`,children:(0,X.jsxs)(Kt.Text,{className:`text-[11px] font-normal leading-5 text-black`,children:[v(z.COMMON$BUILD),` ⌘↩`]})})})]})}function Ho({onMouseDown:e,className:t,isDragging:n=!1}){let[r,i]=(0,Z.useState)(!1),a=n||r;return(0,X.jsxs)(`div`,{className:R(`relative z-10 w-0 shrink-0 self-stretch`,t),"aria-hidden":!0,children:[(0,X.jsx)(`div`,{className:`absolute inset-y-0 left-1/2 w-3 min-w-[12px] -translate-x-1/2 cursor-ew-resize`,onMouseDown:e,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)}),(0,X.jsx)(`div`,{className:R(`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`,a?`bg-white`:`bg-transparent`),"aria-hidden":!0})]})}var Uo=200;function Wo({defaultLeftWidth:e=50,minLeftWidth:t=30,maxLeftWidth:n=80,storageKey:r=`desktop-layout-panel-width`}={}){let[i,a]=or(r,e),o=(0,Z.useCallback)(e=>Math.max(t,Math.min(n,e)),[t,n]),[s,c]=(0,Z.useState)(()=>o(i)),[l,u]=(0,Z.useState)(!1),d=(0,Z.useRef)(null),f=(0,Z.useCallback)(e=>{e.preventDefault(),u(!0)},[]),p=(0,Z.useCallback)(e=>{if(!l||!d.current)return;let t=d.current.getBoundingClientRect();c(o((e.clientX-t.left)/t.width*100))},[l,o]),m=(0,Z.useCallback)(()=>{l&&(u(!1),a(s))},[l,s,a]);return(0,Z.useLayoutEffect)(()=>{if(!l)return;let e=document.createElement(`div`);return e.setAttribute(`aria-hidden`,`true`),e.dataset.panelDragShield=``,Object.assign(e.style,{position:`fixed`,inset:`0`,zIndex:String(Uo),cursor:`ew-resize`}),document.body.appendChild(e),document.addEventListener(`mousemove`,p),document.addEventListener(`mouseup`,m),document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`,()=>{document.removeEventListener(`mousemove`,p),document.removeEventListener(`mouseup`,m),document.body.style.cursor=``,document.body.style.userSelect=``,e.remove()}},[l,p,m]),{leftWidth:s,rightWidth:100-s,isDragging:l,containerRef:d,handleMouseDown:f}}function Go(e){return e?`translate-x-0 opacity-100`:`w-0 translate-x-full opacity-0`}function Ko(){let e=ar(),t=ar(767),{isRightPanelShown:n}=H(),{leftWidth:r,rightWidth:i,isDragging:a,containerRef:o,handleMouseDown:s}=Wo({defaultLeftWidth:50,minLeftWidth:30,maxLeftWidth:80,storageKey:`desktop-layout-panel-width`});return(0,X.jsx)(`div`,{className:R(e?`relative min-h-0 flex-1 flex flex-col`:`h-full flex flex-col overflow-hidden`),children:(0,X.jsxs)(`div`,{ref:o,className:R(`flex flex-1 overflow-hidden`,e?`flex-col`:`transition-all duration-300 ease-in-out`),style:e?void 0:{transitionProperty:a?`none`:`all`},children:[(0,X.jsxs)(`div`,{className:R(`flex flex-col bg-base overflow-hidden`,e?`flex-1`:`transition-all duration-300 ease-in-out`),style:e?void 0:{width:n?`${r}%`:`100%`,transitionProperty:a?`none`:`all`},children:[(0,X.jsxs)(`div`,{"data-testid":`chat-pane-header`,className:R(`flex h-10 min-h-10 shrink-0 items-center`,t&&`gap-2 pl-2.5`),children:[t?(0,X.jsx)(Nt,{}):null,(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,X.jsx)(wo,{})})]}),(0,X.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,X.jsx)(ca,{isRightPanelShown:!e&&n})})]}),!e&&n&&(0,X.jsx)(Ho,{onMouseDown:s,isDragging:a}),!e&&(0,X.jsx)(`div`,{className:R(`transition-all duration-300 ease-in-out overflow-hidden`,Go(n)),style:{width:n?`${i}%`:`0%`,transitionProperty:a?`opacity, transform`:`all`},children:(0,X.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:(0,X.jsxs)(`div`,{className:`flex flex-col flex-1 min-h-0 bg-[var(--oh-surface)] border-l border-[var(--oh-border)] overflow-hidden`,children:[(0,X.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex shrink-0 flex-col border-b border-[var(--oh-border)]`,children:(0,X.jsx)(Vo,{isPanelResizing:a})}),(0,X.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,X.jsx)(Ca,{})})]})})})]})})}function qo({onNavigateBack:e}){let{t}=h(`openhands`),{setIsRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=H();return Z.useLayoutEffect(()=>(n(!0),r(!0),H.getState().selectedTab||i(`files`),()=>{n(!1),r(!1)}),[n,r,i]),(0,X.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-[var(--oh-surface)]`,children:[(0,X.jsxs)(`div`,{"data-testid":`conversation-mobile-panel-top`,className:`flex h-10 min-h-10 shrink-0 items-center gap-1.5 border-b border-[var(--oh-border)] pl-2.5`,children:[(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-mobile-panel-back`,onClick:()=>{e()},"aria-label":t(z.COMMON$BACK),className:jt,children:(0,X.jsx)(Le,{size:20,className:Ot,"aria-hidden":!0,strokeWidth:2})}),(0,X.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 items-center self-stretch`,children:(0,X.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex h-full min-h-0 w-full min-w-0 flex-col justify-center`,children:(0,X.jsx)(Vo,{variant:`compact`})})})]}),(0,X.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-[var(--oh-surface)]`,children:(0,X.jsx)(Ca,{})})]})}var Jo=1e3*60*5,Yo=1e3*60*15,Xo=e=>{let t=e||[],n=O();return b({queryKey:[`v1`,`sub-conversations`,t,n.backend.id,n.orgId],queryFn:async()=>t.length===0?[]:mt.batchGetAppConversations(t),enabled:t.length>0,staleTime:Jo,gcTime:Yo,retry:!1})};function Zo({children:e,conversationId:t}){let{data:n}=K(),{data:r}=Xo(n?.sub_conversation_ids??[]),i=r?.filter(e=>e!==null);return(0,X.jsx)(Jn,{conversationId:t,conversationUrl:n?.sandbox_status===`PAUSED`?null:n?.conversation_url,sessionApiKey:n?.session_api_key,subConversationIds:n?.sub_conversation_ids,subConversations:i,children:e})}function Qo(){let{t:e}=h(`openhands`),{conversationId:t}=q(),n=d(`/conversations/:conversationId/panel`),{isTask:r,taskStatus:i,taskDetail:a}=dn(),o=O(),s=Z.useRef(o.backend.id),c=Z.useRef(o.orgId),l=s.current!==o.backend.id||c.current!==o.orgId,{data:f,isFetched:m}=K(),{data:g}=gt(),{resetConversationState:_}=H(),v=p(),y=u(),b=tr(e=>e.clearTerminal),x=wt(e=>e.reset),S=vr(e=>e.setCurrentAgentState),C=Wn(e=>e.removeErrorMessage);Z.useEffect(()=>{b(),_(),x(),S(F.LOADING),C()},[t,b,_,x,S,C]),Z.useEffect(()=>{if(r&&i===`ERROR`){D(a||e(z.CONVERSATION$FAILED_TO_START_FROM_TASK));let t=y.state?.resumedFromConversationId;v(t?`/conversations/${t}`:`/conversations`,{replace:!0})}},[r,i,a,e,v,y.state]),Z.useEffect(()=>{!m||!g||l||f||(wr(o.backend.id,o.orgId),D(e(z.CONVERSATION$NOT_EXIST_OR_NO_PERMISSION)),v(`/conversations`))},[f,m,g,v,e,l,o.backend.id,o.orgId]),Z.useEffect(()=>{l||t&&(t.startsWith(`task-`)||Cr(o.backend.id,o.orgId,t))},[t,l,o.backend.id,o.orgId]);let w=Z.useRef(null);return Z.useEffect(()=>{!m||!f||o.backend.kind===`cloud`&&f.sandbox_status===`PAUSED`&&f.sandbox_id&&w.current!==f.id&&(w.current=f.id,pt(f.sandbox_id).catch(()=>{D(e(z.CONVERSATION$FAILED_TO_START_FROM_TASK))}))},[m,f?.id,f?.sandbox_status,f?.sandbox_id,o.backend.kind,e]),l?null:(0,X.jsx)(Zo,{conversationId:t,children:(0,X.jsx)(Ar,{children:(0,X.jsx)(`div`,{"data-testid":`app-route`,className:`flex h-full flex-col`,children:n?(0,X.jsx)(qo,{onNavigateBack:()=>v(`/conversations/${t}`)}):(0,X.jsx)(Ko,{})})})})}function $o(){return(0,X.jsx)(Qo,{})}var es=f($o);export{cr as i,zo as n,$r as r,es as t};
|
|
90
|
+
`},_o=(e,t)=>e.timestamp.localeCompare(t.timestamp),vo=async(e,t,n)=>{let r=[],i=new Set,a=new Set,o,s,c=!1,l=!1;for(;;){let e=await t({limit:100,sortOrder:`TIMESTAMP_DESC`,strictPagination:!0,...s?{pageId:s}:{},...o?{timestampLt:o}:{}});if(!Array.isArray(e.items))throw Error(`Invalid transcript history response: expected page.items to be an array.`);r.push(...e.items);let u,d=!1;if(e.items.forEach(e=>{i.has(e.id)||(i.add(e.id),d=!0),(!u||e.timestamp<u)&&(u=e.timestamp)}),e.next_page_id){if(a.has(e.next_page_id))throw Error(`Transcript history pagination repeated a page cursor.`);a.add(e.next_page_id),s=e.next_page_id,o=void 0,c=!0;continue}if(c&&!l||e.items.length<100)break;if(n===void 0)throw Error(`Transcript history pagination cannot prove that all events were loaded.`);if(!u||o&&(!d||u>=o))throw Error(`Transcript history pagination did not advance.`);s=void 0,o=u,l=!0}let u=new Map;r.slice().reverse().forEach(e=>{u.has(e.id)||u.set(e.id,e)}),e.forEach(e=>{u.has(e.id)||u.set(e.id,e)});let d=[...u.values()].sort(_o);if(n!==void 0&&i.size<n)throw Error(`Transcript history is incomplete: expected ${n} persisted events, received ${i.size}.`);return d},yo=`transcript-export-format`;function bo({conversationId:e,conversationUrl:t,sessionApiKey:n,conversationTitle:r,model:i,onClose:a}){let{t:o}=h(`openhands`),{trackConversationExported:s}=Xe(),[c,l]=Z.useState(`markdown`),[u,d]=Z.useState(!0),[f,p]=Z.useState(!0),[m,g]=Z.useState(!1),_=Z.useRef(!1),v=Z.useRef(!1),y=Z.useRef(!0);Z.useEffect(()=>(y.current=!0,()=>{y.current=!1,v.current=!0}),[]);let b=()=>{_.current&&(v.current=!0),a()};return(0,X.jsx)(Qe,{onClose:b,"aria-label":o(z.TRANSCRIPT_EXPORT$TITLE),children:(0,X.jsxs)($e,{testID:`transcript-export-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,X.jsx)(dt,{onClose:b,testId:`close-transcript-export-modal`,className:`absolute right-4 top-4`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 pr-8`,children:[(0,X.jsx)(tt,{title:o(z.TRANSCRIPT_EXPORT$TITLE)}),(0,X.jsx)(et,{description:o(z.TRANSCRIPT_EXPORT$DESCRIPTION)})]}),(0,X.jsxs)(`fieldset`,{className:`flex w-full flex-col gap-2`,children:[(0,X.jsx)(`legend`,{className:`mb-2 text-sm font-medium text-white`,children:o(z.TRANSCRIPT_EXPORT$FORMAT)}),(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-md border border-[var(--oh-border)] px-3 py-2 text-sm text-white`,children:[(0,X.jsx)(`input`,{type:`radio`,name:yo,value:`markdown`,disabled:m,checked:c===`markdown`,onChange:()=>l(`markdown`)}),o(z.TRANSCRIPT_EXPORT$MARKDOWN)]}),(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-md border border-[var(--oh-border)] px-3 py-2 text-sm text-white`,children:[(0,X.jsx)(`input`,{type:`radio`,name:yo,value:`html`,disabled:m,checked:c===`html`,onChange:()=>l(`html`)}),o(z.TRANSCRIPT_EXPORT$HTML)]})]}),(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-sm text-white`,children:[(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,X.jsx)(`input`,{type:`checkbox`,disabled:m,checked:u,onChange:e=>d(e.target.checked)}),o(z.TRANSCRIPT_EXPORT$INCLUDE_TOOL_DETAILS)]}),(0,X.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,X.jsx)(`input`,{type:`checkbox`,disabled:m,checked:f,onChange:e=>p(e.target.checked)}),o(z.TRANSCRIPT_EXPORT$INCLUDE_TIMESTAMPS)]})]}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(nt,{type:`button`,variant:`secondary`,onClick:b,testId:`cancel-transcript-export`,children:o(z.BUTTON$CANCEL)}),(0,X.jsx)(nt,{type:`button`,variant:`primary`,onClick:async()=>{if(!_.current){v.current=!1,_.current=!0,g(!0);try{let o=await Qn.getEventCount(e,t??``,n).catch(()=>void 0);if(v.current)return;let l=J.getState(),d=await vo(l.loadedConversationId===e?l.events:[],r=>Qn.searchEvents(e,t,n,r),o);if(v.current)return;let p={includeToolDetails:u,includeTimestamps:f,title:r,model:i},m=c===`markdown`,h=m?mo(d,p):go(d,p),g=m?`md`:`html`;ie(new Blob([h],{type:m?`text/markdown;charset=utf-8`:`text/html;charset=utf-8`}),`conversation-${e}.${g}`),s(c),a()}catch{v.current||C(o(z.ERROR$GENERIC))}finally{_.current=!1,y.current&&g(!1)}}},testId:`confirm-transcript-export`,isDisabled:m,"aria-busy":m,children:o(z.BUTTON$EXPORT_CONVERSATION)})]})]})})}function xo(){let{t:e}=h(`openhands`),{conversationId:t}=q(),{data:n}=K(),{mutate:r}=Pt(),[i,a]=Z.useState(`view`),[o,s]=Z.useState(!1),[c,l]=Z.useState(!1),u=Z.useRef(null),d=Z.useRef(null),{handleDelete:f,handleStop:p,handleDownloadConversation:m,handleDisplayCost:g,handleShowAgentTools:_,handleShowSkills:v,handleShowHooks:y,handleTogglePublic:b,handleCopyShareLink:x,shareUrl:S,handleConfirmDelete:C,handleConfirmStop:w,metricsModalVisible:T,setMetricsModalVisible:D,systemModalVisible:O,setSystemModalVisible:k,skillsModalVisible:ee,setSkillsModalVisible:A,hooksModalVisible:j,setHooksModalVisible:M,confirmDeleteModalVisible:N,setConfirmDeleteModalVisible:P,confirmStopModalVisible:te,setConfirmStopModalVisible:F,systemMessage:I,shouldShowStop:L,shouldShowDownloadConversation:ne,shouldShowDisplayCost:re,shouldShowAgentTools:ie,shouldShowSkills:ae,shouldShowHooks:oe}=Xt({conversationId:t,executionStatus:n?.execution_status,showOptions:!0,onContextMenuToggle:s});return Z.useEffect(()=>{i===`edit`&&u.current?.focus()},[i]),n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 h-[22px] text-base font-normal text-left pl-0 lg:pl-1 min-w-0`,"data-testid":`conversation-name`,children:[i===`edit`?(0,X.jsx)(`input`,{ref:u,"data-testid":`conversation-name-input`,onClick:e=>{i===`edit`&&(e.preventDefault(),e.stopPropagation())},onBlur:()=>{if(u.current?.value&&t){let i=u.current.value.trim();i!==n?.title&&r({conversationId:t,newTitle:i},{onSuccess:()=>{E(e(z.CONVERSATION$TITLE_UPDATED))}})}else u.current&&(u.current.value=n?.title??``);a(`view`)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:n.title||``,className:`text-white leading-5 bg-transparent border-none outline-none text-base font-normal w-fit max-w-fit field-sizing-content`}):(0,X.jsx)(`div`,{className:`text-white leading-5 truncate`,"data-testid":`conversation-name-title`,onDoubleClick:()=>{a(`edit`)},title:n.title||``,children:n.title}),i!==`edit`&&(0,X.jsxs)(`div`,{ref:d,className:`relative flex items-center shrink-0`,children:[(0,X.jsx)(zt,{onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!o)}}),o&&(0,X.jsx)(Ma,{onClose:()=>s(!1),onRename:e=>{e.preventDefault(),e.stopPropagation(),a(`edit`),s(!1)},onDelete:f,onStop:L?p:void 0,onDisplayCost:re?g:void 0,onShowAgentTools:ie?_:void 0,onShowSkills:ae?v:void 0,onShowHooks:oe?y:void 0,onTogglePublic:b,onCopyShareLink:x,shareUrl:S,onExportTranscript:e=>{e.preventDefault(),e.stopPropagation(),l(!0),s(!1)},onDownloadConversation:ne?m:void 0,position:`bottom`,anchorRef:d})]})]}),(0,X.jsx)(Wa,{isOpen:T,onOpenChange:D}),c&&t&&(0,X.jsx)(bo,{conversationId:t,conversationUrl:n.conversation_url,sessionApiKey:n.session_api_key,conversationTitle:n.title,model:n.llm_model,onClose:()=>l(!1)}),(0,X.jsx)(_n,{isOpen:O,onClose:()=>k(!1),systemMessage:I||null}),ee&&(0,X.jsx)(sn,{onClose:()=>A(!1)}),j&&(0,X.jsx)(xn,{onClose:()=>M(!1)}),N&&(0,X.jsx)(Dt,{onConfirm:C,onCancel:()=>P(!1),conversationTitle:n?.title||``}),te&&(0,X.jsx)(Et,{onConfirm:w,onCancel:()=>F(!1)})]}):null}function So({children:e,tooltip:t,ariaLabel:n}){return(0,X.jsx)(it,{content:t,placement:`bottom`,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,X.jsx)(`span`,{"data-aria-label":n,children:e})})}function Co({className:e}){let{t}=h(`openhands`),n=or(),r=mn(),i=f(),{conversationId:a}=q(),{isRightPanelShown:o,setHasRightPanelToggled:s,setIsRightPanelShown:c,setSelectedTab:l}=H(),u=()=>{if(r)return;if(n){if(!a)return;s(!0),c(!0);let{selectedTab:e}=H.getState();e||l(`files`),i(`/conversations/${a}/panel`);return}let e=!o;if(s(e),c(e),e){let{selectedTab:e}=H.getState();e||l(`files`)}},d=t(r?z.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:n?z.COMMON$SHOW_PANEL:o?z.COMMON$HIDE_PANEL:z.COMMON$SHOW_PANEL),p=n?!1:o;return(0,X.jsx)(So,{tooltip:d,ariaLabel:d,children:(0,X.jsx)(`button`,{type:`button`,onClick:u,disabled:r,className:R(jt,r&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,e),"aria-label":d,"aria-pressed":p,"aria-disabled":r,"data-testid":`right-panel-toggle`,children:(0,X.jsx)(At,{className:`w-5 h-5 -scale-x-100`})})})}function wo(){let{conversationId:e}=q(),{data:t}=K(),{curAgentState:n}=G(),{isTask:r,taskStatus:i}=qt(),{mutate:a}=Ve(),{mutate:o}=wa(),{providers:s}=Ht(),c=t?.execution_status??null,l=se({isPausing:!1,isTask:r,taskStatus:i,isStartingStatus:n===F.LOADING||n===F.INIT,isStopStatus:ce(c),curAgentState:n});return(0,X.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,X.jsxs)(`div`,{className:`flex items-center min-w-0`,children:[(0,X.jsxs)(`div`,{className:`group relative shrink-0`,children:[(0,X.jsx)(ra,{className:`ml-[3.5px] w-6 h-6 cursor-pointer`,color:l}),(0,X.jsx)(ka,{onClose:()=>{},onStopServer:I(c)?t=>{t.preventDefault(),t.stopPropagation(),e&&a({conversationId:e})}:void 0,onStartServer:te(c)?t=>{t.preventDefault(),t.stopPropagation(),e&&o({conversationId:e,providers:s})}:void 0,executionStatus:c,position:`bottom`,className:`opacity-0 invisible pointer-events-none group-hover:opacity-100 group-hover:visible group-hover:pointer-events-auto bottom-full left-0 mt-0 min-h-fit`,isPausing:!1})]}),(0,X.jsx)(xo,{})]}),(0,X.jsx)(Co,{className:`mr-2`})]})}var To=e=>(0,X.jsxs)(`svg`,{width:20,height:20,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,X.jsx)(`path`,{d:`M3 10.5L6.5 14L14 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M7 10.5L10.5 14L18 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`})]}),Eo=160,Do={duration:.22,ease:[.4,0,.2,1]};function Oo({tabValue:e,icon:t,onClick:n,isActive:r,label:i,className:a,measureOnly:o,suppressLayoutAnimation:s=!1}){let c=pe(),l=o||c||!1,u=!l&&!s,d=R(`flex items-center rounded-md cursor-pointer`,`pl-1.5 pr-2 py-1 lg:py-1.5`,`text-[var(--oh-muted)] bg-transparent`,r&&`bg-[var(--oh-interactive-active)] text-white`,r?`hover:text-white hover:bg-[var(--oh-interactive-hover)]`:`hover:text-white hover:bg-white/5`,r?`focus-within:text-white`:`focus-within:text-[var(--oh-muted)]`,a),f=(0,X.jsx)(t,{className:R(`h-4 w-4 shrink-0 text-inherit`)}),p=i&&r?(0,X.jsx)(`span`,{className:`whitespace-nowrap text-sm font-normal`,children:i}):null,m=i?(0,X.jsx)(V.span,{initial:!1,animate:{maxWidth:r?Eo:0,opacity:+!!r,marginLeft:r?8:0},transition:Do,className:`block overflow-hidden whitespace-nowrap text-sm font-normal`,"aria-hidden":!r,children:i}):null;return l?(0,X.jsxs)(`button`,{type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:R(d,`gap-2`),children:[f,p]}):(0,X.jsxs)(V.button,{layout:u?`position`:!1,type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:d,transition:u?{layout:Do}:void 0,children:[f,m]})}var ko=e=>(0,X.jsx)(`svg`,{viewBox:`0 0 128 128`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,X.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M90.767 127.126a7.968 7.968 0 0 0 6.35-.244l26.353-12.681a8 8 0 0 0 4.53-7.209V21.009a8 8 0 0 0-4.53-7.21L97.117 1.12a7.97 7.97 0 0 0-9.093 1.548l-50.45 46.026L15.6 32.013a5.328 5.328 0 0 0-6.807.302l-7.048 6.411a5.335 5.335 0 0 0-.006 7.888L20.796 64 1.74 81.387a5.336 5.336 0 0 0 .006 7.887l7.048 6.411a5.327 5.327 0 0 0 6.807.303l21.974-16.68 50.45 46.025a7.96 7.96 0 0 0 2.743 1.793Zm5.252-92.183L57.74 64l38.28 29.058V34.943Z`})});function Ao(){let e=T().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function jo(e){if(e.length===0)return[];let t=Ao(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await Je({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var Mo=e=>{let t=O(),n=t.backend.kind===`cloud`;return b({queryKey:[`cloud`,`sandbox`,t.backend.id,t.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await jo([e]);return t??null},enabled:n&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},No=`VSCODE`,Po=()=>{let{t:e}=h(`openhands`),{conversationId:t}=q(),n=$r({allowAgentError:!0}),{data:r}=K(),i=O(),a=r?.conversation_url??null,o=r?.session_api_key??null,s=r?.sandbox_id??null,c=i.backend.kind===`cloud`,l=Mo(c?s:null),u=b({queryKey:[`unified`,`vscode_url`,`local`,t,a,o],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return{url:kt((await mt.getVSCodeUrl(t,a,o).catch(()=>_t.getVSCodeUrl(t))).vscode_url)}},enabled:!c&&n&&!!t,refetchOnMount:!0,retry:3}),d,f,p,m,g,_,v;if(c){let e=l.data?.exposed_urls?.find(e=>e.name===No)?.url??null;d=l.isSuccess?{url:kt(e)}:void 0,f=l.isLoading,p=l.isError,m=l.isSuccess,g=l.status,_=l.error,v=async()=>{let e=await l.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===No)?.url??null;return{data:e.data?{url:kt(t)}:void 0}}}else d=u.data,f=u.isLoading,p=u.isError,m=u.isSuccess,g=u.status,_=u.error,v=async()=>({data:(await u.refetch()).data});let y=d&&!d.url?e(z.VSCODE$URL_NOT_AVAILABLE):null;return{data:d?{...d,error:y}:void 0,error:_,isLoading:f,isError:p,isSuccess:m,status:g,refetch:v}};function Fo(){let{t:e}=h(`openhands`),{curAgentState:t}=G(),{data:n,refetch:r,isLoading:i}=Po(),a=A.includes(t);return(0,X.jsxs)(`button`,{type:`button`,onClick:async()=>{let e=n?.url;e||=(await r()).data?.url??null,e&&window.open(e,`_blank`,`noopener,noreferrer`)},disabled:i||a,"aria-label":e(z.VSCODE$OPEN),title:e(z.VSCODE$OPEN),"data-testid":`drawer-vscode-link`,className:R(`inline-flex items-center gap-1.5 rounded-[7px] border border-[var(--oh-border)] bg-base-secondary px-2 py-1 text-xs`,`text-[var(--oh-muted)] transition-colors hover:enabled:bg-surface-raised hover:enabled:text-white`,`cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`),children:[(0,X.jsx)(ko,{className:`h-[15px] w-[15px] shrink-0`,"aria-hidden":!0}),(0,X.jsx)(`span`,{children:e(z.FILES$VSCODE)}),(0,X.jsx)(ze,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})]})}var Io=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.13832 8.76476C8.25957 8.17949 9.52697 7.9727 10.7515 8.14436L14.9025 2.52826L21.4717 9.09737L15.8555 13.2484C16.0272 14.4729 15.8204 15.7403 15.2351 16.8616C15.1872 16.9535 15.1366 17.0444 15.0836 17.1343C14.8318 17.5605 14.5228 17.9624 14.1566 18.3286L10.4443 14.6163L4.75207 20.3085H3.69141V19.2478L9.38361 13.5556L5.6713 9.84332C6.03755 9.47708 6.43936 9.16808 6.86562 8.91632C6.95547 8.86326 7.04641 8.81274 7.13832 8.76476ZM15.0735 4.82054L19.1794 8.92641L14.2461 12.5727L14.3701 13.4567C14.492 14.3266 14.3596 15.2233 13.9758 16.0265L7.97338 10.0241C8.77665 9.64035 9.67335 9.50789 10.5432 9.62984L11.4272 9.75376L15.0735 4.82054Z`,fill:`currentColor`})}),Lo=e=>(0,X.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,X.jsx)(`path`,{d:`M10.9706 10.1586C10.2819 10.0621 9.56905 10.1784 8.93842 10.5075C8.88672 10.5345 8.83557 10.5629 8.78504 10.5928C8.54529 10.7344 8.3193 10.9082 8.11331 11.1142L9.83702 12.8372L7.00054 15.75L7 17H8.25064L11.1628 14.1632L12.8857 15.8865C13.0917 15.6805 13.2655 15.4545 13.4071 15.2147C13.437 15.1642 13.4654 15.1131 13.4924 15.0614C13.8215 14.4308 13.9378 13.718 13.8413 13.0293L17 10.6946L13.3053 7L10.9706 10.1586Z`,fill:`currentColor`})});function Ro(e){if(Fn(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function zo(){let e=J(e=>e.events);return(0,Z.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=Ro(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}function Bo({isOpen:e,onClose:t,ignoreOutsideClickRef:n,anchorRef:r}){let i=Ft(t,n),[a,o]=(0,Z.useState)();(0,Z.useLayoutEffect)(()=>{if(!e||!r?.current){o(void 0);return}let t=()=>{let e=r.current?.getBoundingClientRect();e&&o({position:`fixed`,zIndex:9999,top:e.bottom+8,left:e.left})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[e,r]);let{t:s}=h(`openhands`),{conversationId:c}=q(),{state:l,setUnpinnedTabs:u,setSelectedTab:d}=ct(c),{selectedTab:f,isRightPanelShown:p,setSelectedTab:m}=H(),{navigateToTab:g}=ye(),{hasTaskList:_}=zo(),{backend:v}=O(),y=mn(),b=[{tab:`planner`,icon:Ge,i18nKey:z.COMMON$PLANNER},{tab:`files`,icon:Sn,i18nKey:z.COMMON$FILES},{tab:`terminal`,icon:cr,i18nKey:z.COMMON$TERMINAL},{tab:`browser`,icon:We,i18nKey:z.COMMON$BROWSER}];_&&b.unshift({tab:`tasklist`,icon:To,i18nKey:z.COMMON$TASK_LIST});let x=b.filter(({tab:e})=>e!==`planner`||v.kind===`cloud`),S=e=>{y||(g(e),t())},C=(e,t)=>{if(y){t.preventDefault(),t.stopPropagation();return}if(t.preventDefault(),t.stopPropagation(),l.unpinnedTabs.includes(e))u(l.unpinnedTabs.filter(t=>t!==e));else{let t=[...l.unpinnedTabs,e];if(u(t),f===e&&p){let n=x.find(({tab:n})=>n!==e&&!t.includes(n));n&&(m(n.tab),d(n.tab))}}};if(!e)return null;let w=!!(r?.current&&a),T=(0,X.jsx)(Lt,{ref:i,theme:w?`popover`:`default`,position:w?`none`:`bottom`,alignment:w?`none`:`left`,spacing:w?`none`:`default`,className:R(`z-[9999] w-fit`,w?`mt-0`:`mt-2`),children:x.map(({tab:e,icon:t,i18nKey:n})=>{let r=!l.unpinnedTabs.includes(e);return(0,X.jsx)(`li`,{className:`list-none`,children:(0,X.jsx)(ln,{isDisabled:y,children:(0,X.jsxs)(`div`,{className:R(`group flex h-[30px] w-full min-w-0 items-stretch rounded`,!y&&`hover:bg-[var(--oh-interactive-hover)]`,y&&`opacity-50`),children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-open-${e}`,disabled:y,className:R(`flex min-w-0 flex-1 items-center gap-2 rounded-l p-2 text-start text-white`,at,y?`cursor-not-allowed`:`cursor-pointer`),onClick:()=>S(e),children:[(0,X.jsx)(`span`,{className:ot,"aria-hidden":!0,children:(0,X.jsx)(t,{className:`h-4 w-4`})}),(0,X.jsx)(`span`,{className:`text-sm`,children:s(n)})]}),(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-pin-${e}`,disabled:y,className:R(`flex shrink-0 items-center justify-center rounded-r px-2 text-white`,at,y?`cursor-not-allowed`:`cursor-pointer hover:bg-white/10`),"aria-pressed":r,"aria-label":s(r?z.CONVERSATION$UNPIN_TAB:z.CONVERSATION$PIN_TAB),onClick:t=>C(e,t),children:r?(0,X.jsx)(`span`,{className:R(`-mr-[5px] ml-auto`,ot),"aria-hidden":!0,children:(0,X.jsx)(Lo,{className:`h-7 w-7`})}):(0,X.jsx)(`span`,{className:R(`ml-auto`,ot),"aria-hidden":!0,children:(0,X.jsx)(Io,{className:`h-4.5 w-4.5`})})})]})})},e)})});return w&&a&&typeof document<`u`?Aa.createPortal((0,X.jsx)(`div`,{style:a,children:T}),document.body):T}function Vo({variant:e=`default`,isPanelResizing:t=!1}){let{conversationId:n}=q(),{setSelectedTab:r,planContent:i}=H(),[a,o]=(0,Z.useState)(!1),{state:s}=ct(n),{hasTaskList:c}=zo(),{backend:l}=O(),{handleBuildPlanClick:u}=xe(),{curAgentState:d}=G(),{selectTab:f,isTabActive:p,onTabChange:m,selectedTab:g,isRightPanelShown:_}=ye();(0,Z.useEffect)(()=>{r(s.selectedTab)},[r,s.selectedTab]),(0,Z.useEffect)(()=>{_&&(g||m(`files`))},[_,g,m]);let{t:v,i18n:y}=h(`openhands`),b=[{tabValue:`files`,isActive:p(`files`),icon:Sn,onClick:()=>f(`files`),tooltipContent:v(z.COMMON$FILES),tooltipAriaLabel:v(z.COMMON$FILES),label:v(z.COMMON$FILES)},{tabValue:`planner`,isActive:p(`planner`),icon:Ge,onClick:()=>f(`planner`),tooltipContent:v(z.COMMON$PLANNER),tooltipAriaLabel:v(z.COMMON$PLANNER),label:v(z.COMMON$PLANNER)},{tabValue:`terminal`,isActive:p(`terminal`),icon:cr,onClick:()=>f(`terminal`),tooltipContent:v(z.COMMON$TERMINAL),tooltipAriaLabel:v(z.COMMON$TERMINAL),label:v(z.COMMON$TERMINAL),className:`pl-2`},{tabValue:`browser`,isActive:p(`browser`),icon:We,onClick:()=>f(`browser`),tooltipContent:v(z.COMMON$BROWSER),tooltipAriaLabel:v(z.COMMON$BROWSER),label:v(z.COMMON$BROWSER)}];c&&b.splice(1,0,{tabValue:`tasklist`,isActive:p(`tasklist`),icon:To,onClick:()=>f(`tasklist`),tooltipContent:v(z.COMMON$TASK_LIST),tooltipAriaLabel:v(z.COMMON$TASK_LIST),label:v(z.COMMON$TASK_LIST)});let x=b.filter(e=>e.tabValue===`planner`&&l.kind!==`cloud`?!1:s.unpinnedTabs.includes(e.tabValue)?g===e.tabValue:!0),S=s.unpinnedTabs.join(`,`),C=d===F.RUNNING||d===F.LOADING||!i,w=(0,Z.useRef)(null),T=(0,Z.useRef)(null),E=(0,Z.useRef)(null),D=(0,Z.useRef)(null),k=(0,Z.useRef)(null),[ee,A]=(0,Z.useState)(x.length);(0,Z.useLayoutEffect)(()=>{let e=w.current,t=T.current,n=E.current,r=D.current;if(!e||!t||!n||!r)return;let i=()=>{let i=t.querySelectorAll(`[data-tab-measure="true"]`),a=i.length,o=e.getBoundingClientRect().width;if(o===0){A(a);return}let s=Array.from(i).map(e=>e.getBoundingClientRect().width);if(s.length!==a||a===0){A(Math.max(0,a));return}let c=n.getBoundingClientRect().width,l=r.getBoundingClientRect().width,u=getComputedStyle(e).columnGap||getComputedStyle(e).gap,d=parseFloat(u)||6,f=0;for(let e=a;e>=0;--e){let t=c+l;for(let n=0;n<e;n+=1)t+=s[n]??0;if(e>0&&(t+=e*d),t<=o+.5){f=e;break}}A(e=>e===f?e:f)};if(i(),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(i);return a.observe(e),()=>a.disconnect()},[S,x.length,c,l.kind,g,_,y.language]);let j=Math.min(ee,x.length);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:R(`relative w-full min-w-0`,e===`compact`?`flex h-full min-h-0 items-center py-0 pl-0 pr-1`:`min-h-10 p-1`),children:[(0,X.jsx)(`div`,{ref:T,"aria-hidden":!0,className:`pointer-events-none absolute top-0 left-[-10000px] flex flex-nowrap items-center gap-1.5`,children:x.map(({tabValue:e,icon:t,isActive:n,tooltipContent:r,tooltipAriaLabel:i,label:a,className:o},s)=>(0,X.jsx)(So,{tooltip:r,ariaLabel:i,children:(0,X.jsx)(Oo,{tabValue:e,icon:t,onClick:()=>{},isActive:n,label:a,className:R(o,`shrink-0`),measureOnly:!0})},`measure-${e}-${s}`))}),(0,X.jsxs)(`div`,{ref:w,className:`flex w-full min-w-0 flex-nowrap items-center justify-start`,children:[(0,X.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center justify-start overflow-hidden`,children:(0,X.jsxs)(`div`,{className:`flex w-fit max-w-full min-w-0 items-center gap-1.5`,children:[(0,X.jsx)(gr,{id:`conversation-drawer-tabs`,children:(0,X.jsx)(`div`,{className:`flex w-fit max-w-full min-w-0 flex-nowrap items-center gap-1.5 overflow-x-hidden`,children:x.slice(0,j).map(({tabValue:e,icon:n,onClick:r,isActive:i,tooltipContent:a,tooltipAriaLabel:o,label:s,className:c},l)=>(0,X.jsx)(So,{tooltip:a,ariaLabel:o,children:(0,X.jsx)(Oo,{tabValue:e,icon:n,onClick:r,isActive:i,label:s,className:R(c,`shrink-0`),suppressLayoutAnimation:t})},`${e}-${l}`))})}),(0,X.jsxs)(`div`,{ref:E,className:`relative shrink-0`,children:[(0,X.jsx)(zt,{ref:k,onClick:()=>o(!a),ariaLabel:v(z.COMMON$MORE_OPTIONS),iconClassName:e===`compact`?Ot:void 0}),(0,X.jsx)(Bo,{isOpen:a,onClose:()=>o(!1),ignoreOutsideClickRef:k,anchorRef:k})]})]})}),(0,X.jsx)(`div`,{ref:D,className:R(`ml-auto shrink-0`,l.kind===`cloud`&&`pr-1`),children:l.kind===`cloud`&&(0,X.jsx)(Fo,{})})]})]}),p(`planner`)&&(0,X.jsx)(`div`,{className:R(`flex h-10 min-h-10 shrink-0 items-center border-t border-[var(--oh-border)] pl-[10px] pr-1`),children:(0,X.jsx)(`button`,{type:`button`,onClick:u,disabled:C,className:R(`flex h-5 min-w-17 items-center justify-center rounded bg-white px-2 transition-opacity`,C?`cursor-not-allowed opacity-50`:`cursor-pointer hover:opacity-90`),"data-testid":`planner-tab-build-button`,children:(0,X.jsxs)(Kt.Text,{className:`text-[11px] font-normal leading-5 text-black`,children:[v(z.COMMON$BUILD),` ⌘↩`]})})})]})}function Ho({onMouseDown:e,className:t,isDragging:n=!1}){let[r,i]=(0,Z.useState)(!1),a=n||r;return(0,X.jsxs)(`div`,{className:R(`relative z-10 w-0 shrink-0 self-stretch`,t),"aria-hidden":!0,children:[(0,X.jsx)(`div`,{className:`absolute inset-y-0 left-1/2 w-3 min-w-[12px] -translate-x-1/2 cursor-ew-resize`,onMouseDown:e,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)}),(0,X.jsx)(`div`,{className:R(`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`,a?`bg-white`:`bg-transparent`),"aria-hidden":!0})]})}var Uo=200;function Wo({defaultLeftWidth:e=50,minLeftWidth:t=30,maxLeftWidth:n=80,storageKey:r=`desktop-layout-panel-width`}={}){let[i,a]=ir(r,e),o=(0,Z.useCallback)(e=>Math.max(t,Math.min(n,e)),[t,n]),[s,c]=(0,Z.useState)(()=>o(i)),[l,u]=(0,Z.useState)(!1),d=(0,Z.useRef)(null),f=(0,Z.useCallback)(e=>{e.preventDefault(),u(!0)},[]),p=(0,Z.useCallback)(e=>{if(!l||!d.current)return;let t=d.current.getBoundingClientRect();c(o((e.clientX-t.left)/t.width*100))},[l,o]),m=(0,Z.useCallback)(()=>{l&&(u(!1),a(s))},[l,s,a]);return(0,Z.useLayoutEffect)(()=>{if(!l)return;let e=document.createElement(`div`);return e.setAttribute(`aria-hidden`,`true`),e.dataset.panelDragShield=``,Object.assign(e.style,{position:`fixed`,inset:`0`,zIndex:String(Uo),cursor:`ew-resize`}),document.body.appendChild(e),document.addEventListener(`mousemove`,p),document.addEventListener(`mouseup`,m),document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`,()=>{document.removeEventListener(`mousemove`,p),document.removeEventListener(`mouseup`,m),document.body.style.cursor=``,document.body.style.userSelect=``,e.remove()}},[l,p,m]),{leftWidth:s,rightWidth:100-s,isDragging:l,containerRef:d,handleMouseDown:f}}function Go(e){return e?`translate-x-0 opacity-100`:`w-0 translate-x-full opacity-0`}function Ko(){let e=or(),t=or(767),{isRightPanelShown:n}=H(),{leftWidth:r,rightWidth:i,isDragging:a,containerRef:o,handleMouseDown:s}=Wo({defaultLeftWidth:50,minLeftWidth:30,maxLeftWidth:80,storageKey:`desktop-layout-panel-width`});return(0,X.jsx)(`div`,{className:R(e?`relative min-h-0 flex-1 flex flex-col`:`h-full flex flex-col overflow-hidden`),children:(0,X.jsxs)(`div`,{ref:o,className:R(`flex flex-1 overflow-hidden`,e?`flex-col`:`transition-all duration-300 ease-in-out`),style:e?void 0:{transitionProperty:a?`none`:`all`},children:[(0,X.jsxs)(`div`,{className:R(`flex flex-col bg-base overflow-hidden`,e?`flex-1`:`transition-all duration-300 ease-in-out`),style:e?void 0:{width:n?`${r}%`:`100%`,transitionProperty:a?`none`:`all`},children:[(0,X.jsxs)(`div`,{"data-testid":`chat-pane-header`,className:R(`flex h-10 min-h-10 shrink-0 items-center`,t&&`gap-2 pl-2.5`),children:[t?(0,X.jsx)(Nt,{}):null,(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,X.jsx)(wo,{})})]}),(0,X.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,X.jsx)(ca,{isRightPanelShown:!e&&n})})]}),!e&&n&&(0,X.jsx)(Ho,{onMouseDown:s,isDragging:a}),!e&&(0,X.jsx)(`div`,{className:R(`transition-all duration-300 ease-in-out overflow-hidden`,Go(n)),style:{width:n?`${i}%`:`0%`,transitionProperty:a?`opacity, transform`:`all`},children:(0,X.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:(0,X.jsxs)(`div`,{className:`flex flex-col flex-1 min-h-0 bg-[var(--oh-surface)] border-l border-[var(--oh-border)] overflow-hidden`,children:[(0,X.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex shrink-0 flex-col border-b border-[var(--oh-border)]`,children:(0,X.jsx)(Vo,{isPanelResizing:a})}),(0,X.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,X.jsx)(Ca,{})})]})})})]})})}function qo({onNavigateBack:e}){let{t}=h(`openhands`),{setIsRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=H();return Z.useLayoutEffect(()=>(n(!0),r(!0),H.getState().selectedTab||i(`files`),()=>{n(!1),r(!1)}),[n,r,i]),(0,X.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-[var(--oh-surface)]`,children:[(0,X.jsxs)(`div`,{"data-testid":`conversation-mobile-panel-top`,className:`flex h-10 min-h-10 shrink-0 items-center gap-1.5 border-b border-[var(--oh-border)] pl-2.5`,children:[(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-mobile-panel-back`,onClick:()=>{e()},"aria-label":t(z.COMMON$BACK),className:jt,children:(0,X.jsx)(Le,{size:20,className:Ot,"aria-hidden":!0,strokeWidth:2})}),(0,X.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 items-center self-stretch`,children:(0,X.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex h-full min-h-0 w-full min-w-0 flex-col justify-center`,children:(0,X.jsx)(Vo,{variant:`compact`})})})]}),(0,X.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-[var(--oh-surface)]`,children:(0,X.jsx)(Ca,{})})]})}var Jo=1e3*60*5,Yo=1e3*60*15,Xo=e=>{let t=e||[],n=O();return b({queryKey:[`v1`,`sub-conversations`,t,n.backend.id,n.orgId],queryFn:async()=>t.length===0?[]:mt.batchGetAppConversations(t),enabled:t.length>0,staleTime:Jo,gcTime:Yo,retry:!1})};function Zo({children:e,conversationId:t}){let{data:n}=K(),{data:r}=Xo(n?.sub_conversation_ids??[]),i=r?.filter(e=>e!==null);return(0,X.jsx)(Jn,{conversationId:t,conversationUrl:n?.sandbox_status===`PAUSED`?null:n?.conversation_url,sessionApiKey:n?.session_api_key,subConversationIds:n?.sub_conversation_ids,subConversations:i,children:e})}function Qo(){let{t:e}=h(`openhands`),{conversationId:t}=q(),n=d(`/conversations/:conversationId/panel`),{isTask:r,taskStatus:i,taskDetail:a}=dn(),o=O(),s=Z.useRef(o.backend.id),c=Z.useRef(o.orgId),l=s.current!==o.backend.id||c.current!==o.orgId,{data:p,isFetched:m}=K(),{data:g}=gt(),{resetConversationState:_}=H(),v=f(),y=u(),b=tr(e=>e.clearTerminal),x=wt(e=>e.reset),S=vr(e=>e.setCurrentAgentState),w=Wn(e=>e.removeErrorMessage);Z.useEffect(()=>{b(),_(),x(),S(F.LOADING),w()},[t,b,_,x,S,w]),Z.useEffect(()=>{if(r&&i===`ERROR`){C(a||e(z.CONVERSATION$FAILED_TO_START_FROM_TASK));let t=y.state?.resumedFromConversationId;v(t?`/conversations/${t}`:`/conversations`,{replace:!0})}},[r,i,a,e,v,y.state]),Z.useEffect(()=>{!m||!g||l||p||(wr(o.backend.id,o.orgId),C(e(z.CONVERSATION$NOT_EXIST_OR_NO_PERMISSION)),v(`/conversations`))},[p,m,g,v,e,l,o.backend.id,o.orgId]),Z.useEffect(()=>{l||t&&(t.startsWith(`task-`)||Cr(o.backend.id,o.orgId,t))},[t,l,o.backend.id,o.orgId]);let T=Z.useRef(null);return Z.useEffect(()=>{!m||!p||o.backend.kind===`cloud`&&p.sandbox_status===`PAUSED`&&p.sandbox_id&&T.current!==p.id&&(T.current=p.id,pt(p.sandbox_id).catch(()=>{C(e(z.CONVERSATION$FAILED_TO_START_FROM_TASK))}))},[m,p?.id,p?.sandbox_status,p?.sandbox_id,o.backend.kind,e]),l?null:(0,X.jsx)(Zo,{conversationId:t,children:(0,X.jsx)(Ar,{children:(0,X.jsx)(`div`,{"data-testid":`app-route`,className:`flex h-full flex-col`,children:n?(0,X.jsx)(qo,{onNavigateBack:()=>v(`/conversations/${t}`)}):(0,X.jsx)(Ko,{})})})})}function $o(){return(0,X.jsx)(Qo,{})}var es=p($o);export{cr as i,zo as n,$r as r,es as t};
|