@openhands/agent-canvas 1.16.0 → 1.18.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-CX3Lh9gj.js → acp-providers-DcY_mKYa.js} +1 -1
- package/build/assets/active-backend-context-BnH4-L8h.js +2 -0
- package/build/assets/{agent-context-settings-DSZlXrLj.js → agent-context-settings-D3peZkjX.js} +1 -1
- package/build/assets/agent-profiles-service.api-DkeZaqIl.js +1 -0
- package/build/assets/agent-profiles-settings-7yMWYjGF.js +1 -0
- package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
- package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
- package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +88 -0
- package/build/assets/agent-settings-BF8hM6wb.js +2 -0
- package/build/assets/agent-settings-YPutBAeR.js +1 -0
- package/build/assets/alert-banner-eYyqvHL3.js +1 -0
- package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-BXo0lCI5.js} +1 -1
- package/build/assets/api-key-entry-screen-CCBvBD8u.js +1 -0
- package/build/assets/app-settings-BtYDs-Be.js +1 -0
- package/build/assets/automation-detail-BxXhb_m2.js +3 -0
- package/build/assets/{automation-export-D3a3of4G.js → automation-export-BJsfi7n2.js} +1 -1
- package/build/assets/automation-git-sync-B7o_Nbl-.js +1 -0
- package/build/assets/automation-setup-route-qaJ6lLCf.js +3 -0
- package/build/assets/{automation-templates-BRppNh99.js → automation-templates-Bb98r-kx.js} +1 -1
- package/build/assets/automations-list-DEPVNud3.js +1 -0
- package/build/assets/{back-nav-button-Cjl_hoxq.js → back-nav-button-B2yBiVMB.js} +1 -1
- package/build/assets/backend-form-modal-DxisQV_6.js +1 -0
- package/build/assets/backend-synced-settings-badge-DLEp6cq7.js +1 -0
- package/build/assets/badge-ehL-kgeO.js +1 -0
- package/build/assets/{base-modal-D_L0oEbG.js → base-modal-C1a0TsSx.js} +1 -1
- package/build/assets/bot-ByolqPEr.js +1 -0
- package/build/assets/{brand-button-BAfk4wGP.js → brand-button-CUMfjb99.js} +1 -1
- package/build/assets/browser-SE24Tk8g.js +46 -0
- package/build/assets/browser-tab-HjJxHA0V.js +1 -0
- package/build/assets/canvas-extension-page-BsUGBb1T.js +1 -0
- package/build/assets/canvas-extensions-C9Tm6s_E.js +1 -0
- package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-B8kxM4rO.js} +1 -1
- package/build/assets/{chat-send-button-MUQqCZCS.js → chat-send-button-CGvc2wpE.js} +1 -1
- package/build/assets/check-Bo8s5Ylg.js +1 -0
- package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
- package/build/assets/chevron-right-CfdfRn-8.js +1 -0
- package/build/assets/circle-check-5pH3qCji.js +1 -0
- package/build/assets/circle-plus-check-toggle-BDX_ctNs.js +1 -0
- package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-D5uJ_4JE.js} +1 -1
- package/build/assets/{cog-D-MPQW6G.js → cog-CAEugqtV.js} +1 -1
- package/build/assets/command-menu-CQxs4mtX.js +1 -0
- package/build/assets/commits-tab-D0xgjipP.js +1 -0
- package/build/assets/{condenser-settings-DmEOje-7.js → condenser-settings-D63NJRBT.js} +1 -1
- package/build/assets/confirmation-modal-78sd9Vny.js +1 -0
- package/build/assets/{context-menu-list-item-I86vKcmM.js → context-menu-list-item-Cm7-7Y-7.js} +1 -1
- package/build/assets/conversation-B_nweu5p.js +93 -0
- package/build/assets/conversation-edjzrv5w.js +1 -0
- package/build/assets/conversation-panel-edjzrv5w.js +1 -0
- package/build/assets/conversation-state-store-9D_3P7q4.js +1 -0
- package/build/assets/conversation-store-DC-JlJuq.js +6 -0
- package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-B3dpJXX0.js} +1 -1
- package/build/assets/copy-to-clipboard-button-B1ljgNxO.js +1 -0
- package/build/assets/device-verify-D5QRIS_x.js +1 -0
- package/build/assets/{dropdown-classes-Bc1djN0-.js → dropdown-classes-BGvOvW2_.js} +1 -1
- package/build/assets/edit-automation-modal-D_JWSmxT.js +1 -0
- package/build/assets/empty-state-FK_s1B60.js +1 -0
- package/build/assets/{entry.client-CqyPPjOq.js → entry.client-BMafTpjO.js} +2 -2
- package/build/assets/enum-filter-dropdown-UNaom12H.js +1 -0
- package/build/assets/environment-switch-overlay-COibRUA-.js +1 -0
- package/build/assets/error-state-Cf8LRuuY.js +1 -0
- package/build/assets/extensions-hub-C_6ahIua.js +1 -0
- package/build/assets/extensions-navigation-C5GfpzFe.js +1 -0
- package/build/assets/external-link-Bd7Tga-1.js +1 -0
- package/build/assets/files-tab-D5PPIWI1.js +1 -0
- package/build/assets/{form-control-classes-Bkh5FGrD.js → form-control-classes-Dbq-7YP_.js} +1 -1
- package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
- package/build/assets/get-git-path-jU2zjqIB.js +1 -0
- package/build/assets/git-repo-dropdown-BoDDWXfX.js +1 -0
- package/build/assets/git-repo-dropdown-uxlFw2gn.js +1 -0
- package/build/assets/highlighted-source-view-C7pAXrT0.js +1 -0
- package/build/assets/home-BM5_Wz_R.js +1 -0
- package/build/assets/home-Ivfm7KC4.js +1 -0
- package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +1 -0
- package/build/assets/home-store-DCbei3DX.js +1 -0
- package/build/assets/hooks-service-Dnmhqc0Z.js +1 -0
- package/build/assets/index-home-td9BN2T3.js +1 -0
- package/build/assets/info-BcajzHn1.js +1 -0
- package/build/assets/install-server-modal-B81I-5OE.js +1 -0
- package/build/assets/kebab-menu-item-content-SCJBwZnp.js +1 -0
- package/build/assets/{key-BmVyxs-2.js → key-O84CMFHb.js} +1 -1
- package/build/assets/launch-ZLxI4opd.js +1 -0
- package/build/assets/list-filter-B8PQk3RA.js +1 -0
- package/build/assets/{list-todo-apgLVjMw.js → list-todo-Caa8E1X_.js} +1 -1
- package/build/assets/llm-not-configured-banner-Dh_ajcM8.js +27 -0
- package/build/assets/llm-settings-CODhjQzy.js +1 -0
- package/build/assets/llm-settings-CZaXYgtw.js +1 -0
- package/build/assets/llm-subscription-service-CgIDc38n.js +1 -0
- package/build/assets/loader-circle-BxJgk73D.js +1 -0
- package/build/assets/{loading-spinner-BY9N3pOe.js → loading-spinner-BeLV0IXf.js} +1 -1
- package/build/assets/manage-backends-modal-cMXqCb-B.js +1 -0
- package/build/assets/manifest-bfeccb98.js +1 -0
- package/build/assets/manifest-subpage-layout-CVZgVKoY.js +1 -0
- package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-iRs80q_6.js} +1 -1
- package/build/assets/markdown-renderer-DyFl9-mL.js +8 -0
- package/build/assets/mcp-CraxoXQv.js +1 -0
- package/build/assets/{mcp-marketplace-utils-AIBzzHTO.js → mcp-marketplace-utils-C7PYr293.js} +1 -1
- package/build/assets/mcp-page-CteH_K0N.js +9 -0
- package/build/assets/messages-Bk1xhbU2.js +41 -0
- package/build/assets/{modal-body-BxZjsju9.js → modal-body-C24WsdFb.js} +1 -1
- package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-B0b9eiL8.js} +1 -1
- package/build/assets/modal-close-button-DfqfB2Nj.js +1 -0
- package/build/assets/{mouse-pointer-click-Co2uyaPA.js → mouse-pointer-click-BXlRN92t.js} +1 -1
- package/build/assets/onboarding-DXFBRqEy.js +1 -0
- package/build/assets/onboarding-modal-BT3Gx_sZ.js +1 -0
- package/build/assets/organization-service.api-B5CvmnYQ.js +1 -0
- package/build/assets/pencil-q-ihqDYv.js +1 -0
- package/build/assets/pin-BdroVQdN.js +1 -0
- package/build/assets/planner-tab-CstoOlAB.js +1 -0
- package/build/assets/plug-7ACOEbMs.js +1 -0
- package/build/assets/plugins-management-service-5rqVPEGN.js +1 -0
- package/build/assets/plus-C2e21TFC.js +1 -0
- package/build/assets/profiles-service.api-D1XKMgr0.js +1 -0
- package/build/assets/providers-XmZ9HM4Q.js +1 -0
- package/build/assets/proxy-XP6U1Dhv.js +1 -0
- package/build/assets/{puzzle-JM_QaRm0.js → puzzle-LJYnuxKe.js} +1 -1
- package/build/assets/react-BX7IV650.js +1 -0
- package/build/assets/recommended-automations-launcher-DEHRKIAg.js +1 -0
- package/build/assets/refresh-cw-BtdC3T8P.js +1 -0
- package/build/assets/root-CM6IZHlg.css +1 -0
- package/build/assets/root-DdFkodKW.js +2 -0
- package/build/assets/root-layout-DUquNZTU.js +2 -0
- package/build/assets/schema-field-Y3F8JvXd.js +1 -0
- package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
- package/build/assets/sdk-section-page-CNZTLwH9.js +1 -0
- package/build/assets/secret-form-9-BoGA40.js +1 -0
- package/build/assets/secrets-service-BOIsfD9j.js +1 -0
- package/build/assets/secrets-settings-CBJgFr42.js +1 -0
- package/build/assets/settings-D4hdToD4.js +1 -0
- package/build/assets/settings-dropdown-input-DBvsZ7-Q.js +1 -0
- package/build/assets/settings-index-DeQphyBK.js +1 -0
- package/build/assets/settings-input-dVuzapBA.js +1 -0
- package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-DhAPuXm6.js} +1 -1
- package/build/assets/settings-modal-tHiJ8iYV.js +1 -0
- package/build/assets/settings-nav-GAQjW1a-.js +16 -0
- package/build/assets/settings-service.api-C1vZH9Vh.js +1 -0
- package/build/assets/settings-switch-DDd1cQ8t.js +1 -0
- package/build/assets/{settings-utils-UYpEdPuD.js → settings-utils-BTaaRhLZ.js} +1 -1
- package/build/assets/shared-conversation-Cyg7m7ns.js +1 -0
- package/build/assets/shield-check-C3Rl0NF8.js +1 -0
- package/build/assets/{sidebar-layout-D6fS8-Gl.js → sidebar-layout-DH0E-5KW.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-CQ4iky__.js +1 -0
- package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-oLQiKUBu.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-TfvNNnnr.js} +1 -1
- package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
- package/build/assets/skill-card-pill-row-DfjIfj0K.js +1 -0
- package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-DsNLmn76.js} +2 -2
- package/build/assets/{skill-icon-badge-RQkq8wvl.js → skill-icon-badge-0MK_68Nc.js} +1 -1
- package/build/assets/skill-scope-BE-H9TSZ.js +1 -0
- package/build/assets/skills-plugins-vzSdxSk_.js +1 -0
- package/build/assets/skills-settings-BiPOH9H9.js +1 -0
- package/build/assets/styled-tooltip-CejG0rqv.js +1 -0
- package/build/assets/task-list-tab-OkZSqnTp.js +1 -0
- package/build/assets/{terminal-CNElN42a.js → terminal-Dph60VFZ.js} +2 -2
- package/build/assets/toggle-switch-B2uXaAUS.js +1 -0
- package/build/assets/trash-2-Bb40zQzs.js +1 -0
- package/build/assets/trash-Ckh7yCaB.js +1 -0
- package/build/assets/triangle-alert-DEdu-b_L.js +1 -0
- package/build/assets/{typography-v1KN0tzi.js → typography-DgcLGdHk.js} +1 -1
- package/build/assets/usage-tab-MCmNRAnR.js +1 -0
- package/build/assets/use-acp-credential-form-ychoGqjC.js +1 -0
- package/build/assets/use-activate-agent-profile-8L8Xdghy.js +1 -0
- package/build/assets/use-agent-profiles-Bi8hSkze.js +1 -0
- package/build/assets/{use-automation-health-E6NZi9rb.js → use-automation-health-U99vvHxx.js} +1 -1
- package/build/assets/use-automation-permissions-Buus0R6h.js +1 -0
- package/build/assets/{use-automations-xijQKIl9.js → use-automations-Bq5hVuv0.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-CrJP5262.js → use-can-manage-org-profiles-MzIeEV8F.js} +1 -1
- package/build/assets/use-canvas-extensions-Ca9KoVEm.js +1 -0
- package/build/assets/{use-cloud-current-user-id-CDfAHpPX.js → use-cloud-current-user-id-B4ZLUZSa.js} +1 -1
- package/build/assets/use-config-l5tkDHyD.js +1 -0
- package/build/assets/use-create-conversation-i_PdFdIs.js +1 -0
- package/build/assets/use-create-secret-CjWq0J4O.js +1 -0
- package/build/assets/use-free-models-gCsJ5BV0.js +1 -0
- package/build/assets/{use-get-secrets-K3jmk-LH.js → use-get-secrets-CMTuWEp_.js} +1 -1
- package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
- package/build/assets/use-llm-configured-Dl4zg8ht.js +1 -0
- package/build/assets/use-llm-profiles-SWsuFmFu.js +1 -0
- package/build/assets/use-manifest-capabilities-CdqYfUAC.js +1 -0
- package/build/assets/use-onboarding-completion-Xl63ZvzQ.js +1 -0
- package/build/assets/use-pinned-home-route-BXDIUaxQ.js +1 -0
- package/build/assets/use-plugins-marketplace-BIIaPiaB.js +1 -0
- package/build/assets/use-save-agent-profile-D-ZHHE94.js +1 -0
- package/build/assets/{use-save-settings-DYqkKv7T.js → use-save-settings-Dapkf4cC.js} +1 -1
- package/build/assets/use-settings-C2KKQKVC.js +1 -0
- package/build/assets/use-settings-nav-items-TOc0Rsfd.js +1 -0
- package/build/assets/use-tracking-j4uo9VEW.js +3 -0
- package/build/assets/{use-user-conversation-B9Gebw_g.js → use-user-conversation-5UFqMoO4.js} +1 -1
- package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
- package/build/assets/{useMutation-B-qc391N.js → useMutation-Cszf8mKy.js} +1 -1
- package/build/assets/useQueries-pUohFMSP.js +1 -0
- package/build/assets/useQuery-DAAacS7O.js +1 -0
- package/build/assets/useTranslation-CCgUjPJF.js +1 -0
- package/build/assets/utils-BgLSZdyy.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
- package/build/assets/vendor~root-layout-CcdIqs-C.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +12 -6
- package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-DdBpaVPz.js} +1 -1
- package/build/assets/{wrench-CUEI1krB.js → wrench-B8Wg_nbp.js} +1 -1
- package/build/assets/x-CX8lVGwm.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +79 -22
- package/build/locales/ca/openhands.json +79 -22
- package/build/locales/de/openhands.json +79 -22
- package/build/locales/en/openhands.json +79 -22
- package/build/locales/es/openhands.json +79 -22
- package/build/locales/fr/openhands.json +79 -22
- package/build/locales/it/openhands.json +79 -22
- package/build/locales/ja/openhands.json +79 -22
- package/build/locales/ko-KR/openhands.json +79 -22
- package/build/locales/no/openhands.json +79 -22
- package/build/locales/pt/openhands.json +79 -22
- package/build/locales/tr/openhands.json +79 -22
- package/build/locales/uk/openhands.json +79 -22
- package/build/locales/zh-CN/openhands.json +79 -22
- package/build/locales/zh-TW/openhands.json +79 -22
- 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 +72 -12
- package/dist/api/agent-server-adapter.js +234 -132
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +6 -0
- package/dist/api/agent-server-config.js +6 -3
- package/dist/api/agent-server-config.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 +2 -2
- package/dist/api/automation-service/automation-service.api.js +7 -7
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +9 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
- package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
- package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
- package/dist/api/cloud/provider-connections-service.api.js +50 -0
- package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
- package/dist/api/cloud/skills-service.api.cjs +1 -1
- package/dist/api/cloud/skills-service.api.cjs.map +1 -1
- package/dist/api/cloud/skills-service.api.d.ts +10 -0
- package/dist/api/cloud/skills-service.api.js +11 -1
- package/dist/api/cloud/skills-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +6 -2
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.types.d.ts +13 -0
- package/dist/api/conversation-metadata-store.cjs +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +24 -0
- package/dist/api/conversation-metadata-store.js +10 -2
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/hooks-service.cjs +2 -0
- package/dist/api/hooks-service.cjs.map +1 -0
- package/dist/api/hooks-service.d.ts +13 -0
- package/dist/api/hooks-service.js +20 -0
- package/dist/api/hooks-service.js.map +1 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
- package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +2 -0
- package/dist/api/settings-service/settings-service.api.js +18 -10
- 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.d.ts +7 -0
- package/dist/api/skills-service.js +11 -8
- package/dist/api/skills-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +2 -2
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +79 -70
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/messages.cjs +1 -1
- package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
- package/dist/components/conversation-events/chat/messages.js +28 -27
- package/dist/components/conversation-events/chat/messages.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +104 -97
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +89 -77
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
- package/dist/components/features/automations/build-automation-menu-items.js +12 -11
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +10 -5
- package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
- package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
- package/dist/components/features/automations/detail/run-status-badge.js +82 -53
- package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
- package/dist/components/features/automations/kebab-menu.cjs +1 -1
- package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
- package/dist/components/features/automations/kebab-menu.js +9 -5
- package/dist/components/features/automations/kebab-menu.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
- package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-section.js +9 -9
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +123 -112
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +29 -29
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/change-agent-button.cjs +1 -1
- package/dist/components/features/chat/change-agent-button.js +4 -4
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +137 -137
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/chat-message.cjs +1 -1
- package/dist/components/features/chat/chat-message.cjs.map +1 -1
- package/dist/components/features/chat/chat-message.d.ts +2 -1
- package/dist/components/features/chat/chat-message.js +88 -79
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
- package/dist/components/features/chat/components/context-window-meter.js +4 -4
- package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
- package/dist/components/features/chat/generic-event-message.cjs +1 -1
- package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
- package/dist/components/features/chat/generic-event-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.js +41 -22
- package/dist/components/features/chat/generic-event-message.js.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.js +20 -19
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- package/dist/components/features/chat/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +27 -26
- package/dist/components/features/chat/model-messages.js.map +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.js +4 -4
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +88 -88
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
- package/dist/components/features/conversation-panel/budget-display.js +12 -19
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
- 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-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.js +1 -1
- 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.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
- 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 +37 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
- package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
- package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
- package/dist/components/features/conversation-panel/menu-row.js +27 -16
- package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
- package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
- package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +42 -42
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/images/image-lightbox.cjs +2 -0
- package/dist/components/features/images/image-lightbox.cjs.map +1 -0
- package/dist/components/features/images/image-lightbox.d.ts +11 -0
- package/dist/components/features/images/image-lightbox.js +37 -0
- package/dist/components/features/images/image-lightbox.js.map +1 -0
- package/dist/components/features/images/image-preview.cjs +1 -1
- package/dist/components/features/images/image-preview.cjs.map +1 -1
- package/dist/components/features/images/image-preview.d.ts +2 -1
- package/dist/components/features/images/image-preview.js +33 -13
- package/dist/components/features/images/image-preview.js.map +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
- package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
- package/dist/components/features/settings/cloud-settings-link.js +22 -19
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
- package/dist/components/features/settings/integrations-settings-link.js +20 -17
- package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +3 -2
- package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
- package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
- package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
- package/dist/components/features/settings/settings-dropdown-input.js +6 -6
- 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 +4 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +157 -139
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +28 -26
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +3 -3
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.js +33 -29
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/shared/buttons/remove-button.cjs +1 -1
- package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +2 -1
- package/dist/components/shared/buttons/remove-button.js +2 -1
- package/dist/components/shared/buttons/remove-button.js.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js.map +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 +5 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/free-models-note.cjs +2 -0
- package/dist/components/shared/free-models-note.cjs.map +1 -0
- package/dist/components/shared/free-models-note.d.ts +3 -0
- package/dist/components/shared/free-models-note.js +20 -0
- package/dist/components/shared/free-models-note.js.map +1 -0
- package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
- package/dist/components/shared/modals/confirmation-modal.js +8 -8
- package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +102 -112
- package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +12 -0
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/settings-nav.d.ts +8 -0
- 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 +5 -0
- package/dist/contexts/conversation-websocket-context.js +194 -198
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.js +31 -15
- package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
- package/dist/hooks/chat/record-model-switch-message.js +25 -12
- package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +63 -62
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +5 -1
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
- package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.js +3 -3
- package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
- package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
- package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
- package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
- package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +6 -0
- package/dist/hooks/query/query-keys.js +2 -2
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
- package/dist/hooks/query/use-automation-sdk-version.js +30 -55
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
- package/dist/hooks/query/use-conversation-skills.js +20 -4
- package/dist/hooks/query/use-conversation-skills.js.map +1 -1
- package/dist/hooks/query/use-free-models.cjs +2 -0
- package/dist/hooks/query/use-free-models.cjs.map +1 -0
- package/dist/hooks/query/use-free-models.d.ts +23 -0
- package/dist/hooks/query/use-free-models.js +67 -0
- package/dist/hooks/query/use-free-models.js.map +1 -0
- package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
- package/dist/hooks/query/use-local-git-info.js.map +1 -1
- package/dist/hooks/query/use-provider-connections.cjs +1 -1
- package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
- package/dist/hooks/query/use-provider-connections.d.ts +6 -3
- package/dist/hooks/query/use-provider-connections.js +7 -3
- package/dist/hooks/query/use-provider-connections.js.map +1 -1
- package/dist/hooks/query/use-provider-models.cjs +1 -1
- package/dist/hooks/query/use-provider-models.cjs.map +1 -1
- package/dist/hooks/query/use-provider-models.js +34 -25
- package/dist/hooks/query/use-provider-models.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +31 -19
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-sub-conversations.js +16 -16
- package/dist/hooks/query/use-sub-conversations.js.map +1 -1
- package/dist/hooks/use-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.js +3 -3
- package/dist/hooks/use-agent-state.cjs +1 -1
- package/dist/hooks/use-agent-state.cjs.map +1 -1
- package/dist/hooks/use-agent-state.d.ts +17 -1
- package/dist/hooks/use-agent-state.js +19 -9
- package/dist/hooks/use-agent-state.js.map +1 -1
- package/dist/hooks/use-automation-permissions.cjs +2 -0
- package/dist/hooks/use-automation-permissions.cjs.map +1 -0
- package/dist/hooks/use-automation-permissions.d.ts +43 -0
- package/dist/hooks/use-automation-permissions.js +52 -0
- package/dist/hooks/use-automation-permissions.js.map +1 -0
- package/dist/hooks/use-chat-input-model-state.cjs +1 -1
- package/dist/hooks/use-chat-input-model-state.js +3 -3
- package/dist/hooks/use-handle-plan-click.cjs +1 -1
- package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
- package/dist/hooks/use-handle-plan-click.d.ts +3 -1
- package/dist/hooks/use-handle-plan-click.js +85 -26
- package/dist/hooks/use-handle-plan-click.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.d.ts +1 -2
- package/dist/hooks/use-home-automation-actions.js +1 -1
- package/dist/hooks/use-home-automation-actions.js.map +1 -1
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.js +3 -3
- package/dist/hooks/use-manifest-preflight.d.ts +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
- package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
- package/dist/hooks/use-unified-websocket-status.js +5 -1
- package/dist/hooks/use-unified-websocket-status.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 +71 -14
- 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 +1281 -312
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +79 -22
- package/dist/locales/ca/openhands.json +79 -22
- package/dist/locales/de/openhands.json +79 -22
- package/dist/locales/en/openhands.json +79 -22
- package/dist/locales/es/openhands.json +79 -22
- package/dist/locales/fr/openhands.json +79 -22
- package/dist/locales/it/openhands.json +79 -22
- package/dist/locales/ja/openhands.json +79 -22
- package/dist/locales/ko-KR/openhands.json +79 -22
- package/dist/locales/no/openhands.json +79 -22
- package/dist/locales/pt/openhands.json +79 -22
- package/dist/locales/tr/openhands.json +79 -22
- package/dist/locales/uk/openhands.json +79 -22
- package/dist/locales/zh-CN/openhands.json +79 -22
- package/dist/locales/zh-TW/openhands.json +79 -22
- package/dist/manifests/automation-insights.cjs.map +1 -1
- package/dist/manifests/automation-insights.d.ts +10 -2
- package/dist/manifests/automation-insights.js.map +1 -1
- package/dist/manifests/automation-setup.cjs +1 -1
- package/dist/manifests/automation-setup.cjs.map +1 -1
- package/dist/manifests/automation-setup.d.ts +9 -16
- package/dist/manifests/automation-setup.js +17 -7
- package/dist/manifests/automation-setup.js.map +1 -1
- package/dist/manifests/manifest-actions.d.ts +1 -1
- package/dist/manifests/manifest-capabilities.d.ts +3 -1
- package/dist/manifests/manifest-local-validation.cjs +2 -0
- package/dist/manifests/manifest-local-validation.cjs.map +1 -0
- package/dist/manifests/manifest-local-validation.d.ts +15 -11
- package/dist/manifests/manifest-local-validation.js +8 -0
- package/dist/manifests/manifest-local-validation.js.map +1 -0
- package/dist/manifests/manifest-template.cjs +2 -0
- package/dist/manifests/manifest-template.cjs.map +1 -0
- package/dist/manifests/manifest-template.d.ts +4 -4
- package/dist/manifests/manifest-template.js +12 -0
- package/dist/manifests/manifest-template.js.map +1 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +106 -28
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +39 -4
- package/dist/manifests/types.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
- 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 +22 -20
- 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 +2 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +4 -4
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +2 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +53 -48
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.d.ts +3 -1
- package/dist/routes/llm-settings.js +120 -127
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/planner-tab.cjs +1 -1
- package/dist/routes/planner-tab.cjs.map +1 -1
- package/dist/routes/planner-tab.js +44 -28
- package/dist/routes/planner-tab.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +5 -0
- package/dist/services/telemetry.js +122 -115
- package/dist/services/telemetry.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 +32 -5
- package/dist/stores/conversation-panel-preferences-store.js +29 -12
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-state-store.cjs +1 -1
- package/dist/stores/conversation-state-store.cjs.map +1 -1
- package/dist/stores/conversation-state-store.d.ts +9 -3
- package/dist/stores/conversation-state-store.js +6 -3
- package/dist/stores/conversation-state-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +2 -0
- package/dist/stores/conversation-store.js +3 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/free-models-store.cjs +2 -0
- package/dist/stores/free-models-store.cjs.map +1 -0
- package/dist/stores/free-models-store.d.ts +30 -0
- package/dist/stores/free-models-store.js +22 -0
- package/dist/stores/free-models-store.js.map +1 -0
- package/dist/stores/model-store.cjs +1 -1
- package/dist/stores/model-store.cjs.map +1 -1
- package/dist/stores/model-store.d.ts +7 -0
- package/dist/stores/model-store.js +4 -0
- package/dist/stores/model-store.js.map +1 -1
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +46 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/ui/context-menu.d.ts +1 -1
- package/dist/ui/toggle-switch.cjs +1 -1
- package/dist/ui/toggle-switch.cjs.map +1 -1
- package/dist/ui/toggle-switch.d.ts +4 -1
- package/dist/ui/toggle-switch.js +4 -3
- package/dist/ui/toggle-switch.js.map +1 -1
- package/dist/utils/automation-catalog.cjs +1 -1
- package/dist/utils/automation-catalog.cjs.map +1 -1
- package/dist/utils/automation-catalog.d.ts +12 -1
- package/dist/utils/automation-catalog.js +42 -12
- package/dist/utils/automation-catalog.js.map +1 -1
- package/dist/utils/automation-run-display.cjs +2 -0
- package/dist/utils/automation-run-display.cjs.map +1 -0
- package/dist/utils/automation-run-display.d.ts +20 -0
- package/dist/utils/automation-run-display.js +85 -0
- package/dist/utils/automation-run-display.js.map +1 -0
- package/dist/utils/automation-schedule.cjs +1 -1
- package/dist/utils/automation-schedule.cjs.map +1 -1
- package/dist/utils/automation-schedule.d.ts +16 -0
- package/dist/utils/automation-schedule.js +2 -0
- package/dist/utils/automation-schedule.js.map +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.cjs.map +1 -1
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.js +23 -3
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/format-event-timestamp.cjs +2 -0
- package/dist/utils/format-event-timestamp.cjs.map +1 -0
- package/dist/utils/format-event-timestamp.d.ts +1 -0
- package/dist/utils/format-event-timestamp.js +13 -0
- package/dist/utils/format-event-timestamp.js.map +1 -0
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +27 -6
- package/dist/utils/format-model-name.js +14 -6
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/git-diff-stats.cjs +2 -2
- package/dist/utils/git-diff-stats.cjs.map +1 -1
- package/dist/utils/git-diff-stats.d.ts +4 -0
- package/dist/utils/git-diff-stats.js +12 -2
- package/dist/utils/git-diff-stats.js.map +1 -1
- package/dist/utils/plan-file.cjs +4 -0
- package/dist/utils/plan-file.cjs.map +1 -0
- package/dist/utils/plan-file.d.ts +18 -0
- package/dist/utils/plan-file.js +58 -0
- package/dist/utils/plan-file.js.map +1 -0
- package/dist/utils/recommended-automation-rail.cjs +1 -1
- package/dist/utils/recommended-automation-rail.cjs.map +1 -1
- package/dist/utils/recommended-automation-rail.js +1 -0
- package/dist/utils/recommended-automation-rail.js.map +1 -1
- package/dist/utils/scroll-fade-state.cjs +1 -1
- package/dist/utils/scroll-fade-state.cjs.map +1 -1
- package/dist/utils/scroll-fade-state.d.ts +6 -0
- package/dist/utils/scroll-fade-state.js +8 -1
- package/dist/utils/scroll-fade-state.js.map +1 -1
- package/dist/utils/sdk-settings-schema.cjs +1 -1
- package/dist/utils/sdk-settings-schema.cjs.map +1 -1
- package/dist/utils/sdk-settings-schema.d.ts +1 -0
- package/dist/utils/sdk-settings-schema.js +25 -22
- package/dist/utils/sdk-settings-schema.js.map +1 -1
- package/dist/utils/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.js +11 -11
- package/dist/utils/utils.js.map +1 -1
- package/package.json +4 -4
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/dev-with-automation.mjs +1 -1
- package/scripts/static-server.mjs +33 -1
- package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
- package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
- package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
- package/build/assets/agent-settings-DLtsqaOs.js +0 -2
- package/build/assets/agent-settings-fFvR-XC2.js +0 -1
- package/build/assets/alert-banner-HP6mX-Vr.js +0 -1
- package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
- package/build/assets/app-settings-dbnneVaV.js +0 -1
- package/build/assets/automation-detail-BmwlCUAB.js +0 -3
- package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
- package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
- package/build/assets/automations-list-DuNcRawl.js +0 -1
- package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
- package/build/assets/backend-synced-settings-badge-DPkz30BE.js +0 -1
- package/build/assets/badge-BU3S0VtE.js +0 -1
- package/build/assets/bot-dMYHVfYM.js +0 -1
- package/build/assets/browser-DSAo0tz1.js +0 -46
- package/build/assets/browser-tab-C9vy56R5.js +0 -1
- package/build/assets/canvas-extension-page-dx1gFrfW.js +0 -1
- package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
- package/build/assets/check-CS0vmpQQ.js +0 -1
- package/build/assets/chevron-down-e1QBpjVy.js +0 -1
- package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
- package/build/assets/circle-check-DzWLNsbE.js +0 -1
- package/build/assets/circle-plus-check-toggle-BO_kFZt3.js +0 -1
- package/build/assets/command-menu--UIlGL72.js +0 -1
- package/build/assets/commits-tab-AnZwLvh-.js +0 -1
- package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
- package/build/assets/conversation-BbGrAO4Z.js +0 -93
- package/build/assets/conversation-mYT6NAoj.js +0 -1
- package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
- package/build/assets/conversation-state-store-B0ImPLHO.js +0 -1
- package/build/assets/conversation-store-Ca3ghXap.js +0 -6
- package/build/assets/copy-to-clipboard-button-Ca8iSkkA.js +0 -1
- package/build/assets/device-verify-Bhn2e_Ye.js +0 -1
- package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
- package/build/assets/empty-state-BoGVDecT.js +0 -1
- package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
- package/build/assets/environment-switch-overlay-BmBRT7gv.js +0 -1
- package/build/assets/error-state-Body8Ngd.js +0 -1
- package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
- package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
- package/build/assets/external-link-DKUlnCQV.js +0 -1
- package/build/assets/files-tab-D4o2VyE_.js +0 -1
- package/build/assets/format-model-name-CasAP3nd.js +0 -1
- package/build/assets/get-git-path-ChKDVHZp.js +0 -1
- package/build/assets/git-repo-dropdown-4ROKl2cB.js +0 -1
- package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
- package/build/assets/highlighted-source-view-BFRxGT_Q.js +0 -1
- package/build/assets/home-ChpSuepX.js +0 -1
- package/build/assets/home-DIsB440S.js +0 -1
- package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
- package/build/assets/home-store-CY9Ej0ux.js +0 -1
- package/build/assets/index-home-BdlrFIif.js +0 -1
- package/build/assets/info-B6RQawoW.js +0 -1
- package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
- package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
- package/build/assets/launch-IrTDEFCs.js +0 -1
- package/build/assets/list-filter-DsEK7NFC.js +0 -1
- package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
- package/build/assets/llm-settings-B9juXhIa.js +0 -1
- package/build/assets/llm-settings-De1d5dfr.js +0 -1
- package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
- package/build/assets/loader-circle-CC1au6hc.js +0 -1
- package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
- package/build/assets/manifest-80fb1c29.js +0 -1
- package/build/assets/manifest-subpage-layout-CAOYzrYp.js +0 -1
- package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
- package/build/assets/mcp-BTs_SXfZ.js +0 -1
- package/build/assets/mcp-page-BEBYqH_K.js +0 -9
- package/build/assets/messages-DKV9cRc2.js +0 -41
- package/build/assets/modal-close-button-DDzdRvCs.js +0 -1
- package/build/assets/onboarding-DV_OXoeP.js +0 -1
- package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
- package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
- package/build/assets/pencil-47jAZH_V.js +0 -1
- package/build/assets/pin-By41Vl5J.js +0 -1
- package/build/assets/planner-tab-C9uZmhme.js +0 -1
- package/build/assets/plug-CG5HFcNG.js +0 -1
- package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
- package/build/assets/plus-C7Slq-0I.js +0 -1
- package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
- package/build/assets/providers-BhMcY5nv.js +0 -1
- package/build/assets/proxy-9Fe1v5na.js +0 -1
- package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
- package/build/assets/refresh-cw-3q3Frrii.js +0 -1
- package/build/assets/root-Dc8YmC9F.js +0 -2
- package/build/assets/root-VDaypvK4.css +0 -1
- package/build/assets/root-layout-CXkhSPYh.js +0 -2
- package/build/assets/schema-field-D-y9-LDb.js +0 -1
- package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
- package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
- package/build/assets/secret-form-BB7the8W.js +0 -1
- package/build/assets/secrets-service-ByZVENbp.js +0 -1
- package/build/assets/secrets-settings-B_GpxKW2.js +0 -1
- package/build/assets/settings-C0EWuBtA.js +0 -1
- package/build/assets/settings-dropdown-input-BcwylHs2.js +0 -1
- package/build/assets/settings-index-5w5UW2K3.js +0 -1
- package/build/assets/settings-input-Db-1g8Ql.js +0 -1
- package/build/assets/settings-modal-DfJ3tcJQ.js +0 -1
- package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
- package/build/assets/settings-switch-CS-dJDmA.js +0 -1
- package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
- package/build/assets/shield-check-D2aCRd16.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
- package/build/assets/sidebar-store-DGqHkVLw.js +0 -1
- package/build/assets/skill-card-pill-row-B27-xyig.js +0 -1
- package/build/assets/skill-scope-B42H-XOc.js +0 -1
- package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
- package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
- package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
- package/build/assets/task-list-tab-C5zcaktH.js +0 -1
- package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
- package/build/assets/trash-2-D7K26eDO.js +0 -1
- package/build/assets/trash-D-HYiVYM.js +0 -1
- package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
- package/build/assets/usage-tab-CVDffLPt.js +0 -1
- package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
- package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
- package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
- package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
- package/build/assets/use-config-A9QovgXO.js +0 -1
- package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
- package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
- package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
- package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
- package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
- package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
- package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
- package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
- package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
- package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
- package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
- package/build/assets/use-settings-DSXLbvBl.js +0 -1
- package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
- package/build/assets/use-tracking-D53y3TH9.js +0 -3
- package/build/assets/useQueries-DlbhlH9I.js +0 -1
- package/build/assets/useQuery-BSTgq1rl.js +0 -1
- package/build/assets/utils-CN5ZfZy1.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js +0 -1
- package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
- package/build/assets/x-DJdhbdmt.js +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
- package/dist/hooks/query/use-skills.cjs +0 -2
- package/dist/hooks/query/use-skills.cjs.map +0 -1
- package/dist/hooks/query/use-skills.d.ts +0 -7
- package/dist/hooks/query/use-skills.js +0 -13
- package/dist/hooks/query/use-skills.js.map +0 -1
- package/dist/hooks/use-has-permission.cjs +0 -2
- package/dist/hooks/use-has-permission.cjs.map +0 -1
- package/dist/hooks/use-has-permission.d.ts +0 -1
- package/dist/hooks/use-has-permission.js +0 -8
- package/dist/hooks/use-has-permission.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/files-tab-D4o2VyE_.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Ck5D_A2Q.js","assets/active-backend-context-CrHTlgvN.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js","assets/utils-CN5ZfZy1.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js","assets/useQuery-BSTgq1rl.js","assets/messages-DKV9cRc2.js","assets/vendor-markdown-j0kYzV48.js","assets/useMutation-B-qc391N.js","assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js","assets/markdown-renderer-BzTlxI8x.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js","assets/iconBase-C2sR-uAp.js","assets/agent-server-conversation-service.api-tnqNjbpE.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js","assets/proxy-9Fe1v5na.js","assets/profiles-service.api-ChoKrL0l.js","assets/settings-service.api-DJ1r62Zr.js","assets/settings-CKqk8ZnH.js","assets/llm-subscription-service-BpJ0ouQo.js","assets/llm-subscription-DTqtBCWz.js","assets/acp-providers-CX3Lh9gj.js","assets/skill-enablement-DXeaImBz.js","assets/conversation-store-Ca3ghXap.js","assets/conversation-state-store-B0ImPLHO.js","assets/syntax-highlighter-BGDg_7w9.js","assets/copy-to-clipboard-button-Ca8iSkkA.js","assets/checkmark-XZyokq_Y.js","assets/copy-Drmhc2jD.js","assets/navigation-context-CQZwH_tC.js","assets/use-user-conversation-B9Gebw_g.js","assets/scroll-fade-state-Dw-i4SGq.js","assets/chevron-down-e1QBpjVy.js","assets/chevron-right-ZG4R5G4Q.js","assets/loader-circle-CC1au6hc.js","assets/vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js","assets/use-config-A9QovgXO.js","assets/styled-tooltip-C4jf5Fv9.js","assets/use-settings-DSXLbvBl.js","assets/get-git-path-ChKDVHZp.js","assets/close-ScPlnwyq.js","assets/skills-B0IliMxw.js","assets/u-check-circle-BKn1spCL.js","assets/typography-v1KN0tzi.js","assets/dist-Bl64nBZL.js","assets/form-control-classes-Bkh5FGrD.js","assets/format-model-name-CasAP3nd.js","assets/cloud-funnel-analytics-CztBCCPp.js","assets/mouse-pointer-click-Co2uyaPA.js","assets/use-llm-configured-BV9nZ1_j.js","assets/use-agent-profiles-Bd9Bvvp1.js","assets/use-tracking-D53y3TH9.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js","assets/bot-dMYHVfYM.js","assets/use-llm-profiles-BO-P4Oyo.js","assets/settings-utils-UYpEdPuD.js","assets/map-provider-Cu3Zgumb.js","assets/conversation-tab-empty-state-FIbh_lc8.js","assets/highlighted-source-view-BFRxGT_Q.js","assets/folder-C1ou4_DT.js","assets/link-external-BNZzCM1I.js","assets/commits-tab-AnZwLvh-.js","assets/vendor~commits-tab-BaO2Ce3e.js","assets/vendor~conversation-panel~conversation-C8Fn4XOf.js","assets/vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js","assets/llm-not-configured-banner-CIFABh3K.js","assets/vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js","assets/useInfiniteQuery-C926xzY4.js","assets/recommended-automations-launcher-6ABrI9Cy.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js","assets/secrets-service-ByZVENbp.js","assets/install-server-modal-Dpy89p4g.js","assets/brand-button-BAfk4wGP.js","assets/settings-input-Db-1g8Ql.js","assets/modal-backdrop-BSzNhM4r.js","assets/modal-close-button-DDzdRvCs.js","assets/mcp-marketplace-utils-AIBzzHTO.js","assets/modal-classes-C8eycCwG.js","assets/skill-card-pill-row-B27-xyig.js","assets/extension-module-card-classes-DpeaYhYo.js","assets/circle-plus-check-toggle-BO_kFZt3.js","assets/x-mark-BopmFoBq.js","assets/use-create-conversation-Dx3l7mFZ.js","assets/plugins-management-service-BMJgC3Ga.js","assets/use-create-secret-B9cUFWRG.js","assets/use-automations-xijQKIl9.js","assets/automation-C_eCrGyP.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js","assets/chat-send-button-MUQqCZCS.js","assets/check-CS0vmpQQ.js","assets/circle-check-DzWLNsbE.js","assets/plus-C7Slq-0I.js","assets/refresh-cw-3q3Frrii.js","assets/context-menu-list-item-I86vKcmM.js","assets/dropdown-classes-Bc1djN0-.js","assets/home-store-CY9Ej0ux.js","assets/use-is-authed-nTBcM7dE.js","assets/skill-scope-B42H-XOc.js","assets/use-save-settings-DYqkKv7T.js","assets/use-can-manage-org-profiles-CrJP5262.js","assets/organization-service.api-DrYNkEN_.js","assets/git-repo-dropdown-4ROKl2cB.js","assets/settings-dropdown-input-BcwylHs2.js","assets/merge-agent-profile-save-input-WcFmQVKK.js","assets/base-modal-D_L0oEbG.js","assets/modal-body-BxZjsju9.js","assets/loading-spinner-BY9N3pOe.js","assets/navigation-link-Bxo3-4vo.js","assets/use-activate-agent-profile-BLfmvDiG.js","assets/use-click-outside-element-W6Os4Nlb.js","assets/settings-gear-DaJj6Pde.js","assets/u-robot-BvAOA2ZD.js","assets/format-time-delta-BIR5Os7T.js","assets/browser-tab-C9vy56R5.js","assets/external-link-DKUlnCQV.js","assets/vendor~browser-tab-C5uuAxZX.js","assets/planner-tab-C9uZmhme.js","assets/list-todo-apgLVjMw.js","assets/task-list-tab-C5zcaktH.js","assets/usage-tab-CVDffLPt.js","assets/info-B6RQawoW.js","assets/terminal-CNElN42a.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{St as t,a as n,bt as r,m as i,xt as a,yt as o}from"./vendor-styling-Ck5D_A2Q.js";import{F as s,I as c,R as l,U as u}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{n as d}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js";import{t as f}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{E as p,T as m,f as h,j as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{t as _}from"./useMutation-B-qc391N.js";import{t as v}from"./useQueries-DlbhlH9I.js";import{t as y}from"./useQuery-BSTgq1rl.js";import{i as b}from"./recommended-automations-launcher-6ABrI9Cy.js";import{t as x}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js";import{Ft as S,It as C,Jt as w,Pt as T,Z as E,it as ee,n as D,rt as O,tt as k,ut as A,zt as j}from"./active-backend-context-CrHTlgvN.js";import{A as M,D as N,E as P,H as te,I as ne,M as F,T as I,U as re,W as L,a as ie,d as ae,f as oe,h as se,i as ce,j as le,k as R,l as ue,m as de,n as fe,o as pe,p as z,r as me,s as he,t as B,u as ge,w as _e,y as ve}from"./utils-CN5ZfZy1.js";import{c as ye}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js";import{A as be,D as xe,E as Se,M as Ce,N as we,O as Te,P as Ee,S as De,T as Oe,_ as ke,b as Ae,c as je,f as Me,g as Ne,h as Pe,j as Fe,k as Ie,l as Le,m as Re,n as ze,p as Be,s as Ve,t as He,u as Ue,v as We,w as Ge,x as Ke,y as qe}from"./messages-DKV9cRc2.js";import{t as Je}from"./check-CS0vmpQQ.js";import{n as Ye,r as Xe,t as Ze}from"./vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js";import{r as Qe}from"./map-provider-Cu3Zgumb.js";import{i as $e,n as et,r as tt,t as nt}from"./empty-state-BoGVDecT.js";import{t as rt}from"./external-link-DKUlnCQV.js";import{n as it,r as at,t as ot}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js";import{c as st,d as ct,l as lt,n as ut,s as dt,u as ft}from"./vendor~conversation-panel~conversation-C8Fn4XOf.js";import{a as pt,i as mt}from"./cloud-funnel-analytics-CztBCCPp.js";import{t as ht}from"./info-B6RQawoW.js";import{t as gt}from"./list-todo-apgLVjMw.js";import{t as _t}from"./loader-circle-CC1au6hc.js";import{a as vt,c as yt,d as bt,f as xt,i as St,l as Ct,m as wt,n as Tt,p as Et,r as Dt,t as Ot}from"./skill-filter-w__3UCEE.js";import{t as kt}from"./x-DJdhbdmt.js";import{t as At}from"./trash-2-D7K26eDO.js";import{n as jt,t as V}from"./context-menu-list-item-I86vKcmM.js";import{i as Mt}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js";import{t as Nt}from"./proxy-9Fe1v5na.js";import{t as Pt}from"./loading-spinner-BY9N3pOe.js";import{t as Ft}from"./use-tracking-D53y3TH9.js";import{l as It}from"./settings-service.api-DJ1r62Zr.js";import{n as Lt}from"./use-settings-DSXLbvBl.js";import{t as Rt}from"./modal-backdrop-BSzNhM4r.js";import{n as zt}from"./modal-body-BxZjsju9.js";import{n as Bt,r as Vt}from"./base-modal-D_L0oEbG.js";import{_ as Ht,i as Ut,u as Wt}from"./form-control-classes-Bkh5FGrD.js";import{t as Gt}from"./brand-button-BAfk4wGP.js";import{n as Kt}from"./navigation-context-CQZwH_tC.js";import{t as qt}from"./styled-tooltip-C4jf5Fv9.js";import{r as Jt,u as Yt}from"./dropdown-classes-Bc1djN0-.js";import{c as Xt,d as Zt,i as Qt,l as $t,m as en,t as tn}from"./use-llm-configured-BV9nZ1_j.js";import{_ as nn,a as rn,c as an,d as on,f as sn,h as cn,l as H,o as ln,p as un,t as U,u as W}from"./conversation-store-Ca3ghXap.js";import{t as dn}from"./modal-close-button-DDzdRvCs.js";import{t as fn}from"./confirmation-modal-Dv1ktp8K.js";import{C as pn,D as mn,S as hn,t as gn}from"./agent-server-conversation-service.api-tnqNjbpE.js";import{t as _n}from"./use-is-authed-nTBcM7dE.js";import{d as vn,g as yn,l as bn,m as xn,s as Sn,t as Cn,u as wn,v as Tn}from"./conversation-state-store-B0ImPLHO.js";import{c as En,d as Dn,i as On,l as kn,n as An,r as jn,s as Mn,t as Nn,u as Pn}from"./sidebar-mobile-menu-toggle-C_fb0Jki.js";import{t as Fn}from"./use-click-outside-element-W6Os4Nlb.js";import{n as In}from"./use-create-conversation-Dx3l7mFZ.js";import{r as Ln}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js";import{a as G,i as Rn,n as zn}from"./use-can-manage-org-profiles-CrJP5262.js";import{t as Bn}from"./u-edit-DAkcF52u.js";import{t as Vn}from"./skills-B0IliMxw.js";import{t as Hn}from"./install-server-modal-Dpy89p4g.js";import{o as Un,s as Wn,t as Gn}from"./home-store-CY9Ej0ux.js";import{t as Kn}from"./use-automation-health-E6NZi9rb.js";import{t as qn}from"./use-automations-xijQKIl9.js";import{t as Jn}from"./use-user-conversation-B9Gebw_g.js";import{t as Yn}from"./copy-Drmhc2jD.js";import{r as Xn}from"./typography-v1KN0tzi.js";import{n as Zn,o as Qn,t as $n}from"./extension-module-card-classes-DpeaYhYo.js";import{t as er}from"./secrets-service-ByZVENbp.js";import{t as tr}from"./use-get-secrets-K3jmk-LH.js";import{f as nr,l as rr,s as ir,t as ar}from"./mcp-marketplace-utils-AIBzzHTO.js";import{t as or}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js";import{t as sr}from"./x-mark-BopmFoBq.js";import{A as cr,B as lr,C as ur,D as dr,E as fr,F as pr,G as mr,H as hr,I as gr,L as _r,M as vr,O as yr,P as br,S as xr,T as Sr,U as Cr,_ as wr,a as Tr,b as Er,c as Dr,g as Or,h as kr,i as Ar,j as jr,n as Mr,o as Nr,p as Pr,r as Fr,s as Ir,t as Lr,v as Rr,w as zr,x as Br,y as Vr,z as Hr}from"./llm-not-configured-banner-CIFABh3K.js";import{$ as K,A as Ur,B as Wr,C as q,D as Gr,E as Kr,G as qr,H as Jr,K as Yr,L as Xr,M as Zr,N as Qr,O as $r,P as ei,Q as J,R as ti,S as ni,T as Y,V as ri,W as ii,X as ai,Y as oi,Z as si,_ as ci,a as li,b as ui,c as di,et as fi,f as pi,g as mi,j as hi,m as gi,p as _i,s as vi,u as yi,w as bi,z as xi}from"./markdown-renderer-BzTlxI8x.js";import{a as Si,n as Ci,t as wi}from"./skill-scope-B42H-XOc.js";import{t as Ti}from"./git-repo-dropdown-4ROKl2cB.js";import{n as Ei,t as Di}from"./get-git-path-ChKDVHZp.js";import{t as Oi}from"./parse-git-remote-url-DpDM9bK6.js";import{t as ki}from"./use-breakpoint-DWtihr9g.js";import{n as Ai,t as ji}from"./error-state-Body8Ngd.js";import{a as Mi,i as Ni,n as Pi,o as Fi,r as Ii,t as Li}from"./mcp-page-BEBYqH_K.js";import{n as Ri,t as zi}from"./secret-form-BB7the8W.js";var X=e(t(),1),Bi={curAgentState:R.LOADING},Vi=nn(e=>({...Bi,setCurrentAgentState:t=>e({curAgentState:t}),reset:()=>e(Bi)})),Hi=`openhands-last-conversation-by-backend`;function Ui(e,t){return t?`${e}::${t}`:e}function Wi(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(Hi);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 Gi(e){if(!(typeof window>`u`))try{window.localStorage.setItem(Hi,JSON.stringify(e))}catch{}}function Ki(e,t,n){if(!n)return;let r=Wi();r[Ui(e,t)]=n,Gi(r)}function qi(e,t){let n=Wi(),r=Ui(e,t);r in n&&(delete n[r],Gi(n))}var Ji=e=>({action:we.CHANGE_AGENT_STATE,args:{agent_state:e}}),Yi=e=>`error`in e,Xi=e=>`type`in e&&e.type===`error`,Zi=()=>{let{send:e}=Ce(),t=Y(e=>e.events);X.useEffect(()=>{if(!t.length)return;let n=t[t.length-1];if(!(ei(n)&&Qr(n))){if(Yi(n)){if(n.error_code===401){S(`Session expired.`);return}typeof n.error==`string`?S(n.error):S(n.message);return}Xi(n)&&`${n.message??``}`.startsWith(`Agent reached maximum`)&&e(Ji(R.PAUSED))}},[t.length])},Qi=()=>{let{curAgentState:e}=si();return{runtimeActive:!M.includes(e)}};function $i({children:e}){return Zi(),Qi(),e}var ea=`ACPAuthRequired`,ta={ACPAuthRequired:L.ERROR$ACP_AUTH_REQUIRED_TITLE,ACPSpawnError:L.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPInitError:L.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPPromptError:L.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,UsagePolicyRefusal:L.CHAT_INTERFACE$AGENT_ERROR_MESSAGE};function na(e){return e?ta[e]??null:null}function ra(e){return e===ea}var ia={entriesByConversation:{}},aa=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:n(e.entriesByConversation[t]??[])}}),oa=nn()(cn(e=>({...ia,addPending:(t,n)=>{let r=mn();return e(e=>aa(e,t,e=>[...e,{id:r,question:n,status:`pending`}])),r},resolve:(t,n,r)=>e(e=>aa(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`done`}:e))),fail:(t,n,r)=>e(e=>aa(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`error`}:e))),dismiss:(t,n)=>e(e=>aa(e,t,e=>e.filter(e=>e.id!==n)))}),{name:`BtwStore`})),Z=o();function sa({onClick:e}){let{t}=f(`openhands`);return(0,Z.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,Z.jsx)(Ie,{className:`w-3.5 h-3.5 fill-success`}),(0,Z.jsx)(`span`,{children:t(L.CHAT_INTERFACE$BTW_GOT_IT)})]})}function ca({conversationId:e}){let{t}=f(`openhands`),n=oa(e=>e.entriesByConversation),r=oa(e=>e.dismiss),i=e?n[e]??[]:[];return!e||i.length===0?null:(0,Z.jsx)(`div`,{"data-testid":`btw-messages`,className:`flex flex-col w-full`,children:i.map(n=>{let i=n.status===`pending`;return(0,Z.jsx)(be,{title:(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`opacity-60`,children:t(L.CHAT_INTERFACE$BTW_PREFIX)}),(0,Z.jsx)(`span`,{children:n.question}),i&&(0,Z.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(L.CHAT_INTERFACE$BTW_WAITING_FOR_ANSWER):n.response??``,initiallyExpanded:!i,chevronPosition:`before`,titleTrailing:!i&&(0,Z.jsx)(sa,{onClick:()=>r(e,n.id)})},n.id)})})}function la({conversationId:e}){let t=ui(e=>e.statusByConversation),n=e?t[e]:void 0;return n?.active?(0,Z.jsx)(Te,{status:n}):null}var ua=`${F} `,da=(e,t)=>{let n=oa(e=>e.addPending),r=oa(e=>e.resolve),i=oa(e=>e.fail);return(0,X.useCallback)(a=>{let o=a.trim(),s=o===`/btw`||o.startsWith(ua);if(!e||!s){t(a);return}let c=o.slice(F.length).trim();if(!c)return;let l=n(e,c);wn(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])},fa=`${ne} `,pa=/^--max(?:=|\s+)(\d+)\s*/,ma=(e,t)=>{let{t:n}=f();return(0,X.useCallback)(r=>{let i=r.trim(),a=i===`/goal`||i.startsWith(fa);if(!e||!a){t(r);return}let o=i.slice(ne.length).trim(),s,c=o.match(pa);c&&(s=parseInt(c[1],10),o=o.slice(c[0].length).trim());let l=o;if(!l){S(n(L.GOAL$OBJECTIVE_REQUIRED));return}let u={objective:l};s&&s>=1&&(u.max_iterations=s),yn(e,u).catch(e=>{let t=n(L.GOAL$START_FAILED);S(e instanceof Error&&e.message?e.message:t)})},[e,t,n])},ha=`flex flex-row gap-1 items-center justify-center rounded-[100px]`;function ga(e){return B(ha,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 _a(e){return e?`white`:`var(--oh-muted)`}var va=`font-normal text-sm leading-5 truncate`;function ya({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,isConversationReady:r=!0}){let{t:i}=f(`openhands`),{trackPullButtonClick:a}=Ft(),o=n&&t&&r;return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{a(),e(ae())},disabled:!o,className:B(ga(o),`px-0.5 py-1 w-[76px] min-w-[76px]`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,Z.jsx)(Sr,{width:12,height:12,color:_a(o)})}),(0,Z.jsx)(`div`,{className:B(va,`max-w-[76px]`),title:i(L.COMMON$PULL),children:i(L.COMMON$PULL)})]})}function ba({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=f(`openhands`),{trackPushButtonClick:o}=Ft(),s=n&&t&&i;return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(oe(r))},disabled:!s,className:B(ga(s),`px-2 py-1 w-[77px] min-w-[77px]`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,Z.jsx)(fr,{width:12,height:12,color:_a(s)})}),(0,Z.jsx)(`div`,{className:B(va,`max-w-[77px]`),title:a(L.COMMON$PUSH),children:a(L.COMMON$PUSH)})]})}function xa({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=f(`openhands`),{trackCreatePrButtonClick:o}=Ft(),s=n&&t&&i;return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(he(r))},disabled:!s,className:B(ga(s),`px-2 py-1 w-[126px] min-w-[126px] h-7`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,Z.jsx)(zr,{width:12,height:12,color:_a(s)})}),(0,Z.jsx)(`div`,{className:B(va,`max-w-[126px]`),title:a(L.COMMON$PULL_REQUEST),children:a(L.COMMON$PULL_REQUEST)})]})}function Sa(e){return e.kind===`BashCommand`}function Ca(e){return e.kind===`BashOutput`}function wa(e){return e.kind===`BashError`}function Ta(e,t,n){let r=(0,X.useRef)(null),i=(0,X.useRef)(null),a=(0,X.useRef)([]),o=(0,X.useRef)([]),s=(0,X.useRef)(new Map);return(0,X.useEffect)(()=>{if(!n)return;let c=O(e),l=new WebSocket(c);r.current=l,i.current=null;let u=oi(l);l.onopen=()=>{u(),ai(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(Sa(t)){let e=o.current.shift();e&&s.current.set(t.id,{...e,stdout:[],stderr:[]})}else if(Ca(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 wa(t)&&d(`Bash error: ${t.code}: ${t.detail}`)};function d(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=()=>{u(),r.current=null,i.current=null,d(`Bash WebSocket closed`)},l.onerror=()=>{r.current=null,i.current=null,d(`Bash WebSocket error`)},()=>{u(),l.onclose=null,l.onerror=null,l.close(),r.current=null,i.current=null,d(`Bash WebSocket unmounted`)}},[n,e,t]),(0,X.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 Ea={repository:null,branch:null,provider:null,remoteUrl:null},Da=[`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
|
-
`);async function Oa(e,t){let n=await e(Da,t,10);if(n.exit_code!==0)return Ea;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 Ea;let s=Oi(i);return{repository:s?.repository??null,provider:s?.provider??null,remoteUrl:i||null,branch:o}}var ka=()=>{let{data:e}=J(),t=Ei(),{backend:n}=D(),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=Ta(a,o,d),p=(0,X.useRef)(f);return p.current=f,y({queryKey:[`local-git-info`,i,a,o,s],queryFn:async()=>Oa((e,t,n)=>p.current(e,t,n),s),enabled:d,retry:!1,staleTime:1e4,refetchInterval:1e4,gcTime:1e3*60*5,meta:{disableToast:!0}})},Aa=()=>{let e=d(),{t}=f(`openhands`);return _({mutationFn:e=>gn.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)}),S(t(L.CONVERSATION$FAILED_TO_UPDATE_REPOSITORY))},onSuccess:()=>{C(t(L.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 ja({children:e,tooltipMessage:t,testId:n,shouldShowTooltip:r}){return r?(0,Z.jsx)(qt,{content:t,placement:`top`,showArrow:!0,tooltipClassName:`bg-white text-black`,children:(0,Z.jsx)(`span`,{"data-testid":n,className:`hover:opacity-100`,children:e})}):e}function Ma({isOpen:e,onClose:t,onLaunch:n,defaultProvider:r=`github`}){let{t:i}=f(`openhands`),{providers:a}=Wn(),[o,s]=(0,X.useState)(null),[c,l]=(0,X.useState)(null),[u,d]=(0,X.useState)(null);(0,X.useEffect)(()=>{a.length===1&&!o?s(a[0]):a.length>1&&!o&&r&&a.includes(r)&&s(r)},[a,o,r]);let p=(0,X.useCallback)(e=>{e!==o&&(s(e),l(null),d(null))},[o]),m=(0,X.useCallback)(e=>{e?(l(e),d(null)):(l(null),d(null))},[]),h=(0,X.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,Z.jsx)(Rt,{onClose:_,children:(0,Z.jsxs)(zt,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(dn,{onClose:_,testId:`close-open-repository-modal`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(Vt,{title:i(L.CONVERSATION$OPEN_REPOSITORY)})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4 w-full`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:i(L.CONVERSATION$SELECT_OR_INSERT_LINK)}),a.length>1&&(0,Z.jsx)(Tr,{providers:a,value:o,onChange:p})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] w-full`,children:[(0,Z.jsx)(Ti,{provider:v,value:c?.id||null,repositoryName:c?.full_name||null,onChange:m,className:`w-full`}),(0,Z.jsx)(Ar,{repository:c?.full_name||null,provider:v,selectedBranch:u,onBranchSelect:h,defaultBranch:c?.main_branch||null,disabled:!c,className:`w-full`})]})]}),(0,Z.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,Z.jsx)(Gt,{type:`button`,variant:`secondary`,onClick:_,children:i(L.BUTTON$CANCEL)}),(0,Z.jsx)(Gt,{type:`button`,variant:`primary`,onClick:g,isDisabled:!y,children:i(L.BUTTON$LAUNCH)})]})]})})}function Na({onSuggestionsClick:e}){let{t}=f(`openhands`),{conversationId:n}=K(),[r,i]=(0,X.useState)(!1),[a,o]=(0,X.useState)(!1),s=(0,X.useRef)(null),{addRecentRepository:c}=Gn(),l=q(e=>e.enqueuePendingMessage),u=q(e=>e.markPendingMessageError),{backend:d}=D(),p=d.kind===`local`,{providers:m}=Wn(),h=p||m.length>0,{data:g}=J(),{repositoryInfo:_}=pr(),{data:v}=ka(),y=hr(),b=di()?.isLoadingHistory??!1,x=(0,X.useRef)(y);(0,X.useEffect)(()=>{x.current=y},[y]);let{send:C}=Ce(),w=(0,X.useRef)(C);(0,X.useEffect)(()=>{w.current=C},[C]);let T=Oe(),{mutate:E}=Aa(),{mutate:ee,isPending:O}=In(),k=g?.selected_repository||_?.selectedRepository,A=g?.git_provider||_?.gitProvider,j=g?.selected_branch||_?.selectedBranch,M=k||v?.repository||void 0,N=A||v?.provider,P=j||v?.branch||void 0,te=(g?.id?pn(g.id):null)?.selected_workspace??null,ne=te&&te.replace(/\/+$/,``).split(`/`).pop()||null,F=!!M&&!!N,I=!!g&&y===`OPEN`&&!b;(0,X.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,X.useEffect)(()=>{if(!a)return;let e=e=>{e.key===`Escape`&&o(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let re=(e,r)=>{n&&(c(e),E({conversationId:n,repository:e.full_name,branch:r.name,gitProvider:e.git_provider},{onSuccess:()=>{if(x.current!==`OPEN`){S(t(L.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(L.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))})}}))},ie=!p||!!M||!!ne,ae=p&&!F;return ie||P||F?(0,Z.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center overflow-x-auto flex-nowrap relative scrollbar-hide`,children:[ie?(0,Z.jsx)(Fr,{selectedRepository:M,gitProvider:N,workspaceName:ne,onClick:()=>i(!0),disabled:!I||ae}):null,P?(0,Z.jsx)(Mr,{selectedBranch:P,selectedRepository:M,gitProvider:N}):null,F?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ja,{tooltipMessage:t(L.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pull-button-tooltip`,shouldShowTooltip:!F,children:(0,Z.jsx)(ya,{onSuggestionsClick:e,hasRepository:F,providerTokensReady:h,isConversationReady:I})}),(0,Z.jsx)(ja,{tooltipMessage:t(L.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-push-button-tooltip`,shouldShowTooltip:!F,children:(0,Z.jsx)(ba,{onSuggestionsClick:e,hasRepository:F,providerTokensReady:h,currentGitProvider:N,isConversationReady:I})}),(0,Z.jsx)(ja,{tooltipMessage:t(L.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pr-button-tooltip`,shouldShowTooltip:!F,children:(0,Z.jsx)(xa,{onSuggestionsClick:e,hasRepository:F,providerTokensReady:h,currentGitProvider:N,isConversationReady:I})})]}):null]}),(0,Z.jsx)(Ma,{isOpen:r,onClose:()=>i(!1),onLaunch:re,defaultProvider:N})]}):null}function Pa({onSubmit:e,disabled:t=!1,hasStartedConversation:n}){let{images:r,files:i,imagesMarkedUploadAsFile:a,clearAllFiles:o,subConversationTaskId:s}=U(),{curAgentState:c}=si(),{data:l}=J(),{conversationId:u}=fi(),d=u??l?.id??null,{taskStatus:f}=br(s,l?.id||null),{handleUpload:p}=Nr(),m=Ir(d,ma(d,da(d,t=>{let{imagesToEmbed:n,imagesAsFiles:s}=mr(r,a);e(t,n,[...i,...s]),o()})));return(0,Z.jsxs)(`div`,{"data-testid":`interactive-chat-box`,children:[(0,Z.jsx)(Dr,{disabled:t||c===R.AWAITING_USER_CONFIRMATION||ve(f),isNewConversationPending:t,hasStartedConversation:n,onSubmit:m,onFilesPaste:p}),(0,Z.jsx)(`div`,{className:`mt-3 pb-3`,children:(0,Z.jsx)(Na,{onSuggestionsClick:e=>{m(e)}})})]})}function Fa(){let e=Y(e=>e.events),t=Y(e=>e.uiEvents),n=X.useMemo(()=>t.filter(_i),[t]),r=X.useMemo(()=>e,[e]),i=X.useMemo(()=>n.length,[n]),a=X.useMemo(()=>r.some(e=>e.source===`agent`&&!Yr(e)&&!Xr(e)),[r]),o=pi(r);return{storeEvents:e,uiEvents:t,renderableEvents:n,allConversationEvents:r,totalEvents:i,hasSubstantiveAgentActions:a,conversationUserEventsExist:o,userEventsExist:o}}var Ia=e=>`timestamp`in e?e.timestamp:void 0,La=e=>{let t=!!e&&rn(e),n=t?void 0:e,{data:r}=Jn(e??null),{data:i,isFetched:a}=gi(n??void 0),o=Y(e=>e.addEvents),[s,c]=X.useState(!1),[l,u]=X.useState(!0),d=X.useRef(!1),f=X.useRef(!0);return X.useEffect(()=>{if(d.current=!1,c(!1),t){f.current=!1,u(!1);return}f.current=!0,u(!0)},[e,t]),X.useEffect(()=>{t||!a||!i||i.hasMore||(f.current=!1,u(!1))},[t,a,i?.hasMore,n]),{isLoading:s,hasMore:l,loadOlder:X.useCallback(async()=>{if(!e||rn(e)||d.current||!f.current||!r)return;let{events:t}=Y.getState(),n=t[0];if(!n)return;let i=Ia(n);if(!i){f.current=!1,u(!1);return}d.current=!0,c(!0);try{let t=await mi.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),yi(e,Y.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])}},Ra=nn(e=>({count:0,bump:()=>e(e=>({count:e.count+1}))}));function za(e,t){return e===null?null:`${e}${e.includes(`?`)?`&`:`?`}v=${t}`}var Ba=new Set([`FileEditorObservation`,`StrReplaceEditorObservation`,`PlanningFileEditorObservation`]),Va=new Set([`view`]),Ha=new Set([`ExecuteBashObservation`,`TerminalObservation`]);function Ua(e){let t=e.observation;return!(!t||typeof t.kind!=`string`||!Ba.has(t.kind)||t.command&&Va.has(t.command))}function Wa(e){let t=e.observation;return!!t&&typeof t.kind==`string`&&Ha.has(t.kind)}function Ga(){let e=d(),t=Y(e=>e.events),n=Ra(e=>e.bump),r=(0,X.useRef)(new Set),i=(0,X.useRef)(new WeakSet);(0,X.useEffect)(()=>{let a=!1,o=!1;for(let e of t){let t=`id`in e?e.id:void 0;(t===void 0?i.current.has(e):r.current.has(t))||(t===void 0?i.current.add(e):r.current.add(t),Ua(e)?a=!0:Wa(e)&&(o=!0))}!a&&!o||(e.invalidateQueries({queryKey:[`file_changes`]}),e.invalidateQueries({queryKey:[`file_diff`]}),e.invalidateQueries({queryKey:[`git_commits`]}),a&&(e.invalidateQueries({queryKey:[`workspace-files`]}),e.invalidateQueries({queryKey:[`workspace-file-content`]}),n()))},[t,e,n])}var Ka={kind:`translation`,key:`ACTION_MESSAGE$THINK`,values:{}},qa=new Set([`ExecuteBashAction`,`TerminalAction`,`FileEditorAction`,`StrReplaceEditorAction`,`MCPToolAction`,`InvokeSkillAction`,`TaskAction`,`ThinkAction`,`TaskTrackerAction`,`GrepAction`,`GlobAction`,`BrowserNavigateAction`,`BrowserClickAction`,`BrowserTypeAction`,`BrowserGetStateAction`,`BrowserGetContentAction`,`BrowserScrollAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserSwitchTabAction`,`BrowserCloseTabAction`]),Ja=e=>{if(!Zr(e))return null;let t=We(e);return t?{kind:`text`,text:t}:qa.has(e.action.kind)?ke(e):null},Ya=e=>e.source===`environment`&&`rejection_reason`in e,Xa=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(Jr(i)||Ya(i)){t.add(i.action_id),n.add(i.tool_call_id);continue}if(Qr(i)){n.add(i.tool_call_id);continue}if(hi(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=Ke(i);return e?{kind:`translation`,key:Ae(i),values:{title:e}}:Ka}if(Zr(i)&&!t.has(i.id)&&!n.has(i.tool_call_id))return Ja(i)??Ka}}return Ka};function Za({events:e}){let t=Xa(e);return(0,Z.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,Z.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,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:t.kind===`text`?t.text:(0,Z.jsx)(x,{ns:`openhands`,i18nKey:t.key,values:t.values,components:{path:(0,Z.jsx)(Pe,{}),cmd:(0,Z.jsx)(Ne,{})}})})]})}function Qa({suggestion:e,onClick:t}){let{t:n}=f(`openhands`);return(0,Z.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,X.useMemo)(()=>{switch(e.label){case`INCREASE_TEST_COVERAGE`:return(0,Z.jsx)(ur,{width:24,height:24,color:`#fff`});case`AUTO_MERGE_PRS`:return(0,Z.jsx)(xr,{width:19,height:20,color:`#fff`});case`FIX_README`:return(0,Z.jsx)(Br,{width:24,height:24,color:`#fff`});case`CLEAN_DEPENDENCIES`:return(0,Z.jsx)(Er,{width:24,height:24,color:`#fff`});default:return null}},[e]),(0,Z.jsx)(`span`,{"data-testid":`suggestion`,className:`text-[15px] font-normal leading-5 text-white text-center cursor-pointer`,children:n(e.label)})]})}function $a({suggestions:e,onSuggestionClick:t}){return(0,Z.jsx)(`div`,{"data-testid":`suggestions`,className:`grid grid-cols-2 gap-5 max-w-fit`,children:e.map((e,n)=>(0,Z.jsx)(Qa,{suggestion:e,onClick:t},n))})}var eo=L.SUGGESTIONS$HACKER_NEWS,to=`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
|
-
The script should only use tools that are widely available on unix systems, like curl and grep.`,no=L.SUGGESTIONS$HELLO_WORLD,ro=`I want to create a Hello World app in Javascript that:
|
|
6
|
-
* Displays Hello World in the middle.
|
|
7
|
-
* Has a button that when clicked, changes the greeting with a bouncing animation to fun versions of Hello.
|
|
8
|
-
* Has a counter for how many times the button has been clicked.
|
|
9
|
-
* Has another button that changes the app's background color.`,io=L.SUGGESTIONS$TODO_APP,ao=`I want to create a VueJS app that allows me to:
|
|
10
|
-
* See all the items on my todo list
|
|
11
|
-
* add a new item to the list
|
|
12
|
-
* mark an item as done
|
|
13
|
-
* totally remove an item from the list
|
|
14
|
-
* change the text of an item
|
|
15
|
-
* set a due date on the item
|
|
16
|
-
|
|
17
|
-
This should be a client-only app with no backend. The list should persist in localStorage.`,oo={repo:Vr,"non-repo":{[eo]:to,[no]:ro,[io]:ao}};function so({onSuggestionsClick:e}){let{t}=f(`openhands`),{shouldHideSuggestions:n}=U();return(0,Z.jsx)(i,{children:!n&&(0,Z.jsxs)(Ze.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,Z.jsx)(`div`,{className:`flex flex-col items-center p-4 rounded-xl w-full`,children:(0,Z.jsx)(`span`,{className:`pb-6 text-[32px] font-medium leading-5 text-white`,children:t(L.LANDING$TITLE)})}),(0,Z.jsx)($a,{suggestions:Object.entries(oo.repo).slice(0,4).map(([e,t])=>({label:e,value:t})),onSuggestionClick:e})]})})}var co={files:[],initialPrompt:null,selectedRepository:null,selectedRepositoryProvider:null,replayJson:null},lo=nn(e=>({...co,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(()=>co)})),uo=e=>(0,Z.jsx)(`svg`,{width:12,height:17,viewBox:`0 0 12 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.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 fo({onClick:e}){return(0,Z.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,Z.jsx)(uo,{width:15,height:15})})}var po=[{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 mo({width:e,height:t}){return(0,Z.jsx)(`div`,{className:B(`rounded-md bg-foreground/5 animate-pulse`,e,t)})}function ho(){let{t:e}=f(`openhands`);return(0,Z.jsx)(`div`,{className:`flex flex-col gap-6 p-4 w-full h-full overflow-hidden`,"data-testid":`chat-messages-skeleton`,"aria-label":e(L.CHAT_INTERFACE$LOADING_CONVERSATION),children:po.map((e,t)=>(0,Z.jsx)(`div`,{className:B(`flex w-full`,e.align),children:(0,Z.jsx)(mo,{width:e.width,height:e.height})},t))})}var go=220;function _o({message:e,code:t,onDismiss:n,onRetry:r,onReauth:i,classification:a}){let{t:o,i18n:s}=f(`openhands`),c=na(t),[l,u]=X.useState(!1),[d,m]=X.useState(!1),[h,g]=X.useState(!1),_=X.useRef(null),v=s.exists(e,{ns:`openhands`}),y=v?String(o(e)):e,b=y.length>go,C=b&&!l;return X.useEffect(()=>{if(!h)return;let e=setTimeout(()=>{g(!1)},2e3);return()=>clearTimeout(e)},[h]),X.useEffect(()=>{g(!1)},[y]),X.useLayoutEffect(()=>{let e=_.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){m(!1);return}m(e.getBoundingClientRect().height>t*1.5)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[y,C,l,e]),(0,Z.jsxs)(`div`,{className:B(`flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,d?`items-start`:`items-center`),"data-testid":`error-message-banner`,children:[a!=null&&a.kind!==`internal`&&a.kind!==`unknown`?(0,Z.jsx)(ye,{"aria-hidden":!0,className:`h-4 w-4 shrink-0 text-[var(--oh-warning)]`,strokeWidth:2,"data-testid":`warning-message-banner-icon`}):(0,Z.jsx)(p,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:te},"data-testid":`error-message-banner-icon`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[c&&(0,Z.jsx)(`div`,{className:`text-sm font-medium text-[var(--oh-foreground)]`,"data-testid":`error-message-banner-header`,children:o(c)}),(0,Z.jsx)(`div`,{ref:_,className:B(`whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]`,C&&`line-clamp-3`),"data-testid":`error-message-banner-content`,children:v?(0,Z.jsx)(x,{ns:`openhands`,i18nKey:e}):e}),i&&(0,Z.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:o(L.ERROR$ACP_UPDATE_CREDENTIALS)}),b&&(0,Z.jsx)(`button`,{type:`button`,className:`mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline`,onClick:()=>u(e=>!e),"data-testid":`error-message-banner-toggle`,children:o(l?L.COMMON$VIEW_LESS:L.COMMON$VIEW_MORE)})]}),(0,Z.jsxs)(`div`,{className:B(`flex shrink-0 gap-1`,d?`self-start`:`items-center`),children:[r&&(0,Z.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:o(L.CHAT_INTERFACE$MESSAGE_RETRY)}),(0,Z.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(y),g(!0)}catch{S(o(L.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":o(h?L.BUTTON$COPIED:L.BUTTON$COPY),"data-testid":`error-message-banner-copy`,children:h?(0,Z.jsx)(Je,{className:`h-4 w-4`,"aria-hidden":!0}):(0,Z.jsx)(Qe,{className:`h-4 w-4`,"aria-hidden":!0})}),n&&(0,Z.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":o(L.BUTTON$CLOSE),"data-testid":`error-message-banner-dismiss`,children:(0,Z.jsx)(kt,{className:`h-4 w-4`,"aria-hidden":!0})})]})]})}var vo={dismissedEventIds:{}},yo=nn()(cn(e=>({...vo,dismiss:t=>e(e=>({dismissedEventIds:{...e.dismissedEventIds,...Object.fromEntries(t.map(e=>[e,!0]))}}))}),{name:`SkillInstallBannerStore`})),bo=/^✅ Successfully installed '([^']+)' to (.+)$/m;function xo(e){let t=new Map;for(let n of e){if(!ti(n))continue;let e=n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
18
|
-
`).match(bo);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 So=e=>{let t=Y(e=>e.events),n=Y(e=>e.loadedConversationId),r=yo(e=>e.dismissedEventIds),i=yo(e=>e.dismiss),a=(0,X.useMemo)(()=>!e||e!==n?[]:xo(t).filter(e=>!r[e.eventId]),[e,n,t,r]);return{installs:a,dismissAll:(0,X.useCallback)(()=>i(a.map(e=>e.eventId)),[i,a])}};function Co({conversationId:e}){let{t}=f(`openhands`),{installs:n,dismissAll:r}=So(e),{backend:i}=D(),{mutate:a,isPending:o}=In(),s=b(),{navigate:c}=Kt(),{data:l}=J();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,Z.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,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-[var(--oh-foreground)]`,children:t(L.SKILLS$INSTALL_BANNER_MESSAGE,{skills:d.join(`, `)})}),(0,Z.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=>S(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(L.SKILLS$INSTALL_BANNER_ACTION)})]}),(0,Z.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(L.BUTTON$CLOSE),"data-testid":`skill-install-restart-dismiss`,children:(0,Z.jsx)(kt,{className:`h-4 w-4`,"aria-hidden":!0})})]})}function wo(){let{t:e}=f(`openhands`),{conversationId:t}=fi(),n=q(e=>e.pendingMessages),r=q(e=>e.markPendingMessageError),i=q(e=>e.markPendingMessageSending),a=q(e=>e.removePendingMessage),o=U(e=>e.restoreMessageToInputIfEmpty),{send:s}=Ce(),c=X.useMemo(()=>t?n.filter(e=>_r(t,e.conversationId)):[],[n,t]),l=X.useCallback(async t=>{let n=q.getState().pendingMessages.find(e=>e.id===t);if(n){i(t);try{await s(Fe(n.text,n.imageUrls,n.fileUrls,n.timestamp))}catch(n){r(t,n instanceof Error?n.message:e(L.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}}},[s,r,i,e]),u=X.useCallback((e,t)=>{o(t),a(e)},[o,a]),d=X.useCallback(e=>{a(e)},[a]);return c.length===0?null:(0,Z.jsx)(Z.Fragment,{children:c.map(e=>(0,Z.jsx)(Me,{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,Z.jsx)(Ue,{size:`small`,images:e.imageUrls})},e.id))})}var To=()=>{let{data:e}=J();return _({mutationKey:[`unified-upload-files`],mutationFn:async t=>{let{conversationId:n,files:r}=t;return bn(n,r,e)},meta:{disableToast:!0}})},Eo=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.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 Do(){let{t:e}=f(`openhands`),{data:t}=Lt();return t?.confirmation_mode?(0,Z.jsx)(qt,{closeDelay:100,content:e(L.COMMON$CONFIRMATION_MODE_ENABLED),tooltipClassName:`bg-white text-black hover:bg-transparent`,children:(0,Z.jsx)(`div`,{className:`flex items-center justify-center w-[26px] h-[26px] rounded-lg bg-[var(--oh-surface)]`,children:(0,Z.jsx)(Eo,{width:15,height:15})})}):null}var Oo=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.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 ko({status:e,statusColor:t}){return(0,Z.jsx)(`div`,{"data-testid":`chat-status-indicator`,className:n(`w-full max-w-full rounded-[100px] p-1 bg-[var(--oh-surface)] flex items-center gap-1`),children:(0,Z.jsxs)(i,{mode:`wait`,children:[(0,Z.jsx)(Ze.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,Z.jsx)(Oo,{className:`w-4 h-4`,color:t})},`dot-${e}`),(0,Z.jsx)(Ze.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 Ao=()=>{let e=d(),{navigate:t}=Kt(),{t:n}=f(`openhands`),{data:r}=J(),{trackConversationCreated:i}=Ft();return _({mutationFn:async()=>{if(!r?.id)throw Error(`No active conversation`);let e=await gn.createConversation({sandboxId: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:()=>{m.loading(n(L.CONVERSATION$CLEARING),{...T,id:`clear-conversation`})},onSuccess:r=>{i({conversationId:r.newConversationId,taskId:r.taskId,hasRepository:!1,hasWorkspace:!1,hasInitialQuery:!1,hasParentConversation:!1,entryPoint:`new_command`}),m.dismiss(`clear-conversation`),C(n(L.CONVERSATION$CLEAR_SUCCESS)),t(`/conversations/${r.newConversationId}`),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]})},onError:e=>{m.dismiss(`clear-conversation`);let t=n(L.CONVERSATION$CLEAR_UNKNOWN_ERROR);e instanceof Error?t=e.message:typeof e==`string`&&(t=e),S(n(L.CONVERSATION$CLEAR_FAILED,{error:t}))}})};function jo(e,t){return e?`github`:t?`replay`:`direct`}function Mo(){Ga();let{trackInitialQuerySubmitted:e,trackUserMessageSent:t}=Ft(),{setMessageToSend:n,conversationMode:r,planContent:i}=U(),{errorMessage:a,errorCode:o,errorClassification:s,removeErrorMessage:c,setErrorMessage:u}=bi(),d=l(),{isTask:p,taskStatus:m,taskDetail:h}=pr(),g=p,_=di(),{send:v}=Ce(),{renderableEvents:y,allConversationEvents:b,totalEvents:x,hasSubstantiveAgentActions:C,userEventsExist:w}=Fa(),T=q(e=>e.enqueuePendingMessage),E=q(e=>e.markPendingMessageError),ee=q(e=>e.pendingMessages),{t:D}=f(`openhands`),O=X.useRef(null),{scrollDomToBottom:k,onChatBodyScroll:A,hitBottom:j,autoScroll:M,setAutoScroll:N,setHitBottom:P}=Se(O),{mutate:te,isPending:ne}=Ao(),{curAgentState:F}=si(),{handleBuildPlanClick:I}=Re(),{data:re}=J(),ie=re?.sandbox_status??null,ae=wr(),{isConfigured:oe,isLoading:ce}=tn(),le=!ce&&!oe,ue=F===R.RUNNING||F===R.LOADING;X.useEffect(()=>{if(ue||r!==`plan`||!i)return;let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),I(e),k())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[ue,r,i,I,k]);let{selectedRepository:fe,replayJson:pe}=lo(),{conversationId:z}=fi(),me=ui(e=>{let t=z?e.statusByConversation[z]:void 0;return t?.active?`${t.iteration}:${t.status}`:null}),{mutateAsync:he}=To(),{isLoading:B,hasMore:ge,loadOlder:_e}=La(z),ve=X.useRef(null),ye=X.useCallback(e=>{if(g||B||!ge)return;let t=e.scrollTop<=80,n=e.scrollHeight<=e.clientHeight+80;!t&&!n||(ve.current={scrollHeight:e.scrollHeight,scrollTop:e.scrollTop},_e().catch(e=>{ve.current=null,u(e instanceof Error&&e.message?e.message:D(L.ERROR$GENERIC))}))},[ge,B,g,_e,u,D]),be=X.useCallback(e=>{e.deltaY<0&&e.currentTarget.scrollTop<=0&&ye(e.currentTarget)},[ye]),we=X.useMemo(()=>z?ee.some(e=>_r(z,e.conversationId)):!1,[ee,z]),Te=ci(e=>z?(e.entriesByConversation[z]?.length??0)>0:!1),Ee=vr({isLoadingHistory:_?.isLoadingHistory===!0,hasUserEvents:w,hasPendingUserMessages:we,hasSubstantiveAgentActions:C,hasModelEntries:Te}),Oe=b.length>0||we||!_?.isLoadingHistory,ke=!!z,Ae=!Oe&&!p,je=async(r,i,a)=>{if(r.trim()===`/new`){if(!z){S(D(L.CONVERSATION$CLEAR_NO_ID));return}if(x===0){S(D(L.CONVERSATION$CLEAR_EMPTY));return}if(ne)return;te();return}let o=[...i],s=[...a];x===0?e({entryPoint:jo(fe!==null,pe!==null),queryCharacterLength:r.length,replayJsonSize:pe?.length}):t({sessionMessageCount:x,currentMessageLength:r.length});let c=Hr([...o,...s]);if(!c.isValid){S(`Error: ${c.errorMessage}`);return}let l=o.map(e=>lr(e)),u=await Promise.all(l),d=new Date().toISOString(),{skipped_files:f,uploaded_files:p}=s.length>0?await he({conversationId:z,files:s}):{skipped_files:[],uploaded_files:[]};f.forEach(e=>S(e.reason));let m=`${D(L.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE)}: ${p.join(`
|
|
19
|
-
|
|
20
|
-
`)}`,h=p.length>0?`${r}\n\n${m}`:r,g=T({conversationId:z,text:r,content:h,imageUrls:u,fileUrls:p,timestamp:d});k(),n(``);try{await v(Fe(h,u,p,d))}catch(e){E(g,e instanceof Error?e.message:D(L.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}};X.useEffect(()=>{if(ve.current&&O.current){let{scrollHeight:e,scrollTop:t}=ve.current,n=O.current,r=n.scrollHeight-e;r>0&&(n.scrollTop=t+r),ve.current=null;return}M&&k()},[y.length,we,me,k]);let Me=X.useRef(ye);X.useEffect(()=>{Me.current=ye}),X.useEffect(()=>{let e=O.current;e&&Me.current(e)},[y.length,ge]);let Ne={scrollRef:O,autoScroll:M,setAutoScroll:N,scrollDomToBottom:k,hitBottom:j,setHitBottom:P,onChatBodyScroll:A},Pe=F===R.LOADING||F===R.INIT,Ie=F===R.STOPPED,Le=F===R.PAUSED,ze=de({isPausing:Le,isTask:p,taskStatus:m,isStartingStatus:Pe,isStopStatus:Ie,curAgentState:F}),Be=se({isPausing:Le,isTask:p,taskStatus:m,taskDetail:h,isStartingStatus:Pe,isStopStatus:Ie,curAgentState:F,errorMessage:a,t:D});return(0,Z.jsx)(De,{children:(0,Z.jsx)(Ge,{value:Ne,children:(0,Z.jsxs)(`div`,{className:`relative flex h-full flex-col justify-between px-4`,"data-testid":`chat-interface`,children:[!C&&!we&&!w&&!Te&&!Ae&&!g&&x===0&&!ae&&!le&&(0,Z.jsx)(so,{onSuggestionsClick:e=>n(e)}),(0,Z.jsxs)(`div`,{ref:O,"data-testid":`chat-scroll-container`,onScroll:e=>{A(e.currentTarget),ye(e.currentTarget)},onWheel:be,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:[Ae&&ke&&(0,Z.jsx)(ho,{}),Ae&&!ke&&(0,Z.jsx)(`div`,{className:`flex justify-center`,"data-testid":`loading-spinner`,children:(0,Z.jsx)(Pt,{size:`small`})}),B&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-3 text-sm text-neutral-400`,"data-testid":`loading-older-events`,children:[(0,Z.jsx)(Pt,{size:`small`}),(0,Z.jsx)(`span`,{children:D(L.CHAT_INTERFACE$FETCHING_OLDER_MESSAGES)})]}),(0,Z.jsx)(xe,{conversationId:z,anchorEventId:null}),Oe&&y.length>0&&(0,Z.jsx)(He,{messages:y,allEvents:b}),(0,Z.jsx)(wo,{}),(0,Z.jsx)(la,{conversationId:z})]}),(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-[6px] pb-4`,children:[(0,Z.jsx)(Co,{conversationId:z}),(0,Z.jsx)(ca,{conversationId:z}),a&&(0,Z.jsx)(_o,{message:a,code:o,classification:s,onDismiss:c,onRetry:a===`Unable to connect to server`?()=>_?.reconnect():void 0,onReauth:ra(o)?()=>d(`/settings/agents`):void 0}),le&&!ae&&(0,Z.jsx)(Lr,{}),ae?(0,Z.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,Z.jsx)(`p`,{className:`text-xs font-semibold text-[var(--oh-foreground)]`,children:D(ie===`ERROR`?L.CHAT_INTERFACE$ERROR_SANDBOX_TITLE:L.CHAT_INTERFACE$ARCHIVED_SANDBOX_TITLE)}),(0,Z.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] mt-0.5`,children:D(ie===`ERROR`?L.CHAT_INTERFACE$ERROR_SANDBOX_DESCRIPTION:L.CHAT_INTERFACE$ARCHIVED_SANDBOX_DESCRIPTION)})]}):(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-full mb-1 z-20`,children:(0,Z.jsxs)(`div`,{className:`flex justify-between relative`,children:[(0,Z.jsxs)(`div`,{className:`flex items-end gap-1 pointer-events-auto`,children:[(0,Z.jsx)(Do,{}),Pe&&(0,Z.jsx)(ko,{statusColor:ze,status:Be})]}),j?F===R.RUNNING&&(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-9 bottom-0 flex justify-center`,children:(0,Z.jsx)(Za,{events:b})}):(0,Z.jsx)(`div`,{className:`absolute left-1/2 transform -translate-x-1/2 bottom-0 pointer-events-auto`,children:(0,Z.jsx)(fo,{onClick:k})})]})}),(0,Z.jsx)(Pa,{onSubmit:je,disabled:ne||le,hasStartedConversation:Ee})]})]})]})})})}function No(e){return e?e.replace(/\/+$/,``).split(`/`).pop()||e:null}function Po(){let{conversationId:e}=K(),{data:t}=J();return{workspaceName:No((e?pn(e):null)?.selected_workspace??t?.selected_workspace??null)}}function Fo(){let{data:e}=J(),{repositoryInfo:t}=pr(),{data:n}=ka(),r=e?.selected_repository||t?.selectedRepository,i=e?.git_provider||t?.gitProvider,a=e?.selected_branch||t?.selectedBranch,o=r||n?.repository||null,s=i||n?.provider||null;return{repository:o,provider:s,branch:a||n?.branch||null,isConnected:!!(o&&s)}}function Io(e){return e.startsWith(`/`)?e:`/${e}`}async function Lo(e,t,n,r){let i=A().backend;if(i.kind===`cloud`&&e){let a=new URLSearchParams({...r,path:Io(r.path)});return Nt({backend:i,method:`GET`,hostOverride:ee(e),path:`${n}?${a.toString()}`,authMode:`session-api-key`,sessionApiKey:t??void 0})}return(await new Mt(k({conversationUrl:e,sessionApiKey:t})).client.get(n,{params:r})).data}function Ro(e){return E(e,404)||g(e)&&e.response?.status===404}var zo=class{static async getGitChanges(e,t,n,r){let i=A().backend;if(i.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,Io(r));let n=await Nt({backend:i,method:`GET`,path:`/api/v1/app-conversations/${e}/git/changes?${t.toString()}`});if(!Array.isArray(n))throw Error(`Invalid response from runtime - runtime may be unavailable`);return n.map(e=>({status:Un(String(e.status)),path:e.path}))}let a=await new Mt(k({conversationUrl:t,sessionApiKey:n})).gitChanges(r);if(!Array.isArray(a))throw Error(`Invalid response from runtime - runtime may be unavailable`);return a.map(e=>({status:Un(String(e.status)),path:e.path}))}static async getGitCommits(e,t,n,r=50){try{let i=await Lo(e,t,`/api/git/commits`,{path:n,limit:String(r)});return{commits:(i?.commits??[]).map(e=>({sha:e.sha,shortSha:e.short_sha,subject:e.subject,author:e.author,timestamp:e.timestamp})),hasMore:!!i?.has_more}}catch(e){if(Ro(e))return null;throw e}}static async getCommitChanges(e,t,n,r){let i=await Lo(e,t,`/api/git/commits/${encodeURIComponent(r)}/changes`,{path:n});if(!Array.isArray(i))throw Error(`Invalid response from runtime - runtime may be unavailable`);return i.map(e=>({status:Un(String(e.status)),path:e.path}))}static async getGitChangeDiff(e,t,n,r,i){if(i){let e=await Lo(t,n,`/api/git/diff`,{path:r,commit:i});return{modified:e?.modified??``,original:e?.original??``,...e?.diff?{diff:e.diff}:{}}}let a=A().backend;if(a.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,Io(r));let n=await Nt({backend:a,method:`GET`,path:`/api/v1/app-conversations/${e}/git/diff?${t.toString()}`});return{modified:n?.modified??``,original:n?.original??``,...n?.diff?{diff:n.diff}:{}}}let o=await new Mt(k({conversationUrl:t,sessionApiKey:n})).gitDiff(r);return{modified:o.modified??``,original:o.original??``,...o.diff?{diff:o.diff}:{}}}},Bo=()=>{let{conversationId:e}=K(),{data:t}=J(),[n,r]=X.useState([]),i=X.useRef(null),a=Ei(),o=t?.conversation_url,s=t?.session_api_key,c=t?.selected_repository,l=t?.workspace?.working_dir?.trim(),u=X.useMemo(()=>Di(c,l),[c,l]),d=y({queryKey:[`file_changes`,e,o,s,u],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return zo.getGitChanges(e,o,s,u)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:a&&!!e,meta:{disableToast:!0}});return X.useEffect(()=>{if(!d.isFetching&&d.isSuccess&&d.data){let e=d.data;if(e!==i.current)if(i.current=e,Array.isArray(e)){let t=new Set(e.map(e=>e.path)),i=new Set(n.map(e=>e.path)),a=e.filter(e=>!i.has(e.path)),o=n.filter(e=>t.has(e.path));r([...a,...o])}else r([e])}},[d.isFetching,d.isSuccess,d.data]),{data:n,isLoading:d.isLoading,isFetching:d.isFetching,isSuccess:d.isSuccess,isError:d.isError,error:d.error,refetch:d.refetch}};function Vo(e){let t=0,n=0;for(let r of e.split(`
|
|
21
|
-
`))r.startsWith(`+++`)||r.startsWith(`---`)||r.startsWith(`@@`)||(r.startsWith(`+`)?t+=1:r.startsWith(`-`)&&(n+=1));return{additions:t,deletions:n}}function Ho(e,t){let n=e.length===0?[]:e.split(`
|
|
22
|
-
`),r=t.length===0?[]:t.split(`
|
|
23
|
-
`);if(n.length===0)return{additions:r.length,deletions:0};if(r.length===0)return{additions:0,deletions:n.length};let i=0,a=0,o=0,s=0;for(;o<n.length||s<r.length;){let e=n[o],t=r[s];if(o<n.length&&s<r.length&&e===t){o+=1,s+=1;continue}if(s<r.length&&(o>=n.length||!n.slice(o).includes(t))){i+=1,s+=1;continue}o<n.length&&(a+=1,o+=1)}return{additions:i,deletions:a}}function Uo(e){return typeof e.diff==`string`&&e.diff.length>0?Vo(e.diff):Ho(e.original??``,e.modified??``)}function Wo(e){return e.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0})}function Go(){let{conversationId:e}=K(),{data:t}=J(),n=Ei(),{data:r,isLoading:i,isSuccess:a,isError:o}=Bo(),s=t?.conversation_url,c=t?.session_api_key,l=(0,X.useMemo)(()=>Di(t?.selected_repository,t?.workspace?.working_dir?.trim()),[t?.selected_repository,t?.workspace?.working_dir]),u=v({queries:(0,X.useMemo)(()=>(r??[]).filter(e=>e.status!==`D`),[r]).map(t=>({queryKey:[`conversation_overview_file_diff`,e,s,c,l,t.path],queryFn:async()=>zo.getGitChangeDiff(e,s,c,`${l}/${t.path}`),enabled:n&&!!e&&a&&!!t.path,staleTime:1e3*60*5,meta:{disableToast:!0}}))}),d=u.some(e=>e.isLoading),f=Wo(u.flatMap(e=>e.data?[Uo(e.data)]:[]));return{additions:f.additions,deletions:f.deletions,changeCount:r?.length??0,isLoading:i||d,isError:o}}var Ko=(0,X.createContext)(null);function qo({children:e}){let[t,n]=(0,X.useState)(null),[r,i]=(0,X.useState)(!1),[a,o]=(0,X.useState)(0),s=(0,X.useCallback)((e,t)=>{n(e),i(!!t?.openAdd),o(0)},[]),c=(0,X.useCallback)(()=>{n(null),i(!1),o(0)},[]),l=(0,X.useCallback)(()=>{o(e=>e+1)},[]),u=(0,X.useMemo)(()=>({section:t,openAdd:r,addRequestKey:a,openSection:s,closeDrawer:c,requestAdd:l}),[a,c,r,s,l,t]);return(0,Z.jsx)(Ko.Provider,{value:u,children:e})}function Jo(){let e=(0,X.useContext)(Ko);if(!e)throw Error(`useConversationOverviewDrawer must be used within ConversationOverviewDrawerProvider`);return e}function Yo(){return(0,X.useContext)(Ko)}var Xo=e(r(),1),Zo=`!w-auto whitespace-nowrap`;function Qo({anchorRef:e,onClose:t,gitProvider:n,testIdPrefix:r=`conversation-git-actions`}){let{t:i}=f(`openhands`),a=Fn(t),o=U(e=>e.setMessageToSend),[s,c]=(0,X.useState)();return(0,X.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let n=()=>{let e=t.getBoundingClientRect();c({position:`fixed`,top:e.bottom+4,right:window.innerWidth-e.right,zIndex:50})};return n(),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]),s?Xo.createPortal((0,Z.jsxs)(jt,{ref:a,testId:`${r}-menu`,theme:`popover`,style:s,className:`w-max min-w-[8rem]`,children:[(0,Z.jsx)(V,{testId:`${r}-commit`,onClick:()=>{o(ue()),t()},className:Zo,children:(0,Z.jsx)(dr,{icon:(0,Z.jsx)(ct,{className:`size-4`,"aria-hidden":!0}),text:i(L.DIFF_VIEWER$COMMITS)})}),(0,Z.jsx)(V,{testId:`${r}-pull`,onClick:()=>{o(ae()),t()},className:Zo,children:(0,Z.jsx)(dr,{icon:(0,Z.jsx)(Sr,{width:16,height:16,"aria-hidden":!0}),text:i(L.COMMON$PULL)})}),(0,Z.jsx)(V,{testId:`${r}-push`,onClick:()=>{o(oe(n)),t()},className:Zo,children:(0,Z.jsx)(dr,{icon:(0,Z.jsx)(fr,{width:16,height:16,"aria-hidden":!0}),text:i(L.COMMON$PUSH)})}),(0,Z.jsx)(V,{testId:`${r}-create-pr`,onClick:()=>{o(he(n)),t()},className:Zo,children:(0,Z.jsx)(dr,{icon:(0,Z.jsx)(zr,{width:16,height:16,"aria-hidden":!0}),text:i(L.COMMON$CREATE_PR)})}),(0,Z.jsx)(V,{testId:`${r}-create-new-branch`,onClick:()=>{o(pe()),t()},className:Zo,children:(0,Z.jsx)(dr,{icon:(0,Z.jsx)(cr,{width:16,height:16,"aria-hidden":!0}),text:i(L.COMMON$CREATE_NEW_BRANCH)})})]}),document.body):null}var $o=B(`flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5`,`cursor-pointer border-0 bg-transparent text-left`),es=`size-4 shrink-0 text-[var(--oh-muted)]`,ts=`conversation-overview-diffs-git-action`,ns=B(ts,`absolute inset-0 inline-flex items-center justify-center`,`rounded-md text-[var(--oh-muted)] transition-opacity`,`hover:bg-white/10 hover:text-[var(--oh-foreground)]`),rs=B(`flex items-center rounded-md transition-colors`,`hover:bg-white/5`,`has-[.${ts}:hover]:bg-transparent`),is=B(`pointer-events-none invisible opacity-0`,`group-hover/diffstats:pointer-events-auto group-hover/diffstats:visible group-hover/diffstats:opacity-100`,`group-focus-within/diffstats:pointer-events-auto group-focus-within/diffstats:visible group-focus-within/diffstats:opacity-100`);function as(){let{t:e}=f(`openhands`),{navigateToChanges:t}=li(),n=Yo(),{data:r}=J(),{additions:i,deletions:a,isLoading:o}=Go(),s=r?.git_provider??`github`,[c,l]=(0,X.useState)(!1),u=(0,X.useRef)(null);return(0,X.useEffect)(()=>{if(!c)return;let e=e=>{e.key===`Escape`&&l(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[c]),(0,Z.jsxs)(`li`,{className:rs,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`conversation-overview-diffs`,"aria-label":e(L.CONVERSATION$OVERVIEW_OPEN_CHANGES),onClick:()=>{n?.closeDrawer(),t()},className:$o,children:[(0,Z.jsx)(ut,{className:es,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:e(L.COMMON$CHANGES)})]}),(0,Z.jsx)(`div`,{className:`group/diffstats relative mr-2 flex h-6 min-w-6 shrink-0 items-center justify-center`,children:o?(0,Z.jsx)(`span`,{className:`text-sm tabular-nums text-[var(--oh-muted)]`,children:`…`}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`span`,{className:B(`flex items-center gap-1.5 text-sm tabular-nums transition-opacity`,c?`opacity-0`:`group-hover/diffstats:opacity-0 group-focus-within/diffstats:opacity-0`),children:[(0,Z.jsx)(`span`,{"data-testid":`conversation-overview-diffs-additions`,style:{color:re},children:e(L.CONVERSATION$OVERVIEW_DIFF_ADDITIONS,{count:i.toLocaleString()})}),(0,Z.jsx)(`span`,{"data-testid":`conversation-overview-diffs-deletions`,style:{color:te},children:e(L.CONVERSATION$OVERVIEW_DIFF_DELETIONS,{count:a.toLocaleString()})})]}),(0,Z.jsx)(`button`,{ref:u,type:`button`,"data-testid":`conversation-overview-diffs-git-action`,"aria-label":e(L.CONVERSATION$OVERVIEW_DIFF_GIT_ACTIONS),"aria-expanded":c,"aria-haspopup":`menu`,onClick:e=>{e.stopPropagation(),l(e=>!e)},className:B(ns,!c&&is,c&&`pointer-events-auto visible opacity-100 text-[var(--oh-foreground)]`),children:(0,Z.jsx)(ct,{className:`size-4`,"aria-hidden":!0})}),c?(0,Z.jsx)(Qo,{anchorRef:u,gitProvider:s,testIdPrefix:`conversation-overview-diffs-git`,onClose:()=>l(!1)}):null]})})]})}var os=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.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`})}),ss=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.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`})}),Q={automations:`automations`,skills:`skills`,mcp:`mcp`,secrets:`secrets`,pull_requests:`pull_requests`,issues:`issues`},cs={[W.workspace]:{section:W.workspace,icon:ft,i18nKey:L.CONVERSATION$OVERVIEW_WORKSPACE}},ls=[{part:H.changes,icon:ut,i18nKey:L.COMMON$CHANGES,opensChanges:!0},{part:H.repository,icon:Ye,i18nKey:L.CONVERSATION$REPOSITORY},{part:H.branch,icon:it,i18nKey:L.CONVERSATION$BRANCH},{part:H.commits,icon:ct,i18nKey:L.DIFF_VIEWER$COMMITS,opensCommits:!0},{part:H.pull_requests,icon:zr,i18nKey:L.CONVERSATION$OVERVIEW_PULL_REQUESTS,drawerSection:Q.pull_requests}];function us({testId:e,pinned:t,pinnedLabel:n,unpinnedLabel:r,onClick:i}){return(0,Z.jsx)(`button`,{type:`button`,"data-testid":e,className:B(`flex shrink-0 cursor-pointer items-center justify-center rounded-r px-2 text-white`,Jt,`hover:bg-white/10`),"aria-pressed":t,"aria-label":t?n:r,onClick:i,children:(0,Z.jsx)(`span`,{className:B(`ml-auto overflow-hidden`,Yt),"aria-hidden":!0,children:t?(0,Z.jsx)(ss,{className:`size-4`,width:16,height:16}):(0,Z.jsx)(os,{className:`size-4`,width:16,height:16})})})}function ds({isOpen:e,onClose:t,ignoreOutsideClickRef:n,anchorRef:r}){let i=Fn(t,n),[a,o]=(0,X.useState)(),{t:s}=f(`openhands`),{conversationId:c}=K(),{state:l,setUnpinnedOverviewSections:u,setUnpinnedOverviewGitParts:d}=an(c),{navigateToChanges:p,navigateToCommits:m}=li(),h=Yo();(0,X.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,right:window.innerWidth-e.right})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[e,r]);let g=e=>{if(e.opensChanges){h?.closeDrawer(),p(),t();return}if(e.opensCommits){h?.closeDrawer(),m(),t();return}e.drawerSection&&(h?.openSection(e.drawerSection),t())},_=(e,t)=>{t.preventDefault(),t.stopPropagation();let n=l.unpinnedOverviewSections??[];if(n.includes(e)){u?.(n.filter(t=>t!==e));return}u?.([...n,e])},v=(e,t)=>{t.preventDefault(),t.stopPropagation();let n=l.unpinnedOverviewGitParts??[];if(n.includes(e)){d?.(n.filter(t=>t!==e));return}d?.([...n,e])};if(!e)return null;let y=!!(r?.current&&a),b=un(W.git,l.unpinnedOverviewSections??[]),x=s(L.CONVERSATION$UNPIN_OVERVIEW_SECTION),S=s(L.CONVERSATION$PIN_OVERVIEW_SECTION),C=({key:e,testIdOpen:t,testIdPin:n,icon:r,label:i,pinned:a,isActionable:o,indent:s=!1,onOpen:c,onPinToggle:l})=>{let u=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:Yt,"aria-hidden":!0,children:(0,Z.jsx)(r,{className:`h-4 w-4`})}),(0,Z.jsx)(`span`,{className:`text-sm`,children:i})]});return(0,Z.jsx)(`li`,{className:`list-none`,children:(0,Z.jsxs)(`div`,{className:B(`group flex h-[30px] w-full min-w-0 items-stretch rounded hover:bg-[var(--oh-interactive-hover)]`,s&&`pl-4`),children:[o?(0,Z.jsx)(`button`,{type:`button`,"data-testid":t,className:B(`flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-l p-2 text-start text-white`,Jt),onClick:c,children:u}):(0,Z.jsx)(`div`,{"data-testid":t,className:B(`flex min-w-0 flex-1 items-center gap-2 rounded-l p-2 text-start text-white`,Jt),children:u}),(0,Z.jsx)(us,{testId:n,pinned:a,pinnedLabel:x,unpinnedLabel:S,onClick:l})]})},e)},w=e=>{if(e===W.git)return null;let t=cs[e];return C({key:e,testIdOpen:`conversation-overview-menu-open-${e}`,testIdPin:`conversation-overview-menu-pin-${e}`,icon:t.icon,label:s(t.i18nKey),pinned:un(e,l.unpinnedOverviewSections??[]),isActionable:!1,onPinToggle:t=>_(e,t)})},T=(0,Z.jsxs)(jt,{ref:i,testId:`conversation-overview-context-menu`,theme:y?`popover`:`default`,position:y?`none`:`bottom`,alignment:y?`none`:`right`,spacing:y?`none`:`default`,className:B(`z-[9999] w-fit`,y?`mt-0`:`mt-2`),children:[on.map((e,t)=>(0,Z.jsxs)(X.Fragment,{children:[t>0?(0,Z.jsx)(en,{testId:`conversation-overview-menu-divider-${t}`,inset:`menu`}):null,e.sections.map(e=>w(e))]},e.sections.join(`-`))),(0,Z.jsx)(en,{testId:`conversation-overview-menu-divider-git`,inset:`menu`}),C({key:W.git,testIdOpen:`conversation-overview-menu-open-${W.git}`,testIdPin:`conversation-overview-menu-pin-${W.git}`,icon:it,label:s(L.CONVERSATION$OVERVIEW_GIT),pinned:b,isActionable:!1,onPinToggle:e=>_(W.git,e)}),ls.map(e=>C({key:e.part,testIdOpen:`conversation-overview-menu-open-git-${e.part}`,testIdPin:`conversation-overview-menu-pin-git-${e.part}`,icon:e.icon,label:s(e.i18nKey),pinned:sn(e.part,l.unpinnedOverviewGitParts??[]),isActionable:!!(e.drawerSection||e.opensCommits||e.opensChanges),indent:!0,onOpen:()=>g(e),onPinToggle:t=>v(e.part,t)}))]});return y&&a&&typeof document<`u`?Xo.createPortal((0,Z.jsx)(`div`,{style:a,children:T}),document.body):T}var fs={github:[`GITHUB_TOKEN`,`GH_TOKEN`,`github`],gitlab:[`GITLAB_TOKEN`,`GL_TOKEN`,`gitlab`],bitbucket:[`BITBUCKET_TOKEN`,`bitbucket`],forgejo:[`FORGEJO_TOKEN`,`forgejo`]},ps=30;async function ms(e){if(A().backend.kind!==`local`)return null;let t=fs[e]??[];if(t.length===0)return null;let n=await er.getSecrets(),r=new Set(n.map(e=>e.name)),i=t.find(e=>r.has(e));if(!i)return null;try{return await new h(k()).getSecret(i)}catch{return null}}function hs(e,t,n){let r=ge(t);switch(t){case`gitlab`:return`${r}/${n}/-/issues/${e}`;case`bitbucket`:return`${r}/${n}/issues/${e}`;case`forgejo`:return`${r}/${n}/issues/${e}`;default:return`${r}/${n}/issues/${e}`}}function gs(e,t){let n=ge(e);switch(e){case`gitlab`:return`${n}/${t}/-/issues`;case`bitbucket`:return`${n}/${t}/issues`;case`forgejo`:return`${n}/${t}/issues`;default:return`${n}/${t}/issues`}}function _s(e,t){let n=ge(e);switch(e){case`gitlab`:return`${n}/${t}/-/merge_requests`;case`bitbucket`:return`${n}/${t}/pull-requests`;case`forgejo`:return`${n}/${t}/pulls`;default:return`${n}/${t}/pulls`}}async function vs(e,t){let n={Accept:`application/vnd.github+json`,"X-GitHub-Api-Version":`2022-11-28`};t&&(n.Authorization=`Bearer ${t}`);let r=await fetch(`https://api.github.com${e}`,{headers:n});if(!r.ok)throw Error(`GitHub API ${r.status}`);return r.json()}async function ys(e,t){let n={Accept:`application/json`};t&&(n[`PRIVATE-TOKEN`]=t);let r=await fetch(`https://gitlab.com/api/v4${e}`,{headers:n});if(!r.ok)throw Error(`GitLab API ${r.status}`);return r.json()}var bs=class{static constructIssuesListUrl=gs;static constructPullRequestsListUrl=_s;static async listPullRequests(e,t){let n=await ms(t);if(t===`gitlab`)return(await ys(`/projects/${encodeURIComponent(e)}/merge_requests?state=opened&per_page=${ps}`,n)).map(e=>({id:e.id,number:e.iid,title:e.title,url:e.web_url,authorLogin:e.author?.username??null,updatedAt:e.updated_at??null}));if(t!==`github`&&t!==`forgejo`)return[];let[r,i]=e.split(`/`);return!r||!i?[]:(await vs(`/repos/${r}/${i}/pulls?state=open&per_page=${ps}`,n)).map(n=>({id:n.id,number:n.number,title:n.title,url:n.html_url||me(n.number,t,e),authorLogin:n.user?.login??null,updatedAt:n.updated_at??null}))}static async listIssues(e,t){let n=await ms(t);if(t===`gitlab`)return(await ys(`/projects/${encodeURIComponent(e)}/issues?state=opened&per_page=${ps}`,n)).map(e=>({id:e.id,number:e.iid,title:e.title,url:e.web_url,authorLogin:e.author?.username??null,updatedAt:e.updated_at??null}));if(t!==`github`&&t!==`forgejo`)return[];let[r,i]=e.split(`/`);return!r||!i?[]:(await vs(`/repos/${r}/${i}/issues?state=open&per_page=${ps}`,n)).filter(e=>!e.pull_request).map(n=>({id:n.id,number:n.number,title:n.title,url:n.html_url||hs(n.number,t,e),authorLogin:n.user?.login??null,updatedAt:n.updated_at??null}))}};function xs(e,t){return y({queryKey:[`repository-pull-requests`,t,e],queryFn:()=>bs.listPullRequests(e,t),enabled:!!(e&&t),staleTime:6e4,meta:{disableToast:!0}})}function Ss(e,t){return y({queryKey:[`repository-issues`,t,e],queryFn:()=>bs.listIssues(e,t),enabled:!!(e&&t),staleTime:6e4,meta:{disableToast:!0}})}var Cs=()=>{let{conversationId:e}=K(),{data:t}=J(),n=Ei(),r=t?.conversation_url,i=t?.session_api_key,a=t?.selected_repository,o=t?.workspace?.working_dir?.trim(),s=X.useMemo(()=>Di(a,o),[a,o]),c=y({queryKey:[`git_commits`,e,r,i,s],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return zo.getGitCommits(r,i,s,50)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:n&&!!e,meta:{disableToast:!0}});return{commits:c.data?.commits??[],hasMore:c.data?.hasMore??!1,isUnsupported:c.data===null,isLoading:c.isLoading,isFetching:c.isFetching,isSuccess:c.isSuccess,isError:c.isError}},ws=`size-4 shrink-0 text-[var(--oh-muted)]`,Ts=B(`size-3.5 shrink-0 text-[var(--oh-muted)]`,`opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100`),Es=`-`;function Ds(){let{t:e}=f(`openhands`),{conversationId:t}=K(),{state:n}=an(t),{navigateToCommits:r}=li(),i=Yo(),{data:a}=Lt(),{repository:o,provider:s,branch:c,isConnected:l}=Fo(),u=sn(H.repository,n.unpinnedOverviewGitParts??[]),d=sn(H.branch,n.unpinnedOverviewGitParts??[]),p=sn(H.commits,n.unpinnedOverviewGitParts??[]),m=sn(H.pull_requests,n.unpinnedOverviewGitParts??[]),h=xs(m?o:null,m?s:null),g=Cs();if(!l||!o||!s||!u&&!d&&!p&&!m)return null;let _=a?.provider_tokens_set?.[s]??null,v=ce(s,o,_),y=c?fe(s,o,c,_):null,b=h.data?.length??null,x=g.isUnsupported?null:g.commits.length,S=x!==null&&x>0?g.hasMore?`${x}+`:String(x):Es,C=()=>{i?.openSection(Q.pull_requests)},w=()=>{i?.closeDrawer(),r()},T=u||d,E=p||m;return(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-git-section`,children:[T?(0,Z.jsxs)(`div`,{className:`px-2 pb-1`,children:[u?(0,Z.jsxs)(`a`,{href:v,target:`_blank`,rel:`noreferrer`,"data-testid":`conversation-overview-git-repo`,className:B(`group flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5`,`transition-colors hover:bg-white/5`),children:[(0,Z.jsx)(Qt,{gitProvider:s,className:ws}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:o}),(0,Z.jsx)(rt,{className:Ts,"aria-hidden":!0})]}):null,d?c&&y?(0,Z.jsxs)(`a`,{href:y,target:`_blank`,rel:`noreferrer`,"data-testid":`conversation-overview-git-branch`,className:B(`group flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5`,`transition-colors hover:bg-white/5`),children:[(0,Z.jsx)(Ln,{size:14,className:`shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:c}),(0,Z.jsx)(rt,{className:Ts,"aria-hidden":!0})]}):(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-git-branch`,className:`flex min-w-0 items-center gap-2 px-2 py-1.5`,children:[(0,Z.jsx)(it,{className:`size-3.5 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:B(`text-sm`,c?`text-[var(--oh-foreground)]`:`text-[var(--oh-muted)]`),children:c||e(L.CONVERSATION$OVERVIEW_NONE)})]}):null]}):null,E?(0,Z.jsxs)(`ul`,{className:`px-2`,children:[p?(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`conversation-overview-commits`,onClick:w,className:B(`flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5`,`cursor-pointer bg-transparent text-left transition-colors hover:bg-white/5`),children:[(0,Z.jsx)(ct,{className:ws,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:e(L.DIFF_VIEWER$COMMITS)}),g.isLoading?(0,Z.jsx)(`span`,{className:`text-sm tabular-nums text-[var(--oh-muted)]`,children:`…`}):(0,Z.jsx)(`span`,{"data-testid":`conversation-overview-commits-count`,className:`text-sm tabular-nums text-[var(--oh-muted)]`,children:S})]})}):null,m?(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`conversation-overview-pull-requests`,onClick:C,className:B(`flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5`,`cursor-pointer bg-transparent text-left transition-colors hover:bg-white/5`),children:[(0,Z.jsx)(zr,{className:ws,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:e(L.CONVERSATION$OVERVIEW_PULL_REQUESTS)}),h.isLoading?(0,Z.jsx)(`span`,{className:`text-sm tabular-nums text-[var(--oh-muted)]`,children:`…`}):(0,Z.jsx)(`span`,{"data-testid":`conversation-overview-pull-requests-count`,className:`text-sm tabular-nums text-[var(--oh-muted)]`,children:b!==null&&b>0?b:Es})]})}):null]}):null]})}var Os=B(`w-full max-w-[240px] rounded-xl border border-[var(--oh-border)]`,`bg-[var(--oh-surface)] pb-1`),ks=B(`flex items-center gap-2 rounded-md px-2 py-1.5`,`transition-colors hover:bg-white/5`),As=`size-4 shrink-0 text-[var(--oh-muted)]`;function js({icon:e,label:t,value:n,testId:r}){return(0,Z.jsxs)(`li`,{"data-testid":r,className:ks,children:[e,(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:t}),(0,Z.jsx)(`span`,{className:`max-w-[45%] shrink-0 truncate text-right text-sm text-[var(--oh-muted)]`,children:n})]})}function Ms(){return(0,Z.jsx)(`div`,{className:`px-1`,children:(0,Z.jsx)(en,{inset:`menu`})})}function Ns(){let{t:e}=f(`openhands`),t=Po(),{conversationId:n}=K(),{state:r}=an(n),{isConnected:i}=Fo(),[a,o]=(0,X.useState)(!1),s=(0,X.useRef)(null),c=e=>un(e,r.unpinnedOverviewSections??[]),l=sn(H.changes,r.unpinnedOverviewGitParts??[]),u=c(W.git)&&(l||i),d=on.flatMap(e=>e.sections.filter(e=>c(e))),p=[];u&&p.push({kind:`git`,key:`git`}),d.length>0&&p.push({kind:`sections`,key:d.join(`-`),sections:d});let m=n=>{switch(n){case W.workspace:return(0,Z.jsx)(js,{testId:`conversation-overview-workspace`,icon:(0,Z.jsx)(ft,{className:As}),label:e(L.CONVERSATION$OVERVIEW_WORKSPACE),value:t.workspaceName??e(L.CONVERSATION$OVERVIEW_NONE)},n);case W.git:return null;default:return n}};return(0,Z.jsxs)(`aside`,{"data-testid":`conversation-overview-panel`,"aria-label":e(L.CONVERSATION$OVERVIEW),className:Os,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-4 pb-0.5 pt-2.5`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-medium text-[var(--oh-muted)]`,children:e(L.CONVERSATION$OVERVIEW)}),(0,Z.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Z.jsx)(zn,{ref:s,testId:`conversation-overview-ellipsis`,onClick:()=>o(e=>!e),ariaLabel:e(L.COMMON$MORE_OPTIONS)}),(0,Z.jsx)(ds,{isOpen:a,onClose:()=>o(!1),ignoreOutsideClickRef:s,anchorRef:s})]})]}),p.map((e,t)=>(0,Z.jsxs)(X.Fragment,{children:[t>0?(0,Z.jsx)(Ms,{}):null,e.kind===`git`?(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-git-block`,children:[l?(0,Z.jsx)(`ul`,{className:`px-2`,children:(0,Z.jsx)(as,{})}):null,i?(0,Z.jsx)(Ds,{}):null]}):(0,Z.jsx)(`ul`,{className:`px-2`,children:e.sections.map(e=>m(e))})]},e.key))]})}var Ps={duration:.2,ease:`easeInOut`};function Fs(e){return e>=596}var Is=typeof window<`u`?X.useLayoutEffect:X.useEffect;function Ls(e,t){let[n,r]=(0,X.useState)(!1);return Is(()=>{if(!t){r(!1);return}let n=e.current;if(!n)return;let i=()=>{r(Fs(n.clientWidth))};if(i(),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(i);return a.observe(n),()=>a.disconnect()},[e,t]),n}var Rs=`w-full min-w-0 max-w-[800px] h-full flex flex-col min-h-0`;function zs({isRightPanelShown:e}){let t=ki(),n=!Ee()&&!0,r=U(e=>e.isOverviewPanelShown),a=(0,X.useRef)(null),o=!t&&r,s=Ls(a,o);return(0,Z.jsxs)(`div`,{ref:a,className:`flex h-full min-h-0 w-full overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 justify-center overflow-hidden`,children:(0,Z.jsx)(`div`,{className:Rs,children:(0,Z.jsx)(Mo,{})})}),(0,Z.jsx)(i,{children:o&&s?(0,Z.jsx)(Ze.div,{"data-testid":`conversation-overview-column`,initial:n?{width:0,opacity:0}:!1,animate:{width:268,opacity:1},exit:n?{width:0,opacity:0}:{opacity:0},transition:Ps,className:`flex shrink-0 flex-col items-start overflow-hidden pt-4 pl-3 pr-4`,children:(0,Z.jsx)(`div`,{className:`w-full shrink-0`,style:{width:268},children:(0,Z.jsx)(Ns,{})})},`conversation-overview-column`):null})]})}function Bs({children:e}){return(0,Z.jsx)(`div`,{className:`absolute inset-0`,children:e})}function Vs({children:e}){return(0,Z.jsx)(`div`,{className:`flex flex-col h-full w-full`,children:e})}function Hs({children:e}){return(0,Z.jsx)(`div`,{className:`overflow-hidden flex-grow h-full w-full relative`,children:e})}function Us({className:e}){let{t}=f(`openhands`);return(0,Z.jsxs)(`div`,{className:B(`bg-[var(--oh-surface)] flex h-full w-full flex-col items-center justify-center gap-3`,e),children:[(0,Z.jsx)(_t,{className:`h-8 w-8 shrink-0 animate-spin text-tertiary-light`,"aria-hidden":!0}),(0,Z.jsx)(Be,{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(L.HOME$LOADING)})]})}function Ws({children:e,onReady:t}){return(0,X.useLayoutEffect)(()=>{t()},[t]),e}function Gs({onPending:e}){return(0,X.useLayoutEffect)(()=>{e()},[e]),(0,Z.jsx)(Us,{})}var Ks={duration:.35,ease:`easeInOut`};function qs({showAgentLoading:e,tabKey:t,children:n}){let r=Ee(),[a,o]=(0,X.useState)(!1);(0,X.useLayoutEffect)(()=>{o(!1)},[t]);let s=(0,X.useCallback)(()=>{o(!0)},[]),c=(0,X.useCallback)(()=>{o(!1)},[]),l=e||a;return r?(0,Z.jsx)(`div`,{className:`relative h-full w-full overflow-hidden`,children:l?(0,Z.jsx)(Us,{}):(0,Z.jsx)(X.Suspense,{fallback:(0,Z.jsx)(Gs,{onPending:s}),children:(0,Z.jsx)(Ws,{onReady:c,children:n})})}):(0,Z.jsxs)(`div`,{className:`relative h-full w-full overflow-hidden`,children:[(0,Z.jsx)(Ze.div,{className:`absolute inset-0 h-full w-full`,initial:!1,animate:{opacity:+!l},transition:Ks,"aria-hidden":l,children:(0,Z.jsx)(X.Suspense,{fallback:(0,Z.jsx)(Gs,{onPending:s}),children:(0,Z.jsx)(Ws,{onReady:c,children:n})})}),(0,Z.jsx)(i,{children:l?(0,Z.jsx)(Ze.div,{className:`absolute inset-0 z-10 h-full w-full`,initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:Ks,children:(0,Z.jsx)(Us,{})},`conversation-tab-loading-overlay`):null})]})}var Js=(0,X.lazy)(()=>a(()=>import(`./files-tab-D4o2VyE_.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]))),Ys=(0,X.lazy)(()=>a(()=>import(`./commits-tab-AnZwLvh-.js`),__vite__mapDeps([66,1,2,67,9,5,6,10,68,4,17,69,11,3,7,12,8,13,14,15,16,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,70,71,72,73,57,74,56,58,75,76,77,78,79,80,81,82,83,84,85,86,87,55,88,59,89,90,91,92,93,94,95,96,52,97,98,99,100,101,102,103,104,54,60,61,105,106,107,108,109,110,111,112,113,114,115,65,116,117,62,118]))),Xs=(0,X.lazy)(()=>a(()=>import(`./browser-tab-C9vy56R5.js`),__vite__mapDeps([119,2,1,9,5,6,15,3,4,7,12,8,13,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,120,121,62]))),Zs=(0,X.lazy)(()=>a(()=>import(`./planner-tab-C9uZmhme.js`),__vite__mapDeps([122,1,2,9,5,6,11,3,4,7,12,8,13,10,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,123,70,71,72,73,57,74,56,58,75,76,77,78,79,80,81,82,83,84,85,86,87,55,88,59,89,90,91,92,93,94,95,96,52,97,98,99,100,101,102,103,104,54,60,61,105,106,107,108,109,110,111,112,113,114,115,65,116,117,62]))),Qs=(0,X.lazy)(()=>a(()=>import(`./task-list-tab-C5zcaktH.js`),__vite__mapDeps([124,1,2,9,5,6,11,3,4,7,12,8,13,10,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,62]))),$s=(0,X.lazy)(()=>a(()=>import(`./usage-tab-CVDffLPt.js`),__vite__mapDeps([125,1,2,3,4,5,6,7,71,9,10,92,15,12,8,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,126,39,98,70,72,73,57,74,56,58,75,76,77,50,78,42,79,80,43,81,82,83,84,85,86,87,55,88,59,89,90,91,49,93,94,95,37,38,96,52,97,99,100,101,102,103,104,54,41,60,61,105,106,107,108,48,109,110,111,112,113,114,115,65,116,46,117,51,62]))),ec=(0,X.lazy)(()=>a(()=>import(`./terminal-CNElN42a.js`),__vite__mapDeps([127,1,2,9,5,6,128,129,68,4,17,15,3,7,12,8,13,10,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,70,71,72,73,57,74,56,58,75,76,77,50,78,42,79,80,43,81,82,83,84,85,86,87,55,88,59,89,90,91,92,49,93,94,95,37,38,96,52,39,97,98,99,100,101,102,103,104,54,41,60,61,105,106,107,108,48,109,110,111,112,113,114,115,65,116,46,117,51,62]))),tc={tasklist:{component:Qs},files:{component:Js},commits:{component:Ys},browser:{component:Xs},terminal:{component:ec},planner:{component:Zs},usage:{component:$s}};function nc(){let{selectedTab:e,shouldShownAgentLoading:t}=U(),{conversationId:n}=K(),r=(0,X.useMemo)(()=>tc[e]??tc.files,[e]).component,i=e===`terminal`?`${e}-${n}`:e??`files`;return(0,Z.jsx)(Vs,{children:(0,Z.jsx)(Hs,{children:(0,Z.jsx)(qs,{showAgentLoading:t,tabKey:i,children:(0,Z.jsx)(Bs,{children:(0,Z.jsx)(r,{})},i)})})})}var rc=()=>{let e=d(),t=bi(e=>e.removeErrorMessage);return _({mutationKey:[`start-conversation`],mutationFn:async e=>xn(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)=>{vn(e,r.conversationId)},onSuccess:(n,r)=>{t(),Tn(e,r.conversationId,N.RUNNING)}})},ic=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.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`})}),ac=e=>(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,Z.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,Z.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 oc({icon:e,text:t,onClick:n,testId:r}){return(0,Z.jsx)(V,{testId:r,onClick:n,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 w-full items-center justify-between gap-2`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,Z.jsx)(`span`,{className:Yt,"aria-hidden":!0,children:e})]})})}function sc({className:e=``,executionStatus:t,isPausing:n=!1}){let{curAgentState:r}=si(),{isTask:i,taskStatus:a,taskDetail:o}=pr(),{t:s}=f(`openhands`),{errorMessage:c}=bi(),l=r===R.LOADING||r===R.INIT,u=I(t)||P(t),d=de({isPausing:n,isTask:i,taskStatus:a,isStartingStatus:l,isStopStatus:u,curAgentState:r}),p=se({isPausing:n,isTask:i,taskStatus:a,taskDetail:o,isStartingStatus:l,isStopStatus:u,curAgentState:r,errorMessage:c,t:s});return(0,Z.jsx)(`div`,{className:e,"data-testid":`server-status`,children:(0,Z.jsxs)(`div`,{className:`flex items-center`,children:[(0,Z.jsx)(Oo,{className:`w-6 h-6 shrink-0`,color:d}),(0,Z.jsx)(`span`,{className:`text-[13px] text-white font-normal`,children:p})]})})}function cc({onClose:e,onStopServer:t,onStartServer:n,executionStatus:r,position:i=`top`,className:a=``,isPausing:o=!1,ignoreOutsideClickRef:s}){let{t:c}=f(`openhands`),l=Fn(e,s),u=_e(r),d=P(r),p=u||d;return(0,Z.jsxs)(jt,{ref:l,testId:`server-status-context-menu`,position:i,alignment:`left`,size:`default`,className:B(`left-2 w-fit min-w-42`,a),children:[(0,Z.jsx)(sc,{executionStatus:r,isPausing:o,className:`pl-0 pr-2 py-1`}),p&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(en,{inset:`menu`}),u&&t&&(0,Z.jsx)(oc,{icon:(0,Z.jsx)(ic,{width:18,height:18}),text:c(L.COMMON$STOP_RUNTIME),onClick:t,testId:`stop-server-button`}),d&&n&&(0,Z.jsx)(oc,{icon:(0,Z.jsx)(ac,{width:18,height:18}),text:c(L.COMMON$START_RUNTIME),onClick:n,testId:`start-server-button`})]})]})}function lc({isPublic:e,onToggle:t,ariaLabel:n}){return(0,Z.jsxs)(`label`,{className:`relative inline-flex shrink-0 cursor-pointer items-center`,children:[(0,Z.jsx)(`input`,{hidden:!0,type:`checkbox`,"data-testid":`share-publicly-button`,checked:e,"aria-label":n,onChange:e=>t(e.target.checked)}),(0,Z.jsx)(`span`,{"aria-hidden":!0,className:B(`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,Z.jsx)(`span`,{className:B(`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 uc({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:p,position:m=`bottom`,anchorRef:h}){let g=ki(),{t:_}=f(`openhands`),{backend:v}=D(),{data:y}=J(),b=wr(),x=Fn(e,h),S=h?.current??null,[C,w]=X.useState();X.useLayoutEffect(()=>{if(!S)return;let e=()=>{let e=S.getBoundingClientRect();if(!e)return;let t={position:`fixed`,zIndex:9999};m===`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,m]);let T=!!(a||o||s),E=!!i,ee=!!(r||n),O=v.kind===`cloud`?L.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:L.COMMON$STOP_CONVERSATION,k=v.kind===`cloud`&&!!c,A=y?.public||!1,j=!!S,M=(0,Z.jsxs)(jt,{ref:x,testId:`conversation-name-context-menu`,position:m,alignment:`left`,className:B(g?`right-0 translate-x-[34%] left-auto`:``,j?`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`:``),children:[t&&(0,Z.jsx)(V,{testId:`rename-button`,onClick:t,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Bn,{width:16,height:16}),text:_(L.BUTTON$RENAME)})}),T&&(0,Z.jsx)(en,{testId:`separator-tools`,inset:`menu`}),o&&(0,Z.jsx)(Rr,{isDisabled:b,children:(0,Z.jsx)(V,{testId:`show-skills-button`,onClick:o,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Vn,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:_(L.CONVERSATION$SHOW_SKILLS)})})}),s&&(0,Z.jsx)(Rr,{isDisabled:b,children:(0,Z.jsx)(V,{testId:`show-hooks-button`,onClick:s,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(yr,{width:16,height:16,"aria-hidden":!0}),text:_(L.CONVERSATION$SHOW_HOOKS)})})}),a&&(0,Z.jsx)(Rr,{isDisabled:b,children:(0,Z.jsx)(V,{testId:`show-agent-tools-button`,onClick:a,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)($t,{width:16,height:16}),text:_(L.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),u&&(0,Z.jsx)(V,{testId:`export-transcript-button`,onClick:u,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Mn,{width:16,height:16}),text:_(L.BUTTON$EXPORT_TRANSCRIPT)})}),d&&(0,Z.jsx)(V,{testId:`download-trajectory-button`,onClick:d,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Mn,{width:16,height:16}),text:_(L.BUTTON$DOWNLOAD_CONVERSATION_DATA)})}),(E||ee)&&(0,Z.jsx)(en,{testId:`separator-info-control`,inset:`menu`}),i&&(0,Z.jsx)(V,{testId:`display-cost-button`,onClick:i,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(at,{size:16}),text:_(L.BUTTON$DISPLAY_COST)})}),k&&c&&(0,Z.jsxs)(`li`,{className:`flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]`,children:[(0,Z.jsx)(`span`,{className:`flex shrink-0 items-center text-[var(--oh-muted)]`,"aria-hidden":!0,children:(0,Z.jsx)(lt,{size:16})}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:_(L.CONVERSATION$SHARE_PUBLICLY)}),(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-center`,children:[A&&p&&l&&(0,Z.jsxs)(`div`,{className:`mr-2 flex items-center gap-0.5`,children:[(0,Z.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:_(L.BUTTON$COPY_TO_CLIPBOARD),children:(0,Z.jsx)(Yn,{width:14,height:14})}),(0,Z.jsx)(`a`,{"data-testid":`open-share-link-button`,href:p,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:_(L.BUTTON$OPEN_IN_NEW_TAB),children:(0,Z.jsx)(rt,{size:14,"aria-hidden":!0})})]}),(0,Z.jsx)(lc,{isPublic:A,onToggle:c,ariaLabel:_(L.CONVERSATION$SHARE_PUBLICLY)})]})]}),r&&(0,Z.jsx)(Rr,{isDisabled:b,children:(0,Z.jsx)(V,{testId:`stop-button`,onClick:r,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Xt,{width:16,height:16}),text:_(O)})})}),n&&(0,Z.jsx)(V,{testId:`delete-button`,onClick:n,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Rn,{width:16,height:16}),text:_(L.COMMON$DELETE_CONVERSATION)})})]});return j?typeof document>`u`||!C?null:Xo.createPortal((0,Z.jsx)(`div`,{style:C,children:M}),document.body):M}var dc=new Set([`BrowserClickAction`,`BrowserCloseTabAction`,`BrowserGetContentAction`,`BrowserGetStateAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserNavigateAction`,`BrowserScrollAction`,`BrowserSwitchTabAction`,`BrowserTypeAction`,`ExecuteBashAction`,`FileEditorAction`,`GlobAction`,`GrepAction`,`InvokeSkillAction`,`MCPToolAction`,`StrReplaceEditorAction`,`TaskAction`,`TaskTrackerAction`,`TerminalAction`,`ThinkAction`]),fc=new Set([`BrowserObservation`,`CanvasUIObservation`,`ExecuteBashObservation`,`FileEditorObservation`,`GlobObservation`,`GrepObservation`,`InvokeSkillObservation`,`MCPToolObservation`,`StrReplaceEditorObservation`,`SwitchLLMObservation`,`TaskTrackerObservation`,`TaskObservation`,`TerminalObservation`]),pc=e=>e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim(),mc=(e,t=100)=>e.length>t?`${e.slice(0,t)}…`:e,hc=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString()},$=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`),gc=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`),_c=e=>pc(e||w.t(L.TRANSCRIPT_EXPORT$DEFAULT_TITLE))||w.t(L.TRANSCRIPT_EXPORT$DEFAULT_TITLE),vc=(e,t)=>pc(w.t(e,t).replace(/<\/?(?:cmd|path)>/g,``)),yc=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),bc=e=>e.replace(/(?:Action|Observation)$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).trim(),xc=e=>{let t=pc(e.summary||``);return t&&!yc(t)?t:pc(e.tool_name)||bc(e.action.kind)},Sc=(e,t)=>t?xc(t):pc(e.tool_name)||bc(e.observation.kind),Cc=e=>e.filter(e=>e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(`
|
|
24
|
-
`),wc=e=>[`${w.t(L.TASK$SUBAGENT)}: ${e.subagent_type}`,`${w.t(L.TASK$QUERY)}:\n${e.prompt}`].join(`
|
|
25
|
-
|
|
26
|
-
`),Tc=(e,t)=>{let n=t?.action.kind===`TaskAction`?t.action:void 0;return[`${w.t(L.TASK$SUBAGENT)}: ${e.subagent}`,`${w.t(L.TASK$TASK_ID)}: ${e.task_id}`,n?`${w.t(L.TASK$QUERY)}:\n${n.prompt}`:``,`${w.t(L.TASK$RESULT)}:\n${Cc(e.content)}`].filter(Boolean).join(`
|
|
27
|
-
|
|
28
|
-
`)},Ec=e=>e.action.kind===`TaskAction`?wc(e.action):dc.has(e.action.kind)?je(e):``,Dc=(e,t)=>e.observation.kind===`TaskObservation`?Tc(e.observation,t):fc.has(e.observation.kind)?Ve(e):``,Oc=e=>Wr(e)?[e.reason,e.error,e.stdout,e.stderr].filter(e=>!!e?.trim()).join(`
|
|
29
|
-
|
|
30
|
-
`):``,kc=e=>[$r(e),Gr(e)].map(e=>e.trim()).filter(Boolean).join(`
|
|
31
|
-
|
|
32
|
-
`),Ac=e=>![`FinishAction`,`SwitchLLMAction`,`ThinkAction`].includes(e.action.kind),jc=(e,t)=>{let n=e.reduce((e,t)=>{try{return Kr(t,e)}catch{return e}},[]),r=new Map(e.filter(Zr).map(e=>[e.id,e])),i=[],a=new Set,o=ze(n.filter(e=>qr(e)&&!e.observation.is_error||_i(e)),2**53-1,e),s=e=>{if(a.has(e.id)||!Ac(e))return;a.add(e.id);let t=kc(e);t&&i.push({kind:`message`,author:`assistant`,content:t,timestamp:e.timestamp})};for(let e of o){if(e.kind===`group`)continue;if(e.kind===`thought`){s(e.action);continue}let{event:n}=e;try{let e=Zr(n)?n:Jr(n)?r.get(n.action_id):void 0;if(e&&s(e),qr(n)&&!n.observation.is_error){i.push({kind:`note`,summary:vc(L.MODEL$SWITCHED_TO_PROFILE,{name:n.observation.profile_name}),content:[n.observation.active_model?`${w.t(L.TRANSCRIPT_EXPORT$MODEL)}: ${n.observation.active_model}`:``,n.observation.reason?`${w.t(L.TRANSCRIPT_EXPORT$REASON)}: ${n.observation.reason}`:``].filter(Boolean).join(`
|
|
33
|
-
`),timestamp:n.timestamp??``});continue}if(ri(n)){let e=Le(n).trim();if(n.source===`agent`){let{reasoning:t,message:r}=Ur(e);[t,r].filter(Boolean).forEach(e=>{i.push({kind:`message`,author:`assistant`,content:e,timestamp:n.timestamp??``})})}else e&&i.push({kind:`message`,author:`user`,content:e,timestamp:n.timestamp??``});continue}if(ii(n)){let{reasoning:e,message:t}=Ur(n.content??``,{streaming:!0}),r=[n.reasoning_content?.trim()||``,e].filter(Boolean).join(`
|
|
34
|
-
|
|
35
|
-
`);r&&i.push({kind:`message`,author:`assistant`,content:r,timestamp:n.timestamp??``}),t.trim()&&i.push({kind:`message`,author:`assistant`,content:t.trim(),timestamp:n.timestamp??``});continue}if(Qr(n)){i.push({kind:`error`,content:n.error,timestamp:n.timestamp??``});continue}if(Zr(n)){if(n.action.kind===`FinishAction`){let e=n.action.message.trim();e&&i.push({kind:`message`,author:`assistant`,content:e,timestamp:n.timestamp??``})}else i.push({kind:`tool`,summary:xc(n),details:t?Ec(n):``,timestamp:n.timestamp??``});continue}if(Jr(n)){let e=r.get(n.action_id);i.push({kind:`tool`,summary:Sc(n,e),details:t?Dc(n,e):``,timestamp:n.timestamp??``});continue}if(hi(n)){i.push({kind:`tool`,summary:Ke(n)||w.t(L.ACTION_MESSAGE$ACP_TOOL),details:t?qe(n):``,timestamp:n.timestamp??``});continue}if(Wr(n)){i.push({kind:`tool`,summary:w.t(L.TRANSCRIPT_EXPORT$HOOK,{command:mc(pc(n.hook_command),100)}),details:t?Oc(n):``,timestamp:n.timestamp??``});continue}Xr(n)&&xi(n)&&i.push({kind:`note`,summary:`${w.t(L.GOAL$PREFIX)} ${w.t({running:L.GOAL$STATUS_RUNNING,complete:L.GOAL$STATUS_COMPLETE,capped:L.GOAL$STATUS_CAPPED,interrupted:L.GOAL$STATUS_INTERRUPTED}[n.value.status])}`,content:[n.value.objective,n.value.verdict?.missing||``].filter(Boolean).join(`
|
|
36
|
-
|
|
37
|
-
`),timestamp:n.timestamp??``})}catch{}}return i},Mc=(e,t)=>t.includeTimestamps?`<sub>${$(hc(e.timestamp))}</sub>\n\n`:``,Nc=e=>{let t=Math.max(0,...Array.from(e.matchAll(/`+/g),e=>e[0].length)),n="`".repeat(Math.max(3,t+1));return`${n}text\n${e}\n${n}`},Pc=(e,t)=>{let n=[`# ${gc(_c(t.title))}`,``];t.model&&n.push(`**${w.t(L.TRANSCRIPT_EXPORT$MODEL)}:** ${gc(pc(t.model))}`,``);for(let r of jc(e,t.includeToolDetails)){let e=Mc(r,t);if(r.kind===`message`){let t=r.author===`user`?w.t(L.TRANSCRIPT_EXPORT$USER):w.t(L.CHAT_INTERFACE$ASSISTANT);n.push(`## ${t}`,``,e+gc(r.content),``)}else if(r.kind===`error`){let t=r.content.split(`
|
|
38
|
-
`).map(e=>`> ${gc(e)}`).join(`
|
|
39
|
-
`);n.push(`## ${w.t(L.COMMON$ERROR)}`,``,e+t,``)}else if(r.kind===`note`)n.push(`> **${$(r.summary)}**`,``,e+gc(r.content),``);else if(t.includeToolDetails&&r.details)n.push(`<details>`,`<summary><strong>${$(w.t(L.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(r.summary)}</summary>`,``,e+Nc(r.details),``,`</details>`,``);else{let t=e?`<br>${e.trimEnd()}`:``;n.push(`<p><strong>${$(w.t(L.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(r.summary)}${t}</p>`,``)}}return`${n.join(`
|
|
40
|
-
`).trim()}\n`},Fc=(e,t)=>{if(!t.includeTimestamps)return``;let n=hc(e.timestamp);return`<time datetime="${$(n)}">${$(n)}</time>`},Ic=(e,t)=>{let n=_c(t.title),r=jc(e,t.includeToolDetails).map(e=>{let n=Fc(e,t);if(e.kind===`message`){let t=e.author===`user`?w.t(L.TRANSCRIPT_EXPORT$USER):w.t(L.CHAT_INTERFACE$ASSISTANT);return`<section class="message ${e.author.toLowerCase()}">
|
|
41
|
-
<header><h2>${$(t)}</h2>${n}</header>
|
|
42
|
-
<div class="content">${$(e.content)}</div>
|
|
43
|
-
</section>`}return e.kind===`error`?`<section class="message error">
|
|
44
|
-
<header><h2>${$(w.t(L.COMMON$ERROR))}</h2>${n}</header>
|
|
45
|
-
<div class="content">${$(e.content)}</div>
|
|
46
|
-
</section>`:e.kind===`note`?`<aside class="note">
|
|
47
|
-
<header><strong>${$(e.summary)}</strong>${n}</header>
|
|
48
|
-
${e.content?`<div class="content">${$(e.content)}</div>`:``}
|
|
49
|
-
</aside>`:t.includeToolDetails&&e.details?`<details>
|
|
50
|
-
<summary><strong>${$(w.t(L.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(e.summary)}${n}</summary>
|
|
51
|
-
<pre>${$(e.details)}</pre>
|
|
52
|
-
</details>`:`<div class="tool-summary"><strong>${$(w.t(L.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(e.summary)}${n}</div>`}).join(`
|
|
53
|
-
`),i=t.model?`<p class="model"><strong>${$(w.t(L.TRANSCRIPT_EXPORT$MODEL))}:</strong> ${$(pc(t.model))}</p>`:``;return`<!doctype html>
|
|
54
|
-
<html lang="${$(w.resolvedLanguage||w.language||`en`)}">
|
|
55
|
-
<head>
|
|
56
|
-
<meta charset="utf-8">
|
|
57
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
58
|
-
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:">
|
|
59
|
-
<title>${$(n)}</title>
|
|
60
|
-
<style>
|
|
61
|
-
:root { color-scheme: light dark; font-family: ui-sans-serif, system-ui, sans-serif; }
|
|
62
|
-
body { margin: 0; background: #111827; color: #e5e7eb; line-height: 1.55; }
|
|
63
|
-
main { box-sizing: border-box; width: min(860px, 100%); margin: 0 auto; padding: 48px 24px 80px; }
|
|
64
|
-
h1 { margin: 0; font-size: 2rem; }
|
|
65
|
-
h2 { margin: 0; font-size: 1rem; }
|
|
66
|
-
.model { margin: 8px 0 32px; color: #9ca3af; }
|
|
67
|
-
.message, details, .tool-summary, .note { margin: 16px 0; border: 1px solid #374151; border-radius: 10px; padding: 16px; background: #1f2937; }
|
|
68
|
-
.user { border-left: 4px solid #60a5fa; }
|
|
69
|
-
.assistant { border-left: 4px solid #34d399; }
|
|
70
|
-
.error { border-left: 4px solid #f87171; }
|
|
71
|
-
.note { border-left: 4px solid #a78bfa; }
|
|
72
|
-
header, summary, .tool-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
|
|
73
|
-
summary { cursor: pointer; }
|
|
74
|
-
time { flex: none; color: #9ca3af; font-size: .75rem; font-weight: 400; }
|
|
75
|
-
.content { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
76
|
-
pre { margin: 14px 0 0; padding: 14px; overflow-x: auto; border-radius: 7px; background: #111827; color: #d1d5db; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
77
|
-
@media (prefers-color-scheme: light) {
|
|
78
|
-
body { background: #f9fafb; color: #111827; }
|
|
79
|
-
.message, details, .tool-summary, .note { border-color: #d1d5db; background: #fff; }
|
|
80
|
-
pre { background: #f3f4f6; color: #1f2937; }
|
|
81
|
-
.model, time { color: #6b7280; }
|
|
82
|
-
}
|
|
83
|
-
</style>
|
|
84
|
-
</head>
|
|
85
|
-
<body>
|
|
86
|
-
<main>
|
|
87
|
-
<h1>${$(n)}</h1>
|
|
88
|
-
${i}
|
|
89
|
-
${r}
|
|
90
|
-
</main>
|
|
91
|
-
</body>
|
|
92
|
-
</html>
|
|
93
|
-
`},Lc=(e,t)=>(e.timestamp??``).localeCompare(t.timestamp??``),Rc=async(e,t,n)=>{let r=[],i=new Set,a=[],o=0,s=new Set,c,l,u=!1,d=!1;for(;;){let e=await t({limit:100,sortOrder:`TIMESTAMP_DESC`,strictPagination:!0,...l?{pageId:l}:{},...c?{timestampLt:c}:{}});if(!Array.isArray(e.items))throw Error(`Invalid transcript history response: expected page.items to be an array.`);r.push(...e.items);let a,f=!1;if(e.items.forEach(e=>{i.has(e.id??``)||(e.id?i.add(e.id):o+=1,f=!0),(!a||(e.timestamp??``)<a)&&(a=e.timestamp??``)}),e.next_page_id){if(s.has(e.next_page_id))throw Error(`Transcript history pagination repeated a page cursor.`);s.add(e.next_page_id),l=e.next_page_id,c=void 0,u=!0;continue}if(u&&!d||e.items.length<100)break;if(n===void 0)throw Error(`Transcript history pagination cannot prove that all events were loaded.`);if(!a||c&&(!f||a>=c))throw Error(`Transcript history pagination did not advance.`);l=void 0,c=a,d=!0}let f=new Map;r.slice().reverse().forEach(e=>{if(e.id!==void 0){f.has(e.id)||f.set(e.id,e);return}a.push(e)}),e.forEach(e=>{if(e.id!==void 0){f.has(e.id)||f.set(e.id,e);return}a.push(e)});let p=[...a,...f.values()].sort(Lc);if(n!==void 0&&i.size+o<n)throw Error(`Transcript history is incomplete: expected ${n} persisted events, received ${i.size+o}.`);return p},zc=`transcript-export-format`;function Bc({conversationId:e,conversationUrl:t,sessionApiKey:n,conversationTitle:r,model:i,onClose:a}){let{t:o}=f(`openhands`),{trackConversationExported:s}=Ft(),[c,l]=X.useState(`markdown`),[u,d]=X.useState(!0),[p,m]=X.useState(!0),[h,g]=X.useState(!1),_=X.useRef(!1),v=X.useRef(!1),y=X.useRef(!0);X.useEffect(()=>(y.current=!0,()=>{y.current=!1,v.current=!0}),[]);let b=()=>{_.current&&(v.current=!0),a()};return(0,Z.jsx)(Rt,{onClose:b,"aria-label":o(L.TRANSCRIPT_EXPORT$TITLE),children:(0,Z.jsxs)(zt,{testID:`transcript-export-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,Z.jsx)(dn,{onClose:b,testId:`close-transcript-export-modal`,className:`absolute right-4 top-4`}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 pr-8`,children:[(0,Z.jsx)(Vt,{title:o(L.TRANSCRIPT_EXPORT$TITLE)}),(0,Z.jsx)(Bt,{description:o(L.TRANSCRIPT_EXPORT$DESCRIPTION)})]}),(0,Z.jsxs)(`fieldset`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`legend`,{className:`mb-2 text-sm font-medium text-white`,children:o(L.TRANSCRIPT_EXPORT$FORMAT)}),(0,Z.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,Z.jsx)(`input`,{type:`radio`,name:zc,value:`markdown`,disabled:h,checked:c===`markdown`,onChange:()=>l(`markdown`)}),o(L.TRANSCRIPT_EXPORT$MARKDOWN)]}),(0,Z.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,Z.jsx)(`input`,{type:`radio`,name:zc,value:`html`,disabled:h,checked:c===`html`,onChange:()=>l(`html`)}),o(L.TRANSCRIPT_EXPORT$HTML)]})]}),(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-sm text-white`,children:[(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,disabled:h,checked:u,onChange:e=>d(e.target.checked)}),o(L.TRANSCRIPT_EXPORT$INCLUDE_TOOL_DETAILS)]}),(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,disabled:h,checked:p,onChange:e=>m(e.target.checked)}),o(L.TRANSCRIPT_EXPORT$INCLUDE_TIMESTAMPS)]})]}),(0,Z.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,Z.jsx)(Gt,{type:`button`,variant:`secondary`,onClick:b,testId:`cancel-transcript-export`,children:o(L.BUTTON$CANCEL)}),(0,Z.jsx)(Gt,{type:`button`,variant:`primary`,onClick:async()=>{if(!_.current){v.current=!1,_.current=!0,g(!0);try{let o=await mi.getEventCount(e,t??``,n).catch(()=>void 0);if(v.current)return;let l=Y.getState(),d=await Rc(l.loadedConversationId===e?l.events:[],r=>mi.searchEvents(e,t,n,r),o);if(v.current)return;let f={includeToolDetails:u,includeTimestamps:p,title:r,model:i},m=c===`markdown`,h=m?Pc(d,f):Ic(d,f),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||S(o(L.ERROR$GENERIC))}finally{_.current=!1,y.current&&g(!1)}}},testId:`confirm-transcript-export`,isDisabled:h,"aria-busy":h,children:o(L.BUTTON$EXPORT_CONVERSATION)})]})]})})}function Vc(){let{t:e}=f(`openhands`),{conversationId:t}=K(),{data:n}=J(),{mutate:r}=kn(),[i,a]=X.useState(`view`),[o,s]=X.useState(!1),[c,l]=X.useState(!1),u=X.useRef(null),d=X.useRef(null),{handleDelete:p,handleStop:m,handleDownloadConversation:h,handleDisplayCost:g,handleShowAgentTools:_,handleShowSkills:v,handleShowHooks:y,handleTogglePublic:b,handleCopyShareLink:x,shareUrl:S,handleConfirmDelete:w,handleConfirmStop:T,systemModalVisible:E,setSystemModalVisible:ee,skillsModalVisible:D,setSkillsModalVisible:O,hooksModalVisible:k,setHooksModalVisible:A,confirmDeleteModalVisible:j,setConfirmDeleteModalVisible:M,confirmStopModalVisible:N,setConfirmStopModalVisible:P,systemMessage:te,shouldShowStop:ne,shouldShowDownloadConversation:F,shouldShowDisplayCost:I,shouldShowAgentTools:re,shouldShowSkills:ie,shouldShowHooks:ae}=jr({conversationId:t,executionStatus:n?.execution_status,showOptions:!0,onContextMenuToggle:s});return X.useEffect(()=>{i===`edit`&&u.current?.focus()},[i]),n?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.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,Z.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(L.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,Z.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,Z.jsxs)(`div`,{ref:d,className:`relative flex items-center shrink-0`,children:[(0,Z.jsx)(zn,{onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!o)},ariaLabel:e(L.COMMON$MORE_OPTIONS)}),o&&(0,Z.jsx)(uc,{onClose:()=>s(!1),onRename:e=>{e.preventDefault(),e.stopPropagation(),a(`edit`),s(!1)},onDelete:p,onStop:ne?m:void 0,onDisplayCost:I?g:void 0,onShowAgentTools:re?_:void 0,onShowSkills:ie?v:void 0,onShowHooks:ae?y:void 0,onTogglePublic:b,onCopyShareLink:x,shareUrl:S,onExportTranscript:e=>{e.preventDefault(),e.stopPropagation(),l(!0),s(!1)},onDownloadConversation:F?h:void 0,position:`bottom`,anchorRef:d})]})]}),c&&t&&(0,Z.jsx)(Bc,{conversationId:t,conversationUrl:n.conversation_url,sessionApiKey:n.session_api_key,conversationTitle:n.title,model:n.llm_model,onClose:()=>l(!1)}),(0,Z.jsx)(Or,{isOpen:E,onClose:()=>ee(!1),systemMessage:te||null}),D&&(0,Z.jsx)(kr,{onClose:()=>O(!1)}),k&&(0,Z.jsx)(Pr,{onClose:()=>A(!1)}),j&&(0,Z.jsx)(Dn,{onConfirm:w,onCancel:()=>M(!1),conversationTitle:n?.title||``}),N&&(0,Z.jsx)(Pn,{onConfirm:T,onCancel:()=>P(!1)})]}):null}function Hc({children:e,tooltip:t,ariaLabel:n}){return(0,Z.jsx)(qt,{content:t,placement:`bottom`,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Z.jsx)(`span`,{"data-aria-label":n,children:e})})}var Uc=B(`inline-flex h-7 min-h-7 w-fit shrink-0 cursor-pointer items-center justify-center gap-1.5 px-2.5`,`rounded-md text-xs font-normal leading-none`,Ut,Ht,`text-[var(--oh-muted)]`,Wt,`disabled:cursor-not-allowed disabled:opacity-30`);function Wc({className:e}){let{t}=f(`openhands`),n=wr(),{data:r}=J(),[i,a]=(0,X.useState)(!1),o=(0,X.useRef)(null),s=r?.git_provider??`github`;(0,X.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i]);let c=t(L.CONVERSATION$OVERVIEW_DIFF_GIT_ACTIONS),l=(0,Z.jsxs)(`button`,{ref:o,type:`button`,onClick:()=>{n||a(e=>!e)},disabled:n,className:B(Uc,i&&`bg-white/10 text-[var(--oh-foreground)]`,n&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,e),"aria-expanded":i,"aria-haspopup":`menu`,"aria-disabled":n,"data-testid":`conversation-git-actions-toggle`,children:[(0,Z.jsx)(ct,{className:`size-4 shrink-0`,size:16,"aria-hidden":!0}),(0,Z.jsx)(`span`,{className:`whitespace-nowrap`,children:c})]});return(0,Z.jsxs)(`div`,{className:`relative inline-flex items-center self-center`,children:[n?(0,Z.jsx)(Hc,{tooltip:t(L.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES),ariaLabel:t(L.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES),children:l}):l,i?(0,Z.jsx)(Qo,{anchorRef:o,gitProvider:s,onClose:()=>a(!1)}):null]})}var Gc=null;function Kc(){Gc!==null&&(clearTimeout(Gc),Gc=null)}function qc(){let{isRightPanelShown:e,isOverviewPanelShown:t,setIsOverviewPanelPeeked:n}=U.getState();!e||t||(Kc(),n(!0))}function Jc(){Kc(),Gc=setTimeout(()=>{Gc=null,U.getState().setIsOverviewPanelPeeked(!1)},150)}function Yc(){Kc(),U.getState().setIsOverviewPanelPeeked(!1)}function Xc(){let e=U(e=>e.isRightPanelShown),t=U(e=>e.isOverviewPanelShown),n=U(e=>e.isOverviewPanelPeeked);(0,X.useEffect)(()=>{n&&(!e||t)&&Yc()},[n,t,e])}function Zc({className:e}){let{t}=f(`openhands`),n=wr(),{conversationId:r}=fi(),i=(0,X.useRef)(null),[a,o]=(0,X.useState)(null),{isOverviewPanelShown:s,isOverviewPanelPeeked:c,isRightPanelShown:l,setIsOverviewPanelShown:u,setHasRightPanelToggled:d,setIsRightPanelShown:p}=U();Xc(),(0,X.useEffect)(()=>{l&&s&&u(!1)},[s,l,u]);let m=!n&&l&&!s,h=m&&c;(0,X.useLayoutEffect)(()=>{if(!h){o(null);return}let e=()=>{let e=i.current?.getBoundingClientRect();e&&o({top:e.bottom+4,left:Math.max(8,e.right-240)})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[h]);let g=()=>{if(!n){if(l){d(!1),p(!1),r&&ln(r,{rightPanelShown:!1}),u(!0);return}u(!s)}},_=s||h,v=t(n?L.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:s?L.CONVERSATION$HIDE_OVERVIEW:L.CONVERSATION$SHOW_OVERVIEW),y=h&&a?Xo.createPortal((0,Z.jsx)(`div`,{"data-testid":`conversation-overview-peek`,className:`fixed z-50`,style:{top:a.top,left:a.left,width:240},onMouseEnter:qc,onMouseLeave:Jc,children:(0,Z.jsx)(`div`,{className:`shadow-lg`,children:(0,Z.jsx)(Ns,{})})}),document.body):null;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{ref:i,className:`relative inline-flex items-center self-center`,onMouseEnter:()=>{m&&qc()},onMouseLeave:()=>{(m||c)&&Jc()},children:(0,Z.jsx)(Hc,{tooltip:v,ariaLabel:v,children:(0,Z.jsx)(`button`,{type:`button`,onClick:g,disabled:n,className:B(jn,`size-7`,_&&`bg-white/10 text-[var(--oh-foreground)]`,n&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,e),"aria-label":v,"aria-pressed":s,"aria-disabled":n,"data-testid":`conversation-overview-toggle`,children:(0,Z.jsx)(ht,{className:`h-4 w-4 shrink-0`,size:16,"aria-hidden":!0})})})}),y]})}function Qc({className:e}){let{t}=f(`openhands`),n=ki(),r=wr(),i=l(),{conversationId:a}=K(),{isRightPanelShown:o,setHasRightPanelToggled:s,setIsRightPanelShown:c,setSelectedTab:u}=U(),d=()=>{if(r)return;if(n){if(!a)return;s(!0),c(!0),ln(a,{rightPanelShown:!0});let{selectedTab:e}=U.getState();e||u(`files`),i(`/conversations/${a}/panel`);return}let e=!o;if(s(e),c(e),a&&ln(a,{rightPanelShown:e}),e){let{selectedTab:e}=U.getState();e||u(`files`)}},p=t(r?L.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:n?L.COMMON$SHOW_PANEL:o?L.COMMON$HIDE_PANEL:L.COMMON$SHOW_PANEL),m=n?!1:o;return(0,Z.jsx)(Hc,{tooltip:p,ariaLabel:p,children:(0,Z.jsx)(`button`,{type:`button`,onClick:d,disabled:r,className:B(jn,`size-7 self-center`,r&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,e),"aria-label":p,"aria-pressed":m,"aria-disabled":r,"data-testid":`right-panel-toggle`,children:(0,Z.jsx)(An,{className:`size-5 -scale-x-100`})})})}function $c(){let{t:e}=f(`openhands`),{conversationId:t}=K(),{data:n}=J(),{curAgentState:r}=si(),{isTask:i,taskStatus:a}=pr(),{mutate:o}=Zt(),{mutate:s}=rc(),{providers:c}=Wn(),[l,u]=X.useState(!1),[d,p]=X.useState(!1),m=X.useRef(null),h=n?.execution_status??null,g=de({isPausing:!1,isTask:i,taskStatus:a,isStartingStatus:r===R.LOADING||r===R.INIT,isStopStatus:I(h),curAgentState:r}),_=l||d,v=()=>{u(!1),p(!1)};return(0,Z.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`relative shrink-0`,onPointerEnter:e=>{e.pointerType===`mouse`&&p(!0)},onPointerLeave:e=>{e.pointerType===`mouse`&&p(!1)},children:[(0,Z.jsx)(`button`,{ref:m,type:`button`,"data-testid":`server-status-menu-trigger`,"aria-label":e(L.COMMON$SERVER_STATUS),"aria-expanded":_,"aria-haspopup":`menu`,onClick:e=>{if(e.preventDefault(),e.stopPropagation(),_){v();return}u(!0)},className:B(`flex items-center justify-center rounded-md`,`text-[var(--oh-muted)] hover:bg-white/10`),children:(0,Z.jsx)(Oo,{className:`ml-[3.5px] w-6 h-6 cursor-pointer`,color:g,"aria-hidden":!0})}),_?(0,Z.jsx)(cc,{onClose:v,ignoreOutsideClickRef:m,onStopServer:_e(h)?e=>{e.preventDefault(),e.stopPropagation(),t&&o({conversationId:t}),v()}:void 0,onStartServer:P(h)?e=>{e.preventDefault(),e.stopPropagation(),t&&s({conversationId:t,providers:c}),v()}:void 0,executionStatus:h,position:`bottom`,className:`bottom-full left-0 mt-0 min-h-fit`,isPausing:!1}):null]}),(0,Z.jsx)(Vc,{})]}),(0,Z.jsxs)(`div`,{className:`mr-2 flex shrink-0 items-center gap-1`,children:[(0,Z.jsx)(Wc,{}),(0,Z.jsx)(Zc,{}),(0,Z.jsx)(Qc,{})]})]})}var el=e=>(0,Z.jsxs)(`svg`,{width:20,height:20,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`path`,{d:`M3 10.5L6.5 14L14 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M7 10.5L10.5 14L18 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`})]}),tl=160,nl={duration:.22,ease:[.4,0,.2,1]};function rl({tabValue:e,icon:t,onClick:n,isActive:r,label:i,className:a,measureOnly:o,suppressLayoutAnimation:s=!1}){let c=Ee(),l=o||c||!1,u=!l&&!s,d=B(`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,Z.jsx)(t,{className:B(`h-4 w-4 shrink-0 text-inherit`)}),p=i&&r?(0,Z.jsx)(`span`,{className:`whitespace-nowrap text-sm font-normal`,children:i}):null,m=i?(0,Z.jsx)(Ze.span,{initial:!1,animate:{maxWidth:r?tl:0,opacity:+!!r,marginLeft:r?8:0},transition:nl,className:`block overflow-hidden whitespace-nowrap text-sm font-normal`,"aria-hidden":!r,children:i}):null;return l?(0,Z.jsxs)(`button`,{type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:B(d,`gap-2`),children:[f,p]}):(0,Z.jsxs)(Ze.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:nl}:void 0,children:[f,m]})}var il=e=>(0,Z.jsx)(`svg`,{viewBox:`0 0 128 128`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.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 al(){let e=A().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function ol(e){if(e.length===0)return[];let t=al(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await Nt({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var sl=e=>{let t=D(),n=t.backend.kind===`cloud`;return y({queryKey:[`cloud`,`sandbox`,t.backend.id,t.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await ol([e]);return t??null},enabled:n&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},cl=`__AGENT_CANVAS_VSCODE_BASE_PATH__`;function ll(){if(typeof window<`u`){let e=window[cl];if(typeof e==`string`&&e.trim())return ul(e.trim())}return null}function ul(e){let t=e.startsWith(`/`)?e:`/${e}`;return t.length>1?t.replace(/\/+$/,``):t}function dl(e,t){if(!e||!t)return!1;let n;try{n=new URL(e,typeof window<`u`?window.location.href:void 0)}catch{return!1}return typeof window<`u`&&n.origin!==window.location.origin?!1:n.pathname===t||n.pathname.startsWith(`${t}/`)}var fl=`VSCODE`,pl=()=>{let{t:e}=f(`openhands`),{conversationId:t}=K(),n=Ei({allowAgentError:!0}),{data:r}=J(),i=D(),a=r?.conversation_url??null,o=r?.session_api_key??null,s=r?.sandbox_id??null,c=i.backend.kind===`cloud`,l=ll(),u=l!==null,d=sl(c?s:null),p=y({queryKey:[`unified`,`vscode_status`,`local`,t,a,o],queryFn:()=>gn.getVSCodeStatus(a,o),enabled:!c&&u&&n&&!!t,refetchOnMount:!0}),m=p.data?.enabled===!0&&p.data?.running===!0,h=y({queryKey:[`unified`,`vscode_url`,`local`,t,a,o],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return{url:En((await gn.getVSCodeUrl(t,a,o).catch(()=>Sn.getVSCodeUrl(t))).vscode_url)}},enabled:!c&&u&&n&&!!t&&m,refetchOnMount:!0,retry:3}),g,_,v,b,x,S,C,w;if(c){let e=d.data?.exposed_urls?.find(e=>e.name===fl)?.url??null;g=d.isSuccess?{url:En(e)}:void 0,_=d.isLoading,v=d.isError,b=d.isSuccess,x=d.status,S=d.error,C=async()=>{let e=await d.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===fl)?.url??null;return{data:e.data?{url:En(t)}:void 0}},w=!1}else g=h.data,_=p.isLoading||h.isLoading,v=p.isError||h.isError,b=h.isSuccess,x=h.status,S=p.error??h.error,C=async()=>({data:(await h.refetch()).data}),w=!u||p.isSuccess&&!m||b&&!h.data?.url||b&&!dl(h.data?.url,l);let T=g&&!g.url?e(L.VSCODE$URL_NOT_AVAILABLE):null;return{data:g?{...g,error:T}:void 0,error:S,isLoading:_,isError:v,isSuccess:b,isUnavailable:w,status:x,refetch:C}};function ml(){let{t:e}=f(`openhands`),{curAgentState:t}=si(),{data:n,refetch:r,isLoading:i,isUnavailable:a}=pl(),o=le.includes(t);return a?null:(0,Z.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||o,"aria-label":e(L.VSCODE$OPEN),title:e(L.VSCODE$OPEN),"data-testid":`drawer-vscode-link`,className:B(`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,Z.jsx)(il,{className:`h-[15px] w-[15px] shrink-0`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:e(L.FILES$VSCODE)}),(0,Z.jsx)(rt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})]})}function hl(e){if(Jr(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 gl(){let e=Y(e=>e.events);return(0,X.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=hl(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}function _l({isOpen:e,onClose:t,ignoreOutsideClickRef:n,anchorRef:r}){let i=Fn(t,n),[a,o]=(0,X.useState)();(0,X.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}=f(`openhands`),{conversationId:c}=K(),{state:l,setUnpinnedTabs:u,setSelectedTab:d}=an(c),{selectedTab:p,isRightPanelShown:m,setSelectedTab:h}=U(),{navigateToTab:g}=li(),{hasTaskList:_}=gl(),{backend:v}=D(),y=wr(),b=[{tab:`planner`,icon:gt,i18nKey:L.COMMON$PLANNER},{tab:`files`,icon:Br,i18nKey:L.COMMON$FILES},{tab:`commits`,icon:ut,i18nKey:L.DIFF_VIEWER$COMMITS},{tab:`terminal`,icon:st,i18nKey:L.COMMON$TERMINAL},{tab:`browser`,icon:pt,i18nKey:L.COMMON$BROWSER},{tab:`usage`,icon:at,i18nKey:L.COMMON$USAGE}];_&&b.unshift({tab:`tasklist`,icon:el,i18nKey:L.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),p===e&&m){let n=x.find(({tab:n})=>n!==e&&!t.includes(n));n&&(h(n.tab),d(n.tab))}}};if(!e)return null;let w=!!(r?.current&&a),T=(0,Z.jsx)(jt,{ref:i,theme:w?`popover`:`default`,position:w?`none`:`bottom`,alignment:w?`none`:`left`,spacing:w?`none`:`default`,className:B(`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,Z.jsx)(`li`,{className:`list-none`,children:(0,Z.jsx)(Rr,{isDisabled:y,children:(0,Z.jsxs)(`div`,{className:B(`group flex h-[30px] w-full min-w-0 items-stretch rounded`,!y&&`hover:bg-[var(--oh-interactive-hover)]`,y&&`opacity-50`),children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-open-${e}`,disabled:y,className:B(`flex min-w-0 flex-1 items-center gap-2 rounded-l p-2 text-start text-white`,Jt,y?`cursor-not-allowed`:`cursor-pointer`),onClick:()=>S(e),children:[(0,Z.jsx)(`span`,{className:Yt,"aria-hidden":!0,children:(0,Z.jsx)(t,{className:`h-4 w-4`})}),(0,Z.jsx)(`span`,{className:`text-sm`,children:s(n)})]}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-pin-${e}`,disabled:y,className:B(`flex shrink-0 items-center justify-center rounded-r px-2 text-white`,Jt,y?`cursor-not-allowed`:`cursor-pointer hover:bg-white/10`),"aria-pressed":r,"aria-label":s(r?L.CONVERSATION$UNPIN_TAB:L.CONVERSATION$PIN_TAB),onClick:t=>C(e,t),children:r?(0,Z.jsx)(`span`,{className:B(`-mr-[5px] ml-auto`,Yt),"aria-hidden":!0,children:(0,Z.jsx)(ss,{className:`h-7 w-7`})}):(0,Z.jsx)(`span`,{className:B(`ml-auto`,Yt),"aria-hidden":!0,children:(0,Z.jsx)(os,{className:`h-4.5 w-4.5`})})})]})})},e)})});return w&&a&&typeof document<`u`?Xo.createPortal((0,Z.jsx)(`div`,{style:a,children:T}),document.body):T}function vl({variant:e=`default`,isPanelResizing:t=!1}){let{conversationId:n}=K(),{setSelectedTab:r,planContent:i}=U(),[a,o]=(0,X.useState)(!1),{state:s}=an(n),{hasTaskList:c}=gl(),{backend:l}=D(),{handleBuildPlanClick:u}=Re(),{curAgentState:d}=si(),{selectTab:p,isTabActive:m,onTabChange:h,selectedTab:g,isRightPanelShown:_}=li();(0,X.useEffect)(()=>{r(s.selectedTab)},[r,s.selectedTab]),(0,X.useEffect)(()=>{_&&(g||h(`files`))},[_,g,h]);let{t:v,i18n:y}=f(`openhands`),b=[{tabValue:`files`,isActive:m(`files`),icon:Br,onClick:()=>p(`files`),tooltipContent:v(L.COMMON$FILES),tooltipAriaLabel:v(L.COMMON$FILES),label:v(L.COMMON$FILES)},{tabValue:`commits`,isActive:m(`commits`),icon:ut,onClick:()=>p(`commits`),tooltipContent:v(L.DIFF_VIEWER$COMMITS),tooltipAriaLabel:v(L.DIFF_VIEWER$COMMITS),label:v(L.DIFF_VIEWER$COMMITS)},{tabValue:`planner`,isActive:m(`planner`),icon:gt,onClick:()=>p(`planner`),tooltipContent:v(L.COMMON$PLANNER),tooltipAriaLabel:v(L.COMMON$PLANNER),label:v(L.COMMON$PLANNER)},{tabValue:`terminal`,isActive:m(`terminal`),icon:st,onClick:()=>p(`terminal`),tooltipContent:v(L.COMMON$TERMINAL),tooltipAriaLabel:v(L.COMMON$TERMINAL),label:v(L.COMMON$TERMINAL),className:`pl-2`},{tabValue:`browser`,isActive:m(`browser`),icon:pt,onClick:()=>p(`browser`),tooltipContent:v(L.COMMON$BROWSER),tooltipAriaLabel:v(L.COMMON$BROWSER),label:v(L.COMMON$BROWSER)},{tabValue:`usage`,isActive:m(`usage`),icon:at,onClick:()=>p(`usage`),tooltipContent:v(L.COMMON$USAGE),tooltipAriaLabel:v(L.COMMON$USAGE),label:v(L.COMMON$USAGE)}];c&&b.splice(2,0,{tabValue:`tasklist`,isActive:m(`tasklist`),icon:el,onClick:()=>p(`tasklist`),tooltipContent:v(L.COMMON$TASK_LIST),tooltipAriaLabel:v(L.COMMON$TASK_LIST),label:v(L.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===R.RUNNING||d===R.LOADING||!i,w=(0,X.useRef)(null),T=(0,X.useRef)(null),E=(0,X.useRef)(null),ee=(0,X.useRef)(null),O=(0,X.useRef)(null),[k,A]=(0,X.useState)(x.length);(0,X.useLayoutEffect)(()=>{let e=w.current,t=T.current,n=E.current,r=ee.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.observe(r),()=>a.disconnect()},[S,x.length,c,l.kind,g,_,y.language]);let j=Math.min(k,x.length);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:B(`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,Z.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,Z.jsx)(Hc,{tooltip:r,ariaLabel:i,children:(0,Z.jsx)(rl,{tabValue:e,icon:t,onClick:()=>{},isActive:n,label:a,className:B(o,`shrink-0`),measureOnly:!0})},`measure-${e}-${s}`))}),(0,Z.jsxs)(`div`,{ref:w,className:`flex w-full min-w-0 flex-nowrap items-center justify-start`,children:[(0,Z.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center justify-start overflow-hidden`,children:(0,Z.jsxs)(`div`,{className:`flex w-fit max-w-full min-w-0 items-center gap-1.5`,children:[(0,Z.jsx)(dt,{id:`conversation-drawer-tabs`,children:(0,Z.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,Z.jsx)(Hc,{tooltip:a,ariaLabel:o,children:(0,Z.jsx)(rl,{tabValue:e,icon:n,onClick:r,isActive:i,label:s,className:B(c,`shrink-0`),suppressLayoutAnimation:t})},`${e}-${l}`))})}),(0,Z.jsxs)(`div`,{ref:E,className:`relative shrink-0`,children:[(0,Z.jsx)(zn,{ref:O,onClick:()=>o(!a),ariaLabel:v(L.COMMON$MORE_OPTIONS),iconClassName:e===`compact`?On:void 0}),(0,Z.jsx)(_l,{isOpen:a,onClose:()=>o(!1),ignoreOutsideClickRef:O,anchorRef:O})]})]})}),(0,Z.jsx)(`div`,{ref:ee,className:`ml-auto shrink-0 pr-1`,children:(0,Z.jsx)(ml,{})})]})]}),m(`planner`)&&(0,Z.jsx)(`div`,{className:B(`flex h-10 min-h-10 shrink-0 items-center border-t border-[var(--oh-border)] pl-[10px] pr-1`),children:(0,Z.jsx)(`button`,{type:`button`,onClick:u,disabled:C,className:B(`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,Z.jsxs)(Xn.Text,{className:`text-[11px] font-normal leading-5 text-black`,children:[v(L.COMMON$BUILD),` ⌘↩`]})})})]})}function yl({onMouseDown:e,className:t,isDragging:n=!1,testId:r}){let[i,a]=(0,X.useState)(!1),o=n||i;return(0,Z.jsxs)(`div`,{"data-testid":r,className:B(`relative z-10 w-0 shrink-0 self-stretch`,t),"aria-hidden":!0,children:[(0,Z.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:()=>a(!0),onMouseLeave:()=>a(!1)}),(0,Z.jsx)(`div`,{className:B(`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`,o?`bg-white`:`bg-transparent`),"aria-hidden":!0})]})}var bl=200;function xl({defaultLeftWidth:e=50,minLeftWidth:t=30,maxLeftWidth:n=80,storageKey:r=`desktop-layout-panel-width`}={}){let[i,a]=ot(r,e),o=(0,X.useCallback)(e=>Math.max(t,Math.min(n,e)),[t,n]),[s,c]=(0,X.useState)(()=>o(i)),[l,u]=(0,X.useState)(!1),d=(0,X.useRef)(null),f=(0,X.useCallback)(e=>{e.preventDefault(),u(!0)},[]),p=(0,X.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,X.useCallback)(()=>{l&&(u(!1),a(s))},[l,s,a]);return(0,X.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(bl),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}}var Sl=200;function Cl({containerRef:e,defaultWidth:t,minWidth:n,maxWidth:r,storageKey:i,enabled:a=!0,edge:o=`right`}){let[s,c]=ot(i,t),l=(0,X.useCallback)(e=>Math.max(n,Math.min(r,e)),[n,r]),[u,d]=(0,X.useState)(()=>l(s)),[f,p]=(0,X.useState)(!1),m=(0,X.useRef)(u);m.current=u;let h=(0,X.useCallback)(e=>{a&&(e.preventDefault(),p(!0))},[a]),g=(0,X.useCallback)(t=>{if(!f||!e.current)return;let n=e.current.getBoundingClientRect();d(l(o===`left`?t.clientX-n.left:n.right-t.clientX))},[l,e,o,f]),_=(0,X.useCallback)(()=>{f&&(p(!1),c(m.current))},[f,c]);return(0,X.useLayoutEffect)(()=>{if(!f)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(Sl),cursor:`ew-resize`}),document.body.appendChild(e),document.addEventListener(`mousemove`,g),document.addEventListener(`mouseup`,_),document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`,()=>{document.removeEventListener(`mousemove`,g),document.removeEventListener(`mouseup`,_),document.body.style.cursor=``,document.body.style.userSelect=``,e.remove()}},[g,_,f]),{drawerWidth:u,isDragging:f,handleMouseDown:h}}var wl=()=>void 0;function Tl({openAdd:e}){let{t}=f(`openhands`),[n,r]=(0,X.useState)(e),{data:i,isLoading:a,refetch:o}=Kn(),{data:s,isLoading:c,isError:l,refetch:u}=qn({limit:50,offset:0,enabled:i?.status===`ok`});(0,X.useEffect)(()=>{e&&r(!0)},[e]);let d;return d=a||i?.status===`ok`&&c?(0,Z.jsx)($e,{}):i?.status===`ok`?l?(0,Z.jsx)(ji,{onRetry:u}):s?.automations.length?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(tt,{title:t(L.CONVERSATION_PANEL$AUTOMATIONS),count:s.automations.length,automations:s.automations,view:`list`,onToggle:wl,onRunNow:wl,onDelete:wl,onExport:wl}),(0,Z.jsx)(et,{isOpen:n,onClose:()=>r(!1)})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(nt,{}),(0,Z.jsx)(et,{isOpen:n,onClose:()=>r(!1)})]}):(0,Z.jsx)(Ai,{onRetry:o}),(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-automations-panel`,children:d})}var El={project:`project`,all:`all`};function Dl(e,t){return Ci(e,t)===`project`}function Ol(e,t,n){return t===El.all?e:e.filter(e=>Dl(e,n))}function kl(e,t){return[...e].sort((e,n)=>{let r=Ci(e,t),i=Ci(n,t),a=wi.indexOf(r),o=wi.indexOf(i);return a===o?e.name.localeCompare(n.name):a-o})}function Al({value:e,onChange:t,testId:n}){let{t:r}=f(`openhands`);return(0,Z.jsx)(`div`,{className:`flex w-full justify-center [&>[role=radiogroup]]:w-full`,children:(0,Z.jsx)(mt,{value:e,onChange:t,ariaLabel:r(L.CONVERSATION$OVERVIEW_SCOPE_FILTER),testId:n,options:[{value:El.project,label:r(L.CONVERSATION$OVERVIEW_SCOPE_PROJECT)},{value:El.all,label:r(L.CONVERSATION$OVERVIEW_SCOPE_ALL)}]})})}function jl({openAdd:e}){let{t}=f(`openhands`),{isLoading:n}=Lt(),{data:r}=J(),{data:i,isLoading:a}=Cr(),{isEnabled:o,setEnabled:s}=Si(),c=Yo()?.addRequestKey??0,l=r?.selected_workspace??null,[u,d]=(0,X.useState)(El.project),[p,m]=(0,X.useState)(Ot),[h,g]=(0,X.useState)(!1),[_,v]=(0,X.useState)(null),[y,b]=(0,X.useState)(!1);(0,X.useEffect)(()=>{e&&b(!0)},[e]),(0,X.useEffect)(()=>{c!==0&&b(!0)},[c]);let x=(0,X.useMemo)(()=>{if(!i)return[];let e=Ol(i,u,l);return u===El.all?kl(e,l):e},[i,u,l]),S=(0,X.useMemo)(()=>Tt(x,o,p),[x,o,p]);return a||n?(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-skills-panel`,className:`text-sm text-muted`,children:`…`}):!i||i.length===0?(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-skills-panel`,className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-skills-empty`,className:Qn,children:(0,Z.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:t(L.SETTINGS$SKILLS_NO_SKILLS)})}),y?(0,Z.jsx)(xt,{onClose:()=>b(!1)}):null]}):(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-skills-panel`,className:`flex flex-col gap-4`,children:[(0,Z.jsx)(Al,{value:u,onChange:d,testId:`conversation-overview-skills-scope`}),(0,Z.jsx)(bt,{search:p.query,onSearchChange:e=>m(t=>({...t,query:e})),activeFilterCount:vt(p),onOpenFilters:()=>g(!0)}),x.length===0?(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-skills-project-empty`,className:Qn,children:(0,Z.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:t(L.CONVERSATION$OVERVIEW_SCOPE_PROJECT_EMPTY_SKILLS)})}):S.length===0?(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-skills-no-match`,className:Qn,children:(0,Z.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:t(L.SETTINGS$SKILLS_NO_MATCH)})}):(0,Z.jsx)(`section`,{className:B(`flex min-w-0 flex-col gap-3`,Zn),children:(0,Z.jsx)(`div`,{className:B($n,`grid-cols-1`),children:S.map(e=>(0,Z.jsx)(wt,{skill:e,enabled:o(e),onOpen:()=>v(e),onToggle:t=>s(e.name,t)},e.name))})}),_?(0,Z.jsx)(Et,{skill:_,enabled:o(_),onToggle:e=>s(_.name,e),onClose:()=>v(null)}):null,y?(0,Z.jsx)(xt,{onClose:()=>b(!1)}):null,h?(0,Z.jsx)(Ct,{groups:Dt(x,o,p),activeCount:vt(p),onToggle:(e,t)=>m(n=>yt(n,e,t)),onClearAll:()=>m(e=>St(e)),onClose:()=>g(!1)}):null]})}function Ml({openAdd:e}){let{t}=f(`openhands`),{data:n,isLoading:r}=Lt(),{mutate:i,isPending:a}=Fi(),{mutate:o}=Mi(),s=Yo()?.addRequestKey??0,[c,l]=(0,X.useState)(null),[u,d]=(0,X.useState)(null),[p,m]=(0,X.useState)(null),[h,g]=(0,X.useState)(``),[_,v]=(0,X.useState)(`all`);(0,X.useEffect)(()=>{e&&d({id:``,type:`sse`})},[e]),(0,X.useEffect)(()=>{s!==0&&d({id:``,type:`sse`})},[s]);let y=nr(It(n?.agent_settings?.mcp_config)),b=ir(or),x=y.filter(e=>rr(e,ar(e,b),h));return r||!n?(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-mcp-panel`,className:`text-sm text-muted`,children:`…`}):(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-mcp-panel`,className:`flex flex-col gap-4`,children:[(0,Z.jsx)(Li,{search:h,onSearchChange:g,sectionFilter:_,onSectionFilterChange:v}),_===`library`?null:(0,Z.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,Z.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(L.MCP$INSTALLED_TITLE)}),(0,Z.jsx)(Ni,{servers:x,hasAnyInstalled:y.length>0,query:h,onEdit:d,onToggleEnabled:(e,t)=>{o({serverId:e.id,server:{...e,enabled:t}})}})]}),_===`installed`?null:(0,Z.jsx)(Ii,{onSelect:l,onAdd:l,query:h}),c?(0,Z.jsx)(Hn,{entry:c,existingServers:y,onClose:()=>l(null)}):null,u?(0,Z.jsx)(Pi,{server:u,existingServers:y,onClose:()=>d(null)}):null,p?(0,Z.jsx)(fn,{text:t(L.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>m(null),onConfirm:()=>{p&&i(p,{onSuccess:()=>{C(t(L.MCP$REMOVE_SUCCESS)),m(null)},onError:e=>{S(j(e)||t(L.ERROR$GENERIC)),m(null)}})},isConfirming:a}):null]})}function Nl({openAdd:e}){let t=d(),{t:n}=f(`openhands`),r=Yo()?.addRequestKey??0,{data:i,isLoading:a}=tr(),{mutate:o,isPending:s}=Ri(),[c,l]=(0,X.useState)(`list`),[u,p]=(0,X.useState)(null);(0,X.useEffect)(()=>{e&&l(`add-secret-form`)},[e]),(0,X.useEffect)(()=>{r!==0&&l(`add-secret-form`)},[r]);let m=()=>{t.invalidateQueries({queryKey:[`secrets-search`]}),t.invalidateQueries({queryKey:[`secrets`]})};return c===`add-secret-form`?(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-secrets-add-form`,className:`flex h-full min-h-0 flex-col overflow-y-auto p-4`,children:(0,Z.jsx)(zi,{mode:`add`,selectedSecret:null,onCancel:()=>l(`list`)})}):(0,Z.jsxs)(`div`,{"data-testid":`conversation-overview-secrets-panel`,className:`flex h-full min-h-0 flex-col`,children:[(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 py-2`,children:a?(0,Z.jsx)(`p`,{className:`px-2 py-4 text-sm text-[var(--oh-muted)]`,children:n(L.HOME$LOADING)}):i&&i.length>0?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:i.map(e=>(0,Z.jsxs)(`li`,{"data-testid":`conversation-overview-secret-item`,className:`group flex items-center gap-2 rounded-md px-2 py-2 hover:bg-white/5`,children:[(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`p`,{className:`truncate text-sm text-[var(--oh-foreground)]`,children:e.name}),e.description?(0,Z.jsx)(`p`,{className:`truncate text-xs text-[var(--oh-muted)]`,children:e.description}):null]}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`conversation-overview-secret-delete-${e.name}`,"aria-label":n(L.BUTTON$DELETE),onClick:()=>p(e.name),className:B(`shrink-0 rounded-md p-1 text-[var(--oh-muted)]`,`opacity-0 transition-opacity group-hover:opacity-100`,`hover:bg-white/10 hover:text-[var(--oh-foreground)]`),children:(0,Z.jsx)(At,{className:`size-3.5`,"aria-hidden":!0})})]},e.name))}):(0,Z.jsx)(`p`,{"data-testid":`conversation-overview-secrets-empty`,className:B(Qn,`px-2 py-6 text-center text-sm`),children:n(L.SECRETS$EMPTY)})}),u?(0,Z.jsx)(fn,{text:n(L.SECRETS$CONFIRM_DELETE_KEY),isConfirming:s,onCancel:()=>p(null),onConfirm:()=>{o(u,{onSettled:()=>p(null),onSuccess:m,onError:m})}}):null]})}var Pl=B(`size-3.5 shrink-0 text-[var(--oh-muted)]`,`opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100`);function Fl(e){let{repository:t,provider:n}=Fo();return!t||!n?null:e===Q.pull_requests?bs.constructPullRequestsListUrl(n,t):bs.constructIssuesListUrl(n,t)}function Il({kind:e}){let{t}=f(`openhands`),{provider:n}=Fo(),r=Fl(e);return!r||!n?null:(0,Z.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,"data-testid":`conversation-overview-${e}-open-external`,className:B(`inline-flex h-7 min-h-7 shrink-0 items-center gap-1.5 whitespace-nowrap`,`px-1 text-xs text-[var(--oh-muted)] transition-colors`,`hover:text-[var(--oh-foreground)]`),children:[t(L.CONVERSATION$OVERVIEW_VIEW_ON_PROVIDER,{provider:z(n)}),(0,Z.jsx)(rt,{className:`size-3.5`,"aria-hidden":!0})]})}function Ll({kind:e}){let{t}=f(`openhands`),{repository:n,provider:r,isConnected:i}=Fo(),a=xs(n,r),o=Ss(n,r),s=e===Q.pull_requests?a:o;return!i||!n||!r?(0,Z.jsx)(`p`,{"data-testid":`conversation-overview-git-items-unavailable`,className:B(Qn,`px-4 py-6 text-center text-sm`),children:t(L.CONVERSATION$OVERVIEW_GIT_UNAVAILABLE)}):(0,Z.jsx)(`div`,{"data-testid":`conversation-overview-${e}-panel`,className:`min-h-0 flex-1 overflow-y-auto px-2 py-2`,children:s.isLoading?(0,Z.jsx)(`p`,{className:`px-2 py-4 text-sm text-[var(--oh-muted)]`,children:t(L.HOME$LOADING)}):s.isError?(0,Z.jsx)(`p`,{"data-testid":`conversation-overview-${e}-error`,className:B(Qn,`px-2 py-6 text-center text-sm`),children:t(L.CONVERSATION$OVERVIEW_GIT_ITEMS_ERROR)}):s.data&&s.data.length>0?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:s.data.map(t=>(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`a`,{href:t.url,target:`_blank`,rel:`noreferrer`,"data-testid":`conversation-overview-${e}-item-${t.number}`,className:B(`group flex min-w-0 items-center gap-2 rounded-md px-2 py-2`,`transition-colors hover:bg-white/5`),children:[(0,Z.jsxs)(`span`,{className:`shrink-0 text-sm tabular-nums text-[var(--oh-muted)]`,children:[`#`,t.number]}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm text-[var(--oh-foreground)]`,children:t.title}),(0,Z.jsx)(rt,{className:Pl,"aria-hidden":!0})]})},t.id))}):(0,Z.jsx)(`p`,{"data-testid":`conversation-overview-${e}-empty`,className:B(Qn,`px-2 py-6 text-center text-sm`),children:e===Q.pull_requests?t(L.CONVERSATION$OVERVIEW_PULL_REQUESTS_EMPTY):t(L.CONVERSATION$OVERVIEW_ISSUES_EMPTY)})})}var Rl=B(`flex h-10 min-h-10 shrink-0 items-center gap-1.5`,`border-b border-[var(--oh-border)] py-1 pl-1 pr-4`),zl=B(`h-7 min-h-7 shrink-0 whitespace-nowrap px-2.5 text-xs`),Bl=B(`inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md`,`text-muted transition-colors hover:bg-white/10 hover:text-white`);function Vl(e){switch(e){case Q.automations:return L.CONVERSATION_PANEL$AUTOMATIONS;case Q.skills:return L.SETTINGS$NAV_SKILLS;case Q.mcp:return L.CONVERSATION$OVERVIEW_MCP;case Q.secrets:return L.SETTINGS$NAV_SECRETS;case Q.pull_requests:return L.CONVERSATION$OVERVIEW_PULL_REQUESTS;case Q.issues:return L.CONVERSATION$OVERVIEW_ISSUES;default:return e}}function Hl({section:e}){let{t}=f(`openhands`),{requestAdd:n}=Jo();switch(e){case Q.automations:return(0,Z.jsx)(Gt,{type:`button`,variant:`primary`,testId:`conversation-overview-automations-add`,className:zl,onClick:n,children:t(L.AUTOMATIONS$ADD_AUTOMATION)});case Q.skills:return(0,Z.jsx)(Gt,{type:`button`,variant:`primary`,testId:`conversation-overview-skills-add-skill-button`,className:zl,onClick:n,children:t(L.SETTINGS$SKILLS_ADD_BUTTON)});case Q.mcp:return(0,Z.jsx)(Gt,{type:`button`,variant:`secondary`,testId:`conversation-overview-mcp-add-server`,className:zl,onClick:n,children:t(L.MCP$ADD_CUSTOM)});case Q.secrets:return(0,Z.jsx)(Gt,{type:`button`,variant:`primary`,testId:`conversation-overview-secrets-add-button`,className:zl,onClick:n,children:t(L.SECRETS$ADD_NEW_SECRET)});case Q.pull_requests:return(0,Z.jsx)(Il,{kind:`pull_requests`});case Q.issues:return(0,Z.jsx)(Il,{kind:`issues`});default:return null}}function Ul({section:e,openAdd:t}){switch(e){case Q.automations:return(0,Z.jsx)(Tl,{openAdd:t});case Q.skills:return(0,Z.jsx)(jl,{openAdd:t});case Q.mcp:return(0,Z.jsx)(Ml,{openAdd:t});case Q.secrets:return(0,Z.jsx)(Nl,{openAdd:t});case Q.pull_requests:return(0,Z.jsx)(Ll,{kind:`pull_requests`});case Q.issues:return(0,Z.jsx)(Ll,{kind:`issues`});default:return e}}function Wl({className:e}){let{t}=f(`openhands`),{section:n,openAdd:r,closeDrawer:i}=Jo(),{workspaceName:a}=Po();if((0,X.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&i()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[i,n]),!n)return null;let o=n===Q.pull_requests||n===Q.issues||n===Q.secrets;return(0,Z.jsxs)(`aside`,{"data-testid":`conversation-overview-drawer-content`,"aria-label":t(Vl(n)),className:B(`flex h-full w-full min-h-0 flex-col overflow-hidden bg-base-secondary`,e),children:[(0,Z.jsxs)(`header`,{className:Rl,children:[(0,Z.jsx)(`button`,{type:`button`,"data-testid":`conversation-overview-drawer-close`,"aria-label":t(L.BUTTON$CLOSE),onClick:i,className:Bl,children:(0,Z.jsx)(sr,{className:`size-4`,"aria-hidden":!0})}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,Z.jsx)(`h2`,{className:`truncate text-sm font-medium text-content`,children:t(Vl(n))}),a?(0,Z.jsx)(`p`,{"data-testid":`conversation-overview-drawer-workspace`,className:`truncate text-xs text-muted`,children:a}):null]}),(0,Z.jsx)(`div`,{className:`shrink-0`,children:(0,Z.jsx)(Hl,{section:n})})]}),(0,Z.jsx)(`div`,{className:B(`min-h-0 flex-1 custom-scrollbar-always`,o?`flex flex-col overflow-hidden`:`overflow-y-auto px-4 py-4`),children:(0,Z.jsx)(Ul,{section:n,openAdd:r})})]})}var Gl=`conversation-overview-drawer-width`,Kl=`conversation-overview-drawer-resize-handle`,ql=`conversation-overview-drawer`;function Jl(e){return e?`translate-x-0 opacity-100`:`w-0 translate-x-full opacity-0`}function Yl({isMobile:e,resizeContainerRef:t}){let n=Yo(),r=!!n?.section,{drawerWidth:i,isDragging:a,handleMouseDown:o}=Cl({containerRef:t??{current:null},defaultWidth:420,minWidth:300,maxWidth:640,storageKey:Gl,enabled:r&&!e&&t!=null});return n?e?r?(0,Z.jsx)(Wl,{className:`max-h-[min(50vh,420px)] w-full border-t border-[var(--oh-border)]`}):null:(0,Z.jsxs)(Z.Fragment,{children:[r&&t?(0,Z.jsx)(`div`,{"data-testid":Kl,children:(0,Z.jsx)(yl,{onMouseDown:o,isDragging:a})}):null,(0,Z.jsx)(`div`,{"data-testid":ql,"aria-hidden":!r,className:B(`shrink-0 overflow-hidden ease-in-out`,a?`transition-[transform,opacity] duration-300`:`transition-all duration-300`,Jl(r)),style:{width:r?`${i}px`:`0px`,transitionProperty:a?`transform, opacity`:`width, transform, opacity`},children:(0,Z.jsx)(`div`,{className:`flex h-full flex-col overflow-hidden border-l border-[var(--oh-border)] bg-base-secondary`,style:{width:`${i}px`},children:r?(0,Z.jsx)(Wl,{className:`h-full`}):null})})]}):null}function Xl(e){return e?`translate-x-0 opacity-100`:`w-0 translate-x-full opacity-0`}function Zl(){let e=ki(),t=ki(767),{isRightPanelShown:n}=U(),r=!!Yo()?.section,{leftWidth:i,rightWidth:a,isDragging:o,containerRef:s,handleMouseDown:c}=xl({defaultLeftWidth:50,minLeftWidth:30,maxLeftWidth:80,storageKey:`desktop-layout-panel-width`});return(0,Z.jsx)(`div`,{className:B(e?`relative min-h-0 flex-1 flex flex-col`:`h-full flex flex-col overflow-hidden`),children:(0,Z.jsxs)(`div`,{ref:s,className:B(`flex flex-1 overflow-hidden`,e?`flex-col`:`transition-all duration-300 ease-in-out`),style:e?void 0:{transitionProperty:o?`none`:`all`},children:[(0,Z.jsxs)(`div`,{className:B(`flex flex-col bg-base overflow-hidden`,e?`flex-1`:B(`min-w-0`,!r&&`transition-[width] duration-300 ease-in-out`)),style:e?void 0:{width:n?`${i}%`:`100%`,transitionProperty:o||r?`none`:`width`},children:[(0,Z.jsxs)(`div`,{"data-testid":`chat-pane-header`,className:B(`flex h-10 min-h-10 shrink-0 items-center`,t&&`gap-2 pl-2.5`),children:[t?(0,Z.jsx)(Nn,{}):null,(0,Z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Z.jsx)($c,{})})]}),(0,Z.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,Z.jsx)(zs,{isRightPanelShown:!e&&n})})]}),!e&&n&&(0,Z.jsx)(yl,{onMouseDown:c,isDragging:o}),!e&&(0,Z.jsx)(`div`,{className:B(`transition-all duration-300 ease-in-out overflow-hidden`,Xl(n)),style:{width:n?`${a}%`:`0%`,transitionProperty:o?`opacity, transform`:`all`},children:(0,Z.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:(0,Z.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,Z.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex shrink-0 flex-col border-b border-[var(--oh-border)]`,children:(0,Z.jsx)(vl,{isPanelResizing:o})}),(0,Z.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,Z.jsx)(nc,{})})]})})}),(0,Z.jsx)(Yl,{isMobile:e,resizeContainerRef:s})]})})}function Ql({onNavigateBack:e}){let{t}=f(`openhands`),{setIsRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=U();return X.useLayoutEffect(()=>(n(!0),r(!0),U.getState().selectedTab||i(`files`),()=>{n(!1),r(!1)}),[n,r,i]),(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-[var(--oh-surface)]`,children:[(0,Z.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,Z.jsx)(`button`,{type:`button`,"data-testid":`conversation-mobile-panel-back`,onClick:()=>{e()},"aria-label":t(L.COMMON$BACK),className:jn,children:(0,Z.jsx)(Xe,{size:20,className:On,"aria-hidden":!0,strokeWidth:2})}),(0,Z.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 items-center self-stretch`,children:(0,Z.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,Z.jsx)(vl,{variant:`compact`})})})]}),(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-[var(--oh-surface)]`,children:(0,Z.jsx)(nc,{})})]})}var $l=1e3*60*5,eu=1e3*60*15,tu=e=>{let t=e||[],n=D();return y({queryKey:[`v1`,`sub-conversations`,t,n.backend.id,n.orgId],queryFn:async()=>t.length===0?[]:gn.batchGetAppConversations(t),enabled:t.length>0,staleTime:$l,gcTime:eu,retry:!1})};function nu({children:e,conversationId:t}){let{data:n}=J(),{data:r}=tu(n?.sub_conversation_ids??[]),i=r?.filter(e=>e!==null);return(0,Z.jsx)(vi,{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 ru(){let{t:e}=f(`openhands`),{conversationId:t}=K(),n=c(`/conversations/:conversationId/panel`),{isTask:r,taskStatus:i,taskDetail:a}=gr(),o=D(),u=X.useRef(o.backend.id),d=X.useRef(o.orgId),p=u.current!==o.backend.id||d.current!==o.orgId,{data:m,isFetched:h}=J(),{data:g}=_n(),{resetConversationState:_}=U(),v=l(),y=s(),b=ni(e=>e.clearTerminal),x=Cn(e=>e.reset),C=Vi(e=>e.setCurrentAgentState),w=bi(e=>e.removeErrorMessage);X.useEffect(()=>{b(),_(),x(),C(R.LOADING),w()},[t,b,_,x,C,w]),X.useEffect(()=>{if(r&&i===`ERROR`){S(a||e(L.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]),X.useEffect(()=>{!h||!g||p||m||(qi(o.backend.id,o.orgId),S(e(L.CONVERSATION$NOT_EXIST_OR_NO_PERMISSION)),v(`/conversations`))},[m,h,g,v,e,p,o.backend.id,o.orgId]),X.useEffect(()=>{p||t&&(t.startsWith(`task-`)||Ki(o.backend.id,o.orgId,t))},[t,p,o.backend.id,o.orgId]);let T=X.useRef(null);return X.useEffect(()=>{!h||!m||o.backend.kind===`cloud`&&m.sandbox_status===`PAUSED`&&m.sandbox_id&&T.current!==m.id&&(T.current=m.id,hn(m.sandbox_id).catch(()=>{S(e(L.CONVERSATION$FAILED_TO_START_FROM_TASK))}))},[h,m?.id,m?.sandbox_status,m?.sandbox_id,o.backend.kind,e]),p?null:(0,Z.jsx)(nu,{conversationId:t,children:(0,Z.jsx)($i,{children:(0,Z.jsx)(qo,{children:(0,Z.jsx)(`div`,{"data-testid":`app-route`,className:`flex h-full flex-col`,children:n?(0,Z.jsx)(Ql,{onNavigateBack:()=>v(`/conversations/${t}`)}):(0,Z.jsx)(Zl,{})})})})})}function iu(){return(0,Z.jsx)(ru,{})}var au=u(iu);export{Cs as a,Ga as c,gl as i,Ra as l,Cl as n,Bo as o,yl as r,zo as s,au as t,za as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./conversation-BbGrAO4Z.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./conversation-BbGrAO4Z.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{l as n,v as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{nt as i,tt as a,ut as o,wt as s,yt as c}from"./active-backend-context-CrHTlgvN.js";import{a as l,i as u}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js";import{_ as d}from"./conversation-store-Ca3ghXap.js";import{C as f,E as p,h as m,t as h,y as g}from"./agent-server-conversation-service.api-tnqNjbpE.js";var _=async e=>{let t=(await h.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},v=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:i}=await _(e);if(o().backend.kind===`cloud`){if(!i)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await g(i),{success:!0}}return new r(a({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},y=async(e,t)=>{let{conversationUrl:n,sessionApiKey:i}=await _(e);return new r(a({conversationUrl:n,sessionApiKey:i})).askAgent(e,t)},b=async(e,t)=>{let{conversationUrl:n,sessionApiKey:i}=await _(e);await new r(a({conversationUrl:n,sessionApiKey:i})).startGoal(e,t)},x=async e=>{let{conversationUrl:t,sessionApiKey:n}=await _(e);await new r(a({conversationUrl:t,sessionApiKey:n})).stopGoal(e)},S=async e=>{let{conversationUrl:t,sessionApiKey:n}=await _(e);await new r(a({conversationUrl:t,sessionApiKey:n})).resumeGoal(e)},C=async e=>{let{conversationUrl:t,sessionApiKey:n}=await _(e);return new r(a({conversationUrl:t,sessionApiKey:n})).runConversation(e)},w=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},T=(e,t,n)=>w(e,t,{execution_status:n}),E=(e,t,n)=>w(e,t,{llm_model:n}),D=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},O=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function k(e){let t=e.split(/[\\/]+/).filter(Boolean),n=t[t.length-1];if(!n||n===`.`||n===`..`)throw Error(`Invalid file name`);return n}async function A(e,t={}){return p(e,t)}async function j(e,t,n={}){let r=k(e);return`${(await A(t,n)).replace(/[/\\]+$/,``)}/${r}`}async function M(e,t){if(t?.id===e&&t.workspace?.working_dir?.trim())return t.workspace.working_dir.trim();let n=f(e);return n?.selected_workspace?.trim()?n.selected_workspace.trim():O.test(e)?h.resolveConversationWorkingDir(e):s()}var N=5;async function P(e,t){if(t?.id===e&&t.conversation_url?.trim()&&t.session_api_key?.trim())return{conversationUrl:t.conversation_url.trim(),sessionApiKey:t.session_api_key.trim()};if(o().backend.kind===`cloud`){let[t]=await m([e]);return{conversationUrl:t?.conversation_url?.trim()??null,sessionApiKey:t?.session_api_key?.trim()??null}}return{conversationUrl:null,sessionApiKey:null}}function F(e){if(!e.conversationUrl||!e.sessionApiKey)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return{conversationUrl:e.conversationUrl,sessionApiKey:e.sessionApiKey}}async function I(e,t,n){let r=await M(e,n),i=await P(e,n),a=o().backend.kind===`cloud`,s=n?.id===e?n.session_api_key??i.sessionApiKey:i.sessionApiKey,c=n?.id===e?n.conversation_url??i.conversationUrl:i.conversationUrl;if(a){let e=F({conversationUrl:c,sessionApiKey:s});return L({files:t,workingDir:r,conversationUrl:e.conversationUrl,sessionApiKey:e.sessionApiKey})}return L({files:t,workingDir:r,conversationUrl:c,sessionApiKey:s})}async function L(e){let{files:t,workingDir:n,conversationUrl:r,sessionApiKey:i}=e,o=new u(a({conversationUrl:r,sessionApiKey:i,workingDir:n})),s=async e=>{try{let t=k(e.name),a=await j(e.name,n,{conversationUrl:r,sessionApiKey:i});return await o.fileUpload(e,a),{uploadedFile:t,skippedFile:null}}catch(t){return{uploadedFile:null,skippedFile:{name:e.name,reason:t instanceof Error?t.message:`Upload failed`}}}},c=[];for(let e=0;e<t.length;e+=N){let n=t.slice(e,e+N);c.push(...await Promise.all(n.map(s)))}return{uploaded_files:c.flatMap(e=>e.uploadedFile?[e.uploadedFile]:[]),skipped_files:c.flatMap(e=>e.skippedFile?[e.skippedFile]:[])}}var R=class{static currentConversation=null;static setCurrentConversation(e){this.currentConversation=e}static getCurrentConversation(){return this.currentConversation}static getClientOverrides(){return{sessionApiKey:this.currentConversation?.session_api_key}}static async getVSCodeUrl(e){let t=this.currentConversation?.id===e?this.currentConversation?.workspace?.working_dir??s():s();return{vscode_url:await new n(a(this.getClientOverrides())).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:t})}}static async getTrajectory(e){return{trajectory:(await new l(i(this.getClientOverrides()),e).search({limit:1e4})).items??[]}}static async uploadFiles(e,t){return I(e,t,this.currentConversation)}};e();var z=t(),B=e=>(0,z.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,z.jsx)(`path`,{d:`M21.0004 6.00001C21.0016 5.43668 20.8441 4.88442 20.5459 4.40644C20.2478 3.92846 19.8212 3.54406 19.3148 3.29726C18.8084 3.05046 18.2428 2.95122 17.6826 3.0109C17.1224 3.07059 16.5904 3.28678 16.1474 3.63473C15.7044 3.98269 15.3683 4.44835 15.1776 4.97841C14.9869 5.50848 14.9493 6.08152 15.0691 6.63197C15.1888 7.18241 15.4612 7.688 15.8549 8.09088C16.2487 8.49375 16.7479 8.77762 17.2954 8.91001V10.5C17.2978 10.6372 17.261 10.7722 17.1892 10.8891C17.1175 11.006 17.0138 11.1 16.8904 11.16L12.7354 13.32L8.59544 11.22C8.46356 11.1544 8.35443 11.0507 8.28221 10.9223C8.21 10.7939 8.17802 10.6468 8.19044 10.5V8.91001C8.89743 8.72746 9.51358 8.29333 9.92339 7.689C10.3332 7.08467 10.5085 6.35161 10.4165 5.62725C10.3245 4.90289 9.97149 4.23695 9.42361 3.75426C8.87573 3.27157 8.17062 3.00527 7.44044 3.00527C6.71026 3.00527 6.00514 3.27157 5.45726 3.75426C4.90938 4.23695 4.55635 4.90289 4.46435 5.62725C4.37234 6.35161 4.54768 7.08467 4.95749 7.689C5.36729 8.29333 5.98344 8.72746 6.69044 8.91001V10.5C6.6913 10.9156 6.80651 11.323 7.02346 11.6776C7.24041 12.0321 7.55073 12.3201 7.92044 12.51L12.0004 14.61V16.59C11.2934 16.7726 10.6773 17.2067 10.2675 17.811C9.85768 18.4153 9.68234 19.1484 9.77435 19.8728C9.86635 20.5971 10.2194 21.2631 10.7673 21.7457C11.3151 22.2284 12.0203 22.4947 12.7504 22.4947C13.4806 22.4947 14.1857 22.2284 14.7336 21.7457C15.2815 21.2631 15.6345 20.5971 15.7265 19.8728C15.8185 19.1484 15.6432 18.4153 15.2334 17.811C14.8236 17.2067 14.2074 16.7726 13.5004 16.59V14.61L17.5504 12.57C17.9317 12.3784 18.2501 12.0816 18.468 11.7148C18.686 11.348 18.7944 10.9265 18.7804 10.5V8.88001C19.4147 8.70922 19.9755 8.33496 20.3765 7.81469C20.7776 7.29442 20.9967 6.6569 21.0004 6.00001ZM6.00044 6.00001C6.00044 5.60218 6.15847 5.22065 6.43978 4.93934C6.72108 4.65804 7.10261 4.5 7.50044 4.5C7.89826 4.5 8.27979 4.65804 8.5611 4.93934C8.8424 5.22065 9.00044 5.60218 9.00044 6.00001C9.00044 6.39783 8.8424 6.77936 8.5611 7.06067C8.27979 7.34197 7.89826 7.50001 7.50044 7.50001C7.10261 7.50001 6.72108 7.34197 6.43978 7.06067C6.15847 6.77936 6.00044 6.39783 6.00044 6.00001ZM14.2054 19.5C14.2054 19.8978 14.0474 20.2794 13.7661 20.5607C13.4848 20.842 13.1033 21 12.7054 21C12.3076 21 11.9261 20.842 11.6448 20.5607C11.3635 20.2794 11.2054 19.8978 11.2054 19.5C11.2054 19.1022 11.3635 18.7207 11.6448 18.4393C11.9261 18.158 12.3076 18 12.7054 18C13.1033 18 13.4848 18.158 13.7661 18.4393C14.0474 18.7207 14.2054 19.1022 14.2054 19.5ZM18.0004 7.50001C17.6026 7.50001 17.2211 7.34197 16.9398 7.06067C16.6585 6.77936 16.5004 6.39783 16.5004 6.00001C16.5004 5.60218 16.6585 5.22065 16.9398 4.93934C17.2211 4.65804 17.6026 4.5 18.0004 4.5C18.3983 4.5 18.7798 4.65804 19.0611 4.93934C19.3424 5.22065 19.5004 5.60218 19.5004 6.00001C19.5004 6.39783 19.3424 6.77936 19.0611 7.06067C18.7798 7.34197 18.3983 7.50001 18.0004 7.50001Z`,fill:`currentColor`})}),V=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e};function H(e){let t=e.trim().replace(/\\/g,`/`).replace(/\/+$/,``);return t?t.startsWith(`/`)||/^[A-Za-z]:(\/|$)/.test(t)?t:`/${t}`:``}var U=(e,t)=>{let n=e.trim().replace(/\\/g,`/`);if(!n)return``;n=n.replace(/:(\d+)(-\d+)?$/,``);let r=[t,c].filter(e=>!!e?.trim());for(let e of r){let t=H(e);if(t){if(n===t)return``;if(n.startsWith(`${t}/`))return n.slice(t.length+1)}}return n.startsWith(`/`)?V(n).replace(/^\.\//,``):n.replace(/^\.\//,``)},W=/\.(md|txt|ts|tsx|js|jsx|mjs|cjs|py|json|html?|css|scss|ya?ml|toml|rs|go|java|kt|swift|c|cc|cpp|h|hpp|sh|bash|zsh|sql|xml|svg|pdf|env|rb|php|vue|svelte|lock|ini|cfg|docx?|xlsx?|pptx?|odt|rtf)$/i,G=e=>{let t=e.trim();if(!t||/\s/.test(t)||/^https?:\/\//i.test(t))return!1;let n=t.replace(/\\/g,`/`).replace(/^\.\//,``);if(n=n.replace(/:(\d+)(-\d+)?$/,``),/^(application|audio|image|text|video|font|multipart|message|model)\/[\w.+-]+$/i.test(n)||/^v?\d+(\.\d+){1,3}([-+][\w.]+)?$/i.test(n))return!1;let r=n.includes(`/`)?n.split(`/`).pop()??``:n;return W.test(r)},K=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n},q=d(e=>({execution_status:null,setExecutionStatus:t=>e({execution_status:t}),reset:()=>e({execution_status:null})}));export{x as _,U as a,P as c,D as d,w as f,b as g,S as h,V as i,I as l,C as m,K as n,B as o,v as p,G as r,R as s,q as t,y as u,T as v,E as y};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";var n=e(t(),1),r=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},i=(e=>e?r(e):r),a=e=>e;function o(e,t=a){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r}var s=e=>{let t=i(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s),l=e=>!!e.dispatchFromDevtools&&typeof e.dispatch==`function`,u=new Map,d=e=>{let t=u.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},f=(e,t,n)=>{if(e===void 0)return{type:`untracked`,connection:t.connect(n)};let r=u.get(n.name);if(r)return{type:`tracked`,store:e,...r};let i={connection:t.connect(n),stores:{}};return u.set(n.name,i),{type:`tracked`,store:e,...i}},p=(e,t)=>{if(t===void 0)return;let n=u.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&u.delete(e))},m=/.+ (.+) .+/,h=/^([^@]+)@/;function g(e){if(!e)return;let t=e.split(`
|
|
2
|
-
`),n=t.findIndex(e=>e.includes(`api.setState`));if(n<0)return;let r=t[n+1]?.trim()||``;return m.exec(r)?.[1]||h.exec(r)?.[1]}var _=(e,t={})=>(n,r,i)=>{let{enabled:a,anonymousActionType:o,store:s,...c}=t,u;try{u=(a??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,i);let{connection:m,...h}=f(s,u,c),_=!0;i.setState=((e,t,a)=>{let l=n(e,t);if(!_)return l;let u=a===void 0?{type:o||g(Error().stack)||`anonymous`}:typeof a==`string`?{type:a}:a;return s===void 0?(m?.send(u,r()),l):(m?.send({...u,type:`${s}/${u.type}`},{...d(c.name),[s]:i.getState()}),l)}),i.devtools={cleanup:()=>{m&&typeof m.unsubscribe==`function`&&m.unsubscribe(),p(c.name,s)}};let y=(...e)=>{let t=_;_=!1,n(...e),_=t},b=e(i.setState,r,i);if(h.type===`untracked`?m?.init(b):(h.stores[h.store]=i,m?.init(Object.fromEntries(Object.entries(h.stores).map(([e,t])=>[e,e===h.store?b:t.getState()])))),l(i)){let e=i.dispatch;i.dispatch=(...t)=>{e(...t)}}return m.subscribe(e=>{switch(e.type){case`ACTION`:if(typeof e.payload!=`string`){console.error(`[zustand devtools middleware] Unsupported action format`);return}return v(e.payload,e=>{if(e.type===`__setState`){if(s===void 0){y(e.state);return}Object.keys(e.state).length!==1&&console.error(`
|
|
3
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
4
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
5
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
6
|
-
`);let t=e.state[s];if(t==null)return;JSON.stringify(i.getState())!==JSON.stringify(t)&&y(t);return}l(i)&&i.dispatch(e)});case`DISPATCH`:switch(e.payload.type){case`RESET`:return y(b),s===void 0?m?.init(i.getState()):m?.init(d(c.name));case`COMMIT`:if(s===void 0){m?.init(i.getState());return}return m?.init(d(c.name));case`ROLLBACK`:return v(e.state,e=>{if(s===void 0){y(e),m?.init(i.getState());return}y(e[s]),m?.init(d(c.name))});case`JUMP_TO_STATE`:case`JUMP_TO_ACTION`:return v(e.state,e=>{if(s===void 0){y(e);return}JSON.stringify(i.getState())!==JSON.stringify(e[s])&&y(e[s])});case`IMPORT_STATE`:{let{nextLiftedState:t}=e.payload,n=t.computedStates.slice(-1)[0]?.state;if(!n)return;y(s===void 0?n:n[s]),m?.send(null,t);return}case`PAUSE_RECORDING`:return _=!_}return}}),b},v=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error(`[zustand devtools middleware] Could not parse the received json`,e)}n!==void 0&&t(n)};function y(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var b=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return b(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return b(t)(e)}}}},x=(e,t)=>(n,r,i)=>{let a={storage:y(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return b(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},S={workspace:`workspace`,git:`git`},C=[S.workspace,S.git],w=new Set(C),T={changes:`changes`,repository:`repository`,branch:`branch`,commits:`commits`,pull_requests:`pull_requests`},E=[T.changes,T.repository,T.branch,T.commits,T.pull_requests],D=new Set(E),O=[],k=[],A=[{sections:[S.workspace]}];function j(e,t){return!t.includes(e)}function M(e,t){return!t.includes(e)}var N={CONVERSATION_STATE:`conversation-state`,PENDING_TASK_DRAFT:`pending-task-draft`},P=`conversation-state-updated`,F={selectedTab:`files`,unpinnedTabs:[],unpinnedOverviewSections:[...O],unpinnedOverviewGitParts:[...k],conversationMode:`code`,subConversationTaskId:null,draftMessage:null,rightPanelShown:!1,filesTabDiffView:null,filesTabContentViewMode:`rich`,filesTabTreeVisible:!0,filesTabOpenPaths:[],filesTabSelectedPath:null},I=new Set([`files`,`commits`,`browser`,`terminal`,`planner`,`tasklist`,`usage`]),L=new Set([`editor`,`served`,`app`,`vscode`]),R=new Set([`rich`,`plain`]);function z(e){let t=e;if(t.selectedTab!=null&&(L.has(t.selectedTab)||t.selectedTab===`changes`||!I.has(t.selectedTab))){let e=t.selectedTab;t={...t},e===`changes`?t.selectedTab=`commits`:delete t.selectedTab}if(t.unpinnedTabs){let e=t.unpinnedTabs.filter(e=>e!==`changes`&&!L.has(e));e.length!==t.unpinnedTabs.length&&(t={...t,unpinnedTabs:e})}if(t.unpinnedOverviewSections){let e=t.unpinnedOverviewSections.filter(e=>w.has(e));e.length!==t.unpinnedOverviewSections.length&&(t={...t,unpinnedOverviewSections:e})}if(t.unpinnedOverviewGitParts){let e=t.unpinnedOverviewGitParts.filter(e=>D.has(e));e.length!==t.unpinnedOverviewGitParts.length&&(t={...t,unpinnedOverviewGitParts:e})}if(t.filesTabContentViewMode!=null&&!R.has(t.filesTabContentViewMode)&&(t={...t},delete t.filesTabContentViewMode),t.rightPanelShown!=null&&typeof t.rightPanelShown!=`boolean`&&(t={...t},delete t.rightPanelShown),t.filesTabTreeVisible!=null&&typeof t.filesTabTreeVisible!=`boolean`&&(t={...t},delete t.filesTabTreeVisible),t.filesTabOpenPaths!=null)if(!Array.isArray(t.filesTabOpenPaths))t={...t},delete t.filesTabOpenPaths;else{let e=t.filesTabOpenPaths.filter(e=>typeof e==`string`&&e.length>0);e.length!==t.filesTabOpenPaths.length&&(t={...t,filesTabOpenPaths:e})}return t.filesTabSelectedPath!=null&&typeof t.filesTabSelectedPath!=`string`&&(t={...t},delete t.filesTabSelectedPath),t}function B(e){return e.startsWith(`task-`)}function V(e){return e===``||B(e)}function H(e){if(V(e))return F;try{let t=`${N.CONVERSATION_STATE}-${e}`,n=localStorage.getItem(t);return n===null?F:{...F,...z(JSON.parse(n))}}catch{return F}}function U(e,t){if(!V(e))try{let n=`${N.CONVERSATION_STATE}-${e}`,r={...H(e),...t};localStorage.setItem(n,JSON.stringify(r)),typeof window<`u`&&window.dispatchEvent(new CustomEvent(P,{detail:{conversationId:e}}))}catch(e){console.warn(`Failed to set conversation localStorage`,e)}}function W(e){return`${N.PENDING_TASK_DRAFT}-${e}`}function G(e,t){if(e)try{localStorage.setItem(W(e),t)}catch(e){console.warn(`Failed to store pending task draft`,e)}}function K(e){if(!e)return null;try{let t=W(e),n=localStorage.getItem(t);return localStorage.removeItem(t),n}catch(e){return console.warn(`Failed to consume pending task draft`,e),null}}function q(e){try{let t=`${N.CONVERSATION_STATE}-${e}`;localStorage.removeItem(t),typeof window<`u`&&window.dispatchEvent(new CustomEvent(P,{detail:{conversationId:e}}))}catch(t){console.warn(`Failed to clear conversation localStorage`,e,t)}}function J(e){let[t,r]=(0,n.useState)(()=>H(e));(0,n.useEffect)(()=>{if(typeof window>`u`)return;let t=`${N.CONVERSATION_STATE}-${e}`,n=()=>{r(H(e))},i=e=>{e.key===t&&n()},a=t=>{t.detail?.conversationId===e&&n()};return n(),window.addEventListener(`storage`,i),window.addEventListener(P,a),()=>{window.removeEventListener(`storage`,i),window.removeEventListener(P,a)}},[e]);let i=t=>{if(V(e)){r(e=>({...e,...t}));return}U(e,t)};return{state:t,setSelectedTab:e=>i({selectedTab:e}),setUnpinnedTabs:e=>i({unpinnedTabs:e}),setUnpinnedOverviewSections:e=>i({unpinnedOverviewSections:e}),setUnpinnedOverviewGitParts:e=>i({unpinnedOverviewGitParts:e}),setConversationMode:e=>i({conversationMode:e}),setDraftMessage:e=>i({draftMessage:e}),setRightPanelShown:e=>i({rightPanelShown:e}),setFilesTabDiffView:e=>i({filesTabDiffView:e}),setFilesTabContentViewMode:e=>i({filesTabContentViewMode:e}),setFilesTabTreeVisible:e=>i({filesTabTreeVisible:e}),setFilesTabOpenState:(e,t)=>i({filesTabOpenPaths:e,filesTabSelectedPath:t})}}var Y=()=>{if(typeof window>`u`)return null;let e=window.location.pathname.match(/\/conversations\/([^/]+)/);return e?e[1]:null},X=()=>{if(typeof window>`u`)return`code`;let e=Y();return e?H(e).conversationMode:`code`},Z=c()(_(e=>({isRightPanelShown:!1,isOverviewPanelShown:!1,isOverviewPanelPeeked:!1,selectedTab:`files`,commitsAutoExpandSection:null,images:[],files:[],imagesMarkedUploadAsFile:[],pastedImageNames:[],loadingFiles:[],loadingImages:[],messageToSend:null,messageRestoreIfEmpty:null,shouldShownAgentLoading:!1,submittedMessage:null,shouldHideSuggestions:!1,hasRightPanelToggled:!1,planContent:null,conversationMode:X(),subConversationTaskId:null,setIsRightPanelShown:t=>e({isRightPanelShown:t},!1,`setIsRightPanelShown`),setIsOverviewPanelShown:t=>e({isOverviewPanelShown:t,isOverviewPanelPeeked:!1},!1,`setIsOverviewPanelShown`),setIsOverviewPanelPeeked:t=>e({isOverviewPanelPeeked:t},!1,`setIsOverviewPanelPeeked`),setSelectedTab:t=>e({selectedTab:t},!1,`setSelectedTab`),setCommitsAutoExpandSection:t=>e({commitsAutoExpandSection:t},!1,`setCommitsAutoExpandSection`),setShouldShownAgentLoading:t=>e({shouldShownAgentLoading:t},!1,`setShouldShownAgentLoading`),setShouldHideSuggestions:t=>e({shouldHideSuggestions:t},!1,`setShouldHideSuggestions`),addImages:t=>e(e=>({images:[...e.images,...t]}),!1,`addImages`),addFiles:t=>e(e=>({files:[...e.files,...t]}),!1,`addFiles`),toggleImageUploadAsFile:t=>e(e=>{let n=new Set(e.imagesMarkedUploadAsFile);return n.has(t)?n.delete(t):n.add(t),{imagesMarkedUploadAsFile:[...n]}},!1,`toggleImageUploadAsFile`),markImagesAsPasted:t=>e(e=>({pastedImageNames:[...new Set([...e.pastedImageNames,...t])]}),!1,`markImagesAsPasted`),removeImage:t=>e(e=>{let n=e.images[t],r=[...e.images];return r.splice(t,1),{images:r,imagesMarkedUploadAsFile:n?e.imagesMarkedUploadAsFile.filter(e=>e!==n.name):e.imagesMarkedUploadAsFile,pastedImageNames:n?e.pastedImageNames.filter(e=>e!==n.name):e.pastedImageNames}},!1,`removeImage`),removeFile:t=>e(e=>{let n=[...e.files];return n.splice(t,1),{files:n}},!1,`removeFile`),clearImages:()=>e({images:[]},!1,`clearImages`),clearFiles:()=>e({files:[]},!1,`clearFiles`),clearAllFiles:()=>e({images:[],files:[],imagesMarkedUploadAsFile:[],pastedImageNames:[],loadingFiles:[],loadingImages:[]},!1,`clearAllFiles`),addFileLoading:t=>e(e=>e.loadingFiles.includes(t)?e:{loadingFiles:[...e.loadingFiles,t]},!1,`addFileLoading`),removeFileLoading:t=>e(e=>({loadingFiles:e.loadingFiles.filter(e=>e!==t)}),!1,`removeFileLoading`),addImageLoading:t=>e(e=>e.loadingImages.includes(t)?e:{loadingImages:[...e.loadingImages,t]},!1,`addImageLoading`),removeImageLoading:t=>e(e=>({loadingImages:e.loadingImages.filter(e=>e!==t)}),!1,`removeImageLoading`),clearAllLoading:()=>e({loadingFiles:[],loadingImages:[]},!1,`clearAllLoading`),setMessageToSend:t=>e({messageToSend:{text:t,timestamp:Date.now()}},!1,`setMessageToSend`),clearMessageToSend:()=>e({messageToSend:null},!1,`clearMessageToSend`),restoreMessageToInputIfEmpty:t=>e({messageRestoreIfEmpty:{text:t,timestamp:Date.now()}},!1,`restoreMessageToInputIfEmpty`),clearMessageRestoreIfEmpty:()=>e({messageRestoreIfEmpty:null},!1,`clearMessageRestoreIfEmpty`),setSubmittedMessage:t=>e({submittedMessage:t},!1,`setSubmittedMessage`),resetConversationState:()=>e({shouldHideSuggestions:!1,conversationMode:X(),subConversationTaskId:null,planContent:null},!1,`resetConversationState`),setHasRightPanelToggled:t=>e({hasRightPanelToggled:t},!1,`setHasRightPanelToggled`),setConversationMode:t=>{let n=Y();n&&U(n,{conversationMode:t}),e({conversationMode:t},!1,`setConversationMode`)},setSubConversationTaskId:t=>e({subConversationTaskId:t},!1,`setSubConversationTaskId`),setPlanContent:t=>e({planContent:t},!1,`setPlanContent`)}),{name:`conversation-store`}));export{c as _,B as a,J as c,A as d,M as f,x as g,_ as h,H as i,T as l,y as m,q as n,U as o,j as p,K as r,G as s,Z as t,S as u};
|
|
@@ -1 +0,0 @@
|
|
|
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~iyia17eu-Chf7vmKB.js";import{W as n}from"./utils-CN5ZfZy1.js";import{t as r}from"./checkmark-XZyokq_Y.js";import{t as i}from"./copy-Drmhc2jD.js";var a=e();function o({isHidden:e,isDisabled:o,onClick:s,mode:c}){let{t:l}=t(`openhands`);return(0,a.jsxs)(`button`,{hidden:e,disabled:o,"data-testid":`copy-to-clipboard`,type:`button`,onClick:s,"aria-label":l(c===`copy`?n.BUTTON$COPY:n.BUTTON$COPIED),className:`button-base p-1 cursor-pointer`,children:[c===`copy`&&(0,a.jsx)(i,{width:15,height:15}),c===`copied`&&(0,a.jsx)(r,{width:15,height:15})]})}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{W as o,t as s}from"./utils-CN5ZfZy1.js";import{t as c}from"./use-is-authed-nTBcM7dE.js";import{t as l}from"./typography-v1KN0tzi.js";var u=e(t(),1),d=n(),f=i(function(){let{t:e}=a(`openhands`),[t]=r(),{data:n,isLoading:i}=c(),[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(!1),g=t.get(`user_code`),_=async e=>{try{h(!0),(await fetch(`/oauth/device/verify-authenticated`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`user_code=${encodeURIComponent(e)}`,credentials:`include`})).ok?p({success:!0,messageKey:o.DEVICE$SUCCESS_MESSAGE}):p({success:!1,messageKey:o.DEVICE$ERROR_FAILED})}catch{p({success:!1,messageKey:o.DEVICE$ERROR_OCCURRED})}finally{h(!1)}};return f?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:s(`mb-4`,f.success?`text-green-600`:`text-red-600`),children:f.success?(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})}):(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})}),(0,d.jsx)(`h2`,{className:`text-xl font-medium mb-2`,children:f.success?e(o.DEVICE$SUCCESS_TITLE):e(o.DEVICE$ERROR_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:e(f.messageKey)}),!f.success&&(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(o.DEVICE$TRY_AGAIN)})]})})}):m?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(o.DEVICE$PROCESSING)})]})})}):n&&g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background p-4`,children:(0,d.jsx)(`div`,{className:`flex flex-col items-center gap-6 w-full max-w-md`,children:(0,d.jsxs)(`div`,{className:`flex-1 min-w-0 max-w-md w-full mx-auto p-6 bg-card rounded-2xl shadow-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(o.DEVICE$AUTHORIZATION_REQUEST)}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-base rounded-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(`p`,{className:`text-xs text-[var(--oh-text-subtle)] mb-2 text-center uppercase tracking-wider`,children:e(o.DEVICE$CODE_LABEL)}),(0,d.jsx)(`p`,{className:`text-xl font-mono font-semibold text-center tracking-[0.3em]`,children:g})]}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-amber-950/50 border-l-2 border-amber-500 rounded-r-lg`,children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-amber-500 mb-1`,children:e(o.DEVICE$SECURITY_NOTICE)}),(0,d.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e(o.DEVICE$SECURITY_WARNING)})]}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(o.DEVICE$CONFIRM_PROMPT)}),(0,d.jsxs)(`div`,{className:`flex gap-3`,children:[(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.close(),className:`flex-1 px-4 py-2 border border-[var(--oh-border)] rounded-md hover:bg-muted text-[var(--oh-text-tertiary)]`,children:e(o.DEVICE$CANCEL)}),(0,d.jsx)(`button`,{type:`button`,onClick:()=>_(g),className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700`,children:e(o.DEVICE$AUTHORIZE)})]})]})})}):n&&!g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(o.DEVICE$AUTHORIZATION_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(o.DEVICE$ENTER_CODE_PROMPT)}),(0,d.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`user_code`);t&&n&&_(t)},children:[(0,d.jsxs)(`div`,{className:`mb-4`,children:[(0,d.jsx)(`label`,{htmlFor:`user_code`,className:`block text-sm font-medium mb-2`,children:e(o.DEVICE$CODE_INPUT_LABEL)}),(0,d.jsx)(`input`,{type:`text`,id:`user_code`,name:`user_code`,required:!0,className:`w-full px-3 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring`,placeholder:e(o.DEVICE$CODE_PLACEHOLDER)})]}),(0,d.jsx)(`button`,{type:`submit`,className:`w-full px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(o.DEVICE$CONTINUE)})]})]})}):i?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(o.DEVICE$PROCESSING)})]})}):(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg text-center`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4`,children:e(o.DEVICE$AUTH_REQUIRED)}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(o.DEVICE$SIGN_IN_PROMPT)})]})})});export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{Ft as i,It as a}from"./active-backend-context-CrHTlgvN.js";import{W as o,t as s}from"./utils-CN5ZfZy1.js";import{E as c,x as l}from"./use-tracking-D53y3TH9.js";import{r as u}from"./modal-classes-C8eycCwG.js";import{f as d,l as f}from"./form-control-classes-Bkh5FGrD.js";import{t as p}from"./brand-button-BAfk4wGP.js";import{t as m}from"./settings-dropdown-input-BcwylHs2.js";import{t as h}from"./settings-input-Db-1g8Ql.js";import{t as g}from"./use-llm-profiles-BO-P4Oyo.js";import{s as _}from"./use-automations-xijQKIl9.js";import{n as v}from"./api-error-message-B-XdSk3b.js";import{t as y}from"./x-mark-BopmFoBq.js";import{f as b,g as x,h as S,m as C,p as w}from"./kebab-menu-item-content-D8hSNGmm.js";import{t as T}from"./use-manifest-capabilities-Cw_flwEz.js";var E=e(t(),1);function D(e,t){let n=e.trim();if(!n)return{value:null};let r=Number(n);return Number.isInteger(r)?r<=0?{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_POSITIVE}:t!==void 0&&r>t?{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_MAX_EXCEEDED}:{value:r}:{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_INVALID_NUMBER}}var O=n(),k=`__active__`,A=[o.AUTOMATIONS$WEEKDAY_SUN,o.AUTOMATIONS$WEEKDAY_MON,o.AUTOMATIONS$WEEKDAY_TUE,o.AUTOMATIONS$WEEKDAY_WED,o.AUTOMATIONS$WEEKDAY_THU,o.AUTOMATIONS$WEEKDAY_FRI,o.AUTOMATIONS$WEEKDAY_SAT];function j(e){let t=e.timeout==null?``:String(e.timeout);if(e.trigger.type===`event`)return{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:``,isCustomSchedule:!0,rawSchedule:``,timeout:t};let n=S(e.trigger.schedule);return n.kind===`custom`?{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:n.hour!==void 0&&n.minute!==void 0?C(n.hour,n.minute):``,isCustomSchedule:!0,rawSchedule:n.raw,timeout:t}:{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:n.kind,weekday:n.kind===`weekly`?n.weekday??1:1,timeOfDay:C(n.hour,n.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``,timeout:t}}function M({automation:e,isOpen:t,onClose:n}){let{t:S}=r(`openhands`),C=_(),M=c().editTitle,N=l(`name`),P=l(`prompt`),F=l(`model`),I=l(`timeout`),L=l(`schedule`),{data:R}=T(),z=R?.maxAutomationTimeoutSeconds,B=z===void 0?void 0:Math.min(z,I.max??z),{data:V,isLoading:H}=g(),U=V?.profiles??[],W=[{key:k,label:S(o.COMMON$ACTIVE_PROFILE)},...U.map(e=>({key:e.name,label:e.name}))],G=(0,E.useMemo)(()=>j(e),[e]),[K,q]=(0,E.useState)(G),[J,Y]=(0,E.useState)(null),[X,Z]=(0,E.useState)(null);if((0,E.useEffect)(()=>{t&&(q(G),Y(null),Z(null))},[t,G]),!t)return null;let Q=[{key:`daily`,label:S(o.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:S(o.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:S(o.AUTOMATIONS$FREQUENCY_WEEKLY)},...K.isCustomSchedule?[{key:`custom`,label:S(o.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],$=A.map((e,t)=>({key:String(t),label:S(e)})),ee=!K.isCustomSchedule||x(K.timeOfDay)!==null||K.timeOfDay===``;return(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,O.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,O.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":S(o.AUTOMATIONS$CANCEL),children:(0,O.jsx)(y,{className:`size-5`})}),(0,O.jsx)(`h2`,{className:u,children:M}),(0,O.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let r=K.name.trim();if(!r){Y(S(o.AUTOMATIONS$NAME_REQUIRED));return}Y(null);let s=D(K.timeout,B);if(`errorKey`in s){Z(S(s.errorKey,{max:B}));return}Z(null);let c={};r!==e.name&&(c.name=r);let l=K.prompt.trim();l!==(e.prompt??``).trim()&&(c.prompt=l.length===0?null:l);let u=K.model.trim();if(u!==(e.model??``)&&(c.model=u===``?null:u),(s.value??null)!==(e.timeout??null)&&(c.timeout=s.value),!K.isCustomSchedule&&K.frequency!==`custom`){let t=x(K.timeOfDay);if(t){let n=b({kind:K.frequency,hour:t.hour,minute:t.minute,weekday:K.frequency===`weekly`?K.weekday:void 0});n!==e.trigger.schedule&&(c.trigger={...e.trigger,schedule:n})}}if(Object.keys(c).length===0){n();return}C.mutate({id:e.id,body:c},{onSuccess:()=>{a(S(o.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{i(v(e,S(o.AUTOMATIONS$EDIT_ERROR)))}})},noValidate:!0,className:`mt-4 flex flex-col gap-4`,"aria-label":M,children:[N.present&&(0,O.jsx)(h,{testId:`edit-automation-name`,name:`name`,type:`text`,label:N.label,value:K.name,onChange:e=>q(t=>({...t,name:e})),error:J??void 0,showRequiredTag:N.required}),P.present&&(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:P.label}),(0,O.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:K.prompt,onChange:e=>q(t=>({...t,prompt:e.target.value})),rows:4,className:s(f,`placeholder:italic`)}),P.help!==null&&(0,O.jsx)(`span`,{className:`text-xs text-muted`,children:P.help})]}),F.present&&(H||U.length>0)&&(0,O.jsx)(m,{testId:`edit-automation-model`,name:`model`,label:F.label,items:W,selectedKey:K.model||k,isLoading:H,placeholder:S(o.COMMON$ACTIVE_PROFILE),onSelectionChange:e=>q(t=>({...t,model:e&&e!==k?String(e):``}))}),I.present&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(h,{testId:`edit-automation-timeout`,name:`timeout`,type:`number`,label:I.label,value:K.timeout,onChange:e=>q(t=>({...t,timeout:e})),error:X??void 0,showOptionalTag:!0,min:I.min??1,max:B,step:1,placeholder:`600`}),I.help!==null&&(0,O.jsx)(`span`,{"data-testid":`edit-automation-timeout-hint`,className:`text-xs text-muted`,children:I.help})]}),e.trigger.type===`event`?(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg bg-[var(--oh-surface-raised)] p-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:S(o.AUTOMATIONS$DETAIL$TRIGGER)}),(0,O.jsx)(`span`,{className:`text-sm text-content`,children:S(o.AUTOMATIONS$DETAIL$TRIGGER_EVENT)})]}),e.trigger.source&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:S(o.AUTOMATIONS$DETAIL$EVENT_SOURCE)}),(0,O.jsx)(`span`,{className:`text-sm text-content`,children:e.trigger.source})]}),e.trigger.on&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:S(o.AUTOMATIONS$DETAIL$EVENT_TYPE)}),(0,O.jsx)(`code`,{className:`text-xs font-mono text-content`,children:w(e.trigger.on)})]}),e.trigger.filter&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:S(o.AUTOMATIONS$DETAIL$EVENT_FILTER)}),(0,O.jsx)(`code`,{className:`text-xs font-mono text-content break-all`,children:e.trigger.filter})]})]}):L.present?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(m,{testId:`edit-automation-frequency`,name:`frequency`,label:L.label,items:Q,selectedKey:K.frequency,isDisabled:K.isCustomSchedule,onSelectionChange:e=>{!e||K.isCustomSchedule||q(t=>({...t,frequency:e}))}}),K.frequency===`weekly`&&!K.isCustomSchedule&&(0,O.jsx)(m,{testId:`edit-automation-weekday`,name:`weekday`,label:S(o.AUTOMATIONS$WEEKDAY),items:$,selectedKey:String(K.weekday),onSelectionChange:e=>{e!==null&&q(t=>({...t,weekday:Number(e)}))}}),(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:S(o.AUTOMATIONS$TIME_OF_DAY)}),(0,O.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:K.timeOfDay,onChange:e=>q(t=>({...t,timeOfDay:e.target.value})),disabled:K.isCustomSchedule&&!ee,className:s(d,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,O.jsxs)(`span`,{className:`text-xs text-muted`,children:[S(o.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),K.isCustomSchedule&&(0,O.jsxs)(`p`,{className:`text-xs text-muted`,"data-testid":`custom-schedule-hint`,children:[S(o.AUTOMATIONS$CUSTOM_SCHEDULE_HINT),K.rawSchedule&&(0,O.jsxs)(O.Fragment,{children:[` `,(0,O.jsx)(`code`,{className:`text-xs text-content`,children:K.rawSchedule})]})]})]}):null,(0,O.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,O.jsx)(p,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:C.isPending,children:S(o.AUTOMATIONS$CANCEL)}),(0,O.jsx)(p,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:C.isPending,"aria-busy":C.isPending,children:C.isPending?S(o.AUTOMATIONS$SAVING):S(o.AUTOMATIONS$SAVE)})]})]})]})]})}export{M as t};
|