@openhands/agent-canvas 1.4.0 → 1.5.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 +11 -12
- package/README.windows.md +4 -2
- package/build/assets/{Trans-Ch-OVWEA.js → Trans-DqF_OEZB.js} +1 -1
- package/build/assets/{acp-providers-Sy2LKyMa.js → acp-providers-BQwoUBpe.js} +1 -1
- package/build/assets/active-backend-context-BCXRv5pm.js +1 -0
- package/build/assets/{add-backend-modal-Bgy8anoR.js → add-backend-modal-BKHzq5no.js} +1 -1
- package/build/assets/{agent-profiles-settings-3mmXljZX.js → agent-profiles-settings-CEp5CIz8.js} +1 -1
- package/build/assets/agent-server-compatibility-D6DSanlx.js +1 -0
- package/build/assets/agent-server-conversation-service.api-cylugfDz.js +41 -0
- package/build/assets/{agent-settings-B-W10B4E.js → agent-settings-C-tann3x.js} +2 -2
- package/build/assets/agent-settings-DGUKNSnU.js +1 -0
- package/build/assets/{alert-banner-Bpf2NQJq.js → alert-banner-Dd4woGbm.js} +1 -1
- package/build/assets/api-key-entry-screen-Bll_CkuQ.js +1 -0
- package/build/assets/app-settings-BpViWwpC.js +1 -0
- package/build/assets/automation-detail-Z9dN2f5l.js +2 -0
- package/build/assets/automation-export-D5uL0Tf8.js +2 -0
- package/build/assets/automations-list-BMOWcqzZ.js +1 -0
- package/build/assets/{back-nav-button-CUS2mi-U.js → back-nav-button-ZUDTMOTB.js} +1 -1
- package/build/assets/backend-form-modal-DhBT8P4g.js +1 -0
- package/build/assets/{backend-synced-settings-badge-D9hZx05w.js → backend-synced-settings-badge-Db_REKVw.js} +1 -1
- package/build/assets/{base-modal-BuF2f0YL.js → base-modal-Cb0C6m0Q.js} +1 -1
- package/build/assets/{bot-D7eUAuSB.js → bot-C-EA6685.js} +1 -1
- package/build/assets/{brand-button-vMVuyDXu.js → brand-button-2Tp3aXk1.js} +1 -1
- package/build/assets/{browser-BifzWIBd.js → browser-QYLVr1kS.js} +2 -2
- package/build/assets/browser-store-BGXOGo-R.js +1 -0
- package/build/assets/{browser-tab-CkkqJnqw.js → browser-tab-BTTP1OE2.js} +1 -1
- package/build/assets/canvas-ui-BhxjoA1f.js +1 -0
- package/build/assets/{chat-send-button-B_jc5z5C.js → chat-send-button-BZHG2hAW.js} +1 -1
- package/build/assets/check-TbOEtHKj.js +1 -0
- package/build/assets/{chevron-down-CI8A6tet.js → chevron-down-D7IvFMBM.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-C5YxjxvI.js → circle-plus-check-toggle-QQJKUnF6.js} +1 -1
- package/build/assets/client-source-Biqarhgr.js +1 -0
- package/build/assets/cloud-funnel-analytics-D-27T5Ao.js +1 -0
- package/build/assets/{combobox-caret-DoObzqf4.js → combobox-caret-A5jMVHgE.js} +1 -1
- package/build/assets/{command-menu-D-JV3Wqm.js → command-menu-BMVEme4H.js} +1 -1
- package/build/assets/{command-store-D8J5LMW1.js → command-store-jrWX_CcW.js} +1 -1
- package/build/assets/condenser-settings-CIa6eyB4.js +1 -0
- package/build/assets/{confirmation-modal-BGLu6XJN.js → confirmation-modal-4n_944zq.js} +1 -1
- package/build/assets/{context-menu-list-item-BD5_EaKN.js → context-menu-list-item-DvfFic5I.js} +1 -1
- package/build/assets/conversation-CHnEXGRM.js +1 -0
- package/build/assets/conversation-D4o4dG2t.js +89 -0
- package/build/assets/conversation-panel-11FjLCId.js +1 -0
- package/build/assets/conversation-service.api-0JG_fF9d.js +1 -0
- package/build/assets/conversation-state-store-JiUQp02U.js +1 -0
- package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-BCSpLuEf.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-B2dDYEwf.js → conversation-tab-empty-state-BUhKVwoi.js} +1 -1
- package/build/assets/{copy-3JCw_XFB.js → copy-D1YGjP-C.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-CaR52OnA.js → copy-to-clipboard-button-Dp4Q_hXi.js} +1 -1
- package/build/assets/declaration-BGsHjPEW.js +1 -0
- package/build/assets/{device-verify-Dj6I4Iqe.js → device-verify-CM086oKs.js} +1 -1
- package/build/assets/{dropdown-classes-DJSXeLqc.js → dropdown-classes-DZq0BQjb.js} +1 -1
- package/build/assets/{ellipsis-button-C5Z-tPFp.js → ellipsis-button-TPJdyxnK.js} +1 -1
- package/build/assets/{entry.client-2_3ePAm0.js → entry.client-DypYHsYm.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DXbVwiNZ.js → enum-filter-dropdown-CW_mBg0e.js} +1 -1
- package/build/assets/{environment-switch-overlay-DZQfRGTx.js → environment-switch-overlay-6laJch-9.js} +1 -1
- package/build/assets/{extensions-hub-CLjmOGqS.js → extensions-hub-BJFbFfKS.js} +1 -1
- package/build/assets/{extensions-navigation-B5MeUiMq.js → extensions-navigation-DqSl7CJw.js} +1 -1
- package/build/assets/{external-link-D2zJjE9G.js → external-link-lhdITPqq.js} +1 -1
- package/build/assets/files-tab-c316dKAq.js +1 -0
- package/build/assets/{files-tab-store-DJsPxYdg.js → files-tab-store-tfCav6bB.js} +1 -1
- package/build/assets/{form-control-classes-ChpNBe9n.js → form-control-classes-CvUaw8_L.js} +1 -1
- package/build/assets/format-time-delta-DhDbkD7V.js +1 -0
- package/build/assets/git-provider-icon-DUb2pEos.js +1 -0
- package/build/assets/home-BQ-DC06B.js +1 -0
- package/build/assets/home-D7ds4Jyw.js +1 -0
- package/build/assets/index-home-BRFDWs_4.js +1 -0
- package/build/assets/install-server-modal-CvHvzZj3.js +1 -0
- package/build/assets/{launch-V_3Rp7WS.js → launch-A47TK2Me.js} +1 -1
- package/build/assets/lesson-plan-DSf95kQ2.js +4 -0
- package/build/assets/{list-todo-BfH6yYUK.js → list-todo-CAtvkzcy.js} +1 -1
- package/build/assets/llm-not-configured-banner-B7DR8SPs.js +27 -0
- package/build/assets/llm-settings-Ch4ZbW3c.js +1 -0
- package/build/assets/llm-settings-Cvi7q4ox.js +1 -0
- package/build/assets/llm-subscription-service-Cz1yBBvE.js +1 -0
- package/build/assets/loader-circle-CsAsfLIs.js +1 -0
- package/build/assets/{loading-spinner-BLdswi6q.js → loading-spinner-Txxx1I1p.js} +1 -1
- package/build/assets/manage-backends-modal-DAVhNUCe.js +1 -0
- package/build/assets/manifest-958c741a.js +1 -0
- package/build/assets/{markdown-renderer-DMT7Zkpd.js → markdown-renderer-B6cJJ_MN.js} +1 -1
- package/build/assets/{mcp-BQufNPZ6.js → mcp-BwssgMpg.js} +2 -2
- package/build/assets/{messages-BnJCqnFf.js → messages-D8MeG2ZQ.js} +26 -26
- package/build/assets/{modal-body-DouOE5KH.js → modal-body-CDZdZ-eT.js} +1 -1
- package/build/assets/{modal-classes-Cf-4tbHz.js → modal-classes-B4oit_4c.js} +1 -1
- package/build/assets/{modal-close-button-B6CfxxJj.js → modal-close-button-DQElFMPo.js} +1 -1
- package/build/assets/model-selector-BxTbbKub.js +1 -0
- package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-imH6S7h2.js} +1 -1
- package/build/assets/onboarding-CyicadGt.js +1 -0
- package/build/assets/onboarding-modal-DQwihcTz.js +1 -0
- package/build/assets/option-service.api-DAkg_F7p.js +1 -0
- package/build/assets/organization-service.api-QknzKDh3.js +1 -0
- package/build/assets/package-Dk_VtWJ4.js +1 -0
- package/build/assets/path-utils-BECGet7G.js +1 -0
- package/build/assets/{pencil-Dj2XjKmI.js → pencil-CWhApFIT.js} +1 -1
- package/build/assets/{plan-components-CcCBmCzW.js → plan-components-CgPHWz3E.js} +1 -1
- package/build/assets/{planner-tab-Dhyqcqmb.js → planner-tab-DPKHmMAX.js} +1 -1
- package/build/assets/plugins-management-service-DuTTxquo.js +1 -0
- package/build/assets/profiles-service.api-D6jvZOWu.js +1 -0
- package/build/assets/providers-B8pxQK8x.js +1 -0
- package/build/assets/proxy-CuhhyjdX.js +1 -0
- package/build/assets/{recommended-automations-launcher-CTcGTl4d.js → recommended-automations-launcher-DA6DWS7V.js} +1 -1
- package/build/assets/{refresh-cw-DM82EIyx.js → refresh-cw-B9B7-vsy.js} +1 -1
- package/build/assets/root-BhP6bTBB.js +2 -0
- package/build/assets/root-CYWeTrWE.css +1 -0
- package/build/assets/root-layout-oBaHHW4s.js +2 -0
- package/build/assets/{runtime-waiting-state-BsXLElvN.js → runtime-waiting-state-DeD9G7yJ.js} +1 -1
- package/build/assets/schema-field-BOLdL_U7.js +1 -0
- package/build/assets/sdk-section-page-ZIltERxf.js +1 -0
- package/build/assets/{sdk-settings-schema-Cv7M9eSe.js → sdk-settings-schema-Ba_Pa9uf.js} +1 -1
- package/build/assets/search-dIQ09UY2.js +1 -0
- package/build/assets/secrets-service-50DElFny.js +1 -0
- package/build/assets/{secrets-settings-Cx6yJlyb.js → secrets-settings-Digl7JLe.js} +1 -1
- package/build/assets/{segmented-toggle-DyQqPhoD.js → segmented-toggle-C1-ZVyr5.js} +1 -1
- package/build/assets/settings-BfgLHsgd.js +1 -0
- package/build/assets/{settings-dropdown-input-BjunGXJb.js → settings-dropdown-input-BD5C9fBn.js} +1 -1
- package/build/assets/{settings-index-D6sxWSRk.js → settings-index-CODBijya.js} +1 -1
- package/build/assets/{settings-input-bD6npsDm.js → settings-input-CzNOq-Pj.js} +1 -1
- package/build/assets/{settings-list-classes-Dp_OgzN0.js → settings-list-classes-CuxH9ZoR.js} +1 -1
- package/build/assets/settings-modal-BcSWpKI0.js +1 -0
- package/build/assets/settings-service.api-Bsu1PvYO.js +1 -0
- package/build/assets/{settings-switch-5cuxl8Dc.js → settings-switch-DqmHAfWJ.js} +1 -1
- package/build/assets/{settings-utils-BMdG65By.js → settings-utils-B1lBErvV.js} +1 -1
- package/build/assets/shared-conversation-CDskdmrb.js +1 -0
- package/build/assets/{sidebar-layout-DuzJMMw-.js → sidebar-layout-Cn6eQaEI.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-VvvX32iF.js → sidebar-mobile-menu-toggle-DmCmZgq1.js} +1 -1
- package/build/assets/{sidebar-nav-link-5AlTT5-j.js → sidebar-nav-link-DMc8AIe7.js} +1 -1
- package/build/assets/{sidebar-store-CZuE8AH5.js → sidebar-store-DXWSCFpa.js} +1 -1
- package/build/assets/{skill-card-pill-row-eTIkE4nz.js → skill-card-pill-row-DOIWjiMF.js} +1 -1
- package/build/assets/skills-plugins-DLgINYuY.js +1 -0
- package/build/assets/{skills-settings-BUv04tSc.js → skills-settings-DPiCWalR.js} +2 -2
- package/build/assets/{square-chevron-right-Czw3FFWc.js → square-chevron-right-DE-JN-2Z.js} +1 -1
- package/build/assets/{styled-tooltip-CgX2oRaK.js → styled-tooltip-CvsjHuIf.js} +1 -1
- package/build/assets/{suspense-BO1Tl_Vf.js → suspense-DmZ3MSSh.js} +1 -1
- package/build/assets/{task-list-tab-0k9PhuqO.js → task-list-tab-CuhcDycu.js} +1 -1
- package/build/assets/telemetry-DHiTRl5_.js +2 -0
- package/build/assets/{terminal-B61WrJdS.js → terminal-CVqF-tCD.js} +1 -1
- package/build/assets/{toggle-switch-2j5wwR85.js → toggle-switch-CS0ClOy2.js} +1 -1
- package/build/assets/{trash-2-Be_7y3Mn.js → trash-2-BU6BlW4i.js} +1 -1
- package/build/assets/{typography-D8mHDeNG.js → typography-CQn9wyEX.js} +1 -1
- package/build/assets/use-acp-credential-form-LlfZO_DD.js +1 -0
- package/build/assets/{use-activate-agent-profile-20v1xU0H.js → use-activate-agent-profile-DpQjsXM0.js} +1 -1
- package/build/assets/{use-active-agent-profile-BkJN7Xsy.js → use-active-agent-profile-Gw_uJujV.js} +1 -1
- package/build/assets/{use-active-conversation-DOZVSVtU.js → use-active-conversation-B0sttISF.js} +1 -1
- package/build/assets/use-agent-profiles-LHZEK0Gg.js +1 -0
- package/build/assets/{use-agent-state-DHZO1obC.js → use-agent-state-C5uA0bRj.js} +1 -1
- package/build/assets/use-backends-health-DKt1SmiU.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-C-OhWVBS.js → use-can-manage-org-profiles-BAtqsbCi.js} +1 -1
- package/build/assets/use-cloud-current-user-id-C8m1oBy4.js +1 -0
- package/build/assets/use-config-CXy4vD0H.js +1 -0
- package/build/assets/use-create-conversation-CWQGNQ9J.js +1 -0
- package/build/assets/{use-create-secret-D0HCOZFu.js → use-create-secret-BIrsX3OB.js} +1 -1
- package/build/assets/{use-event-store-DjgU4wfO.js → use-event-store-CsD17BKu.js} +1 -1
- package/build/assets/{use-handle-plan-click-DyRASKMC.js → use-handle-plan-click-DEuO7Byo.js} +1 -1
- package/build/assets/use-is-authed-Dvbpiu3B.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BnoDgvAy.js → use-launch-skill-in-chat-CdHOoQGM.js} +1 -1
- package/build/assets/use-llm-profiles-DQpQxVOD.js +1 -0
- package/build/assets/use-plugins-marketplace-Bkk07W_M.js +1 -0
- package/build/assets/use-runtime-is-ready-D4pkGT6E.js +1 -0
- package/build/assets/use-save-agent-profile-BxEsjnW0.js +1 -0
- package/build/assets/{use-save-settings-BGlSfuYn.js → use-save-settings-ioSUMqbE.js} +1 -1
- package/build/assets/use-settings-DNJC4gqu.js +1 -0
- package/build/assets/use-settings-nav-items-BUsrDbVR.js +16 -0
- package/build/assets/use-skills-BsmKm23M.js +1 -0
- package/build/assets/{use-task-list-AVBLbbcR.js → use-task-list-rs7Xbzl8.js} +1 -1
- package/build/assets/{use-tracking-BIXzagSI.js → use-tracking-poxQHMwR.js} +1 -1
- package/build/assets/{use-user-conversation-zpx7I18x.js → use-user-conversation-B337kUKB.js} +1 -1
- package/build/assets/{useMutation-DrCAVg5w.js → useMutation-u8UgRgDK.js} +1 -1
- package/build/assets/{useMutationState-D8QN0ZCy.js → useMutationState-OnAsCLA_.js} +1 -1
- package/build/assets/{useQueries-DClgUTc7.js → useQueries-BpIlT8Mt.js} +1 -1
- package/build/assets/{useQuery-CRBP8vIS.js → useQuery-D5pEZbY0.js} +1 -1
- package/build/assets/{useTranslation-CDRCKC9-.js → useTranslation-Cbf5AGg_.js} +1 -1
- package/build/assets/{utils-D3U3rlqr.js → utils-DB9LsAzA.js} +1 -1
- package/build/assets/{vendor~browser-Cvg7jXCP.js → vendor~browser-5Njjw1Cl.js} +1 -1
- package/build/assets/{vendor~browser-tab-Di0kh5Zw.js → vendor~browser-tab-Xn94EtUo.js} +1 -1
- package/build/assets/{vendor~entry.client-9tWQ_Ugw.js → vendor~entry.client-DDuH4--y.js} +1 -1
- package/build/assets/{vendor~entry.client-D6BtSOtn.js → vendor~entry.client-DQGrNspu.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js +185 -0
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jewnulst-C57fm7C-.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js} +1 -1
- package/build/assets/{vendor~files-tab-B02k3xvx.js → vendor~files-tab-CiC3-lGh.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation-CYMF9JYB.js → vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B8XNNEQZ.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CnJRLn5s.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DWteoTyr.js +2 -0
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dc5nKwLO.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-tlf6AnDe.js} +1 -1
- package/build/assets/{vendor~launch-CHXA9cJu.js → vendor~launch-28DK5Rsl.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js → vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js → vendor~root-layout~index-home~home~conversation-panel~conversation-Zhq6xAxR.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-B0EIDu4M.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js} +2 -2
- package/build/assets/{verification-settings-D576N2xa.js → verification-settings-HRgEM-_3.js} +1 -1
- package/build/assets/x-ZE4iplpF.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +9 -0
- package/build/locales/ca/openhands.json +9 -0
- package/build/locales/de/openhands.json +9 -0
- package/build/locales/en/openhands.json +9 -0
- package/build/locales/es/openhands.json +9 -0
- package/build/locales/fr/openhands.json +9 -0
- package/build/locales/it/openhands.json +9 -0
- package/build/locales/ja/openhands.json +9 -0
- package/build/locales/ko-KR/openhands.json +9 -0
- package/build/locales/no/openhands.json +9 -0
- package/build/locales/pt/openhands.json +9 -0
- package/build/locales/tr/openhands.json +9 -0
- package/build/locales/uk/openhands.json +9 -0
- package/build/locales/zh-CN/openhands.json +9 -0
- package/build/locales/zh-TW/openhands.json +9 -0
- package/config/defaults.json +5 -4
- 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 +9 -1
- package/dist/api/agent-server-adapter.js +105 -102
- 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 +3 -0
- package/dist/api/agent-server-config.js +45 -23
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/backend-registry/auth.cjs +1 -1
- package/dist/api/backend-registry/auth.cjs.map +1 -1
- package/dist/api/backend-registry/auth.js +1 -1
- package/dist/api/backend-registry/auth.js.map +1 -1
- package/dist/api/backend-registry/default-backend.cjs +1 -1
- package/dist/api/backend-registry/default-backend.cjs.map +1 -1
- package/dist/api/backend-registry/default-backend.d.ts +3 -0
- package/dist/api/backend-registry/default-backend.js +22 -10
- package/dist/api/backend-registry/default-backend.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +38 -33
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/backend-registry/types.d.ts +2 -0
- package/dist/api/canvas-ui-client-tool.cjs +38 -0
- package/dist/api/canvas-ui-client-tool.cjs.map +1 -0
- package/dist/api/canvas-ui-client-tool.d.ts +14 -0
- package/dist/api/canvas-ui-client-tool.js +47 -0
- package/dist/api/canvas-ui-client-tool.js.map +1 -0
- package/dist/api/client-source.cjs +2 -0
- package/dist/api/client-source.cjs.map +1 -0
- package/dist/api/client-source.d.ts +9 -0
- package/dist/api/client-source.js +10 -0
- package/dist/api/client-source.js.map +1 -0
- package/dist/api/cloud/client.cjs +2 -0
- package/dist/api/cloud/client.cjs.map +1 -0
- package/dist/api/cloud/client.d.ts +4 -0
- package/dist/api/cloud/client.js +38 -0
- package/dist/api/cloud/client.js.map +1 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.js +33 -31
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/cloud/organization-service.api.cjs +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.js +11 -10
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/proxy.cjs +1 -1
- package/dist/api/cloud/proxy.cjs.map +1 -1
- package/dist/api/cloud/proxy.d.ts +2 -40
- package/dist/api/cloud/proxy.js +14 -39
- package/dist/api/cloud/proxy.js.map +1 -1
- 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 +2 -9
- package/dist/api/conversation-metadata-store.js +13 -9
- 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 +2 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +98 -88
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +5 -0
- package/dist/api/device-flow-client.cjs +1 -1
- package/dist/api/device-flow-client.cjs.map +1 -1
- package/dist/api/device-flow-client.d.ts +4 -58
- package/dist/api/device-flow-client.js +8 -98
- package/dist/api/device-flow-client.js.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.d.ts +10 -2
- package/dist/api/git-service/agent-server-git-service.api.js +107 -40
- package/dist/api/git-service/agent-server-git-service.api.js.map +1 -1
- package/dist/api/open-hands.types.d.ts +11 -0
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.js +15 -14
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +73 -64
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs +2 -2
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js +2 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js.map +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +4 -2
- package/dist/components/features/backends/backend-form-modal.js +202 -188
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-row.cjs +1 -1
- package/dist/components/features/backends/backend-row.cjs.map +1 -1
- package/dist/components/features/backends/backend-row.js +2 -1
- package/dist/components/features/backends/backend-row.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +51 -51
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +4 -1
- package/dist/components/features/backends/device-flow-auth.js +38 -38
- package/dist/components/features/backends/device-flow-auth.js.map +1 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +173 -165
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-actions.js +44 -43
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-container.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-container.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.js +20 -19
- package/dist/components/features/chat/components/chat-input-container.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-profile-picker.js +44 -32
- package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -1
- package/dist/components/features/chat/components/resolve-picker-kind.cjs +1 -1
- package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -1
- package/dist/components/features/chat/components/resolve-picker-kind.d.ts +10 -22
- package/dist/components/features/chat/components/resolve-picker-kind.js +6 -3
- package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +2 -1
- package/dist/components/features/chat/custom-chat-input.js +52 -51
- package/dist/components/features/chat/custom-chat-input.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.d.ts +2 -1
- package/dist/components/features/chat/interactive-chat-box.js +9 -8
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- package/dist/components/features/diff-viewer/commit-list.cjs +2 -0
- package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -0
- package/dist/components/features/diff-viewer/commit-list.d.ts +13 -0
- package/dist/components/features/diff-viewer/commit-list.js +27 -0
- package/dist/components/features/diff-viewer/commit-list.js.map +1 -0
- package/dist/components/features/diff-viewer/commit-row.cjs +2 -0
- package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -0
- package/dist/components/features/diff-viewer/commit-row.d.ts +14 -0
- package/dist/components/features/diff-viewer/commit-row.js +59 -0
- package/dist/components/features/diff-viewer/commit-row.js.map +1 -0
- package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +7 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.js +40 -39
- package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
- package/dist/components/shared/modals/settings/settings-modal.js +23 -22
- package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +5 -4
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +1 -1
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/canvas-ui.cjs +2 -0
- package/dist/constants/canvas-ui.cjs.map +1 -0
- package/dist/constants/canvas-ui.d.ts +8 -0
- package/dist/constants/canvas-ui.js +6 -0
- package/dist/constants/canvas-ui.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.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.d.ts +2 -1
- package/dist/hooks/mutation/use-create-conversation.js +52 -52
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +2 -0
- package/dist/hooks/query/query-keys.js +4 -1
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.js +50 -48
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.d.ts +1 -0
- package/dist/hooks/query/use-cloud-organizations.js +5 -2
- package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +2 -0
- package/dist/hooks/query/use-commit-changes.cjs.map +1 -0
- package/dist/hooks/query/use-commit-changes.d.ts +5 -0
- package/dist/hooks/query/use-commit-changes.js +34 -0
- package/dist/hooks/query/use-commit-changes.js.map +1 -0
- package/dist/hooks/query/use-task-polling.cjs +1 -1
- package/dist/hooks/query/use-task-polling.cjs.map +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +3 -2
- package/dist/hooks/query/use-task-polling.js +53 -40
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/query/use-unified-git-commits.cjs +2 -0
- package/dist/hooks/query/use-unified-git-commits.cjs.map +1 -0
- package/dist/hooks/query/use-unified-git-commits.d.ts +10 -0
- package/dist/hooks/query/use-unified-git-commits.js +41 -0
- package/dist/hooks/query/use-unified-git-commits.js.map +1 -0
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.cjs.map +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +5 -0
- package/dist/hooks/query/use-unified-git-diff.js +11 -4
- package/dist/hooks/query/use-unified-git-diff.js.map +1 -1
- package/dist/hooks/use-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.cjs.map +1 -1
- package/dist/hooks/use-acp-model-context.d.ts +4 -1
- package/dist/hooks/use-acp-model-context.js +9 -8
- package/dist/hooks/use-acp-model-context.js.map +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.cjs +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.cjs.map +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.js +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.js.map +1 -1
- package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
- package/dist/hooks/use-chat-input-model-state.d.ts +2 -1
- package/dist/hooks/use-chat-input-model-state.js.map +1 -1
- package/dist/hooks/use-chat-input-profile-state.cjs +1 -1
- package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -1
- package/dist/hooks/use-chat-input-profile-state.d.ts +1 -10
- package/dist/hooks/use-chat-input-profile-state.js +42 -15
- package/dist/hooks/use-chat-input-profile-state.js.map +1 -1
- package/dist/hooks/use-device-flow.cjs +1 -1
- package/dist/hooks/use-device-flow.cjs.map +1 -1
- package/dist/hooks/use-device-flow.d.ts +4 -1
- package/dist/hooks/use-device-flow.js +42 -40
- package/dist/hooks/use-device-flow.js.map +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +2 -1
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +9 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.js +19 -18
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +153 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +32 -32
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/locales/ar/openhands.json +9 -0
- package/dist/locales/ca/openhands.json +9 -0
- package/dist/locales/de/openhands.json +9 -0
- package/dist/locales/en/openhands.json +9 -0
- package/dist/locales/es/openhands.json +9 -0
- package/dist/locales/fr/openhands.json +9 -0
- package/dist/locales/it/openhands.json +9 -0
- package/dist/locales/ja/openhands.json +9 -0
- package/dist/locales/ko-KR/openhands.json +9 -0
- package/dist/locales/no/openhands.json +9 -0
- package/dist/locales/pt/openhands.json +9 -0
- package/dist/locales/tr/openhands.json +9 -0
- package/dist/locales/uk/openhands.json +9 -0
- package/dist/locales/zh-CN/openhands.json +9 -0
- package/dist/locales/zh-TW/openhands.json +9 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js +351 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js +106 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +69 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +18 -2
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
- package/dist/node_modules/axios/index.cjs +1 -1
- package/dist/node_modules/axios/index.js +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +67 -66
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/commits-tab.cjs +2 -0
- package/dist/routes/commits-tab.cjs.map +1 -0
- package/dist/routes/commits-tab.d.ts +8 -0
- package/dist/routes/commits-tab.js +45 -0
- package/dist/routes/commits-tab.js.map +1 -0
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.cjs.map +1 -1
- package/dist/routes/files-tab.js +148 -127
- package/dist/routes/files-tab.js.map +1 -1
- package/dist/services/cloud-funnel-analytics.cjs +2 -0
- package/dist/services/cloud-funnel-analytics.cjs.map +1 -0
- package/dist/services/cloud-funnel-analytics.d.ts +12 -0
- package/dist/services/cloud-funnel-analytics.js +53 -0
- package/dist/services/cloud-funnel-analytics.js.map +1 -0
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.js +49 -47
- package/dist/services/telemetry.js.map +1 -1
- package/dist/types/agent-server/core/base/action.d.ts +5 -4
- package/dist/types/agent-server/core/base/base.d.ts +3 -2
- package/dist/types/agent-server/core/base/observation.d.ts +1 -1
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +3 -5
- package/dist/types/agent-server/type-guards.js +2 -1
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/automation.d.ts +5 -0
- package/dist/utils/api-error-message.d.ts +11 -0
- package/dist/utils/automation-timeout.d.ts +19 -0
- package/dist/utils/base-path.cjs +2 -0
- package/dist/utils/base-path.cjs.map +1 -0
- package/dist/utils/base-path.d.ts +2 -0
- package/dist/utils/base-path.js +23 -0
- package/dist/utils/base-path.js.map +1 -0
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +7 -8
- package/scripts/dev-static.mjs +3 -0
- package/scripts/dev-with-automation.mjs +3 -0
- package/scripts/docker-build.mjs +4 -0
- package/scripts/static-server.mjs +93 -7
- package/tools/canvas_ui_tool.py +14 -8
- package/build/assets/active-backend-context-hxq31W25.js +0 -1
- package/build/assets/agent-server-client-options-DVLRd9sw.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CuSdr4Qb.js +0 -5
- package/build/assets/agent-settings-D_yOy8XB.js +0 -1
- package/build/assets/api-key-entry-screen-Dl0qVYi4.js +0 -1
- package/build/assets/app-settings-yVizGXox.js +0 -1
- package/build/assets/automation-detail-dvJfLs5u.js +0 -2
- package/build/assets/automation-export-BPcgLqPD.js +0 -2
- package/build/assets/automations-list-CUXogTe0.js +0 -1
- package/build/assets/backend-form-modal-CQJGmItq.js +0 -1
- package/build/assets/browser-store-BI6uklCG.js +0 -1
- package/build/assets/check-Bvi71siz.js +0 -1
- package/build/assets/condenser-settings-Ca8fYZ_Z.js +0 -1
- package/build/assets/conversation-9NBSRoR9.js +0 -1
- package/build/assets/conversation-BXg6Oti2.js +0 -89
- package/build/assets/conversation-panel-CZri9Rup.js +0 -1
- package/build/assets/conversation-service.api-DPBQvTKD.js +0 -1
- package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
- package/build/assets/declaration-gq8V5eTU.js +0 -1
- package/build/assets/files-tab-UVoray88.js +0 -1
- package/build/assets/git-provider-icon-o6hdnJUB.js +0 -1
- package/build/assets/home-D1IHvGTN.js +0 -1
- package/build/assets/index-redirect-CUUJiNki.js +0 -1
- package/build/assets/install-server-modal-BbuQaA2w.js +0 -1
- package/build/assets/lesson-plan-jC0HBoe6.js +0 -4
- package/build/assets/llm-not-configured-banner-DoARbcdL.js +0 -27
- package/build/assets/llm-settings-4JMLV8mq.js +0 -1
- package/build/assets/llm-settings-D91gMw3U.js +0 -1
- package/build/assets/llm-subscription-service-CKyaV24y.js +0 -1
- package/build/assets/loader-circle-BEykUKYG.js +0 -1
- package/build/assets/manage-backends-modal-DkWAMSle.js +0 -1
- package/build/assets/manifest-aa5c29f6.js +0 -1
- package/build/assets/model-selector-BfqpMkSJ.js +0 -1
- package/build/assets/mouse-pointer-click-PdEQPL6v.js +0 -1
- package/build/assets/onboarding-Bu-HN1ze.js +0 -1
- package/build/assets/onboarding-modal-CZgjs5Bx.js +0 -1
- package/build/assets/option-service.api-BrZ5q87N.js +0 -1
- package/build/assets/organization-service.api-Bk4pCGU1.js +0 -1
- package/build/assets/path-utils-CSmuZoix.js +0 -1
- package/build/assets/plugins-management-service-BRBLxvUl.js +0 -1
- package/build/assets/profiles-service.api-BMXQ9pZC.js +0 -1
- package/build/assets/providers-BpO967xS.js +0 -1
- package/build/assets/proxy-BgJLtxu7.js +0 -1
- package/build/assets/root-BM5WgQ4_.js +0 -2
- package/build/assets/root-V8fkplMy.css +0 -1
- package/build/assets/root-layout-BdoyoobY.js +0 -2
- package/build/assets/schema-field-BSHrUMme.js +0 -1
- package/build/assets/sdk-section-page-t82gsOqa.js +0 -1
- package/build/assets/search-4DHskuhE.js +0 -1
- package/build/assets/secrets-service-B2GqPV0N.js +0 -1
- package/build/assets/settings-DmPLkgq0.js +0 -1
- package/build/assets/settings-modal-CwrZKrTq.js +0 -1
- package/build/assets/settings-service.api-Ce-ub11I.js +0 -1
- package/build/assets/shared-conversation-BDREQPnE.js +0 -1
- package/build/assets/skills-plugins-2Y44YHbO.js +0 -1
- package/build/assets/use-acp-credential-form-MzZM6D7D.js +0 -1
- package/build/assets/use-agent-profiles-DwZxnwO5.js +0 -1
- package/build/assets/use-backends-health-CRHzuvxO.js +0 -1
- package/build/assets/use-cloud-current-user-id-utFreJ0i.js +0 -1
- package/build/assets/use-config-mJrtZHP1.js +0 -1
- package/build/assets/use-create-conversation-DdqsP78F.js +0 -1
- package/build/assets/use-is-authed-B6M0mcGL.js +0 -1
- package/build/assets/use-llm-profiles-RC-PkpBl.js +0 -1
- package/build/assets/use-plugins-marketplace-FHlbeQ4c.js +0 -1
- package/build/assets/use-runtime-is-ready-RKj2WmEh.js +0 -1
- package/build/assets/use-save-agent-profile-tvDP15mh.js +0 -1
- package/build/assets/use-settings-CH5LzXD8.js +0 -1
- package/build/assets/use-settings-nav-items-Dwktv8wo.js +0 -16
- package/build/assets/use-skills-CSzSL6HG.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lf310vj7-CSVPGId3.js +0 -10
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nfpll1wp-BCpa95De.js +0 -177
- package/build/assets/vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js +0 -2
- package/build/assets/x-Cb0WAtak.js +0 -1
- /package/build/assets/{__vite-browser-external-4xJsU2-u.js → __vite-browser-external-DU-Cb_sT.js} +0 -0
- /package/build/assets/{automation-BU8zu-FP.js → automation-BVEmGghX.js} +0 -0
- /package/build/assets/{checkmark-h7udgXMM.js → checkmark-DhcMGwtO.js} +0 -0
- /package/build/assets/{close-p3Op5lxI.js → close-DO5Rq_CS.js} +0 -0
- /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-BvjtzUsr.js} +0 -0
- /package/build/assets/{color-themes-DPBzNtVg.js → color-themes-bVMmJJG6.js} +0 -0
- /package/build/assets/{common-Dh7OqABE.js → common-CxbUL3nR.js} +0 -0
- /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-B31voBg7.js} +0 -0
- /package/build/assets/{copy-BLmGeJcd.js → copy-DLUw2us-.js} +0 -0
- /package/build/assets/{createLucideIcon-CVAsW2Yo.js → createLucideIcon-D4Tak8A1.js} +0 -0
- /package/build/assets/{dist-CodhvuAP.js → dist-Dj01FXbZ.js} +0 -0
- /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-D9hB9PvY.js} +0 -0
- /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BlO4w702.js} +0 -0
- /package/build/assets/{folder-mMWFvaw0.js → folder-ynxP2EIL.js} +0 -0
- /package/build/assets/{get-language-from-path-CPNnuVhI.js → get-language-from-path-rWEQrOGU.js} +0 -0
- /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-C3rfzUex.js} +0 -0
- /package/build/assets/{handle-capture-consent-CPMXU29K.js → handle-capture-consent-DDnXMC9Y.js} +0 -0
- /package/build/assets/{iconBase-DaTRRUjy.js → iconBase-CuvxAQZ5.js} +0 -0
- /package/build/assets/{link-external-DfKQroKX.js → link-external-BVDiJfZt.js} +0 -0
- /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-BkdHwtQe.js} +0 -0
- /package/build/assets/{map-provider-BM2SJarp.js → map-provider-XSFHmdDs.js} +0 -0
- /package/build/assets/{middleware-DYHYNAnP.js → middleware-CWYDMVuG.js} +0 -0
- /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-Dsmzgr5s.js} +0 -0
- /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-SjzfpygH.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-BgYIAs2y.js → objectWithoutPropertiesLoose-CQwg6tC0.js} +0 -0
- /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-C-gDp1wr.js} +0 -0
- /package/build/assets/{react-DPDgL6du.js → react-ao3tWj6K.js} +0 -0
- /package/build/assets/{search-BsjCEFNf.js → search-pb4UKTfK.js} +0 -0
- /package/build/assets/{settings-mQUckT0g.js → settings-DksoDv5z.js} +0 -0
- /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-D_HVvE5L.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-DENKlZpD.js → settings-like-page-layout-classes-DLrsPCaI.js} +0 -0
- /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-C2MUIG88.js} +0 -0
- /package/build/assets/{skills-9cDZONKh.js → skills-CH4xgIh-.js} +0 -0
- /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BpSOvZ-n.js} +0 -0
- /package/build/assets/{terminal-BuLtIrb9.js → terminal-Dokfkxn0.js} +0 -0
- /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-DPWVO-9N.js} +0 -0
- /package/build/assets/{u-check-circle-half-LiwZkuFe.js → u-check-circle-half-BGNAAjOW.js} +0 -0
- /package/build/assets/{u-edit-DJ90xc8Z.js → u-edit-BIskOoEG.js} +0 -0
- /package/build/assets/{use-breakpoint-B-O0lQ84.js → use-breakpoint-OjLm94cF.js} +0 -0
- /package/build/assets/{use-click-outside-element-Bf4Omzot.js → use-click-outside-element-Jpt2WWd7.js} +0 -0
- /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-DkRpDTsD.js} +0 -0
- /package/build/assets/{v4-DbCkTSoU.js → v4-DPgam_jW.js} +0 -0
- /package/build/assets/{vendor~browser-Dqd33JyP.js → vendor~browser-BvEKaLBz.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js → vendor~conversation-panel~conversation~alert-banner-CznX01nZ.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ivvrgjsa-BlIZPCXX.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BuL5kjfS.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DUYl8gbZ.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-pIgQDxTc.js} +0 -0
- /package/build/assets/{vendor~terminal-aeP3PnKf.js → vendor~terminal-jAaNQWS9.js} +0 -0
- /package/build/assets/{x-mark-Batp6gXa.js → x-mark-C5przfXl.js} +0 -0
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,M as n,N as r,P as i,bt as a}from"./vendor-styling-CI0PQ3ab.js";import{n as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js";import{d as s,l as c,m as l,r as u,s as d}from"./path-utils-CSmuZoix.js";import{t as f}from"./useMutation-DrCAVg5w.js";import{t as p}from"./Trans-Ch-OVWEA.js";import{t as m}from"./useTranslation-CDRCKC9-.js";import{t as h}from"./declaration-gq8V5eTU.js";import{A as g,U as _,n as v}from"./active-backend-context-hxq31W25.js";import{t as y}from"./createLucideIcon-CVAsW2Yo.js";import{t as b}from"./chevron-down-CI8A6tet.js";import{t as x}from"./loader-circle-BEykUKYG.js";import{C as S,M as C,t as w}from"./utils-D3U3rlqr.js";import{n as T}from"./common-Dh7OqABE.js";import{n as E,o as D}from"./form-control-classes-ChpNBe9n.js";import{t as ee}from"./use-config-mJrtZHP1.js";import{n as te}from"./navigation-context-DPs2G0X8.js";import{t as ne}from"./styled-tooltip-CgX2oRaK.js";import{t as re}from"./react-DPDgL6du.js";import{s as ie}from"./conversation-local-storage-F6zVMM--.js";import{t as O}from"./conversation-store-LptbOvKa.js";import{r as ae}from"./use-settings-CH5LzXD8.js";import{t as oe}from"./agent-server-conversation-service.api-CuSdr4Qb.js";import{t as se}from"./conversation-service.api-DPBQvTKD.js";import{n as ce}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js";import{t as le}from"./skills-9cDZONKh.js";import{t as ue}from"./close-p3Op5lxI.js";import{t as de}from"./copy-to-clipboard-button-CaR52OnA.js";import{r as k}from"./typography-D8mHDeNG.js";import{t as fe}from"./u-check-circle-BqoIxNz_.js";import{n as pe,r as A,t as me}from"./use-active-conversation-DOZVSVtU.js";import{n as he}from"./files-tab-store-DJsPxYdg.js";import{t as ge}from"./use-agent-state-DHZO1obC.js";import{d as _e,f as ve,m as ye,p as be,r as xe,t as Se}from"./lesson-plan-jC0HBoe6.js";import{C as j,E as Ce,a as we,b as Te,c as M,h as Ee,i as De,k as Oe,l as ke,o as Ae,s as je,t as Me,w as Ne,x as Pe}from"./use-event-store-DjgU4wfO.js";import{ot as Fe,st as Ie}from"./vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js";import{n as Le,t as N}from"./markdown-renderer-DMT7Zkpd.js";import{n as Re,r as ze,t as Be}from"./plan-components-CcCBmCzW.js";import{n as Ve,t as He}from"./get-language-from-path-CPNnuVhI.js";import{n as Ue,t as We}from"./u-check-circle-half-LiwZkuFe.js";var Ge=y(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),P=e(t(),1);function Ke(){!r.current&&n();let[e]=(0,P.useState)(i.current);return e}var F=a(),qe=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(qe||{});function Je(){let{conversationId:e}=A(),t=xe();return{send:(0,P.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Ye(e,t,n,r){return{action:qe.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var I=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),L=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function Xe({status:e}){return(0,F.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,F.jsx)(ce,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function R({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let{t:s}=m(`openhands`),[c,l]=P.useState(r),u=t?(0,F.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`cursor-pointer text-left`,"aria-label":s(c?h.BUTTON$COLLAPSE:h.BUTTON$EXPAND),children:c?(0,F.jsx)(L,{className:w(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,F.jsx)(I,{className:w(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&u,o,(0,F.jsx)(`span`,{children:e}),i===`after`&&u]}),(0,F.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,F.jsx)(Xe,{status:n})]})]}),c&&(typeof t==`string`?(0,F.jsx)(N,{children:t}):t)]})}var Ze=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,F.jsx)(`path`,{d:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z`})}),Qe=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,F.jsx)(`path`,{d:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z`})}),$e={running:h.GOAL$STATUS_RUNNING,complete:h.GOAL$STATUS_COMPLETE,capped:h.GOAL$STATUS_CAPPED,interrupted:h.GOAL$STATUS_INTERRUPTED};function et({status:e}){let{t}=m(`openhands`),{conversationId:n}=A(),r=be(e=>n?!!e.statusByConversation[n]?.active:!1),[i,a]=(0,P.useState)(!1),{active:o,objective:l,iteration:u,max_iterations:f,verdict:p}=e,_=p?Math.round(p.score*100):null,v=p?.missing?t(h.GOAL$MISSING,{missing:p.missing}):``,y=async(e,r)=>{if(!(!n||i)){a(!0);try{await e(n)}catch(e){g(e instanceof Error&&e.message?e.message:t(r))}finally{a(!1)}}},b=()=>y(async e=>{await s(e),await d(e)},h.GOAL$STOP_FAILED),x=()=>y(c,h.GOAL$RESUME_FAILED),S=null;return n&&o?S=(0,F.jsx)(`button`,{type:`button`,"data-testid":`goal-stop`,disabled:i,onClick:b,className:w(E,D),children:t(h.GOAL$STOP)}):n&&e.status===`interrupted`&&!r&&(S=(0,F.jsx)(`button`,{type:`button`,"data-testid":`goal-resume`,disabled:i,onClick:x,className:w(E,D),children:t(h.GOAL$RESUME)})),(0,F.jsx)(`div`,{"data-testid":`goal-status`,className:`flex flex-col w-full`,children:(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$PREFIX)}),(0,F.jsx)(`span`,{children:l}),(0,F.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$ROUND,{iteration:u,max:f})}),(0,F.jsx)(`span`,{children:t($e[e.status])}),_!==null&&(0,F.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$SCORE,{score:_})}),o?(0,F.jsx)(`span`,{"data-testid":`goal-spinner`,className:`inline-block w-3.5 h-3.5 ml-1 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin`}):e.status===`complete`?(0,F.jsx)(`span`,{"data-testid":`goal-done`,className:`inline-flex ml-1`,children:(0,F.jsx)(Ze,{className:`w-3.5 h-3.5 fill-success`})}):(0,F.jsx)(`span`,{"data-testid":`goal-ended`,className:`inline-flex ml-1`,children:(0,F.jsx)(Qe,{className:`w-3.5 h-3.5 fill-[var(--oh-muted)]`})})]}),titleTrailing:S,details:v,initiallyExpanded:!o,chevronPosition:`before`})})}var tt=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,F.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,F.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,F.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function nt({profile:e}){let[t,n]=P.useState(!1);return(0,F.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,F.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,F.jsx)(b,{size:14}):(0,F.jsx)(l,{size:14})}),(0,F.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`hr`,{className:`border-neutral-700`}),(0,F.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function rt({conversationId:e,anchorEventId:t}){let n=ve(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,F.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(tt,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,F.jsx)(p,{i18nKey:h.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,F.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,F.jsx)(R,{title:(0,F.jsx)(`span`,{children:t?(0,F.jsx)(p,{i18nKey:h.MODEL$NO_SAVED_PROFILES}):(0,F.jsx)(p,{i18nKey:h.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,F.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,F.jsx)(p,{i18nKey:h.MODEL$NO_PROFILES_HINT})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,F.jsx)(nt,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var it=(0,P.createContext)(void 0);function at({children:e,value:t}){let n=ze(P.useRef(null)),r=t||n;return(0,F.jsx)(it.Provider,{value:r,children:e})}function ot(){let e=(0,P.useContext)(it);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function st(){return(0,P.useContext)(it)}var ct=()=>{let{setConversationMode:e}=O(),{send:t}=Je(),{conversationId:n}=A(),r=ye(e=>e.enqueuePendingMessage),i=ye(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,P.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Ye(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}},lt=`200%`,z=8,ut=z*2;function dt({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=Ke(),c=`oh-text-shimmer-${(0,P.useId)().replace(/:/g,``)}`,l=(0,P.useMemo)(()=>Math.min(z/2-1,1+i/2),[i]),u=(0,P.useMemo)(()=>{let e=z/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${z}%)`,backgroundSize:`${lt} 100%`,backgroundRepeat:`no-repeat`,WebkitBackgroundClip:`text`,backgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`,animation:`${c} ${r}s linear infinite`}},[c,l,r,a]);return s?(0,F.jsx)(t,{className:w(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${ut}% center}to{background-position:0% center}}`}}),(0,F.jsx)(t,{className:w(`relative inline-block`,n),style:u,...o,children:e})]})}var ft=P.memo(dt);function pt({className:e}){return(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,className:`fill-[var(--oh-foreground)] transition-colors duration-150 group-hover:fill-[var(--oh-text-secondary)]`}),(0,F.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var mt=5,ht=360,gt={p:({children:e})=>(0,F.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function _t({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=m(`openhands`),a=P.useRef(null),[o,s]=P.useState(!1);P.useEffect(()=>{r(o)},[o,r]),P.useLayoutEffect(()=>{let t=a.current;if(!t||n){s(!1);return}let r=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),r=mt*(Number.isFinite(n)&&n>0?n:24),i=(e.match(/\n/g)??[]).length;s(t.scrollHeight>r+1||i>=mt||e.trim().length>ht)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e,n]);let c=o&&!n;return(0,F.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,F.jsx)(`div`,{ref:a,className:w(`text-sm leading-6 whitespace-normal [word-break:break-word]`,c&&`line-clamp-5`),children:(0,F.jsx)(N,{includeStandard:!0,includeHeadings:!0,allowHtml:!1,components:gt,children:e})}),c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{"aria-hidden":!0,"data-testid":`chat-message-truncation-gradient`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-tertiary to-transparent`}),(0,F.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:w(`pointer-events-none absolute bottom-1 left-1/2 z-10 inline-flex -translate-x-1/2 items-center rounded-full border border-[var(--oh-border-subtle)] bg-[var(--oh-surface-raised)] px-2.5 py-0.5 text-xs font-normal text-[var(--oh-foreground)] transition-opacity duration-150`,t?`opacity-100`:`opacity-0`),children:i(h.COMMON$VIEW_MORE)})]}):null]})}function B({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:a,onRetry:o,onStop:s}){let{t:c}=m(`openhands`),[l,u]=P.useState(!1),[d,f]=P.useState(!1),[p,g]=P.useState(!1),[_,v]=P.useState(!1),[y,b]=P.useState(!0),x=P.useRef(null);P.useEffect(()=>{g(!1)},[t]);let S=async()=>{await navigator.clipboard.writeText(t),f(!0)};P.useEffect(()=>{let e;return d&&(e=setTimeout(()=>{f(!1)},2e3)),()=>{clearTimeout(e)}},[d]);let C=e===`user`&&(a===`error`||a===`sending`),T=a===`sending`&&s!=null,E=T&&l,D=e===`user`&&a==null,ee=D&&_&&!p,te=P.Children.count(n)>0;P.useLayoutEffect(()=>{if(!T||D)return;let e=x.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:24;b(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,T,D]);let re=D?(0,F.jsx)(_t,{message:t,isHovering:l,isExpanded:p,onTruncatableChange:v}):(0,F.jsx)(`div`,{ref:x,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,F.jsx)(N,{includeStandard:!0,includeHeadings:!0,allowHtml:e!==`user`,components:gt,children:t})}),ie=(0,F.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:w(`rounded-xl relative w-fit max-w-full flex flex-col`,te&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,a===`error`&&`border border-[var(--oh-status-error)]/40`,!C&&`last:mb-4`),children:[(0,F.jsxs)(`div`,{className:w(`absolute -top-2.5 -right-2.5 z-10`,!l||a===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,F.jsx)(ne,{content:e.tooltip,placement:`top`,children:(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,F.jsx)(de,{isHidden:!l,isDisabled:d,onClick:S,mode:d?`copied`:`copy`})]}),re,T?(0,F.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s?.()},"data-testid":`chat-message-stop`,"aria-label":c(h.BUTTON$STOP),"aria-hidden":!E,tabIndex:E?0:-1,className:w(`group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150`,y?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,E?`opacity-100`:`pointer-events-none opacity-0`),children:(0,F.jsx)(pt,{className:`block h-7 w-7 max-w-none`})}):null,ee?(0,F.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":c(h.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>g(!0)}):null,n]});return e===`user`&&a===`error`?(0,F.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[ie,(0,F.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,F.jsx)(`span`,{children:c(h.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),o?(0,F.jsx)(`button`,{type:`button`,onClick:o,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:c(h.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&a===`sending`?(0,F.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[ie,(0,F.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,F.jsx)(ft,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:c(h.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):ie}function vt(){let{conversationId:e}=pe(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=O(),{setSelectedTab:a}=ie(e),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var yt=300,bt=Be(`shine-text`);function xt({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=m(`openhands`),{navigateToTab:i}=vt(),{handleBuildPlanClick:a}=ct(),{scrollDomToBottom:o}=ot(),s=()=>{i(`planner`)},c=(0,P.useCallback)(e=>{a(e),o()},[a,o]),l=(0,P.useMemo)(()=>e?e.length<=yt?e:`${e.slice(0,yt)}...`:``,[e]);return e?(0,F.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,F.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,F.jsx)(Se,{width:18,height:18,color:`var(--oh-muted)`}),(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(h.COMMON$PLAN_MD)}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsxs)(`button`,{type:`button`,onClick:s,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(h.COMMON$VIEW)}),(0,F.jsx)(Ge,{className:`text-white`,size:18})]})]}),(0,F.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:l&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(N,{includeStandard:!0,components:t?bt:Re,children:l}),e&&e.length>yt&&(0,F.jsx)(`button`,{type:`button`,onClick:s,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(h.COMMON$READ_MORE)})]})}),(0,F.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,F.jsx)(`button`,{type:`button`,onClick:c,disabled:n,className:w(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,F.jsxs)(k.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(h.COMMON$BUILD),` `,(0,F.jsx)(k.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function St({errorId:e,defaultMessage:t}){let{t:n}=m(`openhands`),[r,i]=P.useState(!1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&_.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,F.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,F.jsx)(L,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,F.jsx)(I,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,F.jsx)(N,{children:t})]})}function Ct({event:e}){return ke(e)?(0,F.jsx)(St,{errorId:e.id,defaultMessage:e.error}):null}function wt({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Tt({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Et({onClick:e,className:t}){return(0,F.jsx)(`button`,{type:`button`,onClick:e,className:w(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,F.jsx)(ue,{width:18,height:18})})}function Dt({src:e,size:t=`small`}){return(0,F.jsx)(`img`,{role:`img`,alt:``,src:e,className:w(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Ot({src:e,onRemove:t,size:n=`small`}){return(0,F.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,F.jsx)(Dt,{src:e,size:n}),t&&(0,F.jsx)(Et,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function kt({size:e=`small`,images:t,onRemove:n}){let r=P.useRef(null),[i,a]=P.useState(!1),[o,s]=P.useState(!0),[c,l]=P.useState(!1);return P.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,F.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,F.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(wt,{active:!o})}),(0,F.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:w(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,F.jsx)(Ot,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,F.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Tt,{active:!c})})]})}function At({type:e,onClick:t}){let{t:n}=m(`openhands`),r=e===`confirm`,i=n(r?h.ACTION$CONFIRM:h.ACTION$REJECT),a=n(r?h.CHAT_INTERFACE$USER_CONFIRMED:h.CHAT_INTERFACE$USER_REJECTED),o=r?`${n(h.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(h.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,F.jsx)(ne,{closeDelay:100,content:a,children:(0,F.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:w(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:o})})}function jt({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,F.jsxs)(`div`,{className:w(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,F.jsx)(`span`,{className:``,children:n}),(0,F.jsx)(`span`,{className:`font-bold`,children:i}),(0,F.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var Mt=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,F.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),Nt=re(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),Pt=()=>f({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return _e.respondToConfirmation(e,t,i,n)}});function Ft(){let e=Nt(e=>e.submittedEventIds),t=Nt(e=>e.addSubmittedEventId),{t:n}=m(`openhands`),{data:r}=me(),{curAgentState:i}=ge(),{mutate:a}=Pt(),o=Me(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===S.AWAITING_USER_CONFIRMATION:!1),s=(0,P.useCallback)(e=>{!o||!r||(t(o.id),a({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[o,r,t,a]);return(0,P.useEffect)(()=>{if(!o)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),s(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),s(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[o,s]),i!==S.AWAITING_USER_CONFIRMATION||!o||e.includes(o.id)?null:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(M(o)?o.security_risk:T.UNKNOWN)===T.HIGH&&(0,F.jsx)(jt,{content:n(h.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,F.jsx)(Mt,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(h.COMMON$HIGH_RISK)}),(0,F.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,F.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(h.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(At,{type:`reject`,onClick:()=>s(!1)}),(0,F.jsx)(At,{type:`confirm`,onClick:()=>s(!0)})]})]})]})}var It=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
|
-
`):typeof t.content==`string`&&(n=t.content)),!(Array.isArray(t.content)&&t.content.some(e=>e.type===`image`)))return n;let r=
|
|
3
|
-
`):W()},
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,M as n,N as r,P as i,bt as a}from"./vendor-styling-CI0PQ3ab.js";import{n as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{d as s,l as c,m as l,r as u,s as d}from"./path-utils-BECGet7G.js";import{t as f}from"./useMutation-u8UgRgDK.js";import{t as p}from"./Trans-DqF_OEZB.js";import{t as m}from"./useTranslation-Cbf5AGg_.js";import{t as h}from"./declaration-BGsHjPEW.js";import{F as g,S as _,n as v}from"./active-backend-context-BCXRv5pm.js";import{t as y}from"./createLucideIcon-D4Tak8A1.js";import{t as b}from"./chevron-down-D7IvFMBM.js";import{t as x}from"./loader-circle-CsAsfLIs.js";import{C as S,M as C,t as w}from"./utils-DB9LsAzA.js";import{n as T}from"./common-CxbUL3nR.js";import{n as E,o as D}from"./form-control-classes-CvUaw8_L.js";import{t as ee}from"./use-config-CXy4vD0H.js";import{n as te}from"./navigation-context-SjzfpygH.js";import{t as ne}from"./styled-tooltip-CvsjHuIf.js";import{t as re}from"./react-ao3tWj6K.js";import{s as ie}from"./conversation-local-storage-B31voBg7.js";import{t as O}from"./conversation-store-BCSpLuEf.js";import{r as ae}from"./use-settings-DNJC4gqu.js";import{t as oe}from"./agent-server-conversation-service.api-cylugfDz.js";import{t as se}from"./canvas-ui-BhxjoA1f.js";import{t as ce}from"./conversation-service.api-0JG_fF9d.js";import{n as le}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js";import{t as ue}from"./skills-CH4xgIh-.js";import{t as de}from"./close-DO5Rq_CS.js";import{t as fe}from"./copy-to-clipboard-button-Dp4Q_hXi.js";import{r as k}from"./typography-CQn9wyEX.js";import{t as pe}from"./u-check-circle-DPWVO-9N.js";import{n as me,r as A,t as he}from"./use-active-conversation-B0sttISF.js";import{n as ge}from"./files-tab-store-tfCav6bB.js";import{t as _e}from"./use-agent-state-C5uA0bRj.js";import{d as ve,f as ye,m as be,p as xe,r as Se,t as Ce}from"./lesson-plan-DSf95kQ2.js";import{C as j,E as we,a as Te,b as Ee,c as M,h as De,i as Oe,k as ke,l as Ae,m as je,o as Me,s as Ne,t as Pe,w as Fe,x as Ie}from"./use-event-store-CsD17BKu.js";import{ot as Le,st as Re}from"./vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CnJRLn5s.js";import{n as ze,t as N}from"./markdown-renderer-B6cJJ_MN.js";import{n as Be,r as Ve,t as He}from"./plan-components-CgPHWz3E.js";import{n as Ue,t as We}from"./get-language-from-path-rWEQrOGU.js";import{n as Ge,t as Ke}from"./u-check-circle-half-BGNAAjOW.js";var qe=y(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),P=e(t(),1);function Je(){!r.current&&n();let[e]=(0,P.useState)(i.current);return e}var F=a(),Ye=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(Ye||{});function Xe(){let{conversationId:e}=A(),t=Se();return{send:(0,P.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Ze(e,t,n,r){return{action:Ye.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var I=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),L=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function Qe({status:e}){return(0,F.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,F.jsx)(le,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function R({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let{t:s}=m(`openhands`),[c,l]=P.useState(r),u=t?(0,F.jsx)(`button`,{type:`button`,onClick:()=>l(e=>!e),className:`cursor-pointer text-left`,"aria-label":s(c?h.BUTTON$COLLAPSE:h.BUTTON$EXPAND),children:c?(0,F.jsx)(L,{className:w(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,F.jsx)(I,{className:w(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&u,o,(0,F.jsx)(`span`,{children:e}),i===`after`&&u]}),(0,F.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,F.jsx)(Qe,{status:n})]})]}),c&&(typeof t==`string`?(0,F.jsx)(N,{children:t}):t)]})}var $e=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,F.jsx)(`path`,{d:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z`})}),et=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`,...e,children:(0,F.jsx)(`path`,{d:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z`})}),tt={running:h.GOAL$STATUS_RUNNING,complete:h.GOAL$STATUS_COMPLETE,capped:h.GOAL$STATUS_CAPPED,interrupted:h.GOAL$STATUS_INTERRUPTED};function nt({status:e}){let{t}=m(`openhands`),{conversationId:n}=A(),r=xe(e=>n?!!e.statusByConversation[n]?.active:!1),[i,a]=(0,P.useState)(!1),{active:o,objective:l,iteration:u,max_iterations:f,verdict:p}=e,g=p?Math.round(p.score*100):null,v=p?.missing?t(h.GOAL$MISSING,{missing:p.missing}):``,y=async(e,r)=>{if(!(!n||i)){a(!0);try{await e(n)}catch(e){_(e instanceof Error&&e.message?e.message:t(r))}finally{a(!1)}}},b=()=>y(async e=>{await s(e),await d(e)},h.GOAL$STOP_FAILED),x=()=>y(c,h.GOAL$RESUME_FAILED),S=null;return n&&o?S=(0,F.jsx)(`button`,{type:`button`,"data-testid":`goal-stop`,disabled:i,onClick:b,className:w(E,D),children:t(h.GOAL$STOP)}):n&&e.status===`interrupted`&&!r&&(S=(0,F.jsx)(`button`,{type:`button`,"data-testid":`goal-resume`,disabled:i,onClick:x,className:w(E,D),children:t(h.GOAL$RESUME)})),(0,F.jsx)(`div`,{"data-testid":`goal-status`,className:`flex flex-col w-full`,children:(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$PREFIX)}),(0,F.jsx)(`span`,{children:l}),(0,F.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$ROUND,{iteration:u,max:f})}),(0,F.jsx)(`span`,{children:t(tt[e.status])}),g!==null&&(0,F.jsx)(`span`,{className:`opacity-60`,children:t(h.GOAL$SCORE,{score:g})}),o?(0,F.jsx)(`span`,{"data-testid":`goal-spinner`,className:`inline-block w-3.5 h-3.5 ml-1 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin`}):e.status===`complete`?(0,F.jsx)(`span`,{"data-testid":`goal-done`,className:`inline-flex ml-1`,children:(0,F.jsx)($e,{className:`w-3.5 h-3.5 fill-success`})}):(0,F.jsx)(`span`,{"data-testid":`goal-ended`,className:`inline-flex ml-1`,children:(0,F.jsx)(et,{className:`w-3.5 h-3.5 fill-[var(--oh-muted)]`})})]}),titleTrailing:S,details:v,initiallyExpanded:!o,chevronPosition:`before`})})}var rt=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,F.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,F.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,F.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function it({profile:e}){let[t,n]=P.useState(!1);return(0,F.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,F.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,F.jsx)(b,{size:14}):(0,F.jsx)(l,{size:14})}),(0,F.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`hr`,{className:`border-neutral-700`}),(0,F.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function at({conversationId:e,anchorEventId:t}){let n=ye(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,F.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(rt,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,F.jsx)(p,{i18nKey:h.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,F.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,F.jsx)(R,{title:(0,F.jsx)(`span`,{children:t?(0,F.jsx)(p,{i18nKey:h.MODEL$NO_SAVED_PROFILES}):(0,F.jsx)(p,{i18nKey:h.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,F.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,F.jsx)(p,{i18nKey:h.MODEL$NO_PROFILES_HINT})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,F.jsx)(it,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var ot=(0,P.createContext)(void 0);function st({children:e,value:t}){let n=Ve(P.useRef(null)),r=t||n;return(0,F.jsx)(ot.Provider,{value:r,children:e})}function ct(){let e=(0,P.useContext)(ot);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function lt(){return(0,P.useContext)(ot)}var ut=()=>{let{setConversationMode:e}=O(),{send:t}=Xe(),{conversationId:n}=A(),r=be(e=>e.enqueuePendingMessage),i=be(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,P.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Ze(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}},dt=`200%`,z=8,ft=z*2;function pt({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=Je(),c=`oh-text-shimmer-${(0,P.useId)().replace(/:/g,``)}`,l=(0,P.useMemo)(()=>Math.min(z/2-1,1+i/2),[i]),u=(0,P.useMemo)(()=>{let e=z/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${z}%)`,backgroundSize:`${dt} 100%`,backgroundRepeat:`no-repeat`,WebkitBackgroundClip:`text`,backgroundClip:`text`,color:`transparent`,WebkitTextFillColor:`transparent`,animation:`${c} ${r}s linear infinite`}},[c,l,r,a]);return s?(0,F.jsx)(t,{className:w(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${ft}% center}to{background-position:0% center}}`}}),(0,F.jsx)(t,{className:w(`relative inline-block`,n),style:u,...o,children:e})]})}var mt=P.memo(pt);function ht({className:e}){return(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,className:`fill-[var(--oh-foreground)] transition-colors duration-150 group-hover:fill-[var(--oh-text-secondary)]`}),(0,F.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var gt=5,_t=360,vt={p:({children:e})=>(0,F.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function yt({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=m(`openhands`),a=P.useRef(null),[o,s]=P.useState(!1);P.useEffect(()=>{r(o)},[o,r]),P.useLayoutEffect(()=>{let t=a.current;if(!t||n){s(!1);return}let r=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),r=gt*(Number.isFinite(n)&&n>0?n:24),i=(e.match(/\n/g)??[]).length;s(t.scrollHeight>r+1||i>=gt||e.trim().length>_t)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e,n]);let c=o&&!n;return(0,F.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,F.jsx)(`div`,{ref:a,className:w(`text-sm leading-6 whitespace-normal [word-break:break-word]`,c&&`line-clamp-5`),children:(0,F.jsx)(N,{includeStandard:!0,includeHeadings:!0,allowHtml:!1,components:vt,children:e})}),c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{"aria-hidden":!0,"data-testid":`chat-message-truncation-gradient`,className:`pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-tertiary to-transparent`}),(0,F.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:w(`pointer-events-none absolute bottom-1 left-1/2 z-10 inline-flex -translate-x-1/2 items-center rounded-full border border-[var(--oh-border-subtle)] bg-[var(--oh-surface-raised)] px-2.5 py-0.5 text-xs font-normal text-[var(--oh-foreground)] transition-opacity duration-150`,t?`opacity-100`:`opacity-0`),children:i(h.COMMON$VIEW_MORE)})]}):null]})}function B({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:a,onRetry:o,onStop:s}){let{t:c}=m(`openhands`),[l,u]=P.useState(!1),[d,f]=P.useState(!1),[p,g]=P.useState(!1),[_,v]=P.useState(!1),[y,b]=P.useState(!0),x=P.useRef(null);P.useEffect(()=>{g(!1)},[t]);let S=async()=>{await navigator.clipboard.writeText(t),f(!0)};P.useEffect(()=>{let e;return d&&(e=setTimeout(()=>{f(!1)},2e3)),()=>{clearTimeout(e)}},[d]);let C=e===`user`&&(a===`error`||a===`sending`),T=a===`sending`&&s!=null,E=T&&l,D=e===`user`&&a==null,ee=D&&_&&!p,te=P.Children.count(n)>0;P.useLayoutEffect(()=>{if(!T||D)return;let e=x.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:24;b(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,T,D]);let re=D?(0,F.jsx)(yt,{message:t,isHovering:l,isExpanded:p,onTruncatableChange:v}):(0,F.jsx)(`div`,{ref:x,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,F.jsx)(N,{includeStandard:!0,includeHeadings:!0,allowHtml:e!==`user`,components:vt,children:t})}),ie=(0,F.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":a,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:w(`rounded-xl relative w-fit max-w-full flex flex-col`,te&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,a===`error`&&`border border-[var(--oh-status-error)]/40`,!C&&`last:mb-4`),children:[(0,F.jsxs)(`div`,{className:w(`absolute -top-2.5 -right-2.5 z-10`,!l||a===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,F.jsx)(ne,{content:e.tooltip,placement:`top`,children:(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,F.jsx)(fe,{isHidden:!l,isDisabled:d,onClick:S,mode:d?`copied`:`copy`})]}),re,T?(0,F.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s?.()},"data-testid":`chat-message-stop`,"aria-label":c(h.BUTTON$STOP),"aria-hidden":!E,tabIndex:E?0:-1,className:w(`group absolute z-10 inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-full bg-[var(--oh-color-tertiary)] text-[var(--oh-foreground)] transition-opacity duration-150`,y?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,E?`opacity-100`:`pointer-events-none opacity-0`),children:(0,F.jsx)(ht,{className:`block h-7 w-7 max-w-none`})}):null,ee?(0,F.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":c(h.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>g(!0)}):null,n]});return e===`user`&&a===`error`?(0,F.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[ie,(0,F.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,F.jsx)(`span`,{children:c(h.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),o?(0,F.jsx)(`button`,{type:`button`,onClick:o,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:c(h.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&a===`sending`?(0,F.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[ie,(0,F.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,F.jsx)(mt,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:c(h.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):ie}function bt(){let{conversationId:e}=me(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=O(),{setSelectedTab:a}=ie(e),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var xt=300,St=He(`shine-text`);function Ct({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=m(`openhands`),{navigateToTab:i}=bt(),{handleBuildPlanClick:a}=ut(),{scrollDomToBottom:o}=ct(),s=()=>{i(`planner`)},c=(0,P.useCallback)(e=>{a(e),o()},[a,o]),l=(0,P.useMemo)(()=>e?e.length<=xt?e:`${e.slice(0,xt)}...`:``,[e]);return e?(0,F.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,F.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,F.jsx)(Ce,{width:18,height:18,color:`var(--oh-muted)`}),(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(h.COMMON$PLAN_MD)}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsxs)(`button`,{type:`button`,onClick:s,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(h.COMMON$VIEW)}),(0,F.jsx)(qe,{className:`text-white`,size:18})]})]}),(0,F.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:l&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(N,{includeStandard:!0,components:t?St:Be,children:l}),e&&e.length>xt&&(0,F.jsx)(`button`,{type:`button`,onClick:s,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(h.COMMON$READ_MORE)})]})}),(0,F.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,F.jsx)(`button`,{type:`button`,onClick:c,disabled:n,className:w(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,F.jsxs)(k.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(h.COMMON$BUILD),` `,(0,F.jsx)(k.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function wt({errorId:e,defaultMessage:t}){let{t:n}=m(`openhands`),[r,i]=P.useState(!1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&g.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,F.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,F.jsx)(L,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,F.jsx)(I,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,F.jsx)(N,{children:t})]})}function Tt({event:e}){return Ae(e)?(0,F.jsx)(wt,{errorId:e.id,defaultMessage:e.error}):null}function Et({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Dt({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Ot({onClick:e,className:t}){return(0,F.jsx)(`button`,{type:`button`,onClick:e,className:w(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,F.jsx)(de,{width:18,height:18})})}function kt({src:e,size:t=`small`}){return(0,F.jsx)(`img`,{role:`img`,alt:``,src:e,className:w(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function At({src:e,onRemove:t,size:n=`small`}){return(0,F.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,F.jsx)(kt,{src:e,size:n}),t&&(0,F.jsx)(Ot,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function jt({size:e=`small`,images:t,onRemove:n}){let r=P.useRef(null),[i,a]=P.useState(!1),[o,s]=P.useState(!0),[c,l]=P.useState(!1);return P.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,F.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,F.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Et,{active:!o})}),(0,F.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:w(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,F.jsx)(At,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,F.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Dt,{active:!c})})]})}function Mt({type:e,onClick:t}){let{t:n}=m(`openhands`),r=e===`confirm`,i=n(r?h.ACTION$CONFIRM:h.ACTION$REJECT),a=n(r?h.CHAT_INTERFACE$USER_CONFIRMED:h.CHAT_INTERFACE$USER_REJECTED),o=r?`${n(h.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(h.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,F.jsx)(ne,{closeDelay:100,content:a,children:(0,F.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:w(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:o})})}function Nt({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,F.jsxs)(`div`,{className:w(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,F.jsx)(`span`,{className:``,children:n}),(0,F.jsx)(`span`,{className:`font-bold`,children:i}),(0,F.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var Pt=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,F.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),Ft=re(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),It=()=>f({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return ve.respondToConfirmation(e,t,i,n)}});function Lt(){let e=Ft(e=>e.submittedEventIds),t=Ft(e=>e.addSubmittedEventId),{t:n}=m(`openhands`),{data:r}=he(),{curAgentState:i}=_e(),{mutate:a}=It(),o=Pe(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===S.AWAITING_USER_CONFIRMATION:!1),s=(0,P.useCallback)(e=>{!o||!r||(t(o.id),a({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[o,r,t,a]);return(0,P.useEffect)(()=>{if(!o)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),s(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),s(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[o,s]),i!==S.AWAITING_USER_CONFIRMATION||!o||e.includes(o.id)?null:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(M(o)?o.security_risk:T.UNKNOWN)===T.HIGH&&(0,F.jsx)(Nt,{content:n(h.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,F.jsx)(Pt,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(h.COMMON$HIGH_RISK)}),(0,F.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,F.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(h.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(Mt,{type:`reject`,onClick:()=>s(!1)}),(0,F.jsx)(Mt,{type:`confirm`,onClick:()=>s(!0)})]})]})]})}var Rt=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
|
+
`):typeof t.content==`string`&&(n=t.content)),!(Array.isArray(t.content)&&t.content.some(e=>e.type===`image`)))return n;let r=g.t(h.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE);return n.split(r)[0]};function zt(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function Bt(e){let t=Math.round(e*5);return{filled:t,empty:5-t}}function Vt(e){return e>=.6?`text-green-400`:e>=.4?`text-yellow-400`:`text-red-400`}function Ht(e){return e>=.7?`text-red-400 font-semibold`:e>=.5?`text-yellow-400`:`text-neutral-400`}function Ut(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wt(e){let t=e?.verification;if(!Ut(t))return null;let n=t.enable_iterative_refinement;return typeof n==`boolean`?n:null}function Gt({feature:e}){let t=Math.round(e.probability*100),n=Ht(e.probability);return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,F.jsx)(`span`,{className:`text-neutral-200`,children:e.display_name}),(0,F.jsxs)(`span`,{className:n,children:[`(`,t,`%)`]})]})}function V({label:e,features:t}){return!t||t.length===0?null:(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-1 text-xs`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-neutral-300`,children:e}),t.map((e,t)=>(0,F.jsxs)(P.Fragment,{children:[t>0&&(0,F.jsx)(`span`,{className:`text-neutral-500`,children:`·`}),(0,F.jsx)(Gt,{feature:e})]},e.name))]})}function Kt({categorized:e}){let{t}=m(),n=e.agent_behavioral_issues&&e.agent_behavioral_issues.length>0,r=e.user_followup_patterns&&e.user_followup_patterns.length>0,i=e.infrastructure_issues&&e.infrastructure_issues.length>0,a=e.other&&e.other.length>0;return!n&&!r&&!i&&!a?null:(0,F.jsxs)(`div`,{className:`flex flex-col gap-1 mt-1.5`,children:[n&&(0,F.jsx)(V,{label:t(h.CRITIC$POTENTIAL_ISSUES),features:e.agent_behavioral_issues}),i&&(0,F.jsx)(V,{label:t(h.CRITIC$INFRASTRUCTURE),features:e.infrastructure_issues}),r&&(0,F.jsx)(V,{label:t(h.CRITIC$LIKELY_FOLLOWUP),features:e.user_followup_patterns}),a&&(0,F.jsx)(V,{label:t(h.CRITIC$OTHER),features:e.other})]})}function qt({criticResult:e}){let{t}=m(),{data:n}=ae(),[r,i]=P.useState(!1),a=zt(e.score),{filled:o,empty:s}=Bt(a),c=Vt(a),l=(a*100).toFixed(1),u=Wt(n?.agent_settings)===!1,d=e.metadata?.categorized_features,f=d!=null&&((d.agent_behavioral_issues??[]).length>0||(d.user_followup_patterns??[]).length>0||(d.infrastructure_issues??[]).length>0||(d.other??[]).length>0);return(0,F.jsxs)(`div`,{className:`border-l-2 border-neutral-600 pl-2 my-2 py-1.5 text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-neutral-300 text-xs`,children:t(h.CRITIC$SUCCESS_LIKELIHOOD_LABEL)}),(0,F.jsxs)(`span`,{className:`${c} text-xs tracking-wide`,"aria-label":`Score: ${l}%`,children:[`★`.repeat(o),`☆`.repeat(s)]}),(0,F.jsxs)(`span`,{className:`text-neutral-500 text-xs`,children:[`(`,l,`%)`]}),f&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer ml-1`,"aria-label":t(r?h.BUTTON$COLLAPSE_DETAILS:h.BUTTON$EXPAND_DETAILS),children:r?(0,F.jsx)(L,{className:`h-3 w-3 inline fill-neutral-400`}):(0,F.jsx)(I,{className:`h-3 w-3 inline fill-neutral-400`})})]}),r&&f&&(0,F.jsx)(Kt,{categorized:d}),u&&(0,F.jsx)(`p`,{className:`mt-1.5 text-xs leading-5 text-neutral-500`,"data-testid":`critic-iterative-refinement-hint`,children:t(h.CRITIC$ITERATIVE_REFINEMENT_HINT)})]})}function H({content:e}){let{t}=m(`openhands`),[n,r]=P.useState(!1);if(!e.trim())return null;let i=n?L:I;return(0,F.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`collapsible-thinking`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,"aria-label":t(n?h.THINKING$COLLAPSE:h.THINKING$EXPAND),"data-testid":`collapsible-thinking-toggle`,className:`w-full flex items-center gap-2 text-left cursor-pointer`,children:[(0,F.jsx)(i,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,F.jsx)(Ue,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,F.jsx)(`span`,{className:`font-normal text-[var(--oh-muted)]`,children:t(h.THINKING$TITLE)})]}),n&&(0,F.jsx)(`div`,{className:`mt-1.5 pl-6`,"data-testid":`collapsible-thinking-content`,children:(0,F.jsx)(N,{children:e})})]})}var Jt=()=>{let e=o();return f({mutationKey:[`fork-conversation`],mutationFn:async({sourceConversationId:e,eventId:t,editText:n,title:r})=>{let i=t,a=!1;if(n!=null){let n=await oe.getEventParentId(e,t);n&&(i=n,a=!0)}let o=await oe.forkConversation(e,i,r);return a&&o.leaf_event_id!==i&&(a=!1),{info:o,excluded:a}},onSuccess:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]})}})};function Yt({event:e,isLastMessage:t,isFromPlanningAgent:n}){let{t:r}=m(`openhands`),{navigate:i}=te(),{conversationId:a}=A(),o=v().backend.kind===`cloud`,{mutate:s,isPending:c}=Jt(),l=O(e=>e.setMessageToSend),d=P.useRef(!1),f=Rt(e),{reasoning:p,message:g}=e.source===`agent`?Me(f):{reasoning:``,message:f},y=[];Array.isArray(e.llm_message.content)&&e.llm_message.content.forEach(e=>{e.type===`image`&&y.push(...e.image_urls)});let b=!o&&a?[{icon:(0,F.jsx)(u,{width:15,height:15,"aria-hidden":!0}),onClick:()=>{if(!a||c||d.current)return;d.current=!0;let t=ce.getCurrentConversation(),n=t?.id===a?t.title:void 0,r=n?`${n} (branch)`:void 0,o=e.source===`user`&&g.length>0;s({sourceConversationId:a,eventId:e.id,...o?{editText:g}:{},...r?{title:r}:{}},{onSuccess:({info:e,excluded:t})=>{i(`/conversations/${e.id}`),t&&window.setTimeout(()=>l(g),0)},onError:e=>_(e instanceof Error?e.message:null),onSettled:()=>{d.current=!1}})},tooltip:r(h.CHAT_INTERFACE$BRANCH_FROM_HERE)}]:void 0;return(0,F.jsxs)(F.Fragment,{children:[p&&(0,F.jsx)(H,{content:p}),(0,F.jsxs)(B,{type:e.source,message:g,isFromPlanningAgent:n,actions:b,children:[y.length>0&&(0,F.jsx)(jt,{size:`small`,images:y}),t&&(0,F.jsx)(Lt,{})]}),e.source===`agent`&&e.critic_result!=null&&(0,F.jsx)(qt,{criticResult:e.critic_result})]})}var Xt=class{static isDevMode=!1;static message(e){this.isDevMode&&console.warn(JSON.stringify(JSON.parse(e.data.toString()),null,2))}static event(e,t){this.isDevMode&&console.warn(t||`EVENT`,e)}static warning(e){this.isDevMode&&console.warn(e)}static error(e){this.isDevMode&&console.error(e)}},Zt=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value};function Qt(e){let{children:t}=e,n=e=>{try{return Zt(e)}catch(t){return Xt.error(String(t)),e}};return Array.isArray(t)?(0,F.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,F.jsx)(`strong`,{className:`font-mono`,children:n(t)}):(0,F.jsx)(`strong`,{className:`font-mono`,children:t})}var $t=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},en=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,tn=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return en(e)&&!n.endsWith(`/`)?`${n}/`:n};function nn(e){let{children:t}=e,n=e=>{try{let t=$t(e);return(0,F.jsx)(`span`,{className:`font-mono`,title:t,children:tn(t)})}catch(t){return Xt.error(String(t)),(0,F.jsx)(`span`,{className:`font-mono`,children:e})}};return Array.isArray(t)?(0,F.jsx)(`strong`,{className:`font-mono`,children:t.map((e,t)=>typeof e==`string`?(0,F.jsx)(`span`,{children:n(e)},`${e}-${t}`):e)}):typeof t==`string`?(0,F.jsx)(`strong`,{children:n(t)}):(0,F.jsx)(`strong`,{className:`font-mono`,children:t})}var U=1e3,rn=e=>`\`\`\`json\n${JSON.stringify(e,null,2)}\n\`\`\``,an=e=>{switch(e){case T.LOW:return g.t(h.SECURITY$LOW_RISK);case T.MEDIUM:return g.t(h.SECURITY$MEDIUM_RISK);case T.HIGH:return g.t(h.SECURITY$HIGH_RISK);case T.UNKNOWN:default:return g.t(h.SECURITY$UNKNOWN_RISK)}},W=()=>``,on=e=>e.name?`**Skill:** \`${e.name}\``:W(),sn=e=>{let{action:t}=e,n=[];return t.pattern&&n.push(`**Pattern:** \`${t.pattern}\``),t.path&&n.push(`**Path:** \`${t.path}\``),`include`in t&&t.include&&n.push(`**Include:** \`${t.include}\``),n.length>0?n.join(`
|
|
3
|
+
`):W()},cn=e=>{if(e.command!==`create`||!e.file_text)return W();let t=e.file_text;return t.length>1e3&&(t=`${t.slice(0,U)}...`),`${e.path}\n${t}`},ln=e=>{let t=`Command:\n\`${e.action.command}\``;return(e.security_risk===T.HIGH||e.security_risk===T.MEDIUM)&&(t+=`\n\n${an(e.security_risk)}`),t},un=e=>{let t=`**MCP Tool Call**
|
|
4
4
|
|
|
5
|
-
`;return t+=`**Arguments:**\n\`\`\`json\n${JSON.stringify(e.data,null,2)}\n\`\`\``,t},
|
|
5
|
+
`;return t+=`**Arguments:**\n\`\`\`json\n${JSON.stringify(e.data,null,2)}\n\`\`\``,t},dn=e=>e.thought,fn=e=>e.message.trim(),pn=e=>{let t=`**Command:** \`${e.command}\``;return e.command===`plan`&&(e.task_list&&e.task_list.length>0?(t+=`\n\n**Task List (${e.task_list.length} ${e.task_list.length===1?`item`:`items`}):**\n`,e.task_list.forEach((e,n)=>{let r={todo:`⏳`,in_progress:`🔄`,done:`✅`}[e.status]||`❓`;t+=`\n${n+1}. ${r} **[${e.status.toUpperCase().replace(`_`,` `)}]** ${e.title}`,e.notes&&(t+=`\n *Notes: ${e.notes}*`)})):t+=`
|
|
6
6
|
|
|
7
|
-
**Task List:** Empty`),t},
|
|
7
|
+
**Task List:** Empty`),t},mn=e=>{switch(e.kind){case`BrowserNavigateAction`:{let t=`Browsing ${e.url}`;return e.new_tab&&(t+=`
|
|
8
8
|
**New Tab:** Yes`),t}case`BrowserClickAction`:{let t=`**Element Index:** ${e.index}`;return e.new_tab&&(t+=`
|
|
9
9
|
**New Tab:** Yes`),t}case`BrowserTypeAction`:{let t=e.text.length>50?`${e.text.slice(0,50)}...`:e.text;return`**Element Index:** ${e.index}\n**Text:** ${t}`}case`BrowserGetStateAction`:return e.include_screenshot?`**Include Screenshot:** Yes`:W();case`BrowserGetContentAction`:{let t=[];return e.extract_links&&t.push(`**Extract Links:** Yes`),e.start_from_char>0&&t.push(`**Start From Character:** ${e.start_from_char}`),t.length>0?t.join(`
|
|
10
|
-
`):W()}case`BrowserScrollAction`:return`**Direction:** ${e.direction}`;case`BrowserGoBackAction`:return W();case`BrowserListTabsAction`:return W();case`BrowserSwitchTabAction`:return`**Tab ID:** ${e.tab_id}`;case`BrowserCloseTabAction`:return`**Tab ID:** ${e.tab_id}`;default:return W()}},
|
|
11
|
-
`):null;return
|
|
12
|
-
`)||``;n.length>1e3&&(n=`${n.slice(0,U)}...`);let r=``;return t.command&&(r+=`Command: \`${t.command}\`\n\n`),r+=`Output:\n\`\`\`sh\n${n.trim()||
|
|
13
|
-
`):t.output||``,r=``;return t.error?r+=`**Error:**\n${t.error}`:n?r+=`**Output:**\n${n}`:r+=`Browser action completed successfully.`,r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},
|
|
14
|
-
`),r=`**Tool:** ${t.tool_name}\n\n`;return t.is_error?r+=`**Error:**\n${n}`:r+=`**Result:**\n${n}`,r.length>1e3&&(r=`${r.slice(0,U)}...`),r},
|
|
15
|
-
`),r=`${t.skill_name?`**Skill:** \`${t.skill_name}\`\n\n`:``}${t.is_error?`**Error:**\n${n}`:n}`;return r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},
|
|
16
|
-
`),
|
|
10
|
+
`):W()}case`BrowserScrollAction`:return`**Direction:** ${e.direction}`;case`BrowserGoBackAction`:return W();case`BrowserListTabsAction`:return W();case`BrowserSwitchTabAction`:return`**Tab ID:** ${e.tab_id}`;case`BrowserCloseTabAction`:return`**Tab ID:** ${e.tab_id}`;default:return W()}},hn=e=>{let{action:t}=e;switch(t.kind){case`FileEditorAction`:case`StrReplaceEditorAction`:return cn(t);case`ExecuteBashAction`:case`TerminalAction`:return ln(e);case`MCPToolAction`:return un(t);case`ThinkAction`:return dn(t);case`FinishAction`:return fn(t);case`TaskTrackerAction`:return pn(t);case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:return mn(t);case`GrepAction`:case`GlobAction`:return sn(e);case`InvokeSkillAction`:return on(t);default:return rn(e)}},gn=e=>{if(e.is_error||e.status===`failed`)return`error`;if(e.status===`completed`)return`success`},_n=e=>{let{observation:t}=e;switch(t.kind){case`ExecuteBashObservation`:{let e=t.exit_code,{metadata:n}=t;return e===-1||n.exit_code===-1?`timeout`:e===0||n.exit_code===0?`success`:`error`}case`TerminalObservation`:{let e=t.exit_code??t.metadata.exit_code??null;return t.timeout||e===-1?`timeout`:e===0?`success`:t.is_error?`error`:`success`}case`FileEditorObservation`:case`StrReplaceEditorObservation`:return t.error?`error`:`success`;case`MCPToolObservation`:return t.is_error?`error`:`success`;case`SwitchLLMObservation`:return t.is_error?`error`:`success`;case`InvokeSkillObservation`:return t.is_error?`error`:`success`;case`TaskObservation`:return t.is_error||t.status===`failed`?`error`:`success`;case`CanvasUIObservation`:return t.is_error?`error`:`success`;default:return`success`}},vn=e=>{let{observation:t}=e;if(t.error)return`**Error:**\n${t.error}`;let n=`content`in t&&Array.isArray(t.content)?t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
11
|
+
`):null;return _n(e)===`success`&&`old_content`in t&&`new_content`in t&&t.old_content&&t.new_content||t.command===`view`?`\`\`\`\n${n||t.output}\n\`\`\``:n||t.output},yn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
12
|
+
`)||``;n.length>1e3&&(n=`${n.slice(0,U)}...`);let r=``;return t.command&&(r+=`Command: \`${t.command}\`\n\n`),r+=`Output:\n\`\`\`sh\n${n.trim()||g.t(h.OBSERVATION$COMMAND_NO_OUTPUT)}\n\`\`\``,r},bn=e=>{let{observation:t}=e,n=`content`in t&&Array.isArray(t.content)?t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
13
|
+
`):t.output||``,r=``;return t.error?r+=`**Error:**\n${t.error}`:n?r+=`**Output:**\n${n}`:r+=`Browser action completed successfully.`,r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},xn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
14
|
+
`),r=`**Tool:** ${t.tool_name}\n\n`;return t.is_error?r+=`**Error:**\n${n}`:r+=`**Result:**\n${n}`,r.length>1e3&&(r=`${r.slice(0,U)}...`),r},Sn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
15
|
+
`),r=`${t.skill_name?`**Skill:** \`${t.skill_name}\`\n\n`:``}${t.is_error?`**Error:**\n${n}`:n}`;return r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},Cn=e=>e.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
16
|
+
`),wn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
17
17
|
`);if(t.is_error)return n?`**Error:**\n${n}`:`**Error:**\nFailed to switch LLM profile \`${t.profile_name}\`.`;let r=[`**Profile:** \`${t.profile_name}\``];return t.active_model&&r.push(`**Active model:** \`${t.active_model}\``),t.reason&&r.push(`**Reason:** ${t.reason}`),r.join(`
|
|
18
|
-
`)},
|
|
18
|
+
`)},Tn=e=>{let{observation:t}=e,{command:n,task_list:r}=t,i=`**Command:** \`${n}\``;return n===`plan`&&r.length>0?(i+=`\n\n**Task List (${r.length} ${r.length===1?`item`:`items`}):**\n`,r.forEach((e,t)=>{let n={todo:`⏳`,in_progress:`🔄`,done:`✅`}[e.status]||`❓`;i+=`\n${t+1}. ${n} **[${e.status.toUpperCase().replace(`_`,` `)}]** ${e.title}`,e.notes&&(i+=`\n *Notes: ${e.notes}*`)})):n===`plan`&&(i+=`
|
|
19
19
|
|
|
20
|
-
**Task List:** Empty`),`content`in t&&t.content&&typeof t.content==`string`&&t.content.trim()&&(i+=`\n\n**Result:** ${t.content.trim()}`),i},
|
|
21
|
-
`)||``},
|
|
22
|
-
`),r=``;return t.is_error?r+=`**Error:**\n${n}`:r+=n,r},
|
|
20
|
+
**Task List:** Empty`),`content`in t&&t.content&&typeof t.content==`string`&&t.content.trim()&&(i+=`\n\n**Result:** ${t.content.trim()}`),i},En=e=>{let{observation:t}=e;return t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
21
|
+
`)||``},Dn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
22
|
+
`),r=``;return t.is_error?r+=`**Error:**\n${n}`:r+=n,r},On=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
23
23
|
`),r=`**Pattern:** \`${t.pattern}\`\n`;return r+=`**Search Path:** \`${t.search_path}\`\n\n`,t.is_error?r+=`**Error:**\n${n}`:t.files.length===0?r+=`**Result:** No files found.`:(r+=`**Files Found (${t.files.length}${t.truncated?`+, truncated`:``}):**\n`,r+=t.files.map(e=>`- \`${e}\``).join(`
|
|
24
|
-
`)),r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},
|
|
24
|
+
`)),r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},kn=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
25
25
|
`),r=`**Pattern:** \`${t.pattern}\`\n`;return r+=`**Search Path:** \`${t.search_path}\`\n`,t.include_pattern&&(r+=`**Include:** \`${t.include_pattern}\`\n`),r+=`
|
|
26
26
|
`,t.is_error?r+=`**Error:**\n${n}`:t.matches.length===0?r+=`**Result:** No matches found.`:(r+=`**Matches (${t.matches.length}${t.truncated?`+, truncated`:``}):**\n`,r+=t.matches.map(e=>`- \`${e}\``).join(`
|
|
27
|
-
`)),r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},
|
|
27
|
+
`)),r.length>1e3&&(r=`${r.slice(0,U)}...(truncated)`),r},An=e=>{switch(e.observation.kind){case`FileEditorObservation`:case`StrReplaceEditorObservation`:return vn(e);case`ExecuteBashObservation`:case`TerminalObservation`:return yn(e);case`BrowserObservation`:return bn(e);case`MCPToolObservation`:return xn(e);case`TaskTrackerObservation`:return Tn(e);case`ThinkObservation`:return En(e);case`FinishObservation`:return Dn(e);case`GlobObservation`:return On(e);case`GrepObservation`:return kn(e);case`InvokeSkillObservation`:return Sn(e);case`CanvasUIObservation`:return Cn(e);case`ClientToolObservation`:return e.tool_name===`canvas_ui_control`?Cn(e):rn(e);case`SwitchLLMObservation`:return wn(e);default:return rn(e)}},jn=e=>{switch(e.tool_kind){case`execute`:return`ACTION_MESSAGE$ACP_RUN`;case`edit`:return`ACTION_MESSAGE$ACP_EDIT`;case`read`:return`ACTION_MESSAGE$ACP_READ`;case`fetch`:return`ACTION_MESSAGE$ACP_FETCH`;default:return`ACTION_MESSAGE$ACP_TOOL`}},Mn={read:[`Read`],edit:[`Edit`,`Write`],execute:[`Bash`,`Run`],fetch:[`Fetch`,`WebFetch`]},Nn=e=>{let t=e.title,n=e.tool_kind;if(!t||!n)return t;let r=Mn[n];if(!r)return t;for(let e of r)if(t.length>e.length&&t.startsWith(e)&&/\s/.test(t.charAt(e.length)))return t.slice(e.length).trimStart();return t},Pn=e=>{if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}},Fn=e=>e.length>1e3?`${e.slice(0,U)}...`:e,In=e=>{let t=e.tool_kind,n=e.raw_input,r=e.raw_output,i=e.is_error,a=``;if(t===`execute`&&n&&typeof n==`object`&&`command`in n&&typeof n.command==`string`){let{command:e}=n;a+=`Command: \`${e}\`\n\n`}else if(n!=null&&n!==``){let e=Pn(n);e.trim()&&(a+=`Input:\n\`\`\`json\n${e}\n\`\`\`\n\n`)}let o=Fn(Pn(r).trim()),s=i?`**Error:**`:`Output:`,c=o||g.t(h.OBSERVATION$COMMAND_NO_OUTPUT);return a+=`${s}\n\`\`\`\n${c}\n\`\`\``,a};function Ln({task:e}){let{t}=m(`openhands`),n=(0,P.useMemo)(()=>{switch(e.status){case`todo`:return(0,F.jsx)(Ge,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,F.jsx)(Ke,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,F.jsx)(pe,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,F.jsx)(Ge,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),r=e.status===`done`;return(0,F.jsxs)(`div`,{className:`flex gap-[14px] items-center px-4 py-2 w-full`,"data-name":`item`,children:[(0,F.jsx)(`div`,{className:`shrink-0`,children:n}),(0,F.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[20px] text-nowrap whitespace-pre font-normal`,children:[(0,F.jsx)(k.Text,{className:w(`text-[12px] text-white`,r&&`text-[var(--oh-muted)]`),children:e.title}),e.notes&&(0,F.jsxs)(k.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(h.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function Rn({taskList:e}){let{t}=m(`openhands`);return(0,F.jsxs)(`div`,{className:`flex flex-col overflow-clip bg-[var(--oh-surface)] border border-[var(--oh-border)] rounded-[12px] w-full`,children:[(0,F.jsxs)(`div`,{className:`flex gap-1 items-center border-b border-[var(--oh-border)] h-[41px] px-2 shrink-0`,children:[(0,F.jsx)(Ce,{className:`shrink-0 w-4.5 h-4.5 text-[var(--oh-muted)]`}),(0,F.jsx)(k.Text,{className:`text-[11px] text-nowrap text-white tracking-[0.11px] font-medium leading-[16px] whitespace-pre`,children:t(h.COMMON$TASKS)})]}),(0,F.jsx)(`div`,{children:e.map((e,t)=>(0,F.jsx)(Ln,{task:e},`task-${t}`))})]})}function zn({event:e}){let{observation:t}=e,{command:n,task_list:r}=t;return(0,F.jsx)(`div`,{className:`flex flex-col gap-4`,children:n===`plan`&&r.length>0&&(0,F.jsx)(Rn,{taskList:r})})}var Bn=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),Vn=e=>{let t=[],n=/<EXTRA_INFO>([\s\S]*?)<\/EXTRA_INFO>/gi,r=n.exec(e);for(;r!==null;){let i=r[1].trim();i.length>0&&t.push(i),r=n.exec(e)}return t},Hn=(e,t)=>{let n=`\n\n- **${e}**`;return t&&t.trim().length>0&&(n+=`\n\n${t}`),n},Un=(e,t)=>{let n=`
|
|
28
28
|
|
|
29
|
-
**Triggered Skill Knowledge:**`;return e.forEach((e,r)=>{let i=r<t.length?t[r]:void 0;n+=
|
|
29
|
+
**Triggered Skill Knowledge:**`;return e.forEach((e,r)=>{let i=r<t.length?t[r]:void 0;n+=Hn(e,i)}),n},Wn=e=>{let t=`
|
|
30
30
|
|
|
31
|
-
**Extended Content:**`;return e.forEach(e=>{e.trim().length>0&&(t+=`\n\n${e}`)}),t},
|
|
32
|
-
`);function J({code:e,language:t,copy:n=!0,placeholder:r,expandable:i=!1,wrapLongLines:a=!1}){let{t:o}=m(`openhands`),[s,c]=P.useState(!1),l=e.length>U,u=(l&&!(i&&s)?`${e.slice(0,1e3)}…`:e).trim()||r||``,d=n&&e.trim().length>0,f=o(s?h.BUTTON$COLLAPSE:h.BUTTON$EXPAND),p=(0,F.jsx)(
|
|
31
|
+
**Extended Content:**`;return e.forEach(e=>{e.trim().length>0&&(t+=`\n\n${e}`)}),t},Gn=e=>!e||e.length===0?[]:Vn(Bn(e)),Kn=(e,t)=>{let n=Gn(t);return e&&e.length>0?Un(e,n):n.length>0?Wn(n):``},qn=(e,t)=>{let n=Gn(t);return e&&e.length>0?e.map((e,t)=>({name:e,content:t<n.length?n[t].trim():``})):n.length>0?n.filter(e=>e.trim().length>0).map((e,t)=>({name:`Extended Content ${t+1}`,content:e.trim()})):[]},G=e=>typeof e==`object`&&!!e&&`_isSkillReadyEvent`in e&&e._isSkillReadyEvent===!0,Jn=e=>{let t=e.activated_skills||e.activated_microagents||[],n=e.extended_content||[];if(t.length===0&&n.length===0)throw Error(`Cannot create skill ready event without activated skills or extended content`);let r=Kn(t,n),i=qn(t,n);return{id:`${e.id}-skill-ready`,timestamp:e.timestamp,source:`agent`,_isSkillReadyEvent:!0,_skillReadyContent:r,_skillReadyItems:i}},K=e=>e,q=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
32
|
+
`);function J({code:e,language:t,copy:n=!0,placeholder:r,expandable:i=!1,wrapLongLines:a=!1}){let{t:o}=m(`openhands`),[s,c]=P.useState(!1),l=e.length>U,u=(l&&!(i&&s)?`${e.slice(0,1e3)}…`:e).trim()||r||``,d=n&&e.trim().length>0,f=o(s?h.BUTTON$COLLAPSE:h.BUTTON$EXPAND),p=(0,F.jsx)(Le,{className:`rounded-lg text-xs`,style:Re,language:t,PreTag:`div`,wrapLongLines:a,customStyle:a?{whiteSpace:`pre-wrap`}:void 0,codeTagProps:a?{style:{whiteSpace:`pre-wrap`}}:void 0,children:u});return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[d?(0,F.jsx)(ze,{text:e,children:p}):p,i&&l&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`self-start text-xs text-muted transition-colors hover:text-white hover:underline`,children:f})]})}function Yn({output:e,exitCode:t,copy:n=!0}){let{t:r}=m(`openhands`);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t!=null&&t!==0&&t!==-1&&(0,F.jsx)(`span`,{className:`self-start rounded bg-status-fail-bg px-1.5 py-0.5 font-mono text-xs text-status-fail-text`,children:r(h.OBSERVATION$EXIT_CODE,{code:t})}),(0,F.jsx)(J,{code:e,language:`bash`,copy:n,placeholder:r(h.OBSERVATION$COMMAND_NO_OUTPUT),expandable:!0,wrapLongLines:!0})]})}var Xn=K({actionKinds:[`ExecuteBashAction`,`TerminalAction`],observationKinds:[`ExecuteBashObservation`,`TerminalObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=t?.observation.command??e?.action.command??``,i=e?.security_risk;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r&&(0,F.jsx)(J,{code:r,language:`bash`}),(i===T.HIGH||i===T.MEDIUM)&&(0,F.jsx)(`span`,{className:`text-xs text-status-fail-text`,children:n(i===T.HIGH?h.SECURITY$HIGH_RISK:h.SECURITY$MEDIUM_RISK)}),t&&(0,F.jsx)(Yn,{output:q(t.observation.content),exitCode:t.observation.exit_code})]})}}),Zn=3,Qn=300,$n=25e4,er=(e,t)=>{if(e.length*t.length>$n)return[...e.map(e=>({type:`del`,text:e})),...t.map(e=>({type:`add`,text:e}))];let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;--a)for(let n=r-1;n>=0;--n)i[a][n]=e[a]===t[n]?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o]===t[s]?(a.push({type:`ctx`,text:e[o]}),o+=1,s+=1):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,text:e[o]}),o+=1):(a.push({type:`add`,text:t[s]}),s+=1);for(;o<n;)a.push({type:`del`,text:e[o]}),o+=1;for(;s<r;)a.push({type:`add`,text:t[s]}),s+=1;return a},tr=(e,t)=>{let n=e.split(`
|
|
33
33
|
`),r=t.split(`
|
|
34
|
-
`),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i+=1;let a=n.length,o=r.length;for(;a>i&&o>i&&n[a-1]===r[o-1];)--a,--o;let s=n.slice(Math.max(0,i-Yn),i),c=n.slice(a,Math.min(n.length,a+Yn));return[...s.map(e=>({type:`ctx`,text:e})),...Qn(n.slice(i,a),r.slice(i,o)),...c.map(e=>({type:`ctx`,text:e}))]},er={add:`bg-status-success-bg text-status-success-text`,del:`bg-status-fail-bg text-status-fail-text`,ctx:`text-muted`},tr={add:`+ `,del:`- `,ctx:` `};function nr({oldText:e,newText:t}){let{t:n}=m(`openhands`),r=$n(e,t),i=r.length>Xn;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`div`,{className:`overflow-auto rounded-lg border border-surface-raised font-mono text-xs`,children:(i?r.slice(0,Xn):r).map((e,t)=>(0,F.jsx)(`div`,{className:w(`whitespace-pre-wrap px-2`,er[e.type]),children:`${tr[e.type]}${e.text}`},`${t}-${e.type}`))}),i&&(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$TRUNCATED)})]})}function rr({path:e,range:t}){return(0,F.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground`,children:[(0,F.jsx)(he,{className:`h-3.5 w-3.5 flex-shrink-0 text-muted`}),(0,F.jsx)(`span`,{className:`break-all`,children:t?`${e}:${t}`:e})]})}var ir=K({actionKinds:[`FileEditorAction`,`StrReplaceEditorAction`],observationKinds:[`FileEditorObservation`,`StrReplaceEditorObservation`],Body:function({action:e,observation:t}){let n=t?.observation.path??e?.action.path??``,r=t?.observation.command??e?.action.command,i=He(n),a=e?.action.view_range,o=r===`view`&&a?`${a[0]}-${a[1]}`:void 0,s=n?(0,F.jsx)(rr,{path:n,range:o}):null;if(t){let e=t.observation,n=null;if(e.error)n=(0,F.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:e.error});else if(e.old_content!=null&&e.new_content!=null)n=(0,F.jsx)(nr,{oldText:e.old_content,newText:e.new_content});else{let t=e.new_content||e.output||(e.content?q(e.content):``);n=t?(0,F.jsx)(J,{code:t,language:i}):null}return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,n]})}if(e){let t=e.action,n=null;return t.command===`create`&&t.file_text?n=(0,F.jsx)(J,{code:t.file_text,language:i}):(t.command===`str_replace`||t.command===`insert`)&&t.new_str!=null&&(n=(0,F.jsx)(nr,{oldText:t.old_str??``,newText:t.new_str})),(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,n]})}return null}});function ar({rows:e}){return(0,F.jsx)(`div`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:e.map(({label:e,value:t})=>(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`span`,{className:`text-muted`,children:e}),(0,F.jsx)(`span`,{className:`break-all font-mono text-foreground`,children:t})]},e))})}var or=K({actionKinds:[`GrepAction`,`GlobAction`],observationKinds:[`GrepObservation`,`GlobObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=t?.observation,i=e?.action,a=r?.pattern??i?.pattern??``,o=r?.search_path??i?.path??``,s=r?`include_pattern`in r?r.include_pattern:null:i&&`include`in i?i.include:null,c=r?`matches`in r?r.matches:r.files:[];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(ar,{rows:[{label:n(h.COMMON$PATTERN),value:a},...o?[{label:n(h.COMMON$PATH),value:o}]:[],...s?[{label:n(h.COMMON$INCLUDE),value:s}]:[]]}),r&&(r.is_error?(0,F.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:q(r.content)}):c.length===0?(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$NO_RESULTS)}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$RESULTS,{count:c.length})}),(0,F.jsx)(`div`,{className:`flex flex-col gap-0.5 font-mono text-xs text-foreground`,children:c.map(e=>(0,F.jsx)(`span`,{className:`break-all`,children:e},e))}),r.truncated&&(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$TRUNCATED)})]}))]})}});function sr({label:e,text:t,isError:n=!1}){return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,F.jsx)(Le,{text:t,children:(0,F.jsx)(`div`,{className:`overflow-auto rounded border border-surface-raised bg-surface-raised p-2 text-xs ${n?`text-danger`:`text-foreground`}`,children:(0,F.jsx)(N,{includeStandard:!0,includeHeadings:!0,children:t})})})]})}var cr=[Jn,ir,or,K({actionKinds:[`TaskAction`],observationKinds:[`TaskObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=e?.action,i=t?.observation,a=i?.subagent??r?.subagent_type??``,o=i?.task_id,s=r?.prompt?.trim()??``,c=i?q(i.content).trim():``,l=[...a?[{label:n(h.TASK$SUBAGENT),value:a}]:[],...o?[{label:n(h.TASK$TASK_ID),value:o}]:[]];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[l.length>0&&(0,F.jsx)(ar,{rows:l}),s&&(0,F.jsx)(sr,{label:n(h.TASK$QUERY),text:s}),c&&(0,F.jsx)(sr,{label:n(h.TASK$RESULT),text:c,isError:i?.is_error})]})}})],lr=e=>new Map(cr.flatMap(t=>(e(t)??[]).map(e=>[e,t]))),ur=lr(e=>e.actionKinds),dr=lr(e=>e.observationKinds);function fr(e,t){if(M(e)){let t=ur.get(e.action.kind);if(t)return(0,F.jsx)(t.Body,{action:e})}else if(j(e)){let n=dr.get(e.observation.kind);if(n)return(0,F.jsx)(n.Body,{action:t,observation:e})}return null}var Y=(e,t)=>e?e.length>t?`${e.substring(0,t)}...`:e:``,X=(e,t)=>_.exists(e)?(0,F.jsx)(p,{ns:`openhands`,i18nKey:e,values:t,components:{path:(0,F.jsx)(en,{}),cmd:(0,F.jsx)(Xt,{})}}):e,pr=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),mr=e=>{let t=e.summary?.trim().replace(/\s+/g,` `)||``;return!t||pr(t)?null:t},Z=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?Y(n,t):n:null},hr=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=Z(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},gr=(e,t)=>{let n=t?.tool_name,r=e.observation,i=Z(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=Z((t?.action??{}).profile_name)??Z(r.profile_name)??Z(r.base_url,80)??Z(r.endpoint,80)??Z(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},_r=e=>{if(!M(e))return``;let t=hr(e);if(t)return t;let n=mr(e);if(n)return n;let r=e.action.kind,i=``,a={};switch(r){case`ExecuteBashAction`:case`TerminalAction`:i=`ACTION_MESSAGE$RUN`,a={command:Y(e.action.command,80)};break;case`FileEditorAction`:case`StrReplaceEditorAction`:i=e.action.command===`view`?`ACTION_MESSAGE$READ`:e.action.command===`create`?`ACTION_MESSAGE$WRITE`:`ACTION_MESSAGE$EDIT`,a={path:e.action.path};break;case`MCPToolAction`:i=`ACTION_MESSAGE$CALL_TOOL_MCP`,a={mcp_tool_name:e.tool_name};break;case`InvokeSkillAction`:i=`ACTION_MESSAGE$INVOKE_SKILL`,a={name:e.action.name};break;case`TaskAction`:i=`ACTION_MESSAGE$TASK`,a={name:e.action.subagent_type};break;case`ThinkAction`:i=`ACTION_MESSAGE$THINK`;break;case`FinishAction`:i=`ACTION_MESSAGE$FINISH`;break;case`TaskTrackerAction`:i=`ACTION_MESSAGE$TASK_TRACKING`;break;case`GrepAction`:i=`ACTION_MESSAGE$GREP`,a={pattern:`pattern`in e.action&&e.action.pattern?Y(String(e.action.pattern),50):``};break;case`GlobAction`:i=`ACTION_MESSAGE$GLOB`,a={pattern:`pattern`in e.action&&e.action.pattern?Y(String(e.action.pattern),50):``};break;case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:i=`ACTION_MESSAGE$BROWSE`;break;default:return String(r).replace(`Action`,``).toUpperCase()}return i?X(i,a):r},vr=(e,t)=>{if(!j(e))return``;let n=gr(e,t);if(n)return n;if(t){let e=hr(t);if(e)return e;let n=mr(t);if(n)return n}let r=e.observation.kind,i=``,a={};switch(r){case`ExecuteBashObservation`:case`TerminalObservation`:i=`OBSERVATION_MESSAGE$RUN`,a={command:e.observation.command?Y(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:i=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:`OBSERVATION_MESSAGE$EDIT`,a={path:e.observation.path||``};break;case`MCPToolObservation`:i=`OBSERVATION_MESSAGE$MCP`,a={mcp_tool_name:e.observation.tool_name};break;case`InvokeSkillObservation`:i=`OBSERVATION_MESSAGE$INVOKE_SKILL`,a={name:e.observation.skill_name};break;case`TaskObservation`:i=`OBSERVATION_MESSAGE$TASK`,a={name:e.observation.subagent};break;case`CanvasUIObservation`:i=`OBSERVATION_MESSAGE$CANVAS_UI`;break;case`SwitchLLMObservation`:i=e.observation.is_error?`MODEL$SWITCH_FAILED`:`MODEL$SWITCHED_TO_PROFILE`,a={name:e.observation.profile_name};break;case`BrowserObservation`:i=`OBSERVATION_MESSAGE$BROWSE`;break;case`TaskTrackerObservation`:{let{command:t}=e.observation;i=t===`plan`?`OBSERVATION_MESSAGE$TASK_TRACKING_PLAN`:`OBSERVATION_MESSAGE$TASK_TRACKING_VIEW`;break}case`ThinkObservation`:i=`OBSERVATION_MESSAGE$THINK`;break;case`GlobObservation`:i=`OBSERVATION_MESSAGE$GLOB`,a={pattern:e.observation.pattern?Y(e.observation.pattern,50):``};break;case`GrepObservation`:i=`OBSERVATION_MESSAGE$GREP`,a={pattern:e.observation.pattern?Y(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return i?X(i,a):r},Q=(e,t)=>{let n=``,r=``;if(G(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;n=_.exists(t)?X(t,{}):`Skill Ready`,r=e._skillReadyContent}else M(e)?(n=_r(e),r=fr(e)??pn(e)):j(e)?(n=vr(e,t),r=e.observation.kind===`TaskTrackerObservation`?(0,F.jsx)(Ln,{event:e}):fr(e,t)??On(e)):je(e)?(n=X(kn(e),{title:jn(e)}),r=Pn(e)):e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&typeof e.action.kind==`string`&&(n=String(e.action.kind).replace(`Action`,``).toUpperCase());return{title:n||_.t(h.EVENT$UNKNOWN_EVENT),details:r}};function yr({event:e,isFromPlanningAgent:t=!1}){let n=Q(e);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(B,{type:`agent`,message:typeof n.details==`string`?n.details:String(n.details),isFromPlanningAgent:t}),e.critic_result!=null&&(0,F.jsx)(Gt,{criticResult:e.critic_result})]})}var br=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
35
|
-
`).trim();return!t.skill_name&&!n?[]:[{name:t.skill_name,content:n}]};function
|
|
34
|
+
`),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i+=1;let a=n.length,o=r.length;for(;a>i&&o>i&&n[a-1]===r[o-1];)--a,--o;let s=n.slice(Math.max(0,i-Zn),i),c=n.slice(a,Math.min(n.length,a+Zn));return[...s.map(e=>({type:`ctx`,text:e})),...er(n.slice(i,a),r.slice(i,o)),...c.map(e=>({type:`ctx`,text:e}))]},nr={add:`bg-status-success-bg text-status-success-text`,del:`bg-status-fail-bg text-status-fail-text`,ctx:`text-muted`},rr={add:`+ `,del:`- `,ctx:` `};function ir({oldText:e,newText:t}){let{t:n}=m(`openhands`),r=tr(e,t),i=r.length>Qn;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`div`,{className:`overflow-auto rounded-lg border border-surface-raised font-mono text-xs`,children:(i?r.slice(0,Qn):r).map((e,t)=>(0,F.jsx)(`div`,{className:w(`whitespace-pre-wrap px-2`,nr[e.type]),children:`${rr[e.type]}${e.text}`},`${t}-${e.type}`))}),i&&(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$TRUNCATED)})]})}function ar({path:e,range:t}){return(0,F.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground`,children:[(0,F.jsx)(ge,{className:`h-3.5 w-3.5 flex-shrink-0 text-muted`}),(0,F.jsx)(`span`,{className:`break-all`,children:t?`${e}:${t}`:e})]})}var or=K({actionKinds:[`FileEditorAction`,`StrReplaceEditorAction`],observationKinds:[`FileEditorObservation`,`StrReplaceEditorObservation`],Body:function({action:e,observation:t}){let n=t?.observation.path??e?.action.path??``,r=t?.observation.command??e?.action.command,i=We(n),a=e?.action.view_range,o=r===`view`&&a?`${a[0]}-${a[1]}`:void 0,s=n?(0,F.jsx)(ar,{path:n,range:o}):null;if(t){let e=t.observation,n=null;if(e.error)n=(0,F.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:e.error});else if(e.old_content!=null&&e.new_content!=null)n=(0,F.jsx)(ir,{oldText:e.old_content,newText:e.new_content});else{let t=e.new_content||e.output||(e.content?q(e.content):``);n=t?(0,F.jsx)(J,{code:t,language:i}):null}return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,n]})}if(e){let t=e.action,n=null;return t.command===`create`&&t.file_text?n=(0,F.jsx)(J,{code:t.file_text,language:i}):(t.command===`str_replace`||t.command===`insert`)&&t.new_str!=null&&(n=(0,F.jsx)(ir,{oldText:t.old_str??``,newText:t.new_str})),(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,n]})}return null}});function sr({rows:e}){return(0,F.jsx)(`div`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:e.map(({label:e,value:t})=>(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`span`,{className:`text-muted`,children:e}),(0,F.jsx)(`span`,{className:`break-all font-mono text-foreground`,children:t})]},e))})}var cr=K({actionKinds:[`GrepAction`,`GlobAction`],observationKinds:[`GrepObservation`,`GlobObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=t?.observation,i=e?.action,a=r?.pattern??i?.pattern??``,o=r?.search_path??i?.path??``,s=r?`include_pattern`in r?r.include_pattern:null:i&&`include`in i?i.include:null,c=r?`matches`in r?r.matches:r.files:[];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(sr,{rows:[{label:n(h.COMMON$PATTERN),value:a},...o?[{label:n(h.COMMON$PATH),value:o}]:[],...s?[{label:n(h.COMMON$INCLUDE),value:s}]:[]]}),r&&(r.is_error?(0,F.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:q(r.content)}):c.length===0?(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$NO_RESULTS)}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$RESULTS,{count:c.length})}),(0,F.jsx)(`div`,{className:`flex flex-col gap-0.5 font-mono text-xs text-foreground`,children:c.map(e=>(0,F.jsx)(`span`,{className:`break-all`,children:e},e))}),r.truncated&&(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:n(h.COMMON$TRUNCATED)})]}))]})}});function lr({label:e,text:t,isError:n=!1}){return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,F.jsx)(ze,{text:t,children:(0,F.jsx)(`div`,{className:`overflow-auto rounded border border-surface-raised bg-surface-raised p-2 text-xs ${n?`text-danger`:`text-foreground`}`,children:(0,F.jsx)(N,{includeStandard:!0,includeHeadings:!0,children:t})})})]})}var ur=[Xn,or,cr,K({actionKinds:[`TaskAction`],observationKinds:[`TaskObservation`],Body:function({action:e,observation:t}){let{t:n}=m(`openhands`),r=e?.action,i=t?.observation,a=i?.subagent??r?.subagent_type??``,o=i?.task_id,s=r?.prompt?.trim()??``,c=i?q(i.content).trim():``,l=[...a?[{label:n(h.TASK$SUBAGENT),value:a}]:[],...o?[{label:n(h.TASK$TASK_ID),value:o}]:[]];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[l.length>0&&(0,F.jsx)(sr,{rows:l}),s&&(0,F.jsx)(lr,{label:n(h.TASK$QUERY),text:s}),c&&(0,F.jsx)(lr,{label:n(h.TASK$RESULT),text:c,isError:i?.is_error})]})}})],dr=e=>new Map(ur.flatMap(t=>(e(t)??[]).map(e=>[e,t]))),fr=dr(e=>e.actionKinds),pr=dr(e=>e.observationKinds);function mr(e,t){if(M(e)){let t=fr.get(e.action.kind);if(t)return(0,F.jsx)(t.Body,{action:e})}else if(j(e)){let n=pr.get(e.observation.kind);if(n)return(0,F.jsx)(n.Body,{action:t,observation:e})}return null}var Y=(e,t)=>e?e.length>t?`${e.substring(0,t)}...`:e:``,X=(e,t)=>g.exists(e)?(0,F.jsx)(p,{ns:`openhands`,i18nKey:e,values:t,components:{path:(0,F.jsx)(nn,{}),cmd:(0,F.jsx)(Qt,{})}}):e,hr=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),gr=e=>{let t=e.summary?.trim().replace(/\s+/g,` `)||``;return!t||hr(t)?null:t},Z=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?Y(n,t):n:null},_r=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=Z(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},vr=(e,t)=>{let n=t?.tool_name,r=e.observation,i=Z(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=Z((t?.action??{}).profile_name)??Z(r.profile_name)??Z(r.base_url,80)??Z(r.endpoint,80)??Z(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},yr=e=>{if(!M(e))return``;let t=_r(e);if(t)return t;let n=gr(e);if(n)return n;let r=e.action.kind,i=``,a={};switch(r){case`ExecuteBashAction`:case`TerminalAction`:i=`ACTION_MESSAGE$RUN`,a={command:Y(e.action.command,80)};break;case`FileEditorAction`:case`StrReplaceEditorAction`:i=e.action.command===`view`?`ACTION_MESSAGE$READ`:e.action.command===`create`?`ACTION_MESSAGE$WRITE`:`ACTION_MESSAGE$EDIT`,a={path:e.action.path};break;case`MCPToolAction`:i=`ACTION_MESSAGE$CALL_TOOL_MCP`,a={mcp_tool_name:e.tool_name};break;case`InvokeSkillAction`:i=`ACTION_MESSAGE$INVOKE_SKILL`,a={name:e.action.name};break;case`TaskAction`:i=`ACTION_MESSAGE$TASK`,a={name:e.action.subagent_type};break;case`ThinkAction`:i=`ACTION_MESSAGE$THINK`;break;case`FinishAction`:i=`ACTION_MESSAGE$FINISH`;break;case`TaskTrackerAction`:i=`ACTION_MESSAGE$TASK_TRACKING`;break;case`GrepAction`:i=`ACTION_MESSAGE$GREP`,a={pattern:`pattern`in e.action&&e.action.pattern?Y(String(e.action.pattern),50):``};break;case`GlobAction`:i=`ACTION_MESSAGE$GLOB`,a={pattern:`pattern`in e.action&&e.action.pattern?Y(String(e.action.pattern),50):``};break;case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:i=`ACTION_MESSAGE$BROWSE`;break;case`CanvasUIAction`:case se:return`CANVASUI`;default:return String(r).replace(`Action`,``).toUpperCase()}return i?X(i,a):r},br=(e,t)=>{if(!j(e))return``;let n=vr(e,t);if(n)return n;if(t){let e=_r(t);if(e)return e;let n=gr(t);if(n)return n}let r=e.observation.kind,i=``,a={};switch(r){case`ExecuteBashObservation`:case`TerminalObservation`:i=`OBSERVATION_MESSAGE$RUN`,a={command:e.observation.command?Y(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:i=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:`OBSERVATION_MESSAGE$EDIT`,a={path:e.observation.path||``};break;case`MCPToolObservation`:i=`OBSERVATION_MESSAGE$MCP`,a={mcp_tool_name:e.observation.tool_name};break;case`InvokeSkillObservation`:i=`OBSERVATION_MESSAGE$INVOKE_SKILL`,a={name:e.observation.skill_name};break;case`TaskObservation`:i=`OBSERVATION_MESSAGE$TASK`,a={name:e.observation.subagent};break;case`CanvasUIObservation`:i=`OBSERVATION_MESSAGE$CANVAS_UI`;break;case`ClientToolObservation`:if(e.tool_name===`canvas_ui_control`){i=`OBSERVATION_MESSAGE$CANVAS_UI`;break}return r.replace(`Observation`,``).toUpperCase();case`SwitchLLMObservation`:i=e.observation.is_error?`MODEL$SWITCH_FAILED`:`MODEL$SWITCHED_TO_PROFILE`,a={name:e.observation.profile_name};break;case`BrowserObservation`:i=`OBSERVATION_MESSAGE$BROWSE`;break;case`TaskTrackerObservation`:{let{command:t}=e.observation;i=t===`plan`?`OBSERVATION_MESSAGE$TASK_TRACKING_PLAN`:`OBSERVATION_MESSAGE$TASK_TRACKING_VIEW`;break}case`ThinkObservation`:i=`OBSERVATION_MESSAGE$THINK`;break;case`GlobObservation`:i=`OBSERVATION_MESSAGE$GLOB`,a={pattern:e.observation.pattern?Y(e.observation.pattern,50):``};break;case`GrepObservation`:i=`OBSERVATION_MESSAGE$GREP`,a={pattern:e.observation.pattern?Y(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return i?X(i,a):r},xr=(e,t)=>e.observation.kind!==`ClientToolObservation`||e.tool_name!==`canvas_ui_control`||!t||!je(t)?null:`UI command '${t.action.command}' dispatched to the Agent Canvas frontend.`,Q=(e,t)=>{let n=``,r=``;if(G(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;n=g.exists(t)?X(t,{}):`Skill Ready`,r=e._skillReadyContent}else M(e)?(n=yr(e),r=mr(e)??hn(e)):j(e)?(n=br(e,t),r=e.observation.kind===`TaskTrackerObservation`?(0,F.jsx)(zn,{event:e}):xr(e,t)??mr(e,t)??An(e)):Ne(e)?(n=X(jn(e),{title:Nn(e)}),r=In(e)):e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&typeof e.action.kind==`string`&&(n=String(e.action.kind).replace(`Action`,``).toUpperCase());return{title:n||g.t(h.EVENT$UNKNOWN_EVENT),details:r}};function Sr({event:e,isFromPlanningAgent:t=!1}){let n=Q(e);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(B,{type:`agent`,message:typeof n.details==`string`?n.details:String(n.details),isFromPlanningAgent:t}),e.critic_result!=null&&(0,F.jsx)(qt,{criticResult:e.critic_result})]})}var Cr=e=>{let{observation:t}=e,n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
35
|
+
`).trim();return!t.skill_name&&!n?[]:[{name:t.skill_name,content:n}]};function wr(e){let t=e.split(`
|
|
36
36
|
`),n=null,r=null,i=0;for(let e=0;e<t.length;e+=1){let a=t[e];if(a.startsWith(C[0]))n=a.trim(),i=e+1;else if(a.startsWith(C[2]))r=a.replace(C[2],``).trim(),i=e+1;else if(a.startsWith(C[1])||a.startsWith(C[3]))i=e+1;else if(a.trim()===``&&e<=i)i=e+1;else break}return{matchInfo:n,filePath:r,body:t.slice(i).join(`
|
|
37
|
-
`).trim()}}function
|
|
38
|
-
`);return r?(0,F.jsx)(B,{type:`agent`,message:r,actions:t,isFromPlanningAgent:n}):null}function
|
|
37
|
+
`).trim()}}function Tr(e){return e.replace(/<important>([\s\S]*?)<\/important>/gi,(e,t)=>`**${t.trim()}**`)}function Er({content:e}){let{t}=m(`openhands`),{matchInfo:n,filePath:r,body:i}=wr(e),a=n||r;return(0,F.jsxs)(`div`,{className:`pl-6 pr-2 pt-2 pb-2`,children:[a&&(0,F.jsxs)(`div`,{className:`mb-3 text-sm text-[var(--oh-muted)] space-y-1`,children:[n&&(0,F.jsx)(`p`,{children:n}),r&&(0,F.jsxs)(`p`,{children:[(0,F.jsxs)(k.Text,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.COMMON$PATH),` `]}),(0,F.jsx)(`code`,{className:`bg-[var(--oh-surface)] px-1.5 py-0.5 rounded text-[var(--oh-text-tertiary)]`,children:r})]})]}),a&&i&&(0,F.jsx)(`hr`,{className:`border-[var(--oh-border-subtle)] mb-3`}),i&&(0,F.jsx)(N,{children:Tr(i)})]})}function Dr({items:e,titleKey:t=h.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}){let{t:n}=m(`openhands`),[r,i]=P.useState({}),a=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1 mt-1`,children:[(0,F.jsx)(k.Text,{className:`font-bold text-[var(--oh-foreground)] text-sm px-2 py-1`,children:n(t)}),e.map(e=>{let t=r[e.name]||!1;return(0,F.jsxs)(`div`,{className:`border border-[var(--oh-border-subtle)] rounded-md overflow-hidden`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>a(e.name),className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-tertiary transition-colors cursor-pointer`,children:[(0,F.jsx)(k.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,F.jsx)(b,{size:14}):(0,F.jsx)(l,{size:14})}),(0,F.jsx)(k.Text,{className:`font-normal text-[var(--oh-foreground)] text-sm`,children:e.name})]}),t&&e.content&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`hr`,{className:`border-[var(--oh-border-subtle)]`}),(0,F.jsx)(Er,{content:e.content})]})]},e.name)})]})}function Or(e){if(G(e))return e._skillReadyItems.length>0?{items:e._skillReadyItems,titleKey:h.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}:null;if(j(e)&&e.observation.kind===`InvokeSkillObservation`){let t=Cr(e);return t.length>0?{items:t,titleKey:h.SKILLS$INVOKED_SKILL_KNOWLEDGE}:null}return null}function $({event:e,isLastMessage:t,correspondingAction:n}){let{title:r,details:i}=Q(e,n);if(!G(e)&&j(e)&&e.observation.kind===`TaskTrackerObservation`)return(0,F.jsx)(`div`,{children:i});let a;G(e)?a=`success`:j(e)?a=_n(e):Ne(e)&&(a=gn(e));let o=Or(e);return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(R,{title:r,details:o?(0,F.jsx)(Dr,{items:o.items,titleKey:o.titleKey}):i,success:a,initiallyExpanded:!1,titleIcon:o?(0,F.jsx)(ue,{className:`h-4 w-4 stroke-[var(--oh-muted)] flex-shrink-0 mr-2`}):void 0}),t&&(0,F.jsx)(Lt,{})]})}function kr({event:e,actions:t,isFromPlanningAgent:n=!1}){let r=e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
38
|
+
`);return r?(0,F.jsx)(B,{type:`agent`,message:r,actions:t,isFromPlanningAgent:n}):null}function Ar(e,t){if(t)return`🚫`;switch(e){case`PreToolUse`:return`⏳`;case`PostToolUse`:return`✅`;case`UserPromptSubmit`:return`📝`;case`SessionStart`:return`🚀`;case`SessionEnd`:return`🏁`;case`Stop`:return`⏹️`;default:return`🔗`}}function jr(e){return e.length>80?`${e.slice(0,77)}...`:e}function Mr(e,t){return e?`blocked`:t?`ok`:`failed`}function Nr(e,t){return e?`bg-amber-900/50 text-amber-300`:t?`bg-green-900/50 text-green-300`:`bg-red-900/50 text-red-300`}function Pr({event:e}){let{t}=m(`openhands`);if(!Ie(e))return null;let n=Ar(e.hook_event_type,e.blocked),r=Mr(e.blocked,e.success),i=Nr(e.blocked,e.success),a=(()=>{if(!e.blocked)return e.success?`success`:`error`})();return(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{children:[n,` `,t(h.HOOK$HOOK_LABEL),`: `,e.hook_event_type,e.tool_name&&(0,F.jsxs)(`span`,{className:`text-[var(--oh-muted)] ml-2`,children:[`(`,e.tool_name,`)`]}),(0,F.jsx)(`span`,{className:w(`ml-2 px-1 py-0.5 rounded text-xs`,i),children:r})]}),details:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[var(--oh-muted)]`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$COMMAND),`:`]}),` `,(0,F.jsx)(`code`,{className:`text-xs bg-[var(--oh-surface)] px-1 py-0.5 rounded`,children:jr(e.hook_command)})]}),e.exit_code!==null&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$EXIT_CODE),`:`]}),` `,e.exit_code]}),e.blocked&&e.reason&&(0,F.jsxs)(`div`,{className:`text-amber-400`,children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$BLOCKED_REASON),`:`]}),` `,e.reason]}),e.additional_context&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$CONTEXT),`:`]}),` `,e.additional_context]}),e.error&&(0,F.jsxs)(`div`,{className:`text-red-400`,children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$ERROR),`:`]}),` `,e.error]}),e.stdout&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$OUTPUT),`:`]}),(0,F.jsx)(`pre`,{className:`text-xs bg-[var(--oh-surface)] p-2 rounded mt-1 overflow-x-auto max-h-40 overflow-y-auto`,children:e.stdout})]}),e.stderr&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`span`,{className:`text-[var(--oh-text-subtle)]`,children:[t(h.HOOK$STDERR),`:`]}),(0,F.jsx)(`pre`,{className:`text-xs bg-[var(--oh-surface)] p-2 rounded mt-1 overflow-x-auto max-h-40 overflow-y-auto text-amber-300`,children:e.stderr})]})]}),success:a})}function Fr(e){let t=[],n=[];for(let r of e)ke(r)?(n.length>0&&t.push(n),n=[r]):n.push(r);return n.length>0&&t.push(n),t}var Ir=e=>e?.toUpperCase().endsWith(`PLAN.MD`)??!1;function Lr(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(Fe(n)&&Ir(n.observation.path))return n.id}return null}function Rr(e){return(0,P.useMemo)(()=>{let t=new Set;return Fr(e).forEach(e=>{let n=Lr(e);n&&t.add(n)}),t},[e])}function zr(e,t){return t.has(e)}var Br=e=>e.activated_skills||e.activated_microagents||[],Vr=e=>!e||e.length===0?!1:e.some(e=>e.type===`text`&&e.text.trim().length>0),Hr=e=>{let t=Br(e).length>0,n=Vr(e.extended_content);return t&&n},Ur=(e,t,n)=>{try{let r=Jn(e);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Yt,{event:e,isLastMessage:!1,isFromPlanningAgent:t.isFromPlanningAgent}),(0,F.jsx)($,{event:r,isLastMessage:n})]})}catch{return(0,F.jsx)(Yt,{event:e,isLastMessage:n,isFromPlanningAgent:t.isFromPlanningAgent})}};function Wr({event:e,messages:t,isLastMessage:n,isInLast10Actions:r,planPreviewEventIds:i,suppressThought:a=!1}){let{data:o}=ee(),{planContent:s}=O(),{curAgentState:c}=_e(),l=c===S.RUNNING||c===S.LOADING,u=e.isFromPlanningAgent||!1,d={isLastMessage:n,isInLast10Actions:r,config:o,isFromPlanningAgent:u};if(De(e)&&Ee(e))return(0,F.jsx)(nt,{status:e.value});if(Ae(e))return(0,F.jsx)(Tt,{event:e,...d});if(Ie(e))return(0,F.jsx)(Pr,{event:e});if(Ne(e))return(0,F.jsx)($,{event:e,isLastMessage:n});if(we(e)){let{reasoning:t,message:n}=Me(e.content??``,{streaming:!0}),r=[e.reasoning_content??``,t].filter(Boolean).join(`
|
|
39
39
|
|
|
40
|
-
`);return(0,F.jsxs)(F.Fragment,{children:[r&&(0,F.jsx)(H,{content:r}),n&&(0,F.jsx)(B,{type:`agent`,message:n,isFromPlanningAgent:u})]})}if(M(e)&&e.action.kind===`FinishAction`)return(0,F.jsx)(
|
|
40
|
+
`);return(0,F.jsxs)(F.Fragment,{children:[r&&(0,F.jsx)(H,{content:r}),n&&(0,F.jsx)(B,{type:`agent`,message:n,isFromPlanningAgent:u})]})}if(M(e)&&e.action.kind===`FinishAction`)return(0,F.jsx)(Sr,{event:e,...d});if(M(e)&&e.action.kind===`ThinkAction`)return(0,F.jsx)(H,{content:e.action.thought});if(M(e)){let t=Oe(e);return(0,F.jsxs)(F.Fragment,{children:[t&&(0,F.jsx)(H,{content:t}),!a&&(0,F.jsx)(kr,{event:e,isFromPlanningAgent:u}),(0,F.jsx)($,{event:e,isLastMessage:n})]})}if(j(e)){if(Fe(e))return i&&zr(e.id,i)?(0,F.jsx)(Ct,{planContent:s,isStreaming:n&&c===S.RUNNING,isBuildDisabled:l}):null;let r=t.find(t=>M(t)&&t.id===e.action_id),o=!a&&r&&M(r)&&r.action.kind!==`ThinkAction`,d=r&&M(r)?Oe(r):``;return(0,F.jsxs)(F.Fragment,{children:[d&&(0,F.jsx)(H,{content:d}),o&&(0,F.jsx)(kr,{event:r,isFromPlanningAgent:u}),(0,F.jsx)($,{event:e,isLastMessage:n,correspondingAction:r&&M(r)?r:void 0})]})}if(!M(e)&&!j(e)){let t=e;return ke(e)&&Hr(t)?Ur(t,d,n):(0,F.jsx)(Yt,{event:t,...d,isLastMessage:n})}return(0,F.jsx)($,{event:e,isLastMessage:n})}var Gr=e=>{if(M(e)){let{kind:t}=e.action;return!(t===`FinishAction`||t===`ThinkAction`)}return j(e)?!(Fe(e)||e.observation.kind===`TaskTrackerObservation`):!1},Kr=(e,t=2,n=e)=>{if(t<1)throw Error(`minSize must be at least 1`);let r=[],i=new Set,a=null,o=()=>{a&&=(a.events.length>=t?r.push({kind:`group`,events:a.events,startIndex:a.startIndex}):a.events.forEach((e,t)=>{r.push({kind:`single`,event:e,index:a.startIndex+t})}),null)};return e.forEach((e,t)=>{if(Gr(e)){let s=Te(e,n);s&&!i.has(s.id)&&(o(),i.add(s.id),r.push({kind:`thought`,action:s,index:t})),a||={events:[],startIndex:t},a.events.push(e)}else o(),r.push({kind:`single`,event:e,index:t})}),o(),r},qr=(0,P.createContext)(!1);function Jr({events:e,allEvents:t,isFinalized:n=!1,children:r}){let{t:i}=m(`openhands`),[a,o]=P.useState(!1),s=P.useId(),c=`${s}-toggle`;if(e.length===0)return null;let l=e.find(e=>M(e)),u=e.filter(j).length,d=e.length,f=!!l,p=e[e.length-1],g=null;p&&(M(p)?g=Q(p).title:j(p)&&(g=Q(p,(t??e).find(e=>M(e)&&e.id===p.action_id)).title));let _=f?i(h.EVENT_GROUP$ACTIONS_PROGRESS,{completed:u,total:d}):i(h.EVENT_GROUP$ACTIONS_COMPLETED,{count:d}),v=a?L:I;return(0,F.jsxs)(`div`,{className:`my-1 w-full py-1 text-sm`,"data-testid":`event-group`,children:[(0,F.jsx)(`button`,{id:c,type:`button`,onClick:()=>o(e=>!e),"aria-controls":s,"aria-expanded":a,"aria-label":i(a?h.EVENT_GROUP$COLLAPSE:h.EVENT_GROUP$EXPAND),"data-testid":`event-group-toggle`,className:`w-full flex items-center justify-between gap-2 text-left cursor-pointer`,children:n?(0,F.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,F.jsx)(v,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,F.jsx)(`span`,{className:`truncate`,children:_})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0 font-normal text-[var(--oh-muted)]`,children:[(0,F.jsx)(v,{className:`h-4 w-4 fill-[var(--oh-muted)] flex-shrink-0`}),(0,F.jsx)(`span`,{className:`truncate`,children:g??_})]}),(0,F.jsxs)(`span`,{className:`flex items-center flex-shrink-0 font-normal text-[var(--oh-muted)]`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:_}),f?(0,F.jsx)(x,{"data-testid":`spinner-icon`,className:`h-4 w-4 ml-2 inline animate-spin text-[var(--oh-muted)]`}):null]})]})}),a&&(0,F.jsx)(`div`,{id:s,role:`region`,"aria-labelledby":c,className:`mt-1.5 flex flex-col`,"data-testid":`event-group-content`,children:(0,F.jsx)(qr.Provider,{value:!0,children:r})})]})}var Yr=e=>e.at(-1)?.id,Xr=e=>e.at(-1),Zr=P.memo(({messages:e,allEvents:t})=>{let{conversationId:n}=A(),r=Rr(t),i=ye(e=>n?e.entriesByConversation[n]:void 0),a=P.useMemo(()=>{if(!i||i.length===0)return null;let e=new Set;for(let t of i)t.anchorEventId!==null&&e.add(t.anchorEventId);return e.size>0?e:null},[i]),o=e=>{if(!a||e===void 0)return null;let t=String(e);return a.has(t)?(0,F.jsx)(at,{conversationId:n,anchorEventId:t}):null},s=P.useMemo(()=>Kr(e,void 0,t),[e,t]),c=(n,i,a)=>(0,F.jsx)(Wr,{event:n,messages:t,isLastMessage:e.length-1===i,isInLast10Actions:e.length-1-i<10,planPreviewEventIds:r,suppressThought:a},n.id);return(0,F.jsx)(F.Fragment,{children:s.map((e,n)=>{if(e.kind===`single`)return(0,F.jsxs)(P.Fragment,{children:[c(e.event,e.index,!0),o(e.event.id)]},`single-${e.event.id}`);if(e.kind===`thought`)return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(kr,{event:e.action}),o(e.action.id)]},`thought-${e.action.id}`);let r=n<s.length-1,i=e.events[0]?.id??`group-${e.startIndex}`;return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(Jr,{events:e.events,allEvents:t,isFinalized:r,children:e.events.map((t,n)=>c(t,e.startIndex+n,!0))}),e.events.map(e=>(0,F.jsx)(P.Fragment,{children:o(e.id)},`model-${e.id}`))]},`group-${i}`)})})},(e,t)=>e.messages.length===t.messages.length&&e.allEvents.length===t.allEvents.length&&Yr(e.messages)===Yr(t.messages)&&Yr(e.allEvents)===Yr(t.allEvents)&&Xr(e.messages)===Xr(t.messages)&&Xr(e.allEvents)===Xr(t.allEvents));Zr.displayName=`Messages`;export{Je as S,$e as _,An as a,Xe as b,jt as c,mt as d,ut as f,nt as g,at as h,Nn as i,bt as l,lt as m,Kr as n,hn as o,st as p,In as r,Rt as s,Zr as t,B as u,R as v,Ye as x,Ze as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-DB9LsAzA.js";e();var r=t(),i={sm:`w-[384px]`,md:`w-[520px]`,lg:`w-[640px]`,xl:`w-[720px]`},a=`max-w-[90vw]`;function o(e){return i[e]}function s({testID:e,children:t,className:i,width:a=`sm`}){return(0,r.jsx)(`div`,{"data-testid":e,className:n(`bg-base-secondary flex flex-col gap-6 items-center p-6 rounded-xl`,o(a),i),children:t})}export{s as n,o as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./utils-
|
|
1
|
+
import{t as e}from"./utils-DB9LsAzA.js";var t=e(`text-xl leading-6 -tracking-[0.01em] font-medium text-[var(--oh-modal-title-foreground)]`),n=e(`text-sm font-medium text-[var(--oh-modal-title-foreground)]`),r=e(`text-lg font-medium text-[var(--oh-modal-title-foreground)]`),i=r;export{n as i,r as n,i as r,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{t as i}from"./utils-DB9LsAzA.js";e();var a=t(),o=e=>(0,a.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,a.jsx)(`path`,{d:`M12 4L4 12M4 4L12 12`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})});function s({onClose:e,testId:t,className:s,disabled:c=!1}){let{t:l}=n(`openhands`);return(0,a.jsx)(`button`,{type:`button`,"data-testid":t,onClick:e,disabled:c,"aria-label":l(r.BUTTON$CLOSE),className:i(`absolute right-4 top-4 z-10 flex cursor-pointer items-center justify-center rounded-sm border-0 bg-transparent p-1 text-tertiary-alt transition-colors hover:bg-surface-raised hover:text-white disabled:cursor-not-allowed disabled:opacity-50`,s),children:(0,a.jsx)(o,{"aria-hidden":!0,className:`size-4`})})}export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,i as r,n as i,r as a}from"./vendor-styling-CI0PQ3ab.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-Cbf5AGg_.js";import{t as c}from"./declaration-BGsHjPEW.js";import{P as l,t as u}from"./utils-DB9LsAzA.js";import{_ as d,d as f}from"./agent-server-compatibility-D6DSanlx.js";import{m as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js";import{t as m}from"./proxy-CuhhyjdX.js";import{f as h}from"./form-control-classes-CvUaw8_L.js";import{i as g}from"./combobox-caret-A5jMVHgE.js";import{n as _}from"./map-provider-XSFHmdDs.js";import{g as v}from"./sdk-settings-schema-Ba_Pa9uf.js";var y=e(t(),1),b=e=>{let[t,...n]=e.split(`/`);return!t||n.length===0?{provider:``,model:e,separator:``}:{provider:t,model:n.join(`/`),separator:`/`}};function x(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n))}function S(e,t){return t===void 0?e:e.filter(e=>e.verified===t)}function C(e,t){return!t||t<=0?e:e.slice(0,t)}function w(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}var T=class{static async searchModels(e={},t){let n=d();if(n.backend.kind===`cloud`){let t=w({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq,provider__eq:e.provider__eq});return m({backend:n.backend,method:`GET`,path:`/api/v1/config/models/search${t}`})}let r=new p(f()),i=t===void 0?r.getVerifiedModels():Promise.resolve(t),[a,o]=await Promise.all([r.getModels(),i]),s=e.provider__eq??null,c=new Set(s?o?.[s]??[]:[]),l=[...c].map(e=>({provider:s,name:e,verified:!0})),u=s?(a??[]).filter(e=>e.startsWith(`${s}/`)).map(e=>e.slice(s.length+1)).filter(e=>e.length>0&&!c.has(e)).map(e=>({provider:s,name:e,verified:!1})):[];return{items:C(S(x([...l,...u],e.query),e.verified__eq),e.limit),next_page_id:null}}static async searchProviders(e={},t){let n=d();if(n.backend.kind===`cloud`){let t=w({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq});return m({backend:n.backend,method:`GET`,path:`/api/v1/config/providers/search${t}`})}let r=new p(f()),i=t===void 0?r.getVerifiedModels():Promise.resolve(t),[a,o]=await Promise.all([r.getProviders(),i]),s=new Set(Object.keys(o??{}));return{items:C(S(x([...new Set([...s,...a??[]])].map(e=>({name:e,verified:s.has(e)})),e.query),e.verified__eq),e.limit),next_page_id:null}}},E=[`config`,`verified-models`],D=1e3*60*5,O=1e3*60*15;async function k(){return d().backend.kind===`cloud`?{}:await new p(f()).getVerifiedModels()??{}}var A=()=>o({queryKey:[`config`,`providers`],queryFn:async({client:e})=>{let t=await e.fetchQuery({queryKey:E,queryFn:k,staleTime:D});return(await T.searchProviders({limit:100},t)).items},staleTime:D,gcTime:O}),j=10;async function M(e,t,n,r=0){if(r>=j)throw Error(`Too many pagination requests for provider ${e}`);let i=await T.searchModels({provider__eq:e,limit:100,page_id:n},t);if(i.next_page_id){let n=await M(e,t,i.next_page_id,r+1);return[...i.items,...n]}return i.items}var N=e=>o({queryKey:[`config`,`models`,e],queryFn:async({client:t})=>M(e,await t.fetchQuery({queryKey:E,queryFn:k,staleTime:D})),enabled:!!e,staleTime:D,gcTime:O}),P=n();function F({isDisabled:e,currentModel:t,onChange:n,onDefaultValuesChanged:o,wrapperClassName:d,labelClassName:f}){let[,p]=y.useState(null),[m,x]=y.useState(null),[S,C]=y.useState(null),{data:w=[]}=A(),{data:T=[],isLoading:E,error:D}=N(m),O=y.useMemo(()=>w.filter(e=>e.verified),[w]),k=y.useMemo(()=>w.filter(e=>!e.verified),[w]),j=y.useMemo(()=>T.filter(e=>e.verified),[T]),M=y.useMemo(()=>T.filter(e=>!e.verified),[T]);y.useEffect(()=>{if(t){let{provider:e,model:n}=b(t);p(t),x(e||null),C(n),o?.(e||null,n)}},[t]);let F=e=>{x(e),C(null),p(`${e}/`),n?.(e,null)},I=e=>{let t=`${m}/${e}`;m===`openai`&&(t=e),p(t),C(e),n?.(m,e)},L=()=>{x(null),p(null)},{t:R}=s(`openhands`);return(0,P.jsxs)(`div`,{className:u(`flex flex-col md:flex-row w-full min-w-0 justify-between gap-4 md:gap-[46px]`,d),children:[(0,P.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,P.jsx)(`label`,{className:u(`text-sm`,f),children:R(c.LLM$PROVIDER)}),(0,P.jsxs)(i,{"data-testid":`llm-provider-input`,isRequired:!0,isVirtualized:!1,name:`llm-provider-input`,isDisabled:e,"aria-label":R(c.LLM$PROVIDER),isClearable:!1,onSelectionChange:e=>{e?.toString()&&F(e.toString())},onInputChange:e=>!e&&L(),defaultSelectedKey:m??void 0,selectedKey:m,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:g},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:h}},children:[(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:O.map(e=>(0,P.jsx)(r,{"data-testid":`provider-item-${e.name}`,children:_(e.name)},e.name))}),k.length>0?(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:k.map(e=>(0,P.jsx)(r,{children:_(e.name)},e.name))}):null]})]}),m===`openhands`&&(0,P.jsx)(v,{testId:`openhands-account-help`,text:R(c.SETTINGS$NEED_OPENHANDS_ACCOUNT),linkText:R(c.SETTINGS$CLICK_HERE),href:l.PRODUCTION,size:`settings`,linkColor:`white`}),(0,P.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,P.jsx)(`label`,{className:u(`text-sm`,f),children:R(c.LLM$MODEL)}),(0,P.jsxs)(i,{"data-testid":`llm-model-input`,isRequired:!0,isVirtualized:!1,isLoading:E,name:`llm-model-input`,"aria-label":R(c.LLM$MODEL),isClearable:!1,onSelectionChange:e=>{e?.toString()&&I(e.toString())},isDisabled:e||!m,selectedKey:S,defaultSelectedKey:S??void 0,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:g},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:h}},children:[(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:j.map(e=>(0,P.jsx)(r,{children:e.name},e.name))}),M.length>0?(0,P.jsx)(a,{title:R(c.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:M.map(e=>(0,P.jsx)(r,{"data-testid":`model-item-${e.name}`,children:e.name},e.name))}):null]}),D&&(0,P.jsx)(`p`,{"data-testid":`models-error`,className:`text-danger text-xs`,children:R(c.CONFIGURATION$ERROR_FETCH_MODELS)})]})]})}export{b as n,F as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./navigation-context-SjzfpygH.js";var i=e(t(),1),a=n();function o(e){return e.metaKey||e.altKey||e.ctrlKey||e.shiftKey}function s(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}var c=i.forwardRef(({to:e,replace:t=!1,end:n=!1,onClick:i,className:c,children:l,target:u,rel:d,...f},p)=>{let{currentPath:m,navigate:h}=r(),g=s(m,e,n),_=typeof c==`function`?c({isActive:g}):c,v=n=>{i?.(n),!(n.defaultPrevented||n.button!==0||o(n)||u===`_blank`)&&(n.preventDefault(),h(e,{replace:t}))};return(0,a.jsx)(`a`,{...f,ref:p,href:e,target:u,rel:d,onClick:v,className:_,"aria-current":g?`page`:void 0,children:l})});c.displayName=`NavigationLink`;export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{k as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useQueries-BpIlT8Mt.js";import{t as s}from"./useQuery-D5pEZbY0.js";import{t as c}from"./useTranslation-Cbf5AGg_.js";import{t as l}from"./declaration-BGsHjPEW.js";import{l as u,n as d}from"./active-backend-context-BCXRv5pm.js";import{t as f}from"./createLucideIcon-D4Tak8A1.js";import{t as p}from"./onboarding-modal-DQwihcTz.js";import{t as m}from"./utils-DB9LsAzA.js";import{d as h}from"./agent-server-compatibility-D6DSanlx.js";import{g,h as _,o as v}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js";import{t as y}from"./modal-backdrop-Dsmzgr5s.js";import{r as b,t as x}from"./modal-body-CDZdZ-eT.js";import{r as S}from"./base-modal-Cb0C6m0Q.js";import{i as C}from"./modal-classes-B4oit_4c.js";import{t as w}from"./brand-button-2Tp3aXk1.js";import{t as T}from"./use-onboarding-completion-DkRpDTsD.js";import{t as E}from"./confirmation-modal-4n_944zq.js";import{t as D}from"./folder-ynxP2EIL.js";import{t as O}from"./close-DO5Rq_CS.js";var k=f(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),A=f(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]);function j(){return new v(h())}function M(e){return{workspaces:e.workspaces.map(({parentPath:e,...t})=>({...t,...e?{parentPath:e}:{}})),workspaceParents:e.workspaceParents}}var N=class{static async listWorkspaces(){return M(await j().listWorkspaces())}static async addWorkspaces(e){return M(await j().addWorkspaces(e))}static async removeWorkspace(e){await j().deleteWorkspace(e)}static async addWorkspaceParents(e){return M(await j().addWorkspaceParents(e))}static async removeWorkspaceParent(e){await j().deleteWorkspaceParent(e)}};function P(){let e=i();return a({mutationFn:e=>N.addWorkspaces(e),onSuccess:()=>e.invalidateQueries({queryKey:u.all})})}function F(){let e=i();return a({mutationFn:e=>N.removeWorkspace(e),onSuccess:()=>e.invalidateQueries({queryKey:u.all})})}function I(){let e=i();return a({mutationFn:e=>N.addWorkspaceParents(e),onSuccess:()=>e.invalidateQueries({queryKey:u.all})})}function L(){let e=i();return a({mutationFn:e=>N.removeWorkspaceParent(e),onSuccess:()=>e.invalidateQueries({queryKey:u.all})})}var R=e(t(),1);function z({enabled:e=!0}={}){return s({queryKey:u.all,queryFn:()=>N.listWorkspaces(),enabled:e,retry:(e,t)=>!_(t)&&e<3,meta:{disableToast:!0},staleTime:6e4})}function B(){let{data:e,isLoading:t,isError:n,error:r}=z(),i=_(r),a=e?.workspaces??[],s=e?.workspaceParents??[],c=(0,R.useMemo)(()=>{let e=new Set(s.map(e=>e.path)),t=[].filter(t=>!e.has(t.path));return t.length===0?s:[...s,...t]},[s,i]),l=o({queries:i?[]:c.map(e=>({queryKey:[`file`,`search_subdirs`,e.path],queryFn:()=>new g(h()).searchSubdirectories(e.path),retry:!1,meta:{disableToast:!0}}))}),u=t||l.some(e=>e.isLoading),d=n||l.some(e=>e.isError);return{workspaces:(0,R.useMemo)(()=>{let e=new Map,t=new Map(c.map((e,t)=>[e.path,l[t]]));return c.forEach(n=>{(t.get(n.path)?.data?.items??[]).forEach(t=>{e.has(t.path)||e.set(t.path,{id:t.path,name:t.name,path:t.path,parentPath:n.path})})}),a.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[a,c,l.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),parents:c,isLoading:u,isError:d,error:r}}function V(e,t){return _(e)?t(l.HOME$WORKSPACES_UNSUPPORTED_AGENT_SERVER,{actualVersion:e.actualVersion,requiredVersion:e.requiredVersion}):null}function H(){return new g(h())}var ee=e=>{let t=d();return s({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>H().searchSubdirectories(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},te=()=>{let e=d();return s({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>H().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})},U=n(),W=e=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.8227 16.6549L10.4043 12.6668L13.8227 8.67871L14.9615 9.6549L12.3799 12.6668L14.9615 15.6787L13.8227 16.6549Z`,fill:`currentColor`})}),G=`/projects`;function K({label:e,entries:t,currentPath:n,onPick:r}){return t.length===0?null:(0,U.jsxs)(`div`,{className:`px-2 pb-3`,children:[(0,U.jsx)(`div`,{className:`px-2 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:e}),(0,U.jsx)(`ul`,{children:t.map(e=>{let t=n===e.path;return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`folder-browser-sidebar-${e.label.toLowerCase()}`,className:m(`flex items-center gap-2 w-full px-2 py-1 rounded text-sm cursor-pointer`,t?`bg-tertiary text-white`:`text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,U.jsx)(D,{width:14,height:14,className:`shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.path)})})]})}function q(e){let t=Y(e);if(!t||t===`/`||J(t))return null;let n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));if(n<0)return null;if(n===0)return`/`;let r=t.slice(0,n);return/^[A-Za-z]:$/.test(r)?`${r}${t[n]}`:r}function J(e){return/^[A-Za-z]:[\\/]?$/.test(e)}function Y(e){let t=e.replace(/[\\/]+$/,``);return/^[A-Za-z]:$/.test(t)?`${t}${e.includes(`/`)&&!e.includes(`\\`)?`/`:`\\`}`:t}function X(e){return e?.home===`/home/openhands`}function Z({isOpen:e,onClose:t,onAdd:n,onAddParent:r}){let{t:i}=c(`openhands`),[a,o]=(0,R.useState)(null),s=d(),{data:u}=te();(0,R.useEffect)(()=>{e&&u?.home&&a===null&&o(X(u)?G:u.home),e||o(null)},[e,u?.home,a]),(0,R.useEffect)(()=>{o(null)},[s.backend.id,s.orgId]);let{data:f,isLoading:p,isError:h,error:g}=ee(e?a:null),_=(0,R.useMemo)(()=>{if(!u?.home)return[];let e=[{label:`Home`,path:Y(u.home)||u.home},...u.favorites??[]];return X(u)&&!e.some(e=>e.path===G)&&e.push({label:G,path:G}),e},[u]),v=u?.locations??[];if(!e)return null;let T=f?.items??[],E=a?q(a):null,O=u?.home===`/home/openhands`&&(u?.favorites?.length??0)===0&&a===u?.home&&!p&&!h&&T.length===0,k=e=>{let t=Y(e);if(!t)return`/`;if(t===`/`||J(t))return t;let n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n>=0&&t.slice(n+1)||t};return(0,U.jsx)(y,{onClose:t,"aria-label":i(l.HOME$ADD_WORKSPACES_TITLE),children:(0,U.jsxs)(`div`,{"data-testid":`folder-browser-modal`,className:m(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,b(`xl`),x,`h-[480px]`),children:[(0,U.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,U.jsx)(S,{className:C,title:i(l.HOME$ADD_WORKSPACES_TITLE)})}),(0,U.jsxs)(`div`,{className:`flex flex-1 min-h-0`,children:[(0,U.jsxs)(`aside`,{"data-testid":`folder-browser-sidebar`,className:`w-[180px] shrink-0 border-r border-[var(--oh-border-input)] bg-[var(--oh-surface)] py-3 overflow-y-auto`,children:[(0,U.jsx)(K,{label:i(l.HOME$FAVORITES),entries:_,currentPath:a,onPick:o}),(0,U.jsx)(K,{label:i(l.HOME$LOCATIONS),entries:v,currentPath:a,onPick:o})]}),(0,U.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 border-b border-[var(--oh-border-input)]`,children:[(0,U.jsx)(`button`,{type:`button`,"data-testid":`folder-browser-up`,onClick:()=>E&&o(E),disabled:!E,"aria-label":i(l.COMMON$UP),className:`p-1 rounded hover:bg-[var(--oh-interactive-hover)] text-white disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer`,children:(0,U.jsx)(W,{width:16,height:16})}),(0,U.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,"data-testid":`folder-browser-current-path`,children:a??``})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-[1fr_120px] px-4 py-1 border-b border-[var(--oh-border-input)] text-xs text-[var(--oh-text-secondary)] font-semibold`,children:[(0,U.jsx)(`span`,{children:i(l.HOME$NAME)}),(0,U.jsx)(`span`,{children:i(l.HOME$KIND)})]}),(0,U.jsxs)(`ul`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`folder-browser-list`,children:[p&&(0,U.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,children:i(l.HOME$LOADING)}),h&&(0,U.jsx)(`li`,{className:`px-4 py-2 text-sm text-red-400`,"data-testid":`folder-browser-error`,children:g?.message??i(l.COMMON$FAILED_TO_LOAD)}),!p&&!h&&T.length===0&&(0,U.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,"data-testid":O?`folder-browser-host-home-hint`:`folder-browser-empty`,children:i(O?l.HOME$HOST_HOME_NOT_MOUNTED_HINT:l.HOME$NO_WORKSPACES)}),T.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,onClick:()=>o(e.path),className:`grid grid-cols-[1fr_120px] items-center w-full text-left px-4 py-1.5 text-sm text-white hover:bg-[var(--oh-interactive-hover)] cursor-pointer`,"data-testid":`folder-browser-entry-${e.name}`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,U.jsx)(D,{width:16,height:16,className:`shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,U.jsx)(`span`,{className:`text-[var(--oh-text-secondary)] text-xs`,children:i(l.HOME$FOLDER)})]})},e.path))]})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:[(0,U.jsx)(w,{type:`button`,variant:`secondary`,onClick:t,testId:`folder-browser-cancel`,children:i(l.HOME$CANCEL)}),r&&(0,U.jsx)(w,{type:`button`,variant:`secondary`,onClick:()=>{!a||!r||(r([{id:a,name:k(a),path:a}]),t())},isDisabled:!a||p,testId:`folder-browser-add-all-subdirs`,children:i(l.HOME$ADD_ALL_SUBDIRECTORIES)}),(0,U.jsx)(w,{type:`button`,variant:`primary`,onClick:()=>{a&&(n([{id:a,name:k(a),path:a}]),t())},isDisabled:!a||p,testId:`folder-browser-use`,children:i(l.HOME$ADD_THIS_DIRECTORY)})]})]})})}function ne({isOpen:e,workspaces:t,workspaceParents:n=[],onClose:r,onRemove:i,onRemoveParent:a}){let{t:o}=c(`openhands`),[s,u]=R.useState(null);if(!e)return null;let d=t.filter(e=>!e.parentPath),f=new Map;t.forEach(e=>{if(!e.parentPath)return;let t=f.get(e.parentPath)??[];t.push(e),f.set(e.parentPath,t)});let p=d.length>0||n.length>0;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(y,{onClose:r,"aria-label":o(l.HOME$MANAGE_WORKSPACES),children:(0,U.jsxs)(`div`,{"data-testid":`manage-workspaces-modal`,className:m(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,b(`lg`),x,`max-h-[70vh]`),children:[(0,U.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,U.jsx)(S,{className:C,title:o(l.HOME$MANAGE_WORKSPACES)})}),(0,U.jsxs)(`div`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`manage-workspaces-list`,children:[!p&&(0,U.jsx)(`p`,{className:`px-5 py-6 text-sm text-[var(--oh-text-secondary)] text-center`,children:o(l.HOME$MANAGE_WORKSPACES_EMPTY)}),d.length>0&&(0,U.jsx)(`ul`,{children:d.map(e=>(0,U.jsxs)(`li`,{className:`flex items-center gap-3 px-5 py-2 border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-row-${e.name}`,children:[(0,U.jsx)(D,{width:16,height:16,className:`shrink-0`}),(0,U.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,U.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),(0,U.jsxs)(`button`,{type:`button`,onClick:()=>u({type:`workspace`,path:e.path,text:o(l.HOME$REMOVE_WORKSPACE_CONFIRMATION,{name:e.name})}),"aria-label":o(l.HOME$REMOVE_WORKSPACE),"data-testid":`manage-workspaces-remove-${e.name}`,className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-interactive-hover)] hover:text-white cursor-pointer`,children:[(0,U.jsx)(O,{width:12,height:12}),(0,U.jsx)(`span`,{children:o(l.HOME$REMOVE_WORKSPACE)})]})]},e.id))}),n.length>0&&(0,U.jsxs)(`div`,{"data-testid":`manage-workspaces-parents-section`,children:[(0,U.jsx)(`div`,{className:`px-5 pt-3 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:o(l.HOME$WORKSPACE_PARENTS)}),(0,U.jsx)(`ul`,{children:n.map(e=>{let t=f.get(e.path)??[];return(0,U.jsxs)(`li`,{className:`border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-parent-row-${e.name}`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-2`,children:[(0,U.jsx)(D,{width:16,height:16,className:`shrink-0`}),(0,U.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,U.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),a&&(0,U.jsxs)(`button`,{type:`button`,onClick:()=>u({type:`parent`,path:e.path,text:o(l.HOME$REMOVE_WORKSPACE_PARENT_CONFIRMATION,{name:e.name,count:t.length})}),"aria-label":o(l.HOME$REMOVE_WORKSPACE_PARENT),"data-testid":`manage-workspaces-remove-parent-${e.name}`,className:`flex items-center gap-1 px-2 py-1 rounded text-xs text-[var(--oh-text-tertiary)] hover:bg-[var(--oh-interactive-hover)] hover:text-white cursor-pointer`,children:[(0,U.jsx)(O,{width:12,height:12}),(0,U.jsx)(`span`,{children:o(l.HOME$REMOVE_WORKSPACE_PARENT)})]})]}),t.length>0&&(0,U.jsx)(`ul`,{className:`pb-2`,children:t.map(e=>(0,U.jsxs)(`li`,{className:`flex items-center gap-3 px-5 pl-10 py-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`manage-workspaces-child-${e.name}`,children:[(0,U.jsx)(D,{width:12,height:12,className:`shrink-0 opacity-70`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id))})]},e.id)})})]})]}),(0,U.jsx)(`div`,{className:`flex justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:(0,U.jsx)(w,{type:`button`,variant:`primary`,onClick:r,testId:`manage-workspaces-done`,children:o(l.HOME$DONE)})})]})}),s&&(0,U.jsx)(E,{text:s.text,onConfirm:()=>{s&&(s.type===`workspace`?i(s.path):a?.(s.path),u(null))},onCancel:()=>u(null)})]})}var re=`previewOnboardingStep`,ie=3;function Q(e=typeof window<`u`?window.location.search:``){let t=new URLSearchParams(e).get(re);if(t==null)return null;let n=Number.parseInt(t,10);return!Number.isFinite(n)||n<0||n>ie?null:n}function $(e=typeof window<`u`?window.location.search:``){return Q(e)!=null}function ae(){let e=r(),t=Q(e.search),n=$(e.search),{isCompleted:i,markCompleted:a}=T();return!n&&i?null:(0,U.jsx)(p,{onClose:()=>{n||a()},initialStep:t??0,isPreview:n})}export{V as a,I as c,L as d,A as f,Z as i,P as l,$ as n,B as o,k as p,ne as r,z as s,ae as t,F as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,r as t}from"./rolldown-runtime-BFRubm34.js";import{Ct as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{C as o,E as s,S as c,n as l,r as u}from"./active-backend-context-BCXRv5pm.js";import{t as d}from"./createLucideIcon-D4Tak8A1.js";import{n as f,t as p}from"./chat-send-button-BZHG2hAW.js";import{t as m}from"./check-TbOEtHKj.js";import{t as h}from"./loader-circle-CsAsfLIs.js";import{i as g,r as _,t as v}from"./llm-settings-Cvi7q4ox.js";import{t as y}from"./utils-DB9LsAzA.js";import{E as b,F as x,I as S,R as C,S as w,j as T}from"./agent-server-compatibility-D6DSanlx.js";import{a as E}from"./use-backends-health-DKt1SmiU.js";import{t as D}from"./modal-backdrop-Dsmzgr5s.js";import{r as O,t as k}from"./modal-body-CDZdZ-eT.js";import{t as A}from"./brand-button-2Tp3aXk1.js";import{n as j}from"./navigation-context-SjzfpygH.js";import{t as M}from"./openhands-logo-C-gDp1wr.js";import{c as N,s as P,t as F}from"./backend-form-modal-DhBT8P4g.js";import{r as I}from"./use-settings-DNJC4gqu.js";import{t as ee}from"./use-tracking-poxQHMwR.js";import{t as L}from"./cloud-funnel-analytics-D-27T5Ao.js";import{c as R,i as te,n as z,o as B}from"./acp-providers-BQwoUBpe.js";import{n as V,r as H}from"./use-agent-profiles-LHZEK0Gg.js";import{n as U}from"./use-create-conversation-CWQGNQ9J.js";import{r as W,t as ne}from"./recommended-automations-launcher-DA6DWS7V.js";import{t as re}from"./terminal-Dokfkxn0.js";import{t as ie}from"./use-save-settings-ioSUMqbE.js";import{o as ae}from"./use-can-manage-org-profiles-BAtqsbCi.js";import{t as oe}from"./use-save-agent-profile-BxEsjnW0.js";import{n as se}from"./use-activate-agent-profile-DpQjsXM0.js";import{a as ce,i as le,n as ue,r as de,t as fe}from"./use-acp-credential-form-LlfZO_DD.js";var pe=d(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),G=e(n(),1),K=r(),me=`m19.6 66.5 19.7-11 .3-1-.3-.5h-1l-3.3-.2-11.2-.3L14 53l-9.5-.5-2.4-.5L0 49l.2-1.5 2-1.3 2.9.2 6.3.5 9.5.6 6.9.4L38 49.1h1.6l.2-.7-.5-.4-.4-.4L29 41l-10.6-7-5.6-4.1-3-2-1.5-2-.6-4.2 2.7-3 3.7.3.9.2 3.7 2.9 8 6.1L37 36l1.5 1.2.6-.4.1-.3-.7-1.1L33 25l-6-10.4-2.7-4.3-.7-2.6c-.3-1-.4-2-.4-3l3-4.2L28 0l4.2.6L33.8 2l2.6 6 4.1 9.3L47 29.9l2 3.8 1 3.4.3 1h.7v-.5l.5-7.2 1-8.7 1-11.2.3-3.2 1.6-3.8 3-2L61 2.6l2 2.9-.3 1.8-1.1 7.7L59 27.1l-1.5 8.2h.9l1-1.1 4.1-5.4 6.9-8.6 3-3.5L77 13l2.3-1.8h4.3l3.1 4.7-1.4 4.9-4.4 5.6-3.7 4.7-5.3 7.1-3.2 5.7.3.4h.7l12-2.6 6.4-1.1 7.6-1.3 3.5 1.6.4 1.6-1.4 3.4-8.2 2-9.6 2-14.3 3.3-.2.1.2.3 6.4.6 2.8.2h6.8l12.6 1 3.3 2 1.9 2.7-.3 2-5.1 2.6-6.8-1.6-16-3.8-5.4-1.3h-.8v.4l4.6 4.5 8.3 7.5L89 80.1l.5 2.4-1.3 2-1.4-.2-9.2-7-3.6-3-8-6.8h-.5v.7l1.8 2.7 9.8 14.7.5 4.5-.7 1.4-2.6 1-2.7-.6-5.8-8-6-9-4.7-8.2-.5.4-2.9 30.2-1.3 1.5-3 1.2-2.5-2-1.4-3 1.4-6.2 1.6-8 1.3-6.4 1.2-7.9.7-2.6v-.2H49L43 72l-9 12.3-7.2 7.6-1.7.7-3-1.5.3-2.8L24 86l10-12.8 6-7.9 4-4.6-.1-.5h-.3L17.2 77.4l-4.7.6-2-2 .2-3 1-1 8-5.5Z`,he=`0 0 100 100`,ge=`M4.04286 0.228393C4.52451 0.0304495 5.0488 -0.0409817 5.56586 0.0208928C6.23236 0.0973928 6.82636 0.380893 7.34786 0.870893C7.35488 0.877545 7.36344 0.882351 7.37278 0.884881C7.38212 0.887412 7.39194 0.887588 7.40136 0.885393C8.10536 0.712393 8.78236 0.773393 9.43186 1.06839L9.46336 1.08339L9.54036 1.12139C10.2189 1.47289 10.7054 2.00639 10.9994 2.72039C11.1384 3.05989 11.2084 3.41439 11.2099 3.78339C11.2197 4.05816 11.1893 4.33288 11.1199 4.59889C11.1164 4.61245 11.1165 4.62665 11.12 4.6402C11.1235 4.65374 11.1303 4.66618 11.1399 4.67639C11.5329 5.0749 11.8063 5.57572 11.9289 6.12189C12.1214 7.07239 11.9239 7.92939 11.3374 8.69189L11.2464 8.80189C10.8579 9.24669 10.3481 9.56836 9.77936 9.72739C9.76694 9.73097 9.75556 9.73747 9.74617 9.74634C9.73677 9.75521 9.72964 9.7662 9.72536 9.77839C9.59786 10.1464 9.46986 10.4604 9.23186 10.7744C8.63236 11.5654 7.75086 12.0054 6.75786 11.9999C5.96636 11.9959 5.26486 11.7064 4.65286 11.1319C4.64358 11.1234 4.63225 11.1174 4.61998 11.1146C4.6077 11.1118 4.59491 11.1123 4.58286 11.1159C4.32386 11.1994 4.06286 11.2114 3.78086 11.2084C3.33033 11.2048 2.88658 11.0984 2.48336 10.8974C2.0613 10.688 1.6939 10.3831 1.41036 10.0069C1.30886 9.87239 1.20836 9.74589 1.13486 9.59639C1.03349 9.39033 0.95066 9.17565 0.887357 8.95489C0.754446 8.45324 0.751521 7.92599 0.878857 7.42289C0.882974 7.41102 0.884341 7.39837 0.882857 7.38589C0.88038 7.37348 0.873877 7.36223 0.864357 7.35389C0.556147 7.04213 0.320543 6.66619 0.174357 6.25289C0.0775698 5.99842 0.0213841 5.73031 0.00785682 5.45839C-0.0163229 5.10033 0.0153902 4.74069 0.101857 4.39239C0.326857 3.65039 0.756357 3.06839 1.39036 2.64589C1.53136 2.55189 1.66536 2.47889 1.79136 2.42689C1.93436 2.36689 2.07786 2.31689 2.22186 2.27489C2.23216 2.27184 2.24153 2.26626 2.24913 2.25866C2.25672 2.25107 2.2623 2.24169 2.26536 2.23139C2.37455 1.83888 2.56235 1.47264 2.81736 1.15489C3.15736 0.731893 3.56586 0.422893 4.04286 0.228393ZM3.64086 4.15339C3.58503 4.05573 3.49269 3.98424 3.38415 3.95465C3.27562 3.92507 3.15977 3.93981 3.06211 3.99564C2.96444 4.05147 2.89295 4.14381 2.86337 4.25235C2.83378 4.36088 2.84853 4.47673 2.90436 4.57439L3.75136 6.05689L2.90736 7.48089C2.85561 7.57738 2.84315 7.69014 2.87257 7.7956C2.902 7.90106 2.97104 7.99108 3.06526 8.04684C3.15949 8.1026 3.27162 8.1198 3.37823 8.09484C3.48484 8.06988 3.57768 8.00469 3.63736 7.91289L4.60736 6.27689C4.64561 6.21237 4.66609 6.13887 4.66671 6.06386C4.66732 5.98886 4.64805 5.91503 4.61086 5.84989L3.64086 4.15339ZM6.36386 7.27339C6.25583 7.27982 6.15434 7.32727 6.08012 7.40603C6.00591 7.48479 5.96458 7.58892 5.96458 7.69714C5.96458 7.80536 6.00591 7.90949 6.08012 7.98826C6.15434 8.06702 6.25583 8.11446 6.36386 8.12089H8.78786C8.89675 8.1156 8.99943 8.06862 9.07462 7.98969C9.14982 7.91075 9.19176 7.80591 9.19176 7.69689C9.19176 7.58787 9.14982 7.48303 9.07462 7.4041C8.99943 7.32516 8.89675 7.27818 8.78786 7.27289H6.36386V7.27339Z`,_e=`0 0 12 12`,ve=`M12 0C12.904 6.056 17.944 11.096 24 12C17.944 12.904 12.904 17.944 12 24C11.096 17.944 6.056 12.904 0 12C6.056 11.096 11.096 6.056 12 0Z`,ye=`0 0 24 24`,be=3/2;function q({kind:e,size:t=12,className:n,"data-testid":r}){return e===`openhands`?(0,K.jsx)(M,{width:Math.round(t*be),height:t,className:y(`shrink-0 [&_path:not([fill=transparent])]:fill-current`,n),"data-testid":r??`agent-brand-icon-openhands`,"aria-hidden":!0}):e===`claude-code`?(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:he,width:t,height:t,className:y(`shrink-0`,n),"data-testid":r??`agent-brand-icon-claude-code`,"aria-hidden":!0,children:(0,K.jsx)(`path`,{fill:`currentColor`,d:me})}):e===`codex`?(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:_e,width:t,height:t,className:y(`shrink-0`,n),"data-testid":r??`agent-brand-icon-codex`,"aria-hidden":!0,children:(0,K.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:ge,fill:`currentColor`})}):e===`gemini`?(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:ye,width:t,height:t,className:y(`shrink-0`,n),"data-testid":r??`agent-brand-icon-gemini`,"aria-hidden":!0,children:(0,K.jsx)(`path`,{fill:`currentColor`,d:ve})}):(0,K.jsx)(re,{width:t,height:t,className:y(`shrink-0`,n),"data-testid":r??`agent-brand-icon-generic`,"aria-hidden":!0})}function xe({currentStep:e,totalSteps:t,className:n}){return(0,K.jsx)(`div`,{role:`progressbar`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":e+1,"data-testid":`onboarding-progress-bar`,className:y(`flex w-full items-center gap-2`,n),children:Array.from({length:t},(t,n)=>{let r=n<e,i=n===e;return(0,K.jsx)(`div`,{"data-testid":`onboarding-progress-step-${n}`,"data-state":r?`completed`:i?`current`:`upcoming`,className:y(`h-1.5 flex-1 rounded-full transition-colors duration-300`,r||i?`bg-white`:`bg-white/15`)},n)})})}function Se(e){return e===`openhands`?`openhands`:z.find(({key:t})=>t===e)?.icon??`cli-generic`}function Ce({id:e,muted:t}){let n=Se(e);return n===`openhands`?(0,K.jsx)(q,{kind:`openhands`,size:16,className:y(`text-white`,t&&`opacity-55`),"data-testid":`onboarding-agent-icon-openhands`}):(0,K.jsx)(q,{kind:n,size:18,className:t?`text-[var(--oh-muted)]`:`text-white`,"data-testid":`onboarding-agent-icon-${n}`})}function we(){return[{id:`openhands`,label:`OpenHands`,descriptionKey:a.ONBOARDING$AGENT_OPENHANDS_DESCRIPTION},...z.map(e=>({id:e.key,label:e.display_name,descriptionKey:e.description_key}))]}function Te({selectedAgentId:e,onSelect:t,onBack:n,onNext:r}){let{t:l}=i(`openhands`),{mutate:u,isPending:d}=ie();return(0,K.jsxs)(`div`,{"data-testid":`onboarding-step-choose-agent`,className:`flex flex-col gap-6`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:l(a.ONBOARDING$AGENT_TITLE)}),(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:l(a.ONBOARDING$AGENT_SUBTITLE)})]}),(0,K.jsx)(`div`,{role:`radiogroup`,"aria-label":l(a.ONBOARDING$AGENT_TITLE),className:`flex flex-col gap-3`,children:we().map(n=>{let r=n.id===e;return(0,K.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-testid":`onboarding-agent-option-${n.id}`,"data-selected":r,onClick:()=>t(n.id),className:y(`flex items-start justify-between gap-4 rounded-xl border px-4 py-3 text-left transition-colors cursor-pointer`,r?`border-white/45 bg-white/[0.09] shadow-none hover:border-white/45 hover:bg-white/[0.09]`:`border-white/30 bg-white/5 hover:border-white/40 hover:bg-white/[0.08]`),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(Ce,{id:n.id,muted:!1}),(0,K.jsx)(`span`,{className:`truncate text-base font-normal text-white`,children:n.label})]}),(0,K.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:l(n.descriptionKey)})]}),(0,K.jsx)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:r?(0,K.jsx)(m,{width:18,height:18,className:`mt-1 shrink-0 text-white`,"aria-hidden":!0}):null})]},n.id)})}),(0,K.jsxs)(`div`,{className:y(`sticky bottom-0 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,n?`justify-between`:`justify-end`),children:[n?(0,K.jsx)(A,{testId:`onboarding-agent-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:d,children:l(a.ONBOARDING$BACK)}):null,(0,K.jsx)(A,{testId:`onboarding-agent-next`,type:`button`,variant:`primary`,isDisabled:d,onClick:()=>{let t=te(e);if(!t){r();return}u({agent_settings_diff:t},{onError:e=>{c(s(e)||l(a.ERROR$GENERIC))},onSuccess:()=>{o(l(a.SETTINGS$SAVED)),r()}})},children:l(d?a.SETTINGS$SAVING:a.ONBOARDING$NEXT)})]})]})}function Ee({backend:e,isConnected:t,lastError:n}){let{t:r}=i(`openhands`);if(t===!0)return(0,K.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-connected`,className:y(`flex items-start gap-3 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3`),children:[(0,K.jsx)(f,{className:`mt-0.5 size-5 shrink-0 text-green-400`}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-green-200`,children:r(a.ONBOARDING$BACKEND_CONNECTED_TITLE)}),(0,K.jsx)(`span`,{className:`text-xs text-green-200/80`,children:r(a.ONBOARDING$BACKEND_CONNECTED_BODY)})]})]});if(t===!1){let i=P(r,e,{isConnected:t,lastError:n});return(0,K.jsxs)(`div`,{role:`alert`,"data-testid":`onboarding-backend-disconnected`,className:`flex items-start gap-3 rounded-xl border border-red-500/40 bg-red-500/10 px-4 py-3`,children:[(0,K.jsx)(pe,{className:`mt-0.5 size-5 shrink-0 text-red-400`}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-red-200`,children:i}),(0,K.jsx)(`span`,{className:`text-xs text-red-200/80`,children:r(a.ONBOARDING$BACKEND_DISCONNECTED_BODY)})]})]})}return(0,K.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-checking`,className:`flex items-start gap-3 rounded-xl border border-white/10 bg-white/5 px-4 py-3`,children:[(0,K.jsx)(h,{className:`mt-0.5 size-5 shrink-0 animate-spin text-[var(--oh-text-tertiary)]`}),(0,K.jsx)(`span`,{className:`text-sm text-[var(--oh-text-tertiary)]`,children:r(a.ONBOARDING$BACKEND_CHECKING)})]})}function De({onBack:e,onNext:t,onClose:n}){let{t:r}=i(`openhands`),{active:o,addBackend:s,setActive:c,updateBackend:l}=u(),{backend:d}=o,f=w(d),p=x(),m=p!==null&&!f&&!(d.kind===`cloud`&&C(d.host,p)),h=f||m,g=G.useMemo(()=>T(),[]),_=h?{id:`onboarding-local-backend-draft`,name:b,host:g.baseUrl,apiKey:g.sessionApiKey,kind:`local`}:d,v=E(f?[]:[d]),D=h?null:v[d.id]?.isConnected??null,O=h?null:v[d.id]?.lastError??null,[k,j]=G.useState(!1);G.useEffect(()=>{D===!0&&j(!1)},[D]);let M=D===!0&&!k,P=G.useCallback((e,r)=>{if(f)s(e);else{let t=e.host!==d.host;l(d.id,e),t&&o.orgId!==null&&c(d.id,null)}L({backendKind:e.kind,connectionMethod:r,host:e.host,hasApiKey:!!e.apiKey,source:`onboarding`}),p!==null&&e.kind===`cloud`&&n?n():t()},[o.orgId,s,d.host,d.id,p,f,n,t,c,l]),I=y(`sticky bottom-0 mt-2 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,e?`justify-between`:`justify-end`);return(0,K.jsxs)(`div`,{"data-testid":`onboarding-step-check-backend`,className:`flex flex-col gap-6`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:r(h?p?a.ONBOARDING$LOGIN_TO_CLOUD_TITLE:a.BACKEND$ADD_TITLE:a.ONBOARDING$BACKEND_TITLE)}),h?null:(0,K.jsx)(`p`,{"data-testid":`onboarding-backend-subtitle`,className:`text-sm text-[var(--oh-muted)]`,children:r(a.ONBOARDING$BACKEND_SUBTITLE)})]}),h?null:(0,K.jsx)(Ee,{backend:_,isConnected:D,lastError:O}),D===!0?(0,K.jsxs)(`button`,{type:`button`,onClick:()=>j(e=>!e),"aria-expanded":k,"data-testid":`onboarding-backend-show-configuration`,className:`flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2`,children:[(0,K.jsx)(`span`,{children:r(k?a.ONBOARDING$BACKEND_HIDE_CONFIGURATION:a.ONBOARDING$BACKEND_SHOW_CONFIGURATION)}),(0,K.jsx)(N,{className:y(`h-4 w-4 shrink-0 text-muted transition-transform`,k&&`rotate-180`),"aria-hidden":!0})]}):null,(0,K.jsx)(`div`,{"data-testid":`onboarding-backend-configuration-fields`,children:M?null:(0,K.jsx)(F,{onConnected:P,testIdRoot:`onboarding-backend`,initialManualBackend:_,requireManualApiKey:S(),manualSubmitLabel:r(a.ONBOARDING$NEXT),manualSubmittingLabel:r(a.SETTINGS$SAVING),manualSubmitTestId:`onboarding-backend-next`,analyticsSource:`onboarding`})}),M?(0,K.jsxs)(`div`,{className:I,children:[e?(0,K.jsx)(A,{testId:`onboarding-backend-back`,type:`button`,variant:`secondary`,onClick:e,children:r(a.ONBOARDING$BACK)}):null,(0,K.jsx)(A,{testId:`onboarding-backend-next`,type:`button`,variant:`primary`,onClick:t,children:r(a.ONBOARDING$NEXT)})]}):null]})}var J=H;function Y(){let e=oe(),t=se();return(0,G.useCallback)(async n=>{try{await e.mutateAsync({name:J,profile:n});let r=(await V.getProfile(J)).profile.id;r&&await t.mutateAsync(r)}catch(e){console.error(`Failed to configure onboarding agent profile:`,e)}},[e,t])}var Oe=`openai/gpt-5.5`;function ke({onBack:e,onNext:t}){let{t:n}=i(`openhands`),{backend:r}=l(),o=r.kind===`local`,s=_(),c=g(),u=Y(),[d,f]=G.useState(null),[p,m]=G.useState(!1),h=G.useCallback(async()=>{if(!o||!d)return null;let e=d.values,t=typeof e[`llm.model`]==`string`?e[`llm.model`]:``;if(!t)return null;let n=typeof e[`llm.api_key`]==`string`?e[`llm.api_key`]:``,r=typeof e[`llm.base_url`]==`string`?e[`llm.base_url`]:``,i=ae(t),a={model:t};n&&(a.api_key=n),r&&(a.base_url=r);try{return await s.mutateAsync({name:i,request:{llm:a,include_secrets:!0}}),await c.mutateAsync(i),i}catch(e){return console.error(`Failed to persist onboarding LLM as profile:`,e),null}},[o,d,s,c]),y=G.useCallback(async()=>{m(!0);try{let e=await h();e&&await u({agent_kind:`openhands`,llm_profile_ref:e})}finally{m(!1),t()}},[h,u,t]);return(0,K.jsxs)(`div`,{"data-testid":`onboarding-step-setup-llm`,className:`flex flex-col gap-6 max-h-[calc(90vh-7rem)]`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:n(a.ONBOARDING$LLM_TITLE)}),(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(a.ONBOARDING$LLM_SUBTITLE)})]}),(0,K.jsx)(`div`,{"data-testid":`onboarding-llm-settings`,className:`flex min-h-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always`,children:(0,K.jsx)(v,{embedded:!0,hideSaveButton:!0,suppressSuccessToast:!0,initialValueOverrides:{"llm.model":Oe},onSaveSuccess:y,onSaveControlChange:f})}),(0,K.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,K.jsx)(A,{testId:`onboarding-llm-back`,type:`button`,variant:`secondary`,onClick:e,children:n(a.ONBOARDING$BACK)}),(0,K.jsx)(A,{testId:`onboarding-llm-next`,type:`button`,variant:`primary`,isDisabled:(d?.isSaving??!1)||p,onClick:()=>{if(d?.isDirty){d.save();return}t()},children:n(a.ONBOARDING$NEXT)})]})]})}function Ae({providerKey:e,isActive:t,onBack:n,onNext:r}){let{t:o}=i(`openhands`),s=l(),{status:c,isChecking:u}=ue(e,{enabled:t}),{fields:d,values:f,setValue:p,secretExists:m,hasValueFor:h,conflicts:g,consumesFileCredentials:_,save:v,isSaving:y}=fe(e),b=Y(),x=R(e)??e,S=c===`authenticated`,C=je(s.backend.kind,c),w=S||d.some(e=>e.secret&&(!e.multiline||_)&&h(e.name)),T=C&&!w,E=y||T||u&&!w;return(0,K.jsxs)(`div`,{"data-testid":`onboarding-step-setup-acp-secrets`,className:`flex flex-col gap-6`,children:[(0,K.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:o(a.ONBOARDING$ACP_SECRETS_TITLE)}),(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:o(a.ONBOARDING$ACP_SECRETS_SUBTITLE,{provider:x})}),C&&!S?(0,K.jsx)(`p`,{"data-testid":`onboarding-acp-secrets-required-note`,className:`text-sm text-[var(--oh-muted)]`,children:o(a.ONBOARDING$ACP_SECRETS_REQUIRED_NOTE,{provider:x})}):c!==`authenticated`&&(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:o(a.ONBOARDING$ACP_SECRETS_SUBSCRIPTION_NOTE)})]}),(0,K.jsx)(le,{status:c,isChecking:u,providerName:x,testIdPrefix:`onboarding-acp-auth`}),(0,K.jsx)(`div`,{className:`flex flex-col gap-5`,children:d.map(e=>(0,K.jsx)(de,{field:e,value:f[e.name]??``,onChange:t=>p(e.name,t),alreadySet:m(e.name),testId:`onboarding-acp-secret-${e.name}`,showOptionalTag:!0},e.name))}),(0,K.jsx)(ce,{conflicts:g}),T?(0,K.jsx)(`p`,{"data-testid":`onboarding-acp-secrets-blocked`,className:`text-sm text-amber-300`,children:o(a.ONBOARDING$ACP_SECRETS_REQUIRED_BLOCKED)}):null,(0,K.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,K.jsx)(A,{testId:`onboarding-acp-secrets-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:y,children:o(a.ONBOARDING$BACK)}),(0,K.jsx)(A,{testId:`onboarding-acp-secrets-next`,type:`button`,variant:`primary`,isDisabled:E,onClick:async()=>{await v()&&(e!==`openhands`&&await b({agent_kind:`acp`,acp_server:e,acp_model:B(e)??void 0}),r())},children:o(y?a.SETTINGS$SAVING:a.ONBOARDING$NEXT)})]})]})}function je(e,t){return t===`authenticated`?!1:e===`cloud`?!0:t===`unauthenticated`}function Me({onBack:e,onClose:t,onLaunched:n}){let{t:r}=i(`openhands`),{navigate:o}=j(),{backend:s}=l(),c=s.kind!==`cloud`,u=r(a.ONBOARDING$HELLO_DEFAULT_MESSAGE),[d,f]=G.useState(u),{mutate:m,isPending:h,isSuccess:g}=U(),_=W(),v=h||g||_,y=G.useRef(!1),b=d.trim().length>0&&!v&&!y.current,x=()=>{!b||y.current||(y.current=!0,m({query:d.trim(),entryPoint:`onboarding_say_hello`},{onSuccess:e=>{o(`/conversations/${e.conversation_id}`),n()},onError:()=>{y.current=!1}}))};return(0,K.jsxs)(`div`,{"data-testid":`onboarding-step-say-hello`,className:`flex max-h-[calc(90vh-7rem)] flex-col`,children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-2`,children:[(0,K.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:r(a.ONBOARDING$HELLO_TITLE)}),(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:r(a.ONBOARDING$HELLO_SUBTITLE)})]}),(0,K.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),x()},"data-testid":`onboarding-hello-input-form`,className:`mt-6 box-border flex w-full shrink-0 flex-col items-start justify-center rounded-[15px] border border-[var(--oh-border)] bg-surface-raised p-4`,children:[(0,K.jsx)(`div`,{className:`relative w-full`,children:(0,K.jsx)(`div`,{className:`box-border flex w-full shrink-0 flex-row items-end justify-between gap-2 p-0 pb-[18px]`,children:(0,K.jsx)(`input`,{"data-testid":`onboarding-hello-input`,"aria-label":r(a.ONBOARDING$HELLO_TITLE),type:`text`,value:d,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),x())},placeholder:u,disabled:v,className:`min-h-[20px] w-full flex-1 bg-transparent text-[16px] font-normal leading-[20px] text-white outline-none placeholder:text-[var(--oh-text-tertiary)] disabled:cursor-not-allowed disabled:opacity-50`})})}),(0,K.jsx)(`div`,{className:`flex w-full min-w-0 items-center justify-end gap-2`,children:(0,K.jsx)(p,{buttonClassName:``,handleSubmit:x,disabled:!b})})]}),c?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{"data-testid":`onboarding-hello-or-separator`,className:`mt-6 flex w-full items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`}),(0,K.jsx)(`span`,{className:`text-xs uppercase text-[var(--oh-muted)]`,children:r(a.LANDING$OR)}),(0,K.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`})]}),(0,K.jsx)(`div`,{"data-testid":`onboarding-recommended-automations`,className:`flex min-h-0 flex-1 flex-col`,children:(0,K.jsx)(ne,{onLaunched:n,scrollableGrid:!0})})]}):null,(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 bg-base-secondary pt-7 pb-7`,children:[(0,K.jsx)(A,{testId:`onboarding-hello-back`,type:`button`,variant:`secondary`,onClick:e,isDisabled:v,children:r(a.ONBOARDING$BACK)}),(0,K.jsx)(A,{testId:`onboarding-hello-close`,type:`button`,variant:`secondary`,onClick:t,isDisabled:v,children:r(a.BUTTON$CLOSE)})]})]})}var Ne=t({OnboardingModal:()=>$}),X=[`backend`,`agent`,`setup`,`hello`],Pe=[`agent`,`setup`,`hello`],Z=`openhands-onboarding-started`;function Q({index:e,currentStep:t,children:n}){let r=e===t,i=(e-t)*100;return(0,K.jsx)(`div`,{"data-testid":`onboarding-slide-${e}`,"data-active":r,"aria-hidden":!r,style:{transform:`translateX(${i}%)`},className:y(`w-full transition-transform duration-300 ease-out`,!r&&`pointer-events-none absolute inset-0`),children:n})}function $({onClose:e,initialStep:t=0,isPreview:n=!1}){let{t:r}=i(`openhands`),{data:o}=I(),s=o?.user_consents_to_analytics===!0,{trackOnboardingStarted:c,trackOnboardingStepViewed:l,trackOnboardingCompleted:d,trackOnboardingSkipped:f}=ee(),{active:p}=u(),{backend:m}=p,h=w(m),g=E(h?[]:[m]),_=x(),v=_!==null&&m.kind===`cloud`&&C(m.host,_),b=!h&&g[m.id]?.isConnected===!0&&(_===null||v),S=b?Pe:X,[T,A]=G.useState(()=>X[Math.min(Math.max(t,0),X.length-1)]),[j,M]=G.useState(`openhands`);G.useEffect(()=>{S.includes(T)||A(S[0])},[T,S]);let N=S.length,P=S.includes(T)?T:S[0],F=S.indexOf(P),L=h||g[m.id]?.isConnected!==void 0,R=j===`openhands`,te=F===0&&x()!==null,z=G.useCallback(()=>{A(e=>{let t=S,n=t.indexOf(e);return t[Math.min((n===-1?0:n)+1,t.length-1)]})},[S]),B=G.useCallback(()=>{A(e=>{let t=S,n=t.indexOf(e);return t[Math.max((n===-1?0:n)-1,0)]})},[S]),V=G.useRef(!1);G.useEffect(()=>{n||!s||V.current||window.sessionStorage.getItem(Z)||(V.current=!0,window.sessionStorage.setItem(Z,`1`),c())},[n,s]);let H=G.useRef(null);G.useEffect(()=>{n||!s||!L||H.current!==P&&(H.current=P,l({step:P,stepIndex:F,totalSteps:N,agent:j}))},[n,s,L,P,F,N,j]);let U=()=>{d({agent:j}),e()},W=()=>{f({step:P,stepIndex:F,totalSteps:N,agent:j}),e()};return(0,K.jsx)(D,{"aria-label":r(a.ONBOARDING$TITLE),children:(0,K.jsxs)(`div`,{className:`relative flex flex-col items-center gap-4`,children:[(0,K.jsxs)(`section`,{"data-testid":`onboarding-modal`,"data-current-step":F,"data-preview":n?`true`:void 0,className:y(`flex flex-col gap-6 overflow-hidden rounded-2xl border border-white/10 bg-base-secondary shadow-2xl`,O(`lg`),k,`max-h-[90vh]`),children:[(0,K.jsx)(`header`,{className:`flex flex-col gap-3 px-7 pt-7 shrink-0`,children:(0,K.jsx)(xe,{currentStep:F,totalSteps:N})}),(0,K.jsx)(`div`,{"data-testid":`onboarding-scroll-area`,className:`flex-1 min-h-0 overflow-y-auto custom-scrollbar-always px-7`,children:(0,K.jsxs)(`div`,{"data-testid":`onboarding-slide-rail`,"data-current-step":F,className:`relative overflow-clip`,children:[b?null:(0,K.jsx)(Q,{index:S.indexOf(`backend`),currentStep:F,children:(0,K.jsx)(De,{onNext:z,onClose:e})}),(0,K.jsx)(Q,{index:S.indexOf(`agent`),currentStep:F,children:(0,K.jsx)(Te,{selectedAgentId:j,onSelect:M,onBack:b?void 0:B,onNext:z})}),(0,K.jsx)(Q,{index:S.indexOf(`setup`),currentStep:F,children:R?(0,K.jsx)(ke,{onBack:B,onNext:z}):(0,K.jsx)(Ae,{providerKey:j,isActive:P===`setup`,onBack:B,onNext:z})}),(0,K.jsx)(Q,{index:S.indexOf(`hello`),currentStep:F,children:(0,K.jsx)(Me,{onBack:B,onClose:W,onLaunched:U})})]})})]}),F<N-1&&!te?(0,K.jsx)(`button`,{type:`button`,"data-testid":`onboarding-skip`,onClick:W,className:`rounded-md px-3 py-2 text-sm text-[var(--oh-muted)] transition-colors hover:bg-white/5 hover:text-white cursor-pointer`,children:r(a.ONBOARDING$SKIP)}):null]})})}export{Ne as n,q as r,$ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,l as t}from"./agent-server-compatibility-D6DSanlx.js";import{m as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js";var r=class{static async getModels(){let t=new n(e()),[r,i,a]=await Promise.all([t.getModels(),t.getVerifiedModels(),t.getProviders()]),o=Object.keys(i??{}).sort(),s=o.flatMap(e=>i[e]??[]);return{models:r??[],verified_models:s,verified_providers:a?.filter(e=>o.includes(e))??o,default_model:s[0]??r?.[0]??``}}static async getConfig(){return await t(),{posthog_client_key:`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}};export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./agent-server-compatibility-D6DSanlx.js";import{S as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js";import{t as n}from"./proxy-CuhhyjdX.js";function r(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function i(t){if(t)return t;let n=e().backend;if(n.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return n}async function a(e){return r(await n({backend:i(e),method:`GET`,path:`/api/organizations`}))}async function o(e){let r=i(e);try{return{orgId:(await n({backend:r,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(e instanceof t&&e.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function s(e,t){let r=await n({backend:i(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:r?.org_id??e,userId:r?.user_id??``,role:r?.role??null,permissions:Array.isArray(r?.permissions)?r.permissions:null}}export{a as n,o as r,s as t};
|