@openhands/agent-canvas 1.0.0-beta.9 → 1.0.0-rc.2
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 +2 -2
- package/README.windows.md +2 -2
- package/build/assets/{QueryClientProvider-w1cZWY41.js → QueryClientProvider-7oLZ1RtQ.js} +1 -1
- package/build/assets/{Trans-BJeYqz2A.js → Trans-rF21Jwln.js} +1 -1
- package/build/assets/{acp-providers-DJr8DlNG.js → acp-providers-DZEi8wDz.js} +1 -1
- package/build/assets/active-backend-context-CQTk4wD8.js +1 -0
- package/build/assets/add-backend-modal-CIfhseZn.js +1 -0
- package/build/assets/agent-server-client-options-Dvgeb3x4.js +1 -0
- package/build/assets/agent-server-compatibility-BANjmMTo.js +1 -0
- package/build/assets/agent-server-conversation-service.api-B82pNNTm.js +5 -0
- package/build/assets/{agent-settings-BXBaybB_.js → agent-settings-B6htMeS2.js} +1 -1
- package/build/assets/{alert-banner-NeUl1-PQ.js → alert-banner-D41ZKDZT.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-CmWcFlc6.js → analytics-consent-form-modal-TINgM_jV.js} +1 -1
- package/build/assets/api-key-entry-screen-Di1vHgIU.js +1 -0
- package/build/assets/{app-settings-C-U6jONZ.js → app-settings-CjCa1MOB.js} +1 -1
- package/build/assets/automation-detail-DPoxzTdV.js +1 -0
- package/build/assets/{automations-list-BLJzAd-p.js → automations-list-DwUEe2Ea.js} +1 -1
- package/build/assets/{back-nav-button-DgkK0Ka6.js → back-nav-button-BDM9vr_o.js} +1 -1
- package/build/assets/backend-form-modal-B6q897ZX.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BktJcGgH.js → backend-synced-settings-badge-BwTawSCE.js} +1 -1
- package/build/assets/{base-modal-DZCNv0A4.js → base-modal-Ba5WcNb6.js} +1 -1
- package/build/assets/{brand-button-LBFNic99.js → brand-button-BoiPxAGm.js} +1 -1
- package/build/assets/{browser-D08Sp3ZY.js → browser-DTei6kki.js} +1 -1
- package/build/assets/browser-store-BjhV_9wS.js +1 -0
- package/build/assets/{browser-tab-be3QvXg9.js → browser-tab-DiRTKik8.js} +1 -1
- package/build/assets/chat-send-button-06dIuWXm.js +1 -0
- package/build/assets/check-BDAbW7je.js +1 -0
- package/build/assets/{checkmark-Rmpruj7q.js → checkmark-BB7QCG5T.js} +1 -1
- package/build/assets/{chevron-down-KhWYEjeW.js → chevron-down-DUxWwzTm.js} +1 -1
- package/build/assets/{chevron-left-small-6nyFCWVQ.js → chevron-left-small-CuuwpRi9.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-DquBwJ_6.js → circle-plus-check-toggle-B3_W6-nt.js} +1 -1
- package/build/assets/{close-D_o3d8QM.js → close-Cz0OAgTy.js} +1 -1
- package/build/assets/{code-tag-DhsjDB-v.js → code-tag-Cz9AIz-X.js} +1 -1
- package/build/assets/{color-themes-0biOprdo.js → color-themes-B9n7pBQl.js} +1 -1
- package/build/assets/{combobox-caret-CO7eozIY.js → combobox-caret-DwMmhrrA.js} +1 -1
- package/build/assets/{command-store-UzKGSUC2.js → command-store-DAd3K0d_.js} +1 -1
- package/build/assets/{condenser-settings-BulzYEuW.js → condenser-settings-DczjwkIp.js} +1 -1
- package/build/assets/{confirmation-modal-CMAtd9R0.js → confirmation-modal-C_lds1Tb.js} +1 -1
- package/build/assets/{context-menu-list-item-D0swnhFt.js → context-menu-list-item-DhG1Ln5m.js} +1 -1
- package/build/assets/conversation-CBlJiDaV.js +19 -0
- package/build/assets/conversation-Dss8XCN_.js +1 -0
- package/build/assets/conversation-panel-B5sVpsz5.js +1 -0
- package/build/assets/conversation-service.api-B4s-xIOK.js +1 -0
- package/build/assets/conversation-state-store-BUU90dVq.js +1 -0
- package/build/assets/{conversation-store-CC-isCnP.js → conversation-store-kHcewy1E.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-DYjKsg_c.js → conversation-tab-empty-state-5bW9CQke.js} +1 -1
- package/build/assets/conversation-websocket-context-C2yKCqvj.js +3 -0
- package/build/assets/{copy-BM0RpLez.js → copy-CA1Dblua.js} +1 -1
- package/build/assets/{custom-toast-handlers-BohXx7uh.js → custom-toast-handlers-fgD4IYsu.js} +1 -1
- package/build/assets/{declaration-DaUdB2Wg.js → declaration-IA661TBv.js} +1 -1
- package/build/assets/{device-verify-DiEJqpJb.js → device-verify-BVl4GEvt.js} +1 -1
- package/build/assets/{dist-xtCm0O6P.js → dist-B-SKiGDl.js} +1 -1
- package/build/assets/dist-CBUfAk0Z.js +1 -0
- package/build/assets/{dropdown-classes-Vqz86I0R.js → dropdown-classes-lT1LUsbO.js} +1 -1
- package/build/assets/edit-automation-modal-kc_FzbzK.js +1 -0
- package/build/assets/ellipsis-button-DRRmCrWi.js +1 -0
- package/build/assets/{entry.client-BvKgdCQ9.js → entry.client-CWkbusD1.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DdFgk0EM.js → enum-filter-dropdown-DlY0Q3fj.js} +1 -1
- package/build/assets/{environment-switch-overlay-CuBuZOaa.js → environment-switch-overlay-BrHKX6_Z.js} +1 -1
- package/build/assets/{extensions-hub-Dayqvv0n.js → extensions-hub-NbQnt-cn.js} +1 -1
- package/build/assets/extensions-navigation-oOk5yl8X.js +1 -0
- package/build/assets/{file-DwHCkWZT.js → file-DM0ihEsO.js} +1 -1
- package/build/assets/files-tab-mK7Mdyuf.js +1 -0
- package/build/assets/files-tab-store-QlUCuW8b.js +1 -0
- package/build/assets/{folder-2h1hR1Qb.js → folder-UGYUKpqb.js} +1 -1
- package/build/assets/git-control-bar-branch-button-C1qmab0K.js +27 -0
- package/build/assets/{globe-qFjFNG6J.js → globe-2otpEmVh.js} +1 -1
- package/build/assets/home-ChuA06Hv.js +1 -0
- package/build/assets/{i18n-zDndR1Ne.js → i18n-CyvU1o95.js} +1 -1
- package/build/assets/install-server-modal--lZ1HSHB.js +1 -0
- package/build/assets/{launch-I00QV8YT.js → launch-BADsYeGp.js} +1 -1
- package/build/assets/{lesson-plan-C18uB_56.js → lesson-plan-5O2tVbD1.js} +1 -1
- package/build/assets/{link-external-DtcdPFbw.js → link-external-kU6aFXU6.js} +1 -1
- package/build/assets/llm-client-BnqeDPua.js +1 -0
- package/build/assets/llm-settings-D477P0Lg.js +1 -0
- package/build/assets/llm-settings-DtlQ7i4C.js +1 -0
- package/build/assets/{loading-spinner-DNwR4--Z.js → loading-spinner-CFuA0UNt.js} +1 -1
- package/build/assets/manage-backends-modal-sH7l5NgI.js +1 -0
- package/build/assets/manifest-17af0b17.js +1 -0
- package/build/assets/{markdown-renderer-D6B-u2nM.js → markdown-renderer-CZq_UdmE.js} +1 -1
- package/build/assets/mcp-DdQ72_AO.js +9 -0
- package/build/assets/mcp-client-xEdbDxOL.js +1 -0
- package/build/assets/{messages-Bz9TWjlh.js → messages-luW9zf1w.js} +1 -1
- package/build/assets/{modal-backdrop-BDqI1zBV.js → modal-backdrop-B1si6TUd.js} +1 -1
- package/build/assets/{modal-body-CCLCqX1J.js → modal-body-2Po2nl1e.js} +1 -1
- package/build/assets/{modal-classes-DwTdT3IK.js → modal-classes-9XTtWCtF.js} +1 -1
- package/build/assets/{modal-close-button-gQgKqUf-.js → modal-close-button-BCvw9IUN.js} +1 -1
- package/build/assets/model-selector-DzQRgNGZ.js +1 -0
- package/build/assets/{navigation-context-aNGUUtdq.js → navigation-context-CszaA-CJ.js} +1 -1
- package/build/assets/{navigation-link-CYkF2y3K.js → navigation-link-DXg4oo29.js} +1 -1
- package/build/assets/onboarding-DCL9stdH.js +1 -0
- package/build/assets/{openhands-logo-CHmtDV-t.js → openhands-logo-B-IDE1ER.js} +1 -1
- package/build/assets/{option-service.api-CGNANEcT.js → option-service.api-DHOGfYKh.js} +1 -1
- package/build/assets/organization-service.api-D79cdERN.js +1 -0
- package/build/assets/path-utils-CNd_jqv_.js +1 -0
- package/build/assets/{pencil-Dr0b2jL1.js → pencil-COslZGUC.js} +1 -1
- package/build/assets/{plan-components--aLlpASH.js → plan-components-BRiIX8Wn.js} +1 -1
- package/build/assets/{planner-tab-B-5EeCEm.js → planner-tab-QBnZgIXd.js} +1 -1
- package/build/assets/plus-D8aJZRkD.js +1 -0
- package/build/assets/profiles-client-CesbAK-7.js +1 -0
- package/build/assets/{providers-DknP6O2g.js → providers-Bpq3xFRA.js} +1 -1
- package/build/assets/proxy-wIasY2Po.js +1 -0
- package/build/assets/{query-client-config-CWWGQWvw.js → query-client-config-CITeuHD7.js} +1 -1
- package/build/assets/{recommended-automations-launcher-BIul0osB.js → recommended-automations-launcher-B01jchhe.js} +1 -1
- package/build/assets/root-BBV8Ew9E.js +2 -0
- package/build/assets/root-layout-pQASEqtQ.js +2 -0
- package/build/assets/{sdk-section-page-VmtJWH3A.js → sdk-section-page-BQKe3asw.js} +1 -1
- package/build/assets/{sdk-settings-schema-DFievvEK.js → sdk-settings-schema-DoRnefvb.js} +1 -1
- package/build/assets/{search-BeVRXvX7.js → search-Cbh-hHBu.js} +1 -1
- package/build/assets/secrets-service-DEIB-Cfk.js +1 -0
- package/build/assets/{secrets-settings-BLMvCkKm.js → secrets-settings-D2EfzdpC.js} +1 -1
- package/build/assets/server-client-Cz8PyIbN.js +1 -0
- package/build/assets/settings-B7jVceyu.js +1 -0
- package/build/assets/settings-client-BUlG0Gzq.js +1 -0
- package/build/assets/{settings-dropdown-input-DA_pzHWE.js → settings-dropdown-input-BD7ziSoR.js} +1 -1
- package/build/assets/{settings-gear-aNebYlCy.js → settings-gear-xGs_SPgZ.js} +1 -1
- package/build/assets/{settings-index-CycvkOoq.js → settings-index-Xj0v9Oas.js} +1 -1
- package/build/assets/{settings-input-8y5p4kze.js → settings-input-CPr7vX81.js} +1 -1
- package/build/assets/{settings-list-classes-Qk7zl0Wu.js → settings-list-classes-CYDn4jUg.js} +1 -1
- package/build/assets/{settings-modal-nJYxCsyp.js → settings-modal-CDBy1S9S.js} +1 -1
- package/build/assets/{settings-section-header-context-B77tsYlx.js → settings-section-header-context-aD2iq1gD.js} +1 -1
- package/build/assets/settings-service.api-CTQ-LpAA.js +1 -0
- package/build/assets/{settings-switch-ba4DuiNO.js → settings-switch-CSHSqH99.js} +1 -1
- package/build/assets/{settings-utils-BxzHqLmZ.js → settings-utils-BCbzc6-u.js} +1 -1
- package/build/assets/shared-conversation-BHEbOdHj.js +1 -0
- package/build/assets/{sidebar-mobile-menu-toggle-C0mmabKj.js → sidebar-mobile-menu-toggle-YYPXGikp.js} +1 -1
- package/build/assets/{sidebar-nav-link-BsYdDFfb.js → sidebar-nav-link-CiXbBMQx.js} +1 -1
- package/build/assets/{sidebar-store-DnQAJAE5.js → sidebar-store-B76R2gP8.js} +1 -1
- package/build/assets/{skill-card-pill-row-BhUlGcYB.js → skill-card-pill-row-BXILn-GK.js} +1 -1
- package/build/assets/{skills-TYjOUQ2d.js → skills-CCaEu1KQ.js} +1 -1
- package/build/assets/skills-client-Cr9F5306.js +1 -0
- package/build/assets/{skills-plugins-D0pdqgKa.js → skills-plugins-Bs5HiF1O.js} +1 -1
- package/build/assets/{skills-settings-VqKTkmVl.js → skills-settings-CQYxMmWf.js} +1 -1
- package/build/assets/{styled-tooltip-TCp7svY3.js → styled-tooltip-DEr7oa0m.js} +1 -1
- package/build/assets/suspense-C9MBE_9N.js +1 -0
- package/build/assets/{switch-skeleton-cKrdaYGj.js → switch-skeleton-C87Tx3Tc.js} +1 -1
- package/build/assets/{task-list-tab-BiizRsY3.js → task-list-tab-R9N3Wd-U.js} +1 -1
- package/build/assets/telemetry-DCrd7gnV.js +2 -0
- package/build/assets/{terminal-CpgZx6go.js → terminal-BTM3UFcQ.js} +1 -1
- package/build/assets/{terminal-BSYITdM0.js → terminal-DQJ6IJUd.js} +1 -1
- package/build/assets/{toggle-switch-CUgOZqZu.js → toggle-switch-C-7juZ1u.js} +1 -1
- package/build/assets/{trash-2-CbVljPko.js → trash-2-DAKXV2Wm.js} +1 -1
- package/build/assets/{typography-Bvw0IxaN.js → typography-U1gkzkXo.js} +1 -1
- package/build/assets/{u-check-circle-half-DjpjzWu3.js → u-check-circle-half-CirnoxXG.js} +1 -1
- package/build/assets/{u-check-circle-u9QiS4Fr.js → u-check-circle-lbkXL2z4.js} +1 -1
- package/build/assets/{u-circuit-DlBlOwx9.js → u-circuit-Danff2ks.js} +1 -1
- package/build/assets/{u-edit-BIYzjs3v.js → u-edit-CH5nNya1.js} +1 -1
- package/build/assets/{use-active-conversation-q1wT8LI5.js → use-active-conversation-BY5F6A1G.js} +1 -1
- package/build/assets/use-agent-settings-schema-CsuMq16G.js +1 -0
- package/build/assets/{use-agent-state-CCHlVqvY.js → use-agent-state-DX5NKEa_.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BAKf91Zx.js → use-cloud-current-user-id-e1Pk7NxQ.js} +1 -1
- package/build/assets/use-config-DSzkljTq.js +1 -0
- package/build/assets/use-create-conversation-4iJytCT1.js +1 -0
- package/build/assets/{use-event-store-Cxqc45Sw.js → use-event-store-Rw1YbvLm.js} +1 -1
- package/build/assets/use-get-secrets-BMnFFBUx.js +1 -0
- package/build/assets/{use-handle-plan-click-Bfl0zIBr.js → use-handle-plan-click-DYd5a6zN.js} +1 -1
- package/build/assets/use-is-authed-DrocXcet.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-3ydwpi_M.js → use-launch-skill-in-chat-BoqKmEHC.js} +1 -1
- package/build/assets/use-llm-profiles-BhZRf-NX.js +1 -0
- package/build/assets/use-runtime-is-ready-DP-KKHO6.js +1 -0
- package/build/assets/{use-save-settings-rE9aA29R.js → use-save-settings-hK6LYt0s.js} +1 -1
- package/build/assets/use-settings-Clf0Y_P3.js +1 -0
- package/build/assets/{use-settings-nav-items-C7MOWj09.js → use-settings-nav-items-oZ-BlOWX.js} +1 -1
- package/build/assets/use-skills-v8pQ02ze.js +1 -0
- package/build/assets/{use-task-list-YMkSzdDv.js → use-task-list-DydbuRFM.js} +1 -1
- package/build/assets/{use-tracking-DQYdZpxi.js → use-tracking-DQU60djN.js} +1 -1
- package/build/assets/use-unified-vscode-url-D2Buvmxj.js +1 -0
- package/build/assets/use-user-conversation-DwOGM1lc.js +1 -0
- package/build/assets/{useMutation-DDo48A8t.js → useMutation-7hG0GuPx.js} +1 -1
- package/build/assets/useQuery-JDs8UaWj.js +1 -0
- package/build/assets/{useTranslation-CEcjrme-.js → useTranslation-CbJtty1g.js} +1 -1
- package/build/assets/{utils-CdgBzLA7.js → utils-CVcuFUYj.js} +1 -1
- package/build/assets/{vendor~browser-DWk6fNtJ.js → vendor~browser-3J6WDaAB.js} +1 -1
- package/build/assets/{vendor~browser-tab-NZdVoI2Z.js → vendor~browser-tab-DYZ-OmbT.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-gp03cWZW.js → vendor~conversation-panel~conversation-DYHL7QoY.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~index-BZ5C6Xpz.js → vendor~conversation-panel~conversation~index-Be58Romv.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BodGsxSf.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-CBEOG8NF.js} +1 -1
- package/build/assets/{vendor~files-tab-Buz36Y-q.js → vendor~files-tab-Diy4WrQz.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation-DG0H5SkJ.js → vendor~home~conversation-panel~conversation-DZ-F7J6T.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Ceeqkj0k.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BighOCzm.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9Il_wz8U.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CWwn0K2j.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CXivI4Ym.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Cntsv2EN.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B7I1ZxCx.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D13hiNGV.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-1pTajrpX.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-dZ3D8RVL.js} +1 -1
- package/build/assets/{vendor~launch-DXL78kBf.js → vendor~launch-D65Vw0VZ.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-CfAc3nMS.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BJPgfJoU.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DkwcKRtv.js → vendor~root-layout~home~conversation-panel~conversation-Cg0nXqVs.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-DSqEbr0N.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-Dr8Ly0at.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-BC9XTECT.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-DveauQfg.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-D0XUSHNN.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~jpfhx3ls-BkicN-14.js} +2 -2
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~jxrvuot9-Cwz6a1DC.js +48 -0
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CcFtthyg.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-C37jLHRk.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-BnIlGhjl.js → vendor~root-layout~home~mcp~automations-list-BTTZ58Mb.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-cNHi83v_.js → vendor~root-layout~home~mcp~automations-list-JQ-neDIa.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BGWUbqUq.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-CbuXadI-.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BuCSnjsW.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-UYEKKX0Y.js} +2 -2
- package/build/assets/{verification-settings-CIqtxWat.js → verification-settings-Rabe5TpK.js} +1 -1
- package/build/assets/{vscode-tab-DEt72yJX.js → vscode-tab-zLD5Z-PP.js} +1 -1
- package/build/assets/{waiting-for-runtime-message-DSjJfeoj.js → waiting-for-runtime-message-B1Dzhtj5.js} +1 -1
- package/build/assets/x-8AbJWTbX.js +1 -0
- package/build/assets/{x-mark-DsJ9tDD0.js → x-mark-CmcVOTk2.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +1 -0
- package/build/locales/ca/openhands.json +1 -0
- package/build/locales/de/openhands.json +1 -0
- package/build/locales/en/openhands.json +1 -0
- package/build/locales/es/openhands.json +1 -0
- package/build/locales/fr/openhands.json +1 -0
- package/build/locales/it/openhands.json +1 -0
- package/build/locales/ja/openhands.json +1 -0
- package/build/locales/ko-KR/openhands.json +1 -0
- package/build/locales/no/openhands.json +1 -0
- package/build/locales/pt/openhands.json +1 -0
- package/build/locales/tr/openhands.json +1 -0
- package/build/locales/uk/openhands.json +1 -0
- package/build/locales/zh-CN/openhands.json +1 -0
- package/build/locales/zh-TW/openhands.json +1 -0
- package/dist/api/agent-server-adapter.cjs +2 -2
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.js +6 -3
- package/dist/api/agent-server-adapter.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 +18 -6
- package/dist/api/cloud/proxy.js +1 -1
- package/dist/api/cloud/proxy.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.d.ts +12 -0
- package/dist/api/config-service/config-service.api.js +55 -18
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +8 -0
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +9 -0
- package/dist/components/features/chat/switch-profile-button.cjs +1 -1
- package/dist/components/features/chat/switch-profile-button.cjs.map +1 -1
- package/dist/components/features/chat/switch-profile-button.js +5 -5
- package/dist/components/features/chat/switch-profile-button.js.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.js +34 -37
- package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.js +1 -0
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.d.ts +0 -8
- package/dist/components/features/skills/extensions-navigation.js +34 -51
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.js +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +26 -14
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.js +26 -15
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.js.map +1 -1
- package/dist/hooks/query/use-verified-models.cjs +1 -1
- package/dist/hooks/query/use-verified-models.cjs.map +1 -1
- package/dist/hooks/query/use-verified-models.js +7 -6
- package/dist/hooks/query/use-verified-models.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 +1 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +1 -1
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +17 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/locales/ar/openhands.json +1 -0
- package/dist/locales/ca/openhands.json +1 -0
- package/dist/locales/de/openhands.json +1 -0
- package/dist/locales/en/openhands.json +1 -0
- package/dist/locales/es/openhands.json +1 -0
- package/dist/locales/fr/openhands.json +1 -0
- package/dist/locales/it/openhands.json +1 -0
- package/dist/locales/ja/openhands.json +1 -0
- package/dist/locales/ko-KR/openhands.json +1 -0
- package/dist/locales/no/openhands.json +1 -0
- package/dist/locales/pt/openhands.json +1 -0
- package/dist/locales/tr/openhands.json +1 -0
- package/dist/locales/uk/openhands.json +1 -0
- package/dist/locales/zh-CN/openhands.json +1 -0
- package/dist/locales/zh-TW/openhands.json +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +0 -1
- package/dist/routes/mcp.js +0 -1
- package/dist/routes/mcp.js.map +1 -1
- package/package.json +1 -1
- package/scripts/dev-safe.mjs +18 -2
- package/build/assets/acp-route-guard-A__sWgbc.js +0 -1
- package/build/assets/active-backend-context-I2w666XY.js +0 -1
- package/build/assets/add-backend-modal-BDBDBXsJ.js +0 -1
- package/build/assets/agent-server-client-options-9agOSarV.js +0 -1
- package/build/assets/agent-server-compatibility-B7QStIcH.js +0 -1
- package/build/assets/agent-server-conversation-service.api-Cagoqq1V.js +0 -5
- package/build/assets/api-key-entry-screen-ByXA4hXH.js +0 -1
- package/build/assets/automation-detail-Dbmgt974.js +0 -1
- package/build/assets/backend-form-modal-CeB983Sj.js +0 -1
- package/build/assets/browser-store-JRrcGdlk.js +0 -1
- package/build/assets/chat-send-button-5qz0zj6R.js +0 -1
- package/build/assets/check-CZhEL6rP.js +0 -1
- package/build/assets/conversation-BrjF2-Ky.js +0 -1
- package/build/assets/conversation-HgR_TTPE.js +0 -19
- package/build/assets/conversation-panel-BlRcO5AC.js +0 -1
- package/build/assets/conversation-service.api-B_Pdmwsa.js +0 -1
- package/build/assets/conversation-state-store-D-w0uurj.js +0 -1
- package/build/assets/conversation-websocket-context-G95yfL81.js +0 -3
- package/build/assets/dist-Bl-1K5Tv.js +0 -1
- package/build/assets/edit-automation-modal-CNZgSSiH.js +0 -1
- package/build/assets/extensions-navigation-yFLAU06N.js +0 -1
- package/build/assets/files-tab-CMredyYX.js +0 -1
- package/build/assets/files-tab-store-DLU28g8C.js +0 -1
- package/build/assets/git-control-bar-branch-button-D8blTNXh.js +0 -27
- package/build/assets/home-TrU0fLgG.js +0 -1
- package/build/assets/install-server-modal-D8Q0xZcN.js +0 -1
- package/build/assets/llm-client-BqyLKgUN.js +0 -1
- package/build/assets/llm-settings-C4R4HMUO.js +0 -1
- package/build/assets/llm-settings-Dq3w2cob.js +0 -1
- package/build/assets/manage-backends-modal-Ceo_SOcf.js +0 -1
- package/build/assets/manifest-8c2efa8a.js +0 -1
- package/build/assets/mcp-EvrLVTla.js +0 -9
- package/build/assets/model-selector-DoL0CL0_.js +0 -1
- package/build/assets/onboarding-DLr9jbKH.js +0 -1
- package/build/assets/organization-service.api-Dn74hBTH.js +0 -1
- package/build/assets/path-utils-BjxzIGLp.js +0 -1
- package/build/assets/plus-DT-M0FA1.js +0 -1
- package/build/assets/profiles-client-BrqNmaDV.js +0 -1
- package/build/assets/proxy-sRh0WKI7.js +0 -1
- package/build/assets/root-BietmyRa.js +0 -2
- package/build/assets/root-layout-BgPi-t57.js +0 -2
- package/build/assets/secrets-service-DVtlLWY8.js +0 -1
- package/build/assets/server-client-DYv_GHPl.js +0 -1
- package/build/assets/settings-CXvJUx_j.js +0 -1
- package/build/assets/settings-service.api-DxIEtvx6.js +0 -1
- package/build/assets/shared-conversation-x41nZQi7.js +0 -1
- package/build/assets/telemetry-3piyXm5H.js +0 -2
- package/build/assets/use-agent-settings-schema-Yxf7KGyG.js +0 -1
- package/build/assets/use-config-DwfigQ_Y.js +0 -1
- package/build/assets/use-create-conversation-BEzddjXn.js +0 -1
- package/build/assets/use-get-secrets-BlO1BfUo.js +0 -1
- package/build/assets/use-is-authed-hHndEep7.js +0 -1
- package/build/assets/use-llm-profiles-E-jjZMZw.js +0 -1
- package/build/assets/use-runtime-is-ready-DBWzvAmc.js +0 -1
- package/build/assets/use-settings-BPTbE7lg.js +0 -1
- package/build/assets/use-skills-QhoaIYGF.js +0 -1
- package/build/assets/use-unified-vscode-url-DFtNIC1Q.js +0 -1
- package/build/assets/use-user-conversation-BRAseenw.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-D8soyAAx.js +0 -48
- package/build/assets/vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~jaomi49z-Cw89stA6.js +0 -1
- package/build/assets/x-JOBEVLW0.js +0 -1
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.cjs +0 -2
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.cjs.map +0 -1
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.d.ts +0 -1
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.js +0 -21
- package/dist/components/features/conversation-panel/skills-runtime-waiting-state.js.map +0 -1
- package/dist/utils/acp-route-guard.cjs +0 -1
- package/dist/utils/acp-route-guard.d.ts +0 -26
- package/dist/utils/acp-route-guard.js +0 -4
- /package/build/assets/{agent-server-ui-style-scope-BwIZYdC1.js → agent-server-ui-style-scope-Bhc5vpWO.js} +0 -0
- /package/build/assets/{automation-DJ_3GeXD.js → automation-LZB0MjdV.js} +0 -0
- /package/build/assets/{common-DqjLSBOt.js → common-Cfviy7yT.js} +0 -0
- /package/build/assets/{context-CEQZwATj.js → context-BBqptpXX.js} +0 -0
- /package/build/assets/{conversation-local-storage-YmOVXxxW.js → conversation-local-storage-D5Tre_GA.js} +0 -0
- /package/build/assets/{createLucideIcon-Ddu8jDOQ.js → createLucideIcon-C9OEnwvX.js} +0 -0
- /package/build/assets/{environment-switch-store-CiurvTtK.js → environment-switch-store-BpKxp6Xq.js} +0 -0
- /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-N4-7eaeC.js} +0 -0
- /package/build/assets/{handle-capture-consent-3XrjZ8wi.js → handle-capture-consent-OitMkDHc.js} +0 -0
- /package/build/assets/{health-store-B5f0S2FY.js → health-store-d-d2ssv4.js} +0 -0
- /package/build/assets/{iconBase-BVhFI-0E.js → iconBase-B_5IRYeZ.js} +0 -0
- /package/build/assets/{map-provider-C3Z5Dx2J.js → map-provider-BHow6ugd.js} +0 -0
- /package/build/assets/{middleware-CfatjPYZ.js → middleware-B5rcobhi.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-DSQKyRhw.js → objectWithoutPropertiesLoose-B-IA9dU9.js} +0 -0
- /package/build/assets/{query-keys-tAsQcc_9.js → query-keys-CQaji0wJ.js} +0 -0
- /package/build/assets/{react-Dy05vyj5.js → react-CuAHzoGi.js} +0 -0
- /package/build/assets/{retrieve-axios-error-message-BY-yIkIq.js → retrieve-axios-error-message-DbnSBc_1.js} +0 -0
- /package/build/assets/{sdk-settings-field-metadata-C6KMD-jZ.js → sdk-settings-field-metadata-CtO73dY6.js} +0 -0
- /package/build/assets/{settings-DGY6n4J2.js → settings-KgLvVrSm.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-DNg2vKSM.js → settings-like-page-layout-classes-GknosJgv.js} +0 -0
- /package/build/assets/{use-breakpoint-DpxHDmuH.js → use-breakpoint-2sN462wJ.js} +0 -0
- /package/build/assets/{use-click-outside-element-DhxCUyWl.js → use-click-outside-element-_vianyPb.js} +0 -0
- /package/build/assets/{v4-khGvL7i2.js → v4-BMWDcIWQ.js} +0 -0
- /package/build/assets/{vendor~browser-BDNLFng6.js → vendor~browser-C3GKF4mj.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-D_hRW_zc.js → vendor~conversation-panel~conversation~alert-banner-DMcFTqbt.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-OFpe9fX_.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~j8sdb9mk-oCzr0-9g.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BPuuVEqr.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-CTmh4bwd.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-D44TR8hL.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-87v-LliW.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dr3Ow7Ms.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTosGXG7.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-B1TKKuuH.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-DspdqGPW.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-Fa-nXZ4M.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-DMH1jSwL.js} +0 -0
- /package/build/assets/{vendor~terminal-0ObOedYm.js → vendor~terminal-CnKZILnC.js} +0 -0
- /package/build/assets/{vscode-url-helper-BMq8JBhB.js → vscode-url-helper-CwQPl6QN.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as r}from"./useMutation-7hG0GuPx.js";import{o as i,t as a}from"./declaration-IA661TBv.js";import{n as o}from"./QueryClientProvider-7oLZ1RtQ.js";import{t as s}from"./useTranslation-CbJtty1g.js";import{t as c}from"./retrieve-axios-error-message-DbnSBc_1.js";import{t as l}from"./createLucideIcon-C9OEnwvX.js";import{r as u}from"./vendor~root-layout~home~mcp~automations-list-BTTZ58Mb.js";import{n as d,r as f}from"./custom-toast-handlers-fgD4IYsu.js";import{a as p,c as m,i as h,l as g,n as _,r as v,s as y}from"./circle-plus-check-toggle-B3_W6-nt.js";import{t as b}from"./trash-2-DAKXV2Wm.js";import{t as x}from"./x-8AbJWTbX.js";import{t as S}from"./utils-CVcuFUYj.js";import{n as C}from"./active-backend-context-CQTk4wD8.js";import{a as w}from"./query-keys-CQaji0wJ.js";import{t as T}from"./modal-backdrop-B1si6TUd.js";import{n as E}from"./modal-classes-9XTtWCtF.js";import{c as D,t as O}from"./brand-button-BoiPxAGm.js";import{t as k}from"./modal-close-button-BCvw9IUN.js";import{n as A,t as j}from"./settings-input-CPr7vX81.js";import{t as M}from"./confirmation-modal-C_lds1Tb.js";import{t as N}from"./settings-service.api-CTQ-LpAA.js";import{a as P,i as F,r as I}from"./use-settings-Clf0Y_P3.js";import{t as ee}from"./settings-dropdown-input-BD7ziSoR.js";import{a as L,c as R,d as z,f as te,i as B,m as ne,n as re,p as V,r as H,s as U,t as W,u as G}from"./install-server-modal--lZ1HSHB.js";import{n as K}from"./extensions-navigation-oOk5yl8X.js";import{t as q}from"./enum-filter-dropdown-DlY0Q3fj.js";import{n as J}from"./settings-like-page-layout-classes-GknosJgv.js";var Y=l(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),X=e(t(),1);function Z(){let e=o(),{data:t}=I();return r({mutationFn:async e=>{let n=F(t?.agent_settings?.mcp_config),r={sse_servers:[...n.sse_servers],stdio_servers:[...n.stdio_servers],shttp_servers:[...n.shttp_servers]},i=e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`&&`url`in e){let t=e.url;return typeof t==`string`?t:void 0}};if(e.type===`sse`){if(!e.url)return;let t=r.sse_servers.findIndex(t=>i(t)===e.url);t>=0&&r.sse_servers.splice(t,1)}else if(e.type===`shttp`){if(!e.url)return;let t=r.shttp_servers.findIndex(t=>i(t)===e.url);t>=0&&r.shttp_servers.splice(t,1)}else if(e.type===`stdio`){if(!e.name||!e.command)return;let t=r.stdio_servers.findIndex(t=>t.name===e.name&&t.command===e.command&&JSON.stringify(t.args??[])===JSON.stringify(e.args??[]));t>=0&&r.stdio_servers.splice(t,1)}else return;await N.saveSettings({agent_settings_diff:{mcp_config:P(r)}})},onSuccess:()=>{e.invalidateQueries({queryKey:w.personal()})}})}var Q=i();function ie(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function ae(e){return e.type===`stdio`?e.name??e.command??``:e.url??``}function oe(e){if(e.type===`stdio`){let t=e.args&&e.args.length>0?` ${e.args.join(` `)}`:``;return`${e.command??``}${t}`.trim()}return e.url??``}function se({server:e,onEdit:t,onDelete:n}){let{t:r}=s(`openhands`),i=L(e,G(u)),o=i?.name??ae(e),c=oe(e),l=ie(e.type);return(0,Q.jsx)(`div`,{"data-testid":`mcp-server-item`,"data-server-id":e.id,role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"aria-label":r(a.MCP$EDIT_SERVER_ARIA,{name:o}),className:S(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,y,p),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:i,fallback:(0,Q.jsx)(Y,{strokeWidth:2.25})}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,title:o,children:o}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:l})]}),(0,Q.jsx)(_,{testId:`mcp-installed-toggle-${e.id}`,isSelected:!0,onToggle:e=>{e||n()},enableLabelKey:a.MCP$TOGGLE_ADD_SERVER,disableLabelKey:a.MCP$TOGGLE_REMOVE_SERVER})]}),i?.description?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-description-${e.id}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:i.description}):null,c?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-detail-${e.id}`,className:`truncate text-xs text-tertiary-alt`,title:c,children:c}):null]})]})})}function ce({servers:e,hasAnyInstalled:t,query:n=``,onEdit:r,onDelete:i}){let{t:o}=s(`openhands`);return e.length===0?t&&n.trim().length>0?(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-empty-search`,className:`rounded-xl border border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:o(a.MCP$SEARCH_EMPTY)})}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-installed-empty`,className:m,children:[(0,Q.jsx)(`p`,{className:`text-sm text-white`,children:o(a.MCP$INSTALLED_EMPTY_TITLE)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light mt-1`,children:o(a.MCP$INSTALLED_EMPTY_HINT)})]}):(0,Q.jsx)(`div`,{className:h,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-list`,className:v,children:e.map(e=>(0,Q.jsx)(se,{server:e,onEdit:()=>r(e),onDelete:()=>i(e.id)},e.id))})})}function le({entry:e,onClick:t,onAdd:n}){let r=U(e),i=(()=>{switch(r?.kind){case`stdio`:return`STDIO`;case`shttp`:return`HTTP`;case`sse`:return`SSE`;default:return``}})();return(0,Q.jsx)(`button`,{type:`button`,onClick:t,"data-testid":`mcp-marketplace-card-${e.id}`,className:S(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,y,p),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(B,{entry:e}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:i})]}),(0,Q.jsx)(_,{testId:`mcp-marketplace-toggle-${e.id}`,isSelected:!1,onToggle:e=>{e&&n()},enableLabelKey:a.MCP$TOGGLE_ADD_SERVER,disableLabelKey:a.MCP$TOGGLE_ADD_SERVER})]}),(0,Q.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-tertiary-light`,children:e.description})]})]})})}function ue({backendKind:e,onSelect:t,onAdd:n,query:r=``}){let{t:i}=s(`openhands`),o=R(G(u)).filter(t=>te(t,e)&&V(t,r));return(0,Q.jsxs)(`section`,{"data-testid":`mcp-marketplace-section`,className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-medium text-foreground`,children:i(a.MCP$LIBRARY_TITLE)}),o.length===0?(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-empty`,className:`rounded-xl border border-dashed border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:i(a.MCP$SEARCH_EMPTY)})}):(0,Q.jsx)(`div`,{className:h,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-grid`,className:v,children:o.map(e=>(0,Q.jsx)(le,{entry:e,onClick:()=>t(e),onAdd:()=>n(e)},e.id))})})]})}function de({mode:e,server:t,existingServers:n,onSubmit:r,onCancel:i,onDelete:o,isActionDisabled:c=!1,onTest:l,isTestPending:u=!1,testMessage:d=null}){let{t:f}=s(`openhands`),[p,m]=X.useState(t?.type||`sse`),[h,g]=X.useState(null),_=X.useRef(null),v=[{key:`sse`,label:f(a.SETTINGS$MCP_SERVER_TYPE_SSE)},{key:`stdio`,label:f(a.SETTINGS$MCP_SERVER_TYPE_STDIO)},{key:`shttp`,label:f(a.SETTINGS$MCP_SERVER_TYPE_SHTTP)}],y=e=>{if(!e)return f(a.SETTINGS$MCP_ERROR_URL_REQUIRED);try{let t=new URL(e);if(![`http:`,`https:`].includes(t.protocol))return f(a.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL)}catch{return f(a.SETTINGS$MCP_ERROR_URL_INVALID)}return null},x=e=>e?/^[a-zA-Z0-9_-]+$/.test(e)?null:f(a.SETTINGS$MCP_ERROR_NAME_INVALID):f(a.SETTINGS$MCP_ERROR_NAME_REQUIRED),C=r=>!n||!(e===`add`||e===`edit`&&t?.name!==r)?null:n.filter(e=>e.type===`stdio`).map(e=>e.name).filter(Boolean).includes(r)?f(a.SETTINGS$MCP_ERROR_NAME_DUPLICATE):null,w=e=>e?e.includes(` `)?f(a.SETTINGS$MCP_ERROR_COMMAND_NO_SPACES):null:f(a.SETTINGS$MCP_ERROR_COMMAND_REQUIRED),T=r=>{if(!n)return null;let i=t?.url;return(e===`add`||e===`edit`&&i!==r)&&n.some(e=>(e.type===`sse`||e.type===`shttp`)&&e.url===r)?f(a.SETTINGS$MCP_ERROR_URL_DUPLICATE):null},E=e=>{if(!e.trim())return null;let t=e.split(`
|
|
2
|
+
`);for(let e=0;e<t.length;e+=1){let n=t[e].trim();if(n){let e=n.indexOf(`=`);if(e===-1||!n.substring(0,e).trim())return f(a.SETTINGS$MCP_ERROR_ENV_INVALID_FORMAT)}}return null},k=e=>{if(!e.trim())return null;let t=parseInt(e.trim(),10);return Number.isNaN(t)?f(a.SETTINGS$MCP_ERROR_TIMEOUT_INVALID_NUMBER):t<=0?f(a.SETTINGS$MCP_ERROR_TIMEOUT_POSITIVE):t>3600?f(a.SETTINGS$MCP_ERROR_TIMEOUT_MAX_EXCEEDED):null},M=e=>{let t=e.get(`name`)?.toString().trim()||``,n=e.get(`command`)?.toString().trim()||``,r=e.get(`env`)?.toString()||``;return x(t)||C(t)||w(n)||E(r)||null},N=e=>{if(p===`sse`||p===`shttp`){let t=e.get(`url`)?.toString().trim()||``,n=y(t);if(n)return n;let r=T(t);if(r)return r;if(p===`shttp`){let t=k(e.get(`timeout`)?.toString()||``);if(t)return t}return null}return p===`stdio`?M(e):null},P=e=>{let t={},n=e.trim();if(!n)return t;for(let e of n.split(`
|
|
3
|
+
`)){let n=e.trim(),r=n.indexOf(`=`),i=r>=0?n.substring(0,r).trim():``;n&&r!==-1&&i&&(t[i]=n.substring(r+1).trim())}return t},F=e=>e?Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`
|
|
4
|
+
`):``,I=e=>{let n={id:t?.id||`${p}-${Date.now()}`,type:p};if(p===`sse`||p===`shttp`){let t=e.get(`url`)?.toString().trim(),r=e.get(`api_key`)?.toString().trim(),i=e.get(`timeout`)?.toString().trim(),a={...n,url:t,...r&&{api_key:r}};if(p===`shttp`&&i){let e=parseInt(i,10);Number.isNaN(e)||(a.timeout=e)}return a}let r=e.get(`name`)?.toString().trim(),i=e.get(`command`)?.toString().trim(),a=e.get(`args`)?.toString().trim(),o=e.get(`env`)?.toString().trim(),s=a?a.split(`
|
|
5
|
+
`).map(e=>e.trim()).filter(Boolean):[],c=P(o||``);return{...n,name:r,command:i,...s.length>0&&{args:s},...Object.keys(c).length>0&&{env:c}}};return(0,Q.jsxs)(`form`,{ref:_,"data-testid":e===`add`?`add-mcp-server-form`:`edit-mcp-server-form`,onSubmit:e=>{e.preventDefault(),g(null);let t=new FormData(e.currentTarget),n=N(t);if(n){g(n);return}r(I(t))},className:`flex flex-col items-start gap-6`,children:[e===`add`&&(0,Q.jsx)(ee,{testId:`server-type-dropdown`,name:`server-type`,label:f(a.SETTINGS$MCP_SERVER_TYPE),items:v,selectedKey:p,onSelectionChange:e=>m(e),onInputChange:()=>{},isClearable:!1,allowsCustomValue:!1,required:!0,wrapperClassName:`w-full min-w-0`}),h&&(0,Q.jsx)(`p`,{className:`text-red-500 text-sm`,children:h}),(p===`sse`||p===`shttp`)&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(j,{testId:`url-input`,name:`url`,type:`url`,label:f(a.SETTINGS$MCP_URL),className:`w-full min-w-0`,required:!0,defaultValue:t?.url||``,placeholder:`https://api.example.com`}),(0,Q.jsx)(j,{testId:`api-key-input`,name:`api_key`,type:`password`,label:f(a.SETTINGS$MCP_API_KEY),className:`w-full min-w-0`,showOptionalTag:!0,defaultValue:t?.api_key||``,placeholder:f(a.SETTINGS$MCP_API_KEY_PLACEHOLDER)}),p===`shttp`&&(0,Q.jsx)(j,{testId:`timeout-input`,name:`timeout`,type:`number`,label:f(a.SETTINGS$MCP_TIMEOUT_LABEL),className:`w-full min-w-0`,showOptionalTag:!0,defaultValue:t?.timeout?.toString()||``,placeholder:`60`,min:1,max:3600})]}),p===`stdio`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(j,{testId:`name-input`,name:`name`,type:`text`,label:f(a.SETTINGS$MCP_NAME),className:`w-full min-w-0`,required:!0,defaultValue:t?.name||``,placeholder:`my-mcp-server`,pattern:`^[a-zA-Z0-9_-]+$`}),(0,Q.jsx)(j,{testId:`command-input`,name:`command`,type:`text`,label:f(a.SETTINGS$MCP_COMMAND),className:`w-full min-w-0`,required:!0,defaultValue:t?.command||``,placeholder:`npx`}),(0,Q.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-sm`,children:f(a.SETTINGS$MCP_COMMAND_ARGUMENTS)}),(0,Q.jsx)(A,{})]}),(0,Q.jsx)(`textarea`,{"data-testid":`args-input`,name:`args`,rows:3,defaultValue:t?.args?.join(`
|
|
6
|
+
`)||``,placeholder:`arg1
|
|
7
|
+
arg2
|
|
8
|
+
arg3`,className:S(D,`resize-none placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:f(a.SETTINGS$MCP_COMMAND_ARGUMENTS_HELP)})]}),(0,Q.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-sm`,children:f(a.SETTINGS$MCP_ENVIRONMENT_VARIABLES)}),(0,Q.jsx)(A,{})]}),(0,Q.jsx)(`textarea`,{"data-testid":`env-input`,name:`env`,rows:4,defaultValue:F(t?.env),placeholder:`KEY1=value1
|
|
9
|
+
KEY2=value2`,className:S(D,`resize-none placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)})]})]}),d&&(0,Q.jsx)(`p`,{"data-testid":`mcp-test-message`,className:d.ok?`text-sm text-green-500 whitespace-pre-wrap`:`text-sm text-red-500 whitespace-pre-wrap`,children:d.text}),(0,Q.jsxs)(`div`,{className:S(`flex w-full items-center gap-2`,o?`justify-between`:`justify-end`),children:[o?(0,Q.jsx)(O,{testId:`mcp-custom-editor-delete`,type:`button`,variant:`secondary`,onClick:o,isDisabled:c,startContent:(0,Q.jsx)(b,{"aria-hidden":!0,className:`size-4`,strokeWidth:2}),children:f(a.BUTTON$DELETE)}):null,(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(O,{testId:`cancel-button`,type:`button`,variant:`secondary`,onClick:i,isDisabled:c,children:f(a.BUTTON$CANCEL)}),l&&(0,Q.jsx)(O,{testId:`mcp-test-connection`,type:`button`,variant:`secondary`,onClick:()=>{if(!l||!_.current)return;g(null);let e=new FormData(_.current),t=N(e);if(t){g(t);return}l(I(e))},isDisabled:c||u,children:f(u?a.MCP$VERIFYING:a.MCP$TEST_BUTTON)}),(0,Q.jsxs)(O,{testId:`submit-button`,type:`submit`,variant:`primary`,isDisabled:c||u,children:[e===`add`&&f(a.SETTINGS$MCP_ADD_SERVER),e===`edit`&&f(a.SETTINGS$MCP_SAVE_SERVER)]})]})]})]})}function fe(){let e=o(),{data:t}=I();return r({mutationFn:async({serverId:e,server:n})=>{let r=F(t?.agent_settings?.mcp_config),i={sse_servers:[...r.sse_servers],stdio_servers:[...r.stdio_servers],shttp_servers:[...r.shttp_servers]},[a,o]=e.split(`-`),s=parseInt(o,10);if(a===`sse`){let e={url:n.url,...n.api_key&&{api_key:n.api_key}};i.sse_servers[s]=e}else if(a===`stdio`){let e={name:n.name,command:n.command,...n.args&&{args:n.args},...n.env&&{env:n.env}};i.stdio_servers[s]=e}else if(a===`shttp`){let e={url:n.url,...n.api_key&&{api_key:n.api_key},...n.timeout!==void 0&&{timeout:n.timeout}};i.shttp_servers[s]=e}await N.saveSettings({agent_settings_diff:{mcp_config:P(i)}})},onSuccess:()=>{e.invalidateQueries({queryKey:w.personal()})}})}function pe({server:e,existingServers:t,onClose:n}){let{t:r}=s(`openhands`),{mutate:i,isPending:o}=H(),{mutate:l,isPending:u}=fe(),{mutate:p,isPending:m}=Z(),{mutate:h,isPending:g,data:_,reset:v}=re(),[y,b]=X.useState(!1),x=!!e.id,C=o||u||m,w=C||g||y,D=e=>{switch(e.error_kind){case`timeout`:return r(a.MCP$TEST_ERROR_TIMEOUT);case`connection`:return r(a.MCP$TEST_ERROR_CONNECTION);default:return r(a.MCP$TEST_ERROR_UNKNOWN,{error:e.error})}},O=X.useMemo(()=>_?_.ok?{ok:!0,text:r(a.MCP$TEST_SUCCESS,{count:_.tools.length})}:{ok:!1,text:D(_)}:null,[_,r]),A=e=>{d(c(e)||r(a.ERROR$GENERIC))};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(T,{onClose:w?void 0:n,closeOnEscape:!w,"aria-label":r(x?a.MCP$EDIT_CUSTOM_TITLE:a.MCP$ADD_CUSTOM_TITLE),children:(0,Q.jsxs)(`div`,{"data-testid":`mcp-custom-editor`,className:`relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar`,children:[(0,Q.jsx)(k,{onClose:n,testId:`mcp-custom-editor-close`,disabled:w}),(0,Q.jsx)(`h2`,{className:S(`mb-4 pr-6`,E),children:r(x?a.MCP$EDIT_CUSTOM_TITLE:a.MCP$ADD_CUSTOM_TITLE)}),(0,Q.jsx)(de,{mode:x?`edit`:`add`,server:x?e:void 0,existingServers:t,onSubmit:t=>{v(),h(t,{onSuccess:r=>{r.ok&&(x?l({serverId:e.id,server:t},{onSuccess:n,onError:A}):i(t,{onSuccess:n,onError:A}))},onError:A})},onCancel:n,onDelete:x?()=>b(!0):void 0,isActionDisabled:C,onTest:e=>{h(e)},isTestPending:g,testMessage:O})]})}),y?(0,Q.jsx)(M,{text:r(a.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>b(!1),onConfirm:()=>{p(e,{onSuccess:()=>{f(r(a.MCP$REMOVE_SUCCESS)),b(!1),n()},onError:e=>{A(e),b(!1)}})},isConfirming:m}):null]})}var $=[`all`,`installed`,`library`],me={all:a.MCP$SECTION_FILTER_ALL,installed:a.MCP$INSTALLED_TITLE,library:a.MCP$LIBRARY_TITLE};function he({value:e,onChange:t}){return(0,Q.jsx)(q,{testId:`mcp-section-filter`,value:e,onChange:t,options:$,labelKeyByValue:me})}function ge({search:e,onSearchChange:t,sectionFilter:n,onSectionFilterChange:r}){let{t:i}=s(`openhands`);return(0,Q.jsxs)(`div`,{"data-testid":`mcp-toolbar`,className:`flex items-stretch gap-2`,children:[(0,Q.jsxs)(`div`,{"data-testid":`mcp-search`,className:S(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,Q.jsx)(g,{className:`ml-3 h-4 w-4 text-tertiary-alt shrink-0`,"aria-hidden":!0}),(0,Q.jsx)(`input`,{type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(a.MCP$SEARCH_PLACEHOLDER),"aria-label":i(a.MCP$SEARCH_PLACEHOLDER),"data-testid":`mcp-search-input`,className:S(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,Q.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(a.MCP$SEARCH_CLEAR),"data-testid":`mcp-search-clear`,className:`mr-2 p-1 rounded text-tertiary-alt hover:text-content-1 cursor-pointer`,children:(0,Q.jsx)(x,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,Q.jsx)(he,{value:n,onChange:r})]})}var _e=n(function(){let{t:e}=s(`openhands`),{data:t,isLoading:n}=I(),{mutate:r,isPending:i}=Z(),o=C().backend.kind,[l,p]=X.useState(null),[m,h]=X.useState(null),[g,_]=X.useState(null),[v,y]=X.useState(``),[b,x]=X.useState(`all`),S=ne(F(t?.agent_settings?.mcp_config)),w=G(u),T=S.filter(e=>z(e,L(e,w),v)),E=e=>{p(e)};return n||!t?(0,Q.jsxs)(`div`,{"data-testid":`mcp-page`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,Q.jsx)(K,{}),(0,Q.jsx)(`div`,{className:`flex h-full flex-1 items-center justify-center px-4 md:px-0`,children:(0,Q.jsx)(`div`,{className:`h-8 w-8 rounded-full border-2 border-[var(--oh-border)] border-t-white animate-spin`})})]}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-page`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,Q.jsx)(K,{}),(0,Q.jsxs)(`main`,{className:J,children:[(0,Q.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,Q.jsx)(`div`,{className:`min-w-0`,children:(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`h2`,{className:`text-xl font-medium leading-6 text-foreground`,children:e(a.SETTINGS$MCP_TITLE)}),(0,Q.jsx)(`div`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(a.MCP$PAGE_DESCRIPTION)})]}),(0,Q.jsx)(O,{type:`button`,variant:`secondary`,testId:`mcp-add-custom-server`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>h({id:``,type:`sse`}),children:e(a.MCP$ADD_CUSTOM)})]})}),(0,Q.jsx)(ge,{search:v,onSearchChange:y,sectionFilter:b,onSectionFilterChange:x}),b===`library`?null:(0,Q.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:e(a.MCP$INSTALLED_TITLE)}),(0,Q.jsx)(ce,{servers:T,hasAnyInstalled:S.length>0,query:v,onEdit:e=>{h(e)},onDelete:e=>{let t=S.find(t=>t.id===e);t&&_(t)}})]}),b===`installed`?null:(0,Q.jsx)(ue,{backendKind:o,onSelect:E,onAdd:E,query:v})]}),l&&(0,Q.jsx)(W,{entry:l,onClose:()=>p(null)}),m&&(0,Q.jsx)(pe,{server:m,existingServers:S,onClose:()=>h(null)}),g&&(0,Q.jsx)(M,{text:e(a.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>_(null),onConfirm:()=>{g&&r(g,{onSuccess:()=>{f(e(a.MCP$REMOVE_SUCCESS)),_(null)},onError:t=>{d(c(t)||e(a.ERROR$GENERIC)),_(null)}})},isConfirming:i})]})]})});export{_e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./settings-client-BUlG0Gzq.js";var t=`AGENT_SERVER_VERSION_TOO_OLD`,n={workspaces:{feature:`workspaces`,displayName:`Workspaces`,minVersion:`1.23.0`},hooks:{feature:`hooks`,displayName:`Hooks API`,minVersion:`1.23.0`},mcpTest:{feature:`mcp-test`,displayName:`MCP test API`,minVersion:`1.23.0`},cloudProxy:{feature:`cloud-proxy`,displayName:`Cloud proxy`,minVersion:`1.23.0`}},r=class e extends Error{constructor({requirement:n,actualVersion:r}){super(`${n.displayName} requires agent-server ${n.minVersion} or newer; this backend is running ${r}. Please upgrade your agent-server backend.`),this.code=t,this.name=`AgentServerVersionError`,this.feature=n.feature,this.displayName=n.displayName,this.requiredVersion=n.minVersion,this.actualVersion=r,Object.setPrototypeOf(this,e.prototype)}},i=new WeakMap;function a(e){return e instanceof r||typeof e==`object`&&!!e&&`code`in e&&e.code===`AGENT_SERVER_VERSION_TOO_OLD`}async function o(e){let t=i.get(e);if(t)return t;let n=e.get(`/server_info`).then(e=>e.data);return i.set(e,n),n}async function s(e,t){let n=await o(e),i=typeof n.version==`string`&&n.version.trim()?n.version.trim():`unknown`,a=c(i,t.minVersion);if(a===null||a<0)throw new r({requirement:t,actualVersion:i});return n}function c(e,t){let n=l(e),r=l(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function l(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}var u=class{constructor(t){this.host=t.host.replace(/\/$/,``),this.apiKey=t.apiKey,this.client=new e({baseUrl:this.host,apiKey:this.apiKey,timeout:t.timeout||6e4})}async testServer(e){return await s(this.client,n.mcpTest),(await this.client.post(`/api/mcp/test`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}close(){this.client.close()}};export{a as i,n,s as r,u as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{d as n,u as r}from"./path-utils-BjxzIGLp.js";import{t as i}from"./useMutation-DDo48A8t.js";import{o as a,t as o}from"./declaration-DaUdB2Wg.js";import{t as s}from"./Trans-BJeYqz2A.js";import{t as c}from"./useTranslation-CEcjrme-.js";import{a as l}from"./i18n-zDndR1Ne.js";import{t as u}from"./createLucideIcon-Ddu8jDOQ.js";import{t as d}from"./chevron-down-KhWYEjeW.js";import{A as f,S as p,t as m}from"./utils-CdgBzLA7.js";import{n as h}from"./common-DqjLSBOt.js";import{t as g}from"./use-config-DwfigQ_Y.js";import{f as _,m as v,p as y}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-B1TKKuuH.js";import{t as ee}from"./styled-tooltip-TCp7svY3.js";import{t as te}from"./react-Dy05vyj5.js";import{s as ne}from"./conversation-local-storage-YmOVXxxW.js";import{t as b}from"./conversation-store-CC-isCnP.js";import{n as re}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-CfAc3nMS.js";import{t as ie}from"./skills-TYjOUQ2d.js";import{t as x}from"./close-D_o3d8QM.js";import{r as S}from"./typography-Bvw0IxaN.js";import{t as C}from"./u-check-circle-u9QiS4Fr.js";import{n as ae,r as w,t as oe}from"./use-active-conversation-q1wT8LI5.js";import{t as T}from"./use-agent-state-CCHlVqvY.js";import{d as se,l as ce,n as le,u as ue}from"./conversation-websocket-context-G95yfL81.js";import{C as de,a as fe,g as pe,i as E,r as D,t as me,v as O,y as k}from"./use-event-store-Cxqc45Sw.js";import{t as he}from"./lesson-plan-C18uB_56.js";import{n as ge,t as A}from"./markdown-renderer-D6B-u2nM.js";import{n as _e,r as ve,t as ye}from"./plan-components--aLlpASH.js";import{n as be,t as xe}from"./u-check-circle-half-DjpjzWu3.js";var Se=u(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(t(),1);function Ce(){!y.current&&_();let[e]=(0,j.useState)(v.current);return e}var M=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}(M||{});function we(){let{conversationId:e}=w(),t=le();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Te(e,t,n,r){return{action:M.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var N=a(),P=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.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`})}),F=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.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 Ee({status:e}){return(0,N.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,N.jsx)(re,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function I({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let[s,c]=j.useState(r),l=t?(0,N.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`cursor-pointer text-left`,"aria-label":s?`Collapse`:`Expand`,children:s?(0,N.jsx)(F,{className:m(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,N.jsx)(P,{className:m(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,N.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&l,o,(0,N.jsx)(`span`,{children:e}),i===`after`&&l]}),(0,N.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,N.jsx)(Ee,{status:n})]})]}),s&&(typeof t==`string`?(0,N.jsx)(A,{children:t}):t)]})}var De=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,N.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,N.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,N.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,N.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,N.jsx)(`defs`,{children:(0,N.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,N.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function Oe({profile:e}){let[t,r]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>r(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,N.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,N.jsx)(d,{size:14}):(0,N.jsx)(n,{size:14})}),(0,N.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`hr`,{className:`border-neutral-700`}),(0,N.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 ke({conversationId:e,anchorEventId:t}){let n=ue(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,N.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,N.jsx)(I,{title:(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,N.jsx)(De,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,N.jsx)(s,{i18nKey:o.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,N.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,N.jsx)(I,{title:(0,N.jsx)(`span`,{children:t?(0,N.jsx)(s,{i18nKey:o.MODEL$NO_SAVED_PROFILES}):(0,N.jsx)(s,{i18nKey:o.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,N.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,N.jsx)(s,{i18nKey:o.MODEL$NO_PROFILES_HINT})}):(0,N.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,N.jsx)(Oe,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var L=(0,j.createContext)(void 0);function Ae({children:e,value:t}){let n=ve(j.useRef(null)),r=t||n;return(0,N.jsx)(L.Provider,{value:r,children:e})}function je(){let e=(0,j.useContext)(L);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function Me(){return(0,j.useContext)(L)}var R=()=>{let{setConversationMode:e}=b(),{send:t}=we(),{conversationId:n}=w(),r=se(e=>e.enqueuePendingMessage),i=se(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Te(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}};function Ne(){let{conversationId:e}=ae(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=b(),{setSelectedTab:a}=ne(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 z=300,Pe=ye(`shine-text`);function Fe({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=c(`openhands`),{navigateToTab:i}=Ne(),{handleBuildPlanClick:a}=R(),{scrollDomToBottom:s}=je(),l=()=>{i(`planner`)},u=(0,j.useCallback)(e=>{a(e),s()},[a,s]),d=(0,j.useMemo)(()=>e?e.length<=z?e:`${e.slice(0,z)}...`:``,[e]);return e?(0,N.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,N.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,N.jsx)(he,{width:18,height:18,color:`var(--oh-muted)`}),(0,N.jsx)(S.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(o.COMMON$PLAN_MD)}),(0,N.jsx)(`div`,{className:`flex-1`}),(0,N.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,N.jsx)(S.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(o.COMMON$VIEW)}),(0,N.jsx)(Se,{className:`text-white`,size:18})]})]}),(0,N.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:d&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(A,{includeStandard:!0,components:t?Pe:_e,children:d}),e&&e.length>z&&(0,N.jsx)(`button`,{type:`button`,onClick:l,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(o.COMMON$READ_MORE)})]})}),(0,N.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,N.jsx)(`button`,{type:`button`,onClick:u,disabled:n,className:m(`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,N.jsxs)(S.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(o.COMMON$BUILD),` `,(0,N.jsx)(S.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function Ie({errorId:e,defaultMessage:t}){let{t:n}=c(`openhands`),[r,i]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&l.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,N.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,N.jsx)(F,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,N.jsx)(P,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,N.jsx)(A,{children:t})]})}function Le({event:e}){return fe(e)?(0,N.jsx)(Ie,{errorId:e.id,defaultMessage:e.error}):null}var Re=`200%`,B=8,ze=B*2;function Be({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=Ce(),c=`oh-text-shimmer-${(0,j.useId)().replace(/:/g,``)}`,l=(0,j.useMemo)(()=>Math.min(B/2-1,1+i/2),[i]),u=(0,j.useMemo)(()=>{let e=B/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${B}%)`,backgroundSize:`${Re} 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,N.jsx)(t,{className:m(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${ze}% center}to{background-position:0% center}}`}}),(0,N.jsx)(t,{className:m(`relative inline-block`,n),style:u,...o,children:e})]})}var Ve=j.memo(Be),He=3,V=24;function Ue({className:e}){return(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,N.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,N.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var We={p:({children:e})=>(0,N.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function Ge({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=c(`openhands`),a=j.useRef(null),[s,l]=j.useState(!1);j.useLayoutEffect(()=>{let t=a.current;if(!t||n){l(!1),r(!1);return}let i=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),i=He*(Number.isFinite(n)&&n>0?n:V),a=(e.match(/\n/g)??[]).length,o=t.scrollHeight>i+1||a>=He||e.trim().length>220;l(e=>(e!==o&&r(o),o))};i();let o=new ResizeObserver(i);return o.observe(t),()=>o.disconnect()},[e,n,r]);let u=s&&!n;return(0,N.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,N.jsx)(`div`,{ref:a,className:m(`text-sm leading-6 whitespace-normal [word-break:break-word]`,u&&`line-clamp-3`),children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:e})}),u?(0,N.jsxs)(N.Fragment,{children:[(0,N.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,N.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:m(`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(o.COMMON$VIEW_MORE)})]}):null]})}function H({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:a,onRetry:s,onStop:l}){let{t:u}=c(`openhands`),[d,f]=j.useState(!1),[p,h]=j.useState(!1),[g,_]=j.useState(!1),[v,y]=j.useState(!1),[te,ne]=j.useState(!0),b=j.useRef(null);j.useEffect(()=>{_(!1)},[t]);let re=async()=>{await navigator.clipboard.writeText(t),h(!0)};j.useEffect(()=>{let e;return p&&(e=setTimeout(()=>{h(!1)},2e3)),()=>{clearTimeout(e)}},[p]);let ie=e===`user`&&(a===`error`||a===`sending`),x=a===`sending`&&l!=null,S=x&&d,C=e===`user`&&a==null,ae=C&&v&&!g,w=j.Children.count(n)>0;j.useLayoutEffect(()=>{if(!x||C)return;let e=b.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:V;ne(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,x,C]);let oe=C?(0,N.jsx)(Ge,{message:t,isHovering:d,isExpanded:g,onTruncatableChange:y}):(0,N.jsx)(`div`,{ref:b,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:t})}),T=(0,N.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":a,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:m(`rounded-xl relative w-fit max-w-full flex flex-col`,w&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,a===`error`&&`border border-[var(--oh-status-error)]/40`,!ie&&`last:mb-4`),children:[(0,N.jsxs)(`div`,{className:m(`absolute -top-2.5 -right-2.5 z-10`,!d||a===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,N.jsx)(ee,{content:e.tooltip,placement:`top`,children:(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,N.jsx)(ge,{isHidden:!d,isDisabled:p,onClick:re,mode:p?`copied`:`copy`})]}),oe,x?(0,N.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),l?.()},"data-testid":`chat-message-stop`,"aria-label":u(o.BUTTON$STOP),"aria-hidden":!S,tabIndex:S?0:-1,className:m(`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`,te?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,S?`opacity-100`:`pointer-events-none opacity-0`),children:(0,N.jsx)(Ue,{className:`block h-7 w-7 max-w-none`})}):null,ae?(0,N.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":u(o.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>_(!0)}):null,n]});return e===`user`&&a===`error`?(0,N.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[T,(0,N.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,N.jsx)(`span`,{children:u(o.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),s?(0,N.jsx)(`button`,{type:`button`,onClick:s,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:u(o.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&a===`sending`?(0,N.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[T,(0,N.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,N.jsx)(Ve,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:u(o.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):T}function Ke({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.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 qe({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.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 Je({onClick:e,className:t}){return(0,N.jsx)(`button`,{type:`button`,onClick:e,className:m(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,N.jsx)(x,{width:18,height:18})})}function Ye({src:e,size:t=`small`}){return(0,N.jsx)(`img`,{role:`img`,alt:``,src:e,className:m(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Xe({src:e,onRemove:t,size:n=`small`}){return(0,N.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,N.jsx)(Ye,{src:e,size:n}),t&&(0,N.jsx)(Je,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Ze({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,N.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,N.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(Ke,{active:!o})}),(0,N.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:m(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,N.jsx)(Xe,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,N.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(qe,{active:!c})})]})}function Qe({type:e,onClick:t}){let{t:n}=c(`openhands`),r=e===`confirm`,i=n(r?o.ACTION$CONFIRM:o.ACTION$REJECT),a=n(r?o.CHAT_INTERFACE$USER_CONFIRMED:o.CHAT_INTERFACE$USER_REJECTED),s=r?`${n(o.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(o.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,N.jsx)(ee,{closeDelay:100,content:a,children:(0,N.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:m(`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:s})})}function $e({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,N.jsxs)(`div`,{className:m(`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,N.jsx)(`span`,{className:``,children:n}),(0,N.jsx)(`span`,{className:`font-bold`,children:i}),(0,N.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var et=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,N.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,N.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,N.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`})]}),tt=te(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),nt=()=>i({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return ce.respondToConfirmation(e,t,i,n)}});function rt(){let e=tt(e=>e.submittedEventIds),t=tt(e=>e.addSubmittedEventId),{t:n}=c(`openhands`),{data:r}=oe(),{curAgentState:i}=T(),{mutate:a}=nt(),s=me(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===p.AWAITING_USER_CONFIRMATION:!1),l=(0,j.useCallback)(e=>{!s||!r||(t(s.id),a({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[s,r,t,a]);return(0,j.useEffect)(()=>{if(!s)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),l(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),l(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[s,l]),i!==p.AWAITING_USER_CONFIRMATION||!s||e.includes(s.id)?null:(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(E(s)?s.security_risk:h.UNKNOWN)===h.HIGH&&(0,N.jsx)($e,{content:n(o.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,N.jsx)(et,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(o.COMMON$HIGH_RISK)}),(0,N.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,N.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(o.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(Qe,{type:`reject`,onClick:()=>l(!1)}),(0,N.jsx)(Qe,{type:`confirm`,onClick:()=>l(!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(`
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{d as n,u as r}from"./path-utils-CNd_jqv_.js";import{t as i}from"./useMutation-7hG0GuPx.js";import{o as a,t as o}from"./declaration-IA661TBv.js";import{t as s}from"./Trans-rF21Jwln.js";import{t as c}from"./useTranslation-CbJtty1g.js";import{a as l}from"./i18n-CyvU1o95.js";import{t as u}from"./createLucideIcon-C9OEnwvX.js";import{t as d}from"./chevron-down-DUxWwzTm.js";import{A as f,S as p,t as m}from"./utils-CVcuFUYj.js";import{n as h}from"./common-Cfviy7yT.js";import{t as g}from"./use-config-DSzkljTq.js";import{f as _,m as v,p as y}from"./vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-DspdqGPW.js";import{t as ee}from"./styled-tooltip-DEr7oa0m.js";import{t as te}from"./react-CuAHzoGi.js";import{s as ne}from"./conversation-local-storage-D5Tre_GA.js";import{t as b}from"./conversation-store-kHcewy1E.js";import{n as re}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-BJPgfJoU.js";import{t as ie}from"./skills-CCaEu1KQ.js";import{t as x}from"./close-Cz0OAgTy.js";import{r as S}from"./typography-U1gkzkXo.js";import{t as C}from"./u-check-circle-lbkXL2z4.js";import{n as ae,r as w,t as oe}from"./use-active-conversation-BY5F6A1G.js";import{t as T}from"./use-agent-state-DX5NKEa_.js";import{d as se,l as ce,n as le,u as ue}from"./conversation-websocket-context-C2yKCqvj.js";import{C as de,a as fe,g as pe,i as E,r as D,t as me,v as O,y as k}from"./use-event-store-Rw1YbvLm.js";import{t as he}from"./lesson-plan-5O2tVbD1.js";import{n as ge,t as A}from"./markdown-renderer-CZq_UdmE.js";import{n as _e,r as ve,t as ye}from"./plan-components-BRiIX8Wn.js";import{n as be,t as xe}from"./u-check-circle-half-CirnoxXG.js";var Se=u(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(t(),1);function Ce(){!y.current&&_();let[e]=(0,j.useState)(v.current);return e}var M=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}(M||{});function we(){let{conversationId:e}=w(),t=le();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function Te(e,t,n,r){return{action:M.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var N=a(),P=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.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`})}),F=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,N.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 Ee({status:e}){return(0,N.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,N.jsx)(re,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function I({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let[s,c]=j.useState(r),l=t?(0,N.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`cursor-pointer text-left`,"aria-label":s?`Collapse`:`Expand`,children:s?(0,N.jsx)(F,{className:m(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,N.jsx)(P,{className:m(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,N.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&l,o,(0,N.jsx)(`span`,{children:e}),i===`after`&&l]}),(0,N.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,N.jsx)(Ee,{status:n})]})]}),s&&(typeof t==`string`?(0,N.jsx)(A,{children:t}):t)]})}var De=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,N.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,N.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,N.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,N.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,N.jsx)(`defs`,{children:(0,N.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,N.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function Oe({profile:e}){let[t,r]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>r(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,N.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,N.jsx)(d,{size:14}):(0,N.jsx)(n,{size:14})}),(0,N.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`hr`,{className:`border-neutral-700`}),(0,N.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 ke({conversationId:e,anchorEventId:t}){let n=ue(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,N.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,N.jsx)(I,{title:(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,N.jsx)(De,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,N.jsx)(s,{i18nKey:o.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,N.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,N.jsx)(I,{title:(0,N.jsx)(`span`,{children:t?(0,N.jsx)(s,{i18nKey:o.MODEL$NO_SAVED_PROFILES}):(0,N.jsx)(s,{i18nKey:o.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,N.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,N.jsx)(s,{i18nKey:o.MODEL$NO_PROFILES_HINT})}):(0,N.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,N.jsx)(Oe,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var L=(0,j.createContext)(void 0);function Ae({children:e,value:t}){let n=ve(j.useRef(null)),r=t||n;return(0,N.jsx)(L.Provider,{value:r,children:e})}function je(){let e=(0,j.useContext)(L);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}function Me(){return(0,j.useContext)(L)}var R=()=>{let{setConversationMode:e}=b(),{send:t}=we(),{conversationId:n}=w(),r=se(e=>e.enqueuePendingMessage),i=se(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(Te(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}};function Ne(){let{conversationId:e}=ae(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=b(),{setSelectedTab:a}=ne(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 z=300,Pe=ye(`shine-text`);function Fe({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=c(`openhands`),{navigateToTab:i}=Ne(),{handleBuildPlanClick:a}=R(),{scrollDomToBottom:s}=je(),l=()=>{i(`planner`)},u=(0,j.useCallback)(e=>{a(e),s()},[a,s]),d=(0,j.useMemo)(()=>e?e.length<=z?e:`${e.slice(0,z)}...`:``,[e]);return e?(0,N.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,N.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,N.jsx)(he,{width:18,height:18,color:`var(--oh-muted)`}),(0,N.jsx)(S.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(o.COMMON$PLAN_MD)}),(0,N.jsx)(`div`,{className:`flex-1`}),(0,N.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,N.jsx)(S.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(o.COMMON$VIEW)}),(0,N.jsx)(Se,{className:`text-white`,size:18})]})]}),(0,N.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:d&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(A,{includeStandard:!0,components:t?Pe:_e,children:d}),e&&e.length>z&&(0,N.jsx)(`button`,{type:`button`,onClick:l,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(o.COMMON$READ_MORE)})]})}),(0,N.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,N.jsx)(`button`,{type:`button`,onClick:u,disabled:n,className:m(`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,N.jsxs)(S.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(o.COMMON$BUILD),` `,(0,N.jsx)(S.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function Ie({errorId:e,defaultMessage:t}){let{t:n}=c(`openhands`),[r,i]=j.useState(!1);return(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,N.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&l.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,N.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,N.jsx)(F,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,N.jsx)(P,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,N.jsx)(A,{children:t})]})}function Le({event:e}){return fe(e)?(0,N.jsx)(Ie,{errorId:e.id,defaultMessage:e.error}):null}var Re=`200%`,B=8,ze=B*2;function Be({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2,style:a,...o}){let s=Ce(),c=`oh-text-shimmer-${(0,j.useId)().replace(/:/g,``)}`,l=(0,j.useMemo)(()=>Math.min(B/2-1,1+i/2),[i]),u=(0,j.useMemo)(()=>{let e=B/2;return{...a,backgroundImage:`repeating-linear-gradient(90deg, var(--oh-muted) 0%, var(--oh-muted) ${e-l}%, var(--oh-foreground) ${e}%, var(--oh-muted) ${e+l}%, var(--oh-muted) ${B}%)`,backgroundSize:`${Re} 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,N.jsx)(t,{className:m(`text-[var(--oh-muted)]`,n),style:a,...o,children:e}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`@keyframes ${c}{from{background-position:${ze}% center}to{background-position:0% center}}`}}),(0,N.jsx)(t,{className:m(`relative inline-block`,n),style:u,...o,children:e})]})}var Ve=j.memo(Be),He=3,V=24;function Ue({className:e}){return(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,className:e,children:[(0,N.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,N.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,className:`fill-[var(--oh-color-tertiary)]`})]})}var We={p:({children:e})=>(0,N.jsx)(`p`,{className:`m-0 leading-6`,children:e})};function Ge({message:e,isHovering:t,isExpanded:n,onTruncatableChange:r}){let{t:i}=c(`openhands`),a=j.useRef(null),[s,l]=j.useState(!1);j.useLayoutEffect(()=>{let t=a.current;if(!t||n){l(!1),r(!1);return}let i=()=>{let n=Number.parseFloat(getComputedStyle(t).lineHeight),i=He*(Number.isFinite(n)&&n>0?n:V),a=(e.match(/\n/g)??[]).length,o=t.scrollHeight>i+1||a>=He||e.trim().length>220;l(e=>(e!==o&&r(o),o))};i();let o=new ResizeObserver(i);return o.observe(t),()=>o.disconnect()},[e,n,r]);let u=s&&!n;return(0,N.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,N.jsx)(`div`,{ref:a,className:m(`text-sm leading-6 whitespace-normal [word-break:break-word]`,u&&`line-clamp-3`),children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:e})}),u?(0,N.jsxs)(N.Fragment,{children:[(0,N.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,N.jsx)(`span`,{"data-testid":`chat-message-view-more`,className:m(`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(o.COMMON$VIEW_MORE)})]}):null]})}function H({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:a,onRetry:s,onStop:l}){let{t:u}=c(`openhands`),[d,f]=j.useState(!1),[p,h]=j.useState(!1),[g,_]=j.useState(!1),[v,y]=j.useState(!1),[te,ne]=j.useState(!0),b=j.useRef(null);j.useEffect(()=>{_(!1)},[t]);let re=async()=>{await navigator.clipboard.writeText(t),h(!0)};j.useEffect(()=>{let e;return p&&(e=setTimeout(()=>{h(!1)},2e3)),()=>{clearTimeout(e)}},[p]);let ie=e===`user`&&(a===`error`||a===`sending`),x=a===`sending`&&l!=null,S=x&&d,C=e===`user`&&a==null,ae=C&&v&&!g,w=j.Children.count(n)>0;j.useLayoutEffect(()=>{if(!x||C)return;let e=b.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight),n=Number.isFinite(t)&&t>0?t:V;ne(e.scrollHeight<=n+1)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,x,C]);let oe=C?(0,N.jsx)(Ge,{message:t,isHovering:d,isExpanded:g,onTruncatableChange:y}):(0,N.jsx)(`div`,{ref:b,className:`min-w-0 text-sm leading-6 whitespace-normal [word-break:break-word]`,children:(0,N.jsx)(A,{includeStandard:!0,includeHeadings:!0,components:We,children:t})}),T=(0,N.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":a,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:m(`rounded-xl relative w-fit max-w-full flex flex-col`,w&&`gap-2`,e===`user`&&`mt-6 bg-tertiary self-end px-4 py-2.5`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,a===`error`&&`border border-[var(--oh-status-error)]/40`,!ie&&`last:mb-4`),children:[(0,N.jsxs)(`div`,{className:m(`absolute -top-2.5 -right-2.5 z-10`,!d||a===`sending`?`hidden`:`flex`,`items-center gap-1`),onClick:e=>e.stopPropagation(),children:[r?.map((e,t)=>e.tooltip?(0,N.jsx)(ee,{content:e.tooltip,placement:`top`,children:(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,N.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,N.jsx)(ge,{isHidden:!d,isDisabled:p,onClick:re,mode:p?`copied`:`copy`})]}),oe,x?(0,N.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),l?.()},"data-testid":`chat-message-stop`,"aria-label":u(o.BUTTON$STOP),"aria-hidden":!S,tabIndex:S?0:-1,className:m(`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`,te?`right-3 top-1/2 -translate-y-1/2`:`right-3 bottom-2.5`,S?`opacity-100`:`pointer-events-none opacity-0`),children:(0,N.jsx)(Ue,{className:`block h-7 w-7 max-w-none`})}):null,ae?(0,N.jsx)(`button`,{type:`button`,"data-testid":`chat-message-expand`,"aria-expanded":!1,"aria-label":u(o.COMMON$VIEW_MORE),className:`absolute inset-0 z-[1] cursor-pointer rounded-xl border-0 bg-transparent p-0`,onClick:()=>_(!0)}):null,n]});return e===`user`&&a===`error`?(0,N.jsxs)(`div`,{className:`flex w-fit max-w-full flex-col items-end gap-1.5 self-end last:mb-4`,children:[T,(0,N.jsxs)(`div`,{role:`alert`,"data-testid":`chat-message-error`,className:`flex items-center gap-2 text-xs text-[var(--oh-status-error)]`,children:[(0,N.jsx)(`span`,{children:u(o.CHAT_INTERFACE$MESSAGE_SEND_FAILED)}),s?(0,N.jsx)(`button`,{type:`button`,onClick:s,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`chat-message-retry`,children:u(o.CHAT_INTERFACE$MESSAGE_RETRY)}):null]})]}):e===`user`&&a===`sending`?(0,N.jsxs)(`div`,{className:`flex w-full max-w-full flex-col last:mb-4`,children:[T,(0,N.jsx)(`div`,{className:`my-1 w-full py-1 text-sm`,children:(0,N.jsx)(Ve,{as:`p`,role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`block w-full text-sm font-normal`,duration:1,spread:2,children:u(o.CHAT_INTERFACE$MESSAGE_SENDING)})})]}):T}function Ke({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.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 qe({width:e=20,height:t=20,active:n}){return(0,N.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.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 Je({onClick:e,className:t}){return(0,N.jsx)(`button`,{type:`button`,onClick:e,className:m(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,N.jsx)(x,{width:18,height:18})})}function Ye({src:e,size:t=`small`}){return(0,N.jsx)(`img`,{role:`img`,alt:``,src:e,className:m(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Xe({src:e,onRemove:t,size:n=`small`}){return(0,N.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,N.jsx)(Ye,{src:e,size:n}),t&&(0,N.jsx)(Je,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Ze({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,N.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,N.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(Ke,{active:!o})}),(0,N.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:m(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,N.jsx)(Xe,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,N.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,N.jsx)(qe,{active:!c})})]})}function Qe({type:e,onClick:t}){let{t:n}=c(`openhands`),r=e===`confirm`,i=n(r?o.ACTION$CONFIRM:o.ACTION$REJECT),a=n(r?o.CHAT_INTERFACE$USER_CONFIRMED:o.CHAT_INTERFACE$USER_REJECTED),s=r?`${n(o.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(o.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,N.jsx)(ee,{closeDelay:100,content:a,children:(0,N.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:m(`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:s})})}function $e({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,N.jsxs)(`div`,{className:m(`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,N.jsx)(`span`,{className:``,children:n}),(0,N.jsx)(`span`,{className:`font-bold`,children:i}),(0,N.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var et=e=>(0,N.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,N.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,N.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,N.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`})]}),tt=te(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),nt=()=>i({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return ce.respondToConfirmation(e,t,i,n)}});function rt(){let e=tt(e=>e.submittedEventIds),t=tt(e=>e.addSubmittedEventId),{t:n}=c(`openhands`),{data:r}=oe(),{curAgentState:i}=T(),{mutate:a}=nt(),s=me(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===p.AWAITING_USER_CONFIRMATION:!1),l=(0,j.useCallback)(e=>{!s||!r||(t(s.id),a({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[s,r,t,a]);return(0,j.useEffect)(()=>{if(!s)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),l(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),l(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[s,l]),i!==p.AWAITING_USER_CONFIRMATION||!s||e.includes(s.id)?null:(0,N.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(E(s)?s.security_risk:h.UNKNOWN)===h.HIGH&&(0,N.jsx)($e,{content:n(o.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,N.jsx)(et,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(o.COMMON$HIGH_RISK)}),(0,N.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,N.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(o.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,N.jsx)(Qe,{type:`reject`,onClick:()=>l(!1)}),(0,N.jsx)(Qe,{type:`confirm`,onClick:()=>l(!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
2
|
`):typeof t.content==`string`&&(n=t.content)),!(Array.isArray(t.content)&&t.content.some(e=>e.type===`image`)))return n;let r=l.t(`CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE`);return n.split(r)[0]};function U({event:e,isLastMessage:t,isFromPlanningAgent:n}){let r=it(e),i=[];return Array.isArray(e.llm_message.content)&&e.llm_message.content.forEach(e=>{e.type===`image`&&i.push(...e.image_urls)}),(0,N.jsxs)(H,{type:e.source,message:r,isFromPlanningAgent:n,children:[i.length>0&&(0,N.jsx)(Ze,{size:`small`,images:i}),t&&(0,N.jsx)(rt,{})]})}var at=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)}},ot=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value};function st(e){let{children:t}=e,n=e=>{try{return ot(e)}catch(t){return at.error(String(t)),e}};return Array.isArray(t)?(0,N.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,N.jsx)(`strong`,{className:`font-mono`,children:n(t)}):(0,N.jsx)(`strong`,{className:`font-mono`,children:t})}var ct=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},lt=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,ut=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return lt(e)&&!n.endsWith(`/`)?`${n}/`:n};function dt(e){let{children:t}=e,n=e=>{try{let t=ct(e);return(0,N.jsx)(`span`,{className:`font-mono`,title:t,children:ut(t)})}catch(t){return at.error(String(t)),(0,N.jsx)(`span`,{className:`font-mono`,children:e})}};return Array.isArray(t)?(0,N.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,N.jsx)(`strong`,{children:n(t)}):(0,N.jsx)(`strong`,{className:`font-mono`,children:t})}var W=1e3,ft=e=>`\`\`\`json\n${JSON.stringify(e,null,2)}\n\`\`\``,pt=e=>{switch(e){case h.LOW:return l.t(`SECURITY$LOW_RISK`);case h.MEDIUM:return l.t(`SECURITY$MEDIUM_RISK`);case h.HIGH:return l.t(`SECURITY$HIGH_RISK`);case h.UNKNOWN:default:return l.t(`SECURITY$UNKNOWN_RISK`)}},G=()=>``,mt=e=>e.name?`**Skill:** \`${e.name}\``:G(),ht=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
3
|
`):G()},gt=e=>{if(e.command!==`create`||!e.file_text)return G();let t=e.file_text;return t.length>1e3&&(t=`${t.slice(0,W)}...`),`${e.path}\n${t}`},_t=e=>{let t=`Command:\n\`${e.action.command}\``;return(e.security_risk===h.HIGH||e.security_risk===h.MEDIUM)&&(t+=`\n\n${pt(e.security_risk)}`),t},vt=e=>{let t=`**MCP Tool Call**
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./react-dom-hVBnwgwZ.js";import{o as r}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./react-dom-hVBnwgwZ.js";import{o as r}from"./declaration-IA661TBv.js";var i=e(t(),1),a=e(n(),1),o=r();function s({children:e,onClose:t,closeOnEscape:n=!0,closeOnBackdropClick:r=!0,"aria-label":s}){return i.useEffect(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&t?.()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,t]),typeof document>`u`?null:(0,a.createPortal)((0,o.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":s,className:`fixed inset-0 flex items-center justify-center z-60`,children:[(0,o.jsx)(`div`,{onClick:e=>{r&&e.target===e.currentTarget&&t?.()},className:`fixed inset-0 bg-black opacity-60`}),(0,o.jsx)(`div`,{className:`relative`,children:e})]}),document.body)}export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-IA661TBv.js";import{t as n}from"./utils-CVcuFUYj.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-CVcuFUYj.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{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t,t as n}from"./declaration-IA661TBv.js";import{t as r}from"./useTranslation-CbJtty1g.js";import{t as i}from"./utils-CVcuFUYj.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}=r(`openhands`);return(0,a.jsx)(`button`,{type:`button`,"data-testid":t,onClick:e,disabled:c,"aria-label":l(n.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{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-IA661TBv.js";import{t as i}from"./useQuery-JDs8UaWj.js";import{t as a}from"./useTranslation-CbJtty1g.js";import{M as o,t as s}from"./utils-CVcuFUYj.js";import{c,n as l}from"./agent-server-client-options-Dvgeb3x4.js";import{t as u}from"./llm-client-BnqeDPua.js";import{d}from"./brand-button-BoiPxAGm.js";import{n as f,t as p}from"./vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-UYEKKX0Y.js";import{i as m}from"./combobox-caret-DwMmhrrA.js";import{t as h}from"./proxy-wIasY2Po.js";import{n as g}from"./map-provider-BHow6ugd.js";import{d as _}from"./sdk-settings-schema-DoRnefvb.js";var v=e(t(),1);function y(e){return null}y.getCollectionNode=function*(e){let{children:t,title:n,items:r}=e;yield{type:`section`,props:e,hasChildNodes:!0,rendered:n,"aria-label":e[`aria-label`],*childNodes(){if(typeof t==`function`){if(!r)throw Error(`props.children was a function but props.items is missing`);for(let e of r)yield{type:`item`,value:e,renderer:t}}else{let e=[];v.Children.forEach(t,t=>{e.push({type:`item`,element:t})}),yield*e}}}};var b=y,x=e=>{let[t,...n]=e.split(`/`);return!t||n.length===0?{provider:``,model:e,separator:``}:{provider:t,model:n.join(`/`),separator:`/`}};function S(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n))}function C(e,t){return t===void 0?e:e.filter(e=>e.verified===t)}function w(e,t){return!t||t<=0?e:e.slice(0,t)}function T(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 E=class{static async searchModels(e={},t){let n=c();if(n.backend.kind===`cloud`){let t=T({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq,provider__eq:e.provider__eq});return h({backend:n.backend,method:`GET`,path:`/api/v1/config/models/search${t}`})}let r=new u(l()),i=t===void 0?r.getVerifiedModels():Promise.resolve(t),[a,o]=await Promise.all([r.getModels(),i]),s=e.provider__eq??null,d=new Set(s?o?.[s]??[]:[]),f=[...d].map(e=>({provider:s,name:e,verified:!0})),p=s?(a??[]).filter(e=>e.startsWith(`${s}/`)).map(e=>e.slice(s.length+1)).filter(e=>e.length>0&&!d.has(e)).map(e=>({provider:s,name:e,verified:!1})):[];return{items:w(C(S([...f,...p],e.query),e.verified__eq),e.limit),next_page_id:null}}static async searchProviders(e={},t){let n=c();if(n.backend.kind===`cloud`){let t=T({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq});return h({backend:n.backend,method:`GET`,path:`/api/v1/config/providers/search${t}`})}let r=new u(l()),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:w(C(S([...new Set([...s,...a??[]])].map(e=>({name:e,verified:s.has(e)})),e.query),e.verified__eq),e.limit),next_page_id:null}}},D=[`config`,`verified-models`],O=1e3*60*5,k=1e3*60*15;async function A(){return c().backend.kind===`cloud`?{}:await new u(l()).getVerifiedModels()??{}}var j=()=>i({queryKey:[`config`,`providers`],queryFn:async({client:e})=>{let t=await e.fetchQuery({queryKey:D,queryFn:A,staleTime:O});return(await E.searchProviders({limit:100},t)).items},staleTime:O,gcTime:k}),M=10;async function N(e,t,n,r=0){if(r>=M)throw Error(`Too many pagination requests for provider ${e}`);let i=await E.searchModels({provider__eq:e,limit:100,page_id:n},t);if(i.next_page_id){let n=await N(e,t,i.next_page_id,r+1);return[...i.items,...n]}return i.items}var P=e=>i({queryKey:[`config`,`models`,e],queryFn:async({client:t})=>N(e,await t.fetchQuery({queryKey:D,queryFn:A,staleTime:O})),enabled:!!e,staleTime:O,gcTime:k}),F=()=>i({queryKey:D,queryFn:A,select:e=>e?.openhands??[],staleTime:O,gcTime:k}),I=new Set([`https://llm-proxy.app.all-hands.dev`,`https://llm-proxy.app.all-hands.dev/v1`]),L=`litellm_proxy/`,R=e=>e.trim().replace(/\/+$/,``);function z(e,t,n){if(!e)return``;if(!e.startsWith(L)||!t||!I.has(R(t)))return e;let r=e.slice(14);return n.includes(r)?`openhands/${r}`:e}var B=n();function V({isDisabled:e,currentModel:t,currentBaseUrl:n,onChange:i,onDefaultValuesChanged:c,wrapperClassName:l,labelClassName:u}){let[,h]=v.useState(null),[y,S]=v.useState(null),[C,w]=v.useState(null),{data:T=[]}=j(),{data:E}=F(),{data:D=[],isLoading:O,error:k}=P(y),A=v.useMemo(()=>T.filter(e=>e.verified),[T]),M=v.useMemo(()=>T.filter(e=>!e.verified),[T]),N=v.useMemo(()=>D.filter(e=>e.verified),[D]),I=v.useMemo(()=>D.filter(e=>!e.verified),[D]);v.useEffect(()=>{if(t&&E!==void 0){let e=z(t,n,E),{provider:r,model:i}=x(e);h(e),S(r||null),w(i),c?.(r||null,i)}},[t,n,E]);let L=e=>{S(e),w(null),h(`${e}/`),i?.(e,null)},R=e=>{let t=`${y}/${e}`;y===`openai`&&(t=e),h(t),w(e),i?.(y,e)},V=()=>{S(null),h(null)},{t:H}=a(`openhands`);return(0,B.jsxs)(`div`,{className:s(`flex flex-col md:flex-row w-full min-w-0 justify-between gap-4 md:gap-[46px]`,l),children:[(0,B.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,B.jsx)(`label`,{className:s(`text-sm`,u),children:H(r.LLM$PROVIDER)}),(0,B.jsxs)(p,{"data-testid":`llm-provider-input`,isRequired:!0,isVirtualized:!1,name:`llm-provider-input`,isDisabled:e,"aria-label":H(r.LLM$PROVIDER),isClearable:!1,onSelectionChange:e=>{e?.toString()&&L(e.toString())},onInputChange:e=>!e&&V(),defaultSelectedKey:y??void 0,selectedKey:y,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:m},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:d}},children:[(0,B.jsx)(b,{title:H(r.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:A.map(e=>(0,B.jsx)(f,{"data-testid":`provider-item-${e.name}`,children:g(e.name)},e.name))}),M.length>0?(0,B.jsx)(b,{title:H(r.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:M.map(e=>(0,B.jsx)(f,{children:g(e.name)},e.name))}):null]})]}),y===`openhands`&&(0,B.jsx)(_,{testId:`openhands-account-help`,text:H(r.SETTINGS$NEED_OPENHANDS_ACCOUNT),linkText:H(r.SETTINGS$CLICK_HERE),href:o.PRODUCTION,size:`settings`,linkColor:`white`}),(0,B.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,B.jsx)(`label`,{className:s(`text-sm`,u),children:H(r.LLM$MODEL)}),(0,B.jsxs)(p,{"data-testid":`llm-model-input`,isRequired:!0,isVirtualized:!1,isLoading:O,name:`llm-model-input`,"aria-label":H(r.LLM$MODEL),isClearable:!1,onSelectionChange:e=>{e?.toString()&&R(e.toString())},isDisabled:e||!y,selectedKey:C,defaultSelectedKey:C??void 0,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:m},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:d}},children:[(0,B.jsx)(b,{title:H(r.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:N.map(e=>(0,B.jsx)(f,{children:e.name},e.name))}),I.length>0?(0,B.jsx)(b,{title:H(r.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:I.map(e=>(0,B.jsx)(f,{"data-testid":`model-item-${e.name}`,children:e.name},e.name))}):null]}),k&&(0,B.jsx)(`p`,{"data-testid":`models-error`,className:`text-danger text-xs`,children:H(r.CONFIGURATION$ERROR_FETCH_MODELS)})]})]})}export{x as n,V as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-IA661TBv.js";var r=e(t(),1),i=n(),a=r.createContext({currentPath:`/`,conversationId:null,isNavigating:!1,navigate:()=>{}});function o({value:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function s(){return r.useContext(a)}export{s as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-IA661TBv.js";import{n as r}from"./navigation-context-CszaA-CJ.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{t}from"./react-CM_dJw1Z.js";import{k as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{u as r}from"./path-utils-CNd_jqv_.js";import{t as i}from"./useMutation-7hG0GuPx.js";import{i as a}from"./organization-service.api-D79cdERN.js";import{o,t as s}from"./declaration-IA661TBv.js";import{n as c}from"./QueryClientProvider-7oLZ1RtQ.js";import{t as l}from"./useQuery-JDs8UaWj.js";import{r as u,t as d}from"./recommended-automations-launcher-B01jchhe.js";import{t as f}from"./useTranslation-CbJtty1g.js";import{t as p}from"./retrieve-axios-error-message-DbnSBc_1.js";import{t as m}from"./createLucideIcon-C9OEnwvX.js";import{n as h}from"./vendor~root-layout~home~conversation-panel~conversation-Cg0nXqVs.js";import{t as g}from"./check-BDAbW7je.js";import{n as _,r as v}from"./custom-toast-handlers-fgD4IYsu.js";import{a as y,i as b,r as x,t as S}from"./llm-settings-D477P0Lg.js";import{t as C}from"./utils-CVcuFUYj.js";import{S as w,_ as ee,n as T,p as te}from"./agent-server-client-options-Dvgeb3x4.js";import{n as E,r as ne}from"./active-backend-context-CQTk4wD8.js";import{a as re,c as D,l as ie}from"./vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~jxrvuot9-Cwz6a1DC.js";import{i as O}from"./mcp-client-xEdbDxOL.js";import{r as k}from"./query-keys-CQaji0wJ.js";import{t as A}from"./modal-backdrop-B1si6TUd.js";import{r as j,t as M}from"./modal-body-2Po2nl1e.js";import{r as N}from"./base-modal-Ba5WcNb6.js";import{i as P}from"./modal-classes-9XTtWCtF.js";import{t as F}from"./brand-button-BoiPxAGm.js";import{t as ae}from"./openhands-logo-B-IDE1ER.js";import{n as oe}from"./navigation-context-CszaA-CJ.js";import{t as se}from"./chat-send-button-06dIuWXm.js";import{i as ce,o as le,t as ue}from"./backend-form-modal-B6q897ZX.js";import{t as de}from"./settings-input-CPr7vX81.js";import{t as fe}from"./confirmation-modal-C_lds1Tb.js";import{i as pe,n as I,o as me,s as he}from"./acp-providers-DZEi8wDz.js";import{t as ge}from"./use-create-conversation-4iJytCT1.js";import{t as _e}from"./terminal-DQJ6IJUd.js";import{t as L}from"./folder-UGYUKpqb.js";import{t as ve}from"./chevron-left-small-CuuwpRi9.js";import{t as R}from"./close-Cz0OAgTy.js";import{t as ye}from"./use-save-settings-hK6LYt0s.js";import{n as be,t as xe}from"./use-get-secrets-BMnFFBUx.js";var Se=m(`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`}]]),z=e(t(),1),B=o(),Ce=`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`,we=`0 0 100 100`,Te=`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`,Ee=`0 0 12 12`,De=`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`,Oe=`0 0 24 24`,ke=3/2;function V({kind:e,size:t=12,className:n,"data-testid":r}){return e===`openhands`?(0,B.jsx)(ae,{width:Math.round(t*ke),height:t,className:C(`shrink-0 [&_path:not([fill=transparent])]:fill-current`,n),"data-testid":r??`agent-brand-icon-openhands`,"aria-hidden":!0}):e===`claude-code`?(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:we,width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-claude-code`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fill:`currentColor`,d:Ce})}):e===`codex`?(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:Ee,width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-codex`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:Te,fill:`currentColor`})}):e===`gemini`?(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:Oe,width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-gemini`,"aria-hidden":!0,children:(0,B.jsx)(`path`,{fill:`currentColor`,d:De})}):(0,B.jsx)(_e,{width:t,height:t,className:C(`shrink-0`,n),"data-testid":r??`agent-brand-icon-generic`,"aria-hidden":!0})}function H(){return new re(T())}function U(e){return{workspaces:e.workspaces.map(({parentPath:e,...t})=>({...t,...e?{parentPath:e}:{}})),workspaceParents:e.workspaceParents}}var W=class{static async listWorkspaces(){return U(await H().listWorkspaces())}static async addWorkspaces(e){return U(await H().addWorkspaces(e))}static async removeWorkspace(e){await H().deleteWorkspace(e)}static async addWorkspaceParents(e){return U(await H().addWorkspaceParents(e))}static async removeWorkspaceParent(e){await H().deleteWorkspaceParent(e)}};function Ae(){let e=c();return i({mutationFn:e=>W.addWorkspaces(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function je(){let e=c();return i({mutationFn:e=>W.removeWorkspace(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function Me(){let e=c();return i({mutationFn:e=>W.addWorkspaceParents(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function Ne(){let e=c();return i({mutationFn:e=>W.removeWorkspaceParent(e),onSuccess:()=>e.invalidateQueries({queryKey:k.all})})}function G({enabled:e=!0}={}){return l({queryKey:k.all,queryFn:()=>W.listWorkspaces(),enabled:e,retry:(e,t)=>!O(t)&&e<3,meta:{disableToast:!0},staleTime:6e4})}function Pe(){let{data:e,isLoading:t,isError:n,error:r}=G(),i=O(r),o=e?.workspaces??[],s=e?.workspaceParents??[],c=(0,z.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=a({queries:i?[]:c.map(e=>({queryKey:[`file`,`search_subdirs`,e.path],queryFn:()=>new D(T()).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,z.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})})}),o.forEach(t=>{e.set(t.path,t)}),Array.from(e.values())},[o,c,l.map(e=>`${e.dataUpdatedAt??0}:${e.status}`).join(`|`)]),isLoading:u,isError:d,error:r}}function Fe(e,t){return O(e)?t(s.HOME$WORKSPACES_UNSUPPORTED_AGENT_SERVER,{actualVersion:e.actualVersion,requiredVersion:e.requiredVersion}):null}function K(){return new D(T())}var Ie=e=>{let t=E();return l({queryKey:[`file`,`search_subdirs`,e,t.backend.id,t.orgId],queryFn:()=>K().searchSubdirectories(e),enabled:!!e,retry:!1,meta:{disableToast:!0}})},Le=()=>{let e=E();return l({queryKey:[`file`,`home`,e.backend.id,e.orgId],queryFn:async()=>K().getHome(),retry:!1,meta:{disableToast:!0},staleTime:1/0})},q=`/projects`;function J({label:e,entries:t,currentPath:n,onPick:r}){return t.length===0?null:(0,B.jsxs)(`div`,{className:`px-2 pb-3`,children:[(0,B.jsx)(`div`,{className:`px-2 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:e}),(0,B.jsx)(`ul`,{children:t.map(e=>{let t=n===e.path;return(0,B.jsx)(`li`,{children:(0,B.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`folder-browser-sidebar-${e.label.toLowerCase()}`,className:C(`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,B.jsx)(L,{width:14,height:14,className:`shrink-0`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.path)})})]})}function Re(e){let t=e.replace(/\/+$/,``);if(!t||t===`/`)return null;let n=t.lastIndexOf(`/`);return n<=0?`/`:t.slice(0,n)}function Y(e){return e?.home===`/home/openhands`}function ze({isOpen:e,onClose:t,onAdd:n,onAddParent:r}){let{t:i}=f(`openhands`),[a,o]=(0,z.useState)(null),c=E(),{data:l}=Le();(0,z.useEffect)(()=>{e&&l?.home&&a===null&&o(Y(l)?q:l.home),e||o(null)},[e,l?.home,a]),(0,z.useEffect)(()=>{o(null)},[c.backend.id,c.orgId]);let{data:u,isLoading:d,isError:p,error:m}=Ie(e?a:null),h=(0,z.useMemo)(()=>{if(!l?.home)return[];let e=[{label:`Home`,path:l.home.replace(/[\\/]+$/,``)||l.home},...l.favorites??[]];return Y(l)&&!e.some(e=>e.path===q)&&e.push({label:q,path:q}),e},[l]),g=l?.locations??[];if(!e)return null;let _=u?.items??[],v=a?Re(a):null,y=l?.home===`/home/openhands`&&(l?.favorites?.length??0)===0&&a===l?.home&&!d&&!p&&_.length===0,b=e=>{let t=e.replace(/\/+$/,``);if(!t)return`/`;let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1)||`/`:t};return(0,B.jsx)(A,{onClose:t,"aria-label":i(s.HOME$ADD_WORKSPACES_TITLE),children:(0,B.jsxs)(`div`,{"data-testid":`folder-browser-modal`,className:C(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,j(`xl`),M,`h-[480px]`),children:[(0,B.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,B.jsx)(N,{className:P,title:i(s.HOME$ADD_WORKSPACES_TITLE)})}),(0,B.jsxs)(`div`,{className:`flex flex-1 min-h-0`,children:[(0,B.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,B.jsx)(J,{label:i(s.HOME$FAVORITES),entries:h,currentPath:a,onPick:o}),(0,B.jsx)(J,{label:i(s.HOME$LOCATIONS),entries:g,currentPath:a,onPick:o})]}),(0,B.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 border-b border-[var(--oh-border-input)]`,children:[(0,B.jsx)(`button`,{type:`button`,"data-testid":`folder-browser-up`,onClick:()=>v&&o(v),disabled:!v,"aria-label":`Up`,className:`p-1 rounded hover:bg-[var(--oh-interactive-hover)] text-white disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer`,children:(0,B.jsx)(ve,{width:16,height:16})}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,"data-testid":`folder-browser-current-path`,children:a??``})]}),(0,B.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,B.jsx)(`span`,{children:i(s.HOME$NAME)}),(0,B.jsx)(`span`,{children:i(s.HOME$KIND)})]}),(0,B.jsxs)(`ul`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`folder-browser-list`,children:[d&&(0,B.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,children:i(s.HOME$LOADING)}),p&&(0,B.jsx)(`li`,{className:`px-4 py-2 text-sm text-red-400`,"data-testid":`folder-browser-error`,children:m?.message??`Failed to load`}),!d&&!p&&_.length===0&&(0,B.jsx)(`li`,{className:`px-4 py-2 text-sm text-[var(--oh-text-secondary)]`,"data-testid":y?`folder-browser-host-home-hint`:`folder-browser-empty`,children:i(y?s.HOME$HOST_HOME_NOT_MOUNTED_HINT:s.HOME$NO_WORKSPACES)}),_.map(e=>(0,B.jsx)(`li`,{children:(0,B.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,B.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,B.jsx)(L,{width:16,height:16,className:`shrink-0`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.name})]}),(0,B.jsx)(`span`,{className:`text-[var(--oh-text-secondary)] text-xs`,children:i(s.HOME$FOLDER)})]})},e.path))]})]})]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:[(0,B.jsx)(F,{type:`button`,variant:`secondary`,onClick:t,testId:`folder-browser-cancel`,children:i(s.HOME$CANCEL)}),r&&(0,B.jsx)(F,{type:`button`,variant:`secondary`,onClick:()=>{!a||!r||(r([{id:a,name:b(a),path:a}]),t())},isDisabled:!a||d,testId:`folder-browser-add-all-subdirs`,children:i(s.HOME$ADD_ALL_SUBDIRECTORIES)}),(0,B.jsx)(F,{type:`button`,variant:`primary`,onClick:()=>{a&&(n([{id:a,name:b(a),path:a}]),t())},isDisabled:!a||d,testId:`folder-browser-use`,children:i(s.HOME$ADD_THIS_DIRECTORY)})]})]})})}function Be({isOpen:e,workspaces:t,workspaceParents:n=[],onClose:r,onRemove:i,onRemoveParent:a}){let{t:o}=f(`openhands`),[c,l]=z.useState(null);if(!e)return null;let u=t.filter(e=>!e.parentPath),d=new Map;t.forEach(e=>{if(!e.parentPath)return;let t=d.get(e.parentPath)??[];t.push(e),d.set(e.parentPath,t)});let p=u.length>0||n.length>0;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(A,{onClose:r,"aria-label":o(s.HOME$MANAGE_WORKSPACES),children:(0,B.jsxs)(`div`,{"data-testid":`manage-workspaces-modal`,className:C(`flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border-input)] rounded-xl`,j(`lg`),M,`max-h-[70vh]`),children:[(0,B.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-[var(--oh-border-input)]`,children:(0,B.jsx)(N,{className:P,title:o(s.HOME$MANAGE_WORKSPACES)})}),(0,B.jsxs)(`div`,{className:`flex-1 overflow-auto custom-scrollbar-always`,"data-testid":`manage-workspaces-list`,children:[!p&&(0,B.jsx)(`p`,{className:`px-5 py-6 text-sm text-[var(--oh-text-secondary)] text-center`,children:o(s.HOME$MANAGE_WORKSPACES_EMPTY)}),u.length>0&&(0,B.jsx)(`ul`,{children:u.map(e=>(0,B.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,B.jsx)(L,{width:16,height:16,className:`shrink-0`}),(0,B.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,B.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),(0,B.jsxs)(`button`,{type:`button`,onClick:()=>l({type:`workspace`,path:e.path,text:o(s.HOME$REMOVE_WORKSPACE_CONFIRMATION,{name:e.name})}),"aria-label":o(s.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,B.jsx)(R,{width:12,height:12}),(0,B.jsx)(`span`,{children:o(s.HOME$REMOVE_WORKSPACE)})]})]},e.id))}),n.length>0&&(0,B.jsxs)(`div`,{"data-testid":`manage-workspaces-parents-section`,children:[(0,B.jsx)(`div`,{className:`px-5 pt-3 pb-1 text-[11px] uppercase tracking-wide text-[var(--oh-muted)] font-semibold`,children:o(s.HOME$WORKSPACE_PARENTS)}),(0,B.jsx)(`ul`,{children:n.map(e=>{let t=d.get(e.path)??[];return(0,B.jsxs)(`li`,{className:`border-b border-[var(--oh-border-subtle)] last:border-b-0`,"data-testid":`manage-workspaces-parent-row-${e.name}`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-2`,children:[(0,B.jsx)(L,{width:16,height:16,className:`shrink-0`}),(0,B.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,B.jsx)(`span`,{className:`text-sm text-white truncate`,children:e.name}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate`,children:e.path})]}),a&&(0,B.jsxs)(`button`,{type:`button`,onClick:()=>l({type:`parent`,path:e.path,text:o(s.HOME$REMOVE_WORKSPACE_PARENT_CONFIRMATION,{name:e.name,count:t.length})}),"aria-label":o(s.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,B.jsx)(R,{width:12,height:12}),(0,B.jsx)(`span`,{children:o(s.HOME$REMOVE_WORKSPACE_PARENT)})]})]}),t.length>0&&(0,B.jsx)(`ul`,{className:`pb-2`,children:t.map(e=>(0,B.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,B.jsx)(L,{width:12,height:12,className:`shrink-0 opacity-70`}),(0,B.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id))})]},e.id)})})]})]}),(0,B.jsx)(`div`,{className:`flex justify-end gap-2 px-5 py-3 border-t border-[var(--oh-border-input)]`,children:(0,B.jsx)(F,{type:`button`,variant:`primary`,onClick:r,testId:`manage-workspaces-done`,children:o(s.HOME$DONE)})})]})}),c&&(0,B.jsx)(fe,{text:c.text,onConfirm:()=>{c&&(c.type===`workspace`?i(c.path):a?.(c.path),l(null))},onCancel:()=>l(null)})]})}function Ve({currentStep:e,totalSteps:t,className:n}){return(0,B.jsx)(`div`,{role:`progressbar`,"aria-valuemin":1,"aria-valuemax":t,"aria-valuenow":e+1,"data-testid":`onboarding-progress-bar`,className:C(`flex w-full items-center gap-2`,n),children:Array.from({length:t},(t,n)=>{let r=n<e,i=n===e;return(0,B.jsx)(`div`,{"data-testid":`onboarding-progress-step-${n}`,"data-state":r?`completed`:i?`current`:`upcoming`,className:C(`h-1.5 flex-1 rounded-full transition-colors duration-300`,r||i?`bg-white`:`bg-white/15`)},n)})})}function He(e){return e===`openhands`?`openhands`:I.find(({key:t})=>t===e)?.icon??`cli-generic`}function Ue({id:e,muted:t}){let n=He(e);return n===`openhands`?(0,B.jsx)(V,{kind:`openhands`,size:16,className:C(`text-white`,t&&`opacity-55`),"data-testid":`onboarding-agent-icon-openhands`}):(0,B.jsx)(V,{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:s.ONBOARDING$AGENT_OPENHANDS_DESCRIPTION},...I.map(e=>({id:e.key,label:e.display_name,descriptionKey:e.description_key}))]}function Ge({selectedAgentId:e,onSelect:t,onBack:n,onNext:r}){let{t:i}=f(`openhands`),{mutate:a,isPending:o}=ye();return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-choose-agent`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:i(s.ONBOARDING$AGENT_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:i(s.ONBOARDING$AGENT_SUBTITLE)})]}),(0,B.jsx)(`div`,{role:`radiogroup`,"aria-label":i(s.ONBOARDING$AGENT_TITLE),className:`flex flex-col gap-3`,children:We().map(n=>{let r=n.id===e;return(0,B.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-testid":`onboarding-agent-option-${n.id}`,"data-selected":r,onClick:()=>t(n.id),className:C(`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,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,B.jsx)(Ue,{id:n.id,muted:!1}),(0,B.jsx)(`span`,{className:`truncate text-base font-normal text-white`,children:n.label})]}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:i(n.descriptionKey)})]}),(0,B.jsx)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:r?(0,B.jsx)(g,{width:18,height:18,className:`mt-1 shrink-0 text-white`,"aria-hidden":!0}):null})]},n.id)})}),(0,B.jsxs)(`div`,{className:C(`sticky bottom-0 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,n?`justify-between`:`justify-end`),children:[n?(0,B.jsx)(F,{testId:`onboarding-agent-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:o,children:i(s.ONBOARDING$BACK)}):null,(0,B.jsx)(F,{testId:`onboarding-agent-next`,type:`button`,variant:`primary`,isDisabled:o,onClick:()=>{let t=pe(e);if(!t){r();return}a({agent_settings_diff:t},{onError:e=>{_(p(e)||i(s.ERROR$GENERIC))},onSuccess:()=>{v(i(s.SETTINGS$SAVED)),r()}})},children:i(o?s.SETTINGS$SAVING:s.ONBOARDING$NEXT)})]})]})}function Ke({isConnected:e}){let{t}=f(`openhands`);return e===!0?(0,B.jsxs)(`div`,{role:`status`,"data-testid":`onboarding-backend-connected`,className:C(`flex items-start gap-3 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3`),children:[(0,B.jsx)(h,{className:`mt-0.5 size-5 shrink-0 text-green-400`}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium text-green-200`,children:t(s.ONBOARDING$BACKEND_CONNECTED_TITLE)}),(0,B.jsx)(`span`,{className:`text-xs text-green-200/80`,children:t(s.ONBOARDING$BACKEND_CONNECTED_BODY)})]})]}):e===!1?(0,B.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,B.jsx)(Se,{className:`mt-0.5 size-5 shrink-0 text-red-400`}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium text-red-200`,children:t(s.ONBOARDING$BACKEND_DISCONNECTED_TITLE)}),(0,B.jsx)(`span`,{className:`text-xs text-red-200/80`,children:t(s.ONBOARDING$BACKEND_DISCONNECTED_BODY)})]})]}):(0,B.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,B.jsx)(r,{className:`mt-0.5 size-5 shrink-0 animate-spin text-[var(--oh-text-tertiary)]`}),(0,B.jsx)(`span`,{className:`text-sm text-[var(--oh-text-tertiary)]`,children:t(s.ONBOARDING$BACKEND_CHECKING)})]})}function qe({onBack:e,onNext:t}){let{t:n}=f(`openhands`),{active:r}=ne(),{backend:i}=r,a=te(i),o=z.useMemo(()=>w(),[]),c=a?{id:`onboarding-local-backend-draft`,name:ee,host:o.baseUrl,apiKey:o.sessionApiKey,kind:`local`}:i,l=le(a?[]:[i]),u=a?!1:l[i.id]?.isConnected??null,[d,p]=z.useState(!1);z.useEffect(()=>{u===!0&&p(!1)},[u]);let m=u===!0&&!d;return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-check-backend`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:n(s.ONBOARDING$BACKEND_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(s.ONBOARDING$BACKEND_SUBTITLE)})]}),(0,B.jsx)(Ke,{isConnected:u}),u===!0?(0,B.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),"aria-expanded":d,"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,B.jsx)(`span`,{children:n(d?s.ONBOARDING$BACKEND_HIDE_CONFIGURATION:s.ONBOARDING$BACKEND_SHOW_CONFIGURATION)}),(0,B.jsx)(ce,{className:C(`h-4 w-4 shrink-0 text-muted transition-transform`,d&&`rotate-180`),"aria-hidden":!0})]}):null,(0,B.jsx)(ue,{mode:a?`add`:`edit`,backend:c,onSubmitted:t,testIdRoot:`onboarding-backend`,requireApiKey:!0,hideConfigurationFields:m,renderActions:({canSubmit:t,isSubmitting:r})=>(0,B.jsxs)(`div`,{className:C(`sticky bottom-0 mt-2 flex items-center gap-2 bg-base-secondary pt-4 pb-7`,e?`justify-between`:`justify-end`),children:[e?(0,B.jsx)(F,{testId:`onboarding-backend-back`,type:`button`,variant:`secondary`,onClick:e,isDisabled:r,children:n(s.ONBOARDING$BACK)}):null,(0,B.jsx)(F,{testId:`onboarding-backend-next`,type:`submit`,variant:`primary`,isDisabled:!t||r,children:n(r?s.SETTINGS$SAVING:s.ONBOARDING$NEXT)})]})})]})}var Je={"llm.model":`anthropic/claude-opus-4-8`};function Ye({onBack:e,onNext:t}){let{t:n}=f(`openhands`),{backend:r}=E(),i=r.kind===`local`,a=x(),o=b(),[c,l]=z.useState(null),[u,d]=z.useState(!1),p=z.useCallback(async()=>{if(!i||!c)return;let e=c.values,t=typeof e[`llm.model`]==`string`?e[`llm.model`]:``;if(!t)return;let n=typeof e[`llm.api_key`]==`string`?e[`llm.api_key`]:``,r=typeof e[`llm.base_url`]==`string`?e[`llm.base_url`]:``,s=y(t),l={model:t};n&&(l.api_key=n),r&&(l.base_url=r);try{await a.mutateAsync({name:s,request:{llm:l,include_secrets:!0}}),await o.mutateAsync(s)}catch(e){console.error(`Failed to persist onboarding LLM as profile:`,e)}},[i,c,a,o]),m=z.useCallback(async()=>{d(!0);try{await p()}finally{d(!1),t()}},[p,t]);return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-setup-llm`,className:`flex flex-col gap-6 max-h-[calc(90vh-7rem)]`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:n(s.ONBOARDING$LLM_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(s.ONBOARDING$LLM_SUBTITLE)})]}),(0,B.jsx)(`div`,{"data-testid":`onboarding-llm-settings`,className:`flex min-h-0 flex-1 flex-col overflow-y-auto custom-scrollbar-always`,children:(0,B.jsx)(S,{embedded:!0,hideSaveButton:!0,suppressSuccessToast:!0,initialValueOverrides:Je,onSaveSuccess:m,onSaveControlChange:l})}),(0,B.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,B.jsx)(F,{testId:`onboarding-llm-back`,type:`button`,variant:`secondary`,onClick:e,children:n(s.ONBOARDING$BACK)}),(0,B.jsx)(F,{testId:`onboarding-llm-next`,type:`button`,variant:`primary`,isDisabled:(c?.isSaving??!1)||u,onClick:()=>{if(c?.isDirty){c.save();return}t()},children:n(s.ONBOARDING$NEXT)})]})]})}var Xe=10;function Ze(e){return`${e.stdout??``}\n${e.stderr??``}`}function Qe(e){let t;try{t=JSON.parse((e.stdout??``).trim())}catch{return`unknown`}let n=t?.loggedIn;return typeof n==`boolean`?n?`authenticated`:`unauthenticated`:`unknown`}function $e(e){let t=Ze(e).toLowerCase();return t.includes(`not logged in`)?`unauthenticated`:t.includes(`logged in`)?`authenticated`:`unknown`}function et(e){let t=(e.stdout??``).trim();return t===`present`?`authenticated`:t===`absent`?`unauthenticated`:`unknown`}var tt={"claude-code":{command:`claude auth status --json`,classify:Qe},codex:{command:`codex login status`,classify:$e},"gemini-cli":{command:`test -f "$HOME/.gemini/oauth_creds.json" && echo present || echo absent`,classify:et}},nt=class{static async getAuthStatus(e){let t=tt[e];if(!t)return`unknown`;let n=await new ie(T()).executeCommand(t.command,void 0,Xe);return t.classify(n)}};async function rt(e){try{return await nt.getAuthStatus(e)}catch{return`unknown`}}function it(e,t={}){let{enabled:n=!0}=t,r=E(),i=r.backend.kind===`local`,a=n&&i&&!!e,o=l({queryKey:[`acp-auth-status`,r.backend.id,e],queryFn:()=>rt(e),enabled:a,staleTime:1/0,gcTime:1e3*60*15,retry:!1,refetchOnWindowFocus:!1,refetchOnMount:!1});return{status:o.data??`unknown`,isChecking:a&&o.isFetching&&o.data===void 0,isSupported:i}}function at({providerKey:e,isActive:t,onBack:n,onNext:i}){let{t:a}=f(`openhands`),o=c(),{mutateAsync:l}=be(),{data:u}=xe(),{status:d,isChecking:m}=it(e,{enabled:t}),h=z.useMemo(()=>he(e),[e]),[y,b]=z.useState({}),[x,S]=z.useState(!1),C=me(e)??e,w=z.useCallback(e=>(u??[]).some(t=>t.name===e),[u]);return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-setup-acp-secrets`,className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:a(s.ONBOARDING$ACP_SECRETS_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:a(s.ONBOARDING$ACP_SECRETS_SUBTITLE,{provider:C})}),d!==`authenticated`&&(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:a(s.ONBOARDING$ACP_SECRETS_SUBSCRIPTION_NOTE)})]}),d===`authenticated`?(0,B.jsxs)(`div`,{"data-testid":`onboarding-acp-auth-detected`,className:`flex items-start gap-2 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3 text-sm text-green-200`,children:[(0,B.jsx)(g,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,B.jsx)(`span`,{children:a(s.ONBOARDING$ACP_AUTH_DETECTED,{provider:C})})]}):m?(0,B.jsxs)(`div`,{"data-testid":`onboarding-acp-auth-checking`,className:`flex items-center gap-2 text-sm text-[var(--oh-muted)]`,children:[(0,B.jsx)(r,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,B.jsx)(`span`,{children:a(s.ONBOARDING$ACP_AUTH_CHECKING,{provider:C})})]}):null,(0,B.jsx)(`div`,{className:`flex flex-col gap-5`,children:h.map(e=>{let t=w(e.name);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(de,{testId:`onboarding-acp-secret-${e.name}`,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:y[e.name]??``,onChange:t=>b(n=>({...n,[e.name]:t})),showOptionalTag:!0,placeholder:t?a(s.ONBOARDING$ACP_SECRET_ALREADY_SET):``}),(0,B.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:a(e.hint_key)})]},e.name)})}),(0,B.jsxs)(`div`,{className:`sticky bottom-0 flex items-center justify-between gap-2 bg-base-secondary pt-4 pb-7`,children:[(0,B.jsx)(F,{testId:`onboarding-acp-secrets-back`,type:`button`,variant:`secondary`,onClick:n,isDisabled:x,children:a(s.ONBOARDING$BACK)}),(0,B.jsx)(F,{testId:`onboarding-acp-secrets-next`,type:`button`,variant:`primary`,isDisabled:x,onClick:async()=>{let e=h.map(e=>({name:e.name,value:y[e.name]?.trim()})).filter(e=>!!e.value);if(e.length===0){i();return}S(!0);try{for(let{name:t,value:n}of e)await l({name:t,value:n});await o.invalidateQueries({queryKey:[`secrets-search`]}),await o.invalidateQueries({queryKey:[`secrets`]}),v(a(s.SETTINGS$SAVED)),i()}catch(e){_(p(e)||a(s.ERROR$GENERIC))}finally{S(!1)}},children:a(x?s.SETTINGS$SAVING:s.ONBOARDING$NEXT)})]})]})}function ot({onBack:e,onClose:t,onLaunched:n}){let{t:r}=f(`openhands`),{navigate:i}=oe(),a=r(s.ONBOARDING$HELLO_DEFAULT_MESSAGE),[o,c]=z.useState(a),{mutate:l,isPending:p,isSuccess:m}=ge(),h=u(),g=p||m||h,_=z.useRef(!1),v=o.trim().length>0&&!g&&!_.current,y=()=>{!v||_.current||(_.current=!0,l({query:o.trim()},{onSuccess:e=>{n(),i(`/conversations/${e.conversation_id}`)},onError:()=>{_.current=!1}}))};return(0,B.jsxs)(`div`,{"data-testid":`onboarding-step-say-hello`,className:`flex max-h-[calc(90vh-7rem)] flex-col`,children:[(0,B.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-2`,children:[(0,B.jsx)(`h2`,{className:`text-2xl font-medium text-white`,children:r(s.ONBOARDING$HELLO_TITLE)}),(0,B.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:r(s.ONBOARDING$HELLO_SUBTITLE)})]}),(0,B.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),y()},"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,B.jsx)(`div`,{className:`relative w-full`,children:(0,B.jsx)(`div`,{className:`box-border flex w-full shrink-0 flex-row items-end justify-between gap-2 p-0 pb-[18px]`,children:(0,B.jsx)(`input`,{"data-testid":`onboarding-hello-input`,"aria-label":r(s.ONBOARDING$HELLO_TITLE),type:`text`,value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),y())},placeholder:a,disabled:g,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,B.jsx)(`div`,{className:`flex w-full min-w-0 items-center justify-end gap-2`,children:(0,B.jsx)(se,{buttonClassName:``,handleSubmit:y,disabled:!v})})]}),(0,B.jsxs)(`div`,{"data-testid":`onboarding-hello-or-separator`,className:`mt-6 flex w-full items-center gap-3`,children:[(0,B.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`}),(0,B.jsx)(`span`,{className:`text-xs uppercase text-[var(--oh-muted)]`,children:r(s.LANDING$OR)}),(0,B.jsx)(`div`,{className:`h-px flex-1 bg-[var(--oh-border)]`})]}),(0,B.jsx)(`div`,{"data-testid":`onboarding-recommended-automations`,className:`flex min-h-0 flex-1 flex-col`,children:(0,B.jsx)(d,{onLaunched:n,scrollableGrid:!0})}),(0,B.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 bg-base-secondary pt-7 pb-7`,children:[(0,B.jsx)(F,{testId:`onboarding-hello-back`,type:`button`,variant:`secondary`,onClick:e,isDisabled:g,children:r(s.ONBOARDING$BACK)}),(0,B.jsx)(F,{testId:`onboarding-hello-close`,type:`button`,variant:`secondary`,onClick:t,isDisabled:g,children:r(s.BUTTON$CLOSE)})]})]})}var X=4,Z=2;function Q({index:e,currentStep:t,children:n}){let r=e===t,i=(e-t)*100;return(0,B.jsx)(`div`,{"data-testid":`onboarding-slide-${e}`,"data-active":r,"aria-hidden":!r,style:{transform:`translateX(${i}%)`},className:C(`w-full transition-transform duration-300 ease-out`,!r&&`pointer-events-none absolute inset-0`),children:n})}function st({onClose:e,initialStep:t=0,isPreview:n=!1}){let{t:r}=f(`openhands`),[i,a]=z.useState(()=>Math.min(Math.max(t,0),X-1)),[o,c]=z.useState(`openhands`),l=o===`openhands`,u=z.useCallback(()=>a(e=>Math.min(e+1,X-1)),[]),d=z.useCallback(()=>a(e=>Math.max(e-1,0)),[]);return(0,B.jsx)(A,{"aria-label":r(s.ONBOARDING$TITLE),children:(0,B.jsxs)(`div`,{className:`relative flex flex-col items-center gap-4`,children:[(0,B.jsxs)(`section`,{"data-testid":`onboarding-modal`,"data-current-step":i,"data-preview":n?`true`:void 0,className:C(`flex flex-col gap-6 overflow-hidden rounded-2xl border border-white/10 bg-base-secondary shadow-2xl`,j(`lg`),M,`max-h-[90vh]`),children:[(0,B.jsx)(`header`,{className:`flex flex-col gap-3 px-7 pt-7 shrink-0`,children:(0,B.jsx)(Ve,{currentStep:i,totalSteps:X})}),(0,B.jsx)(`div`,{"data-testid":`onboarding-scroll-area`,className:`flex-1 min-h-0 overflow-y-auto custom-scrollbar-always px-7`,children:(0,B.jsxs)(`div`,{"data-testid":`onboarding-slide-rail`,"data-current-step":i,className:`relative overflow-clip`,children:[(0,B.jsx)(Q,{index:0,currentStep:i,children:(0,B.jsx)(Ge,{selectedAgentId:o,onSelect:c,onNext:u})}),(0,B.jsx)(Q,{index:1,currentStep:i,children:(0,B.jsx)(qe,{onBack:d,onNext:u})}),(0,B.jsx)(Q,{index:Z,currentStep:i,children:l?(0,B.jsx)(Ye,{onBack:d,onNext:u}):(0,B.jsx)(at,{providerKey:o,isActive:i===Z,onBack:d,onNext:u})}),(0,B.jsx)(Q,{index:3,currentStep:i,children:(0,B.jsx)(ot,{onBack:d,onClose:e,onLaunched:e})})]})})]}),i<X-1?(0,B.jsx)(`button`,{type:`button`,"data-testid":`onboarding-skip`,onClick:e,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(s.ONBOARDING$SKIP)}):null]})})}var ct=`previewOnboardingStep`,lt=3;function $(e=typeof window<`u`?window.location.search:``){let t=new URLSearchParams(e).get(ct);if(t==null)return null;let n=Number.parseInt(t,10);return!Number.isFinite(n)||n<0||n>lt?null:n}function ut(e=typeof window<`u`?window.location.search:``){return $(e)!=null}var dt=`openhands-onboarded`;function ft(){if(typeof window>`u`)return!0;try{return window.localStorage.getItem(dt)!==null}catch{return!0}}function pt(){let[e,t]=z.useState(()=>ft());return z.useEffect(()=>{let e=e=>{e.key===`openhands-onboarded`&&t(ft())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{isCompleted:e,markCompleted:z.useCallback(()=>{try{window.localStorage.setItem(dt,`1`)}catch{}t(!0)},[])}}function mt(){let e=n(),t=$(e.search),r=ut(e.search),{isCompleted:i,markCompleted:a}=pt();return!r&&i?null:(0,B.jsx)(st,{onClose:()=>{r||a()},initialStep:t??0,isPreview:r})}export{Fe as a,Me as c,Ne as d,V as f,ze as i,Ae as l,ut as n,Pe as o,Be as r,G as s,mt as t,je as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-DaUdB2Wg.js";e();var n=t(),r=e=>(0,n.jsxs)(`svg`,{width:47,height:30,viewBox:`0 0 148 100`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`path`,{d:`M71.754 16.863V2.97414C71.754 1.82355 72.6871 0.890503 73.8377 0.890503C74.9883 0.890503 75.9213 1.82355 75.9213 2.97414V16.863C75.9213 18.0136 74.9883 18.9466 73.8377 18.9466C72.6871 18.9466 71.754 18.0136 71.754 16.863Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M82.5273 18.9329L89.4717 6.90477C90.047 5.90832 91.3215 5.5668 92.318 6.1421C93.3144 6.7174 93.6559 7.99197 93.0806 8.98841L86.1362 21.0165C85.5609 22.0129 84.2864 22.3545 83.2899 21.7792C82.2935 21.2039 81.952 19.9293 82.5273 18.9329Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M65.1481 18.9329L58.2037 6.90477C57.6284 5.90832 56.3538 5.5668 55.3574 6.1421C54.3609 6.7174 54.0194 7.99197 54.5947 8.98841L61.5391 21.0165C62.1144 22.0129 63.389 22.3545 64.3854 21.7792C65.3819 21.2039 65.7234 19.9293 65.1481 18.9329Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M98.5045 92.4969C95.1427 89.7602 90.8793 83.6628 89.0929 77.664C86.8598 70.1655 82.0309 62.777 80.9578 60.9138C80.0056 59.2602 83.0313 53.2605 89.0929 58.0459C93.9421 61.8742 97.3878 68.466 98.5045 71.2833C98.9566 72.4239 103.006 79.2475 101.827 56.6051C101.455 49.445 100.49 44.3126 100.036 33.9388C99.6807 25.7997 101.824 23.057 105.11 23.057C108.396 23.057 111.106 24.1244 111.106 32.4283C111.106 22.8682 113.154 20.7141 117.646 20.7147C121.39 20.7153 123.069 23.9077 123.069 27.0952V32.5084C123.069 27.0952 126.669 26.5896 128.519 26.5896C130.37 26.5896 134.076 28.1957 134.076 32.5084V43.317C134.076 38.116 137.324 36.601 139.773 36.765C142.963 36.9786 144.405 39.2382 143.965 44.3126C143.651 47.9349 142.689 58.5273 142.689 62.0291C142.689 65.1712 143.965 71.6801 142.689 77.664C141.953 81.1168 140.137 90.2628 130.885 94.4102C121.634 98.5575 105.364 98.0807 98.5045 92.4969Z`,fill:`transparent`}),(0,n.jsx)(`path`,{d:`M140.606 62.0292C140.606 58.409 141.583 47.6748 141.89 44.1323C142.097 41.7374 141.809 40.4247 141.424 39.7542C141.141 39.2626 140.699 38.915 139.634 38.8436C138.865 38.7921 138.027 39.0114 137.401 39.5761C136.814 40.1052 136.159 41.1682 136.159 43.3176L136.155 43.4388L135.198 59.758C135.164 60.3451 134.883 60.8911 134.424 61.2599C133.966 61.6284 133.374 61.7859 132.793 61.6941L122.764 60.1068L111.948 58.6703C110.949 58.5376 110.188 57.7084 110.142 56.7016L109.545 43.8055L109.54 43.6959C109.274 38.5609 109.022 33.8767 109.022 32.4282C109.022 28.3859 108.338 26.6806 107.74 25.9634C107.263 25.3915 106.577 25.1402 105.11 25.1402C104.583 25.1402 104.212 25.2481 103.933 25.4111C103.659 25.5714 103.346 25.8587 103.049 26.4208C102.41 27.6257 101.945 29.891 102.118 33.8479C102.342 38.9804 102.692 42.8146 103.035 46.2718C103.377 49.7231 103.718 52.8561 103.908 56.4971C104.204 62.1966 104.178 66.1256 103.945 68.7924C103.828 70.124 103.656 71.1996 103.423 72.0501C103.202 72.8558 102.871 73.6757 102.296 74.2887C101.6 75.0303 100.608 75.3844 99.577 75.136C98.7592 74.9389 98.1847 74.4215 97.8706 74.0916C97.2141 73.4017 96.7501 72.5106 96.568 72.0512C95.5097 69.3812 92.2352 63.1808 87.8023 59.6811C86.5089 58.6599 85.5666 58.3652 84.9736 58.3204C84.4148 58.2783 84.0094 58.4436 83.6909 58.6967C83.34 58.9756 83.0781 59.3811 82.9479 59.7643C82.9019 59.8999 82.8823 59.9968 82.8741 60.0584C84.0759 62.0865 88.8421 69.5222 91.0896 77.069C92.7648 82.6941 96.8038 88.4259 99.8194 90.8809C102.74 93.258 107.988 94.7313 113.9 95.0218C119.756 95.3095 125.788 94.4121 130.033 92.5092C138.233 88.8334 139.903 80.7382 140.651 77.2292C141.232 74.5057 141.243 71.5987 141.087 68.9009C141.01 67.5551 140.894 66.2969 140.793 65.1373C140.695 64.0105 140.606 62.9215 140.606 62.0292ZM120.986 27.0953C120.986 25.8314 120.648 24.7049 120.089 23.9514C119.583 23.27 118.84 22.7987 117.646 22.7984C116.668 22.7982 116.011 22.9187 115.546 23.1167C115.13 23.2943 114.781 23.5699 114.463 24.0831C113.73 25.2671 113.192 27.6455 113.189 32.384L113.707 43.6021C113.901 47.3443 114.103 51.3994 114.236 54.7707L120.986 55.6666V27.0953ZM125.153 56.2652L131.172 57.218L131.992 43.267V32.5083C131.992 31.031 131.39 30.1275 130.678 29.5489C129.884 28.9039 128.957 28.6731 128.519 28.6731C127.722 28.6731 126.899 28.797 126.306 29.2179C125.849 29.5421 125.153 30.3087 125.153 32.5083V56.2652ZM136.159 35.4278C137.406 34.8069 138.74 34.6083 139.912 34.6868C142.037 34.8292 143.91 35.718 145.037 37.6779C146.06 39.4592 146.273 41.8136 146.041 44.4927C145.72 48.1949 144.772 58.6457 144.772 62.0292C144.772 62.708 144.843 63.6116 144.944 64.7758C145.042 65.907 145.165 67.2389 145.247 68.6606C145.411 71.4987 145.422 74.8383 144.727 78.0987C144.002 81.4953 142.041 91.6918 131.738 96.3108C126.731 98.5551 120.002 99.4936 113.696 99.1838C107.445 98.8767 101.128 97.3189 97.1887 94.1122C93.4809 91.0936 88.9938 84.6307 87.0962 78.2589C84.9529 71.0619 80.3109 63.9646 79.1527 61.9533C78.4706 60.7689 78.684 59.3628 79.0019 58.4258C79.3607 57.3688 80.0554 56.2631 81.0993 55.4337C82.1758 54.5784 83.6043 54.0377 85.2876 54.1647C86.9369 54.2893 88.6462 55.0393 90.3834 56.4107C94.8541 59.9401 98.1342 65.5082 99.7424 68.9231C99.759 68.7664 99.779 68.6024 99.7941 68.4298C100.003 66.0435 100.039 62.3344 99.7467 56.7132C99.5635 53.1942 99.2356 50.1809 98.8888 46.6828C98.5425 43.1904 98.184 39.2713 97.955 34.0302C97.7722 29.8481 98.2012 26.6722 99.3672 24.471C99.9716 23.3302 100.79 22.4223 101.83 21.814C102.866 21.2087 103.995 20.974 105.11 20.974C106.759 20.974 108.813 21.2062 110.448 22.7678C110.593 22.4576 110.75 22.1652 110.921 21.8899C111.676 20.6698 112.681 19.8084 113.912 19.2835C115.095 18.7791 116.378 18.6309 117.646 18.6311C120.195 18.6315 122.165 19.7565 123.435 21.4683C124.257 22.576 124.75 23.8776 124.985 25.1982C126.338 24.5876 127.691 24.5068 128.519 24.5068C129.933 24.5068 131.784 25.0791 133.305 26.3154C134.908 27.6179 136.159 29.6733 136.159 32.5083V35.4278Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M49.258 92.4969C52.6198 89.7602 56.8832 83.6628 58.6696 77.664C60.9027 70.1655 65.7316 62.777 66.8047 60.9138C67.757 59.2602 64.7312 53.2605 58.6696 58.0459C53.8204 61.8742 50.3747 68.466 49.258 71.2833C48.8059 72.4239 44.7566 79.2475 45.935 56.6051C46.3077 49.445 47.2728 44.3126 47.7261 33.9388C48.0818 25.7997 45.9381 23.057 42.6523 23.057C39.3666 23.057 36.6568 24.1244 36.6568 32.4283C36.6568 22.8682 34.6087 20.7141 30.1168 20.7147C26.3728 20.7153 24.6934 23.9077 24.6934 27.0952V32.5084C24.6934 27.0952 21.0938 26.5896 19.243 26.5896C17.3923 26.5896 13.687 28.1957 13.687 32.5084V43.317C13.687 38.116 10.4388 36.601 7.98968 36.765C4.79943 36.9786 3.3574 39.2382 3.79721 44.3126C4.11115 47.9349 5.07331 58.5273 5.07331 62.0291C5.07331 65.1712 3.79721 71.6801 5.07331 77.664C5.80964 81.1168 7.62551 90.2628 16.8772 94.4102C26.129 98.5575 42.3987 98.0807 49.258 92.4969Z`,fill:`transparent`}),(0,n.jsx)(`path`,{d:`M7.15667 62.0292C7.15667 58.409 6.18001 47.6748 5.87297 44.1323C5.66546 41.7374 5.95363 40.4247 6.33881 39.7542C6.62122 39.2626 7.06342 38.915 8.1284 38.8436C8.89765 38.7921 9.7355 39.0114 10.3617 39.5761C10.9484 40.1052 11.6032 41.1682 11.6032 43.3176L11.6075 43.4388L12.5644 59.758C12.5989 60.3451 12.8798 60.8911 13.338 61.2599C13.7961 61.6284 14.3888 61.7859 14.9695 61.6941L24.9988 60.1068L35.8144 58.6703C36.8136 58.5376 37.5741 57.7084 37.6208 56.7016L38.2174 43.8055L38.2226 43.6959C38.4887 38.5609 38.7401 33.8767 38.7401 32.4282C38.7401 28.3859 39.4246 26.6806 40.0228 25.9634C40.4997 25.3915 41.1851 25.1402 42.6523 25.1402C43.1795 25.1402 43.5506 25.2481 43.8296 25.4111C44.1038 25.5714 44.416 25.8587 44.7139 26.4208C45.3521 27.6257 45.8174 29.891 45.6445 33.8479C45.4202 38.9804 45.0703 42.8146 44.7276 46.2718C44.3854 49.7231 44.0444 52.8561 43.8549 56.4971C43.5583 62.1966 43.5848 66.1256 43.818 68.7924C43.9345 70.124 44.107 71.1996 44.3397 72.0501C44.5602 72.8558 44.891 73.6757 45.4664 74.2887C46.1626 75.0303 47.1547 75.3844 48.1855 75.136C49.0033 74.9389 49.5779 74.4215 49.8919 74.0916C50.5484 73.4017 51.0124 72.5106 51.1945 72.0512C52.2528 69.3812 55.5273 63.1808 59.9602 59.6811C61.2536 58.6599 62.1959 58.3652 62.7889 58.3204C63.3477 58.2783 63.7531 58.4436 64.0716 58.6967C64.4225 58.9756 64.6844 59.3811 64.8146 59.7643C64.8606 59.8999 64.8802 59.9968 64.8884 60.0584C63.6866 62.0865 58.9205 69.5222 56.6729 77.069C54.9978 82.6941 50.9587 88.4259 47.9431 90.8809C45.0229 93.258 39.7748 94.7313 33.8625 95.0218C28.0069 95.3095 21.9748 94.4121 17.7298 92.5092C9.52994 88.8334 7.85968 80.7382 7.11135 77.2292C6.5306 74.5057 6.51956 71.5987 6.67502 68.9009C6.75257 67.5551 6.86815 66.2969 6.96907 65.1373C7.06713 64.0105 7.15666 62.9215 7.15667 62.0292ZM26.7768 27.0953C26.7768 25.8314 27.1148 24.7049 27.6737 23.9514C28.1793 23.27 28.9221 22.7987 30.1168 22.7984C31.0942 22.7982 31.7519 22.9187 32.2162 23.1167C32.6327 23.2943 32.9818 23.5699 33.2997 24.0831C34.0329 25.2671 34.5706 27.6455 34.5739 32.384L34.0554 43.6021C33.8615 47.3443 33.6592 51.3994 33.5263 54.7707L26.7768 55.6666V27.0953ZM22.6096 56.2652L16.5905 57.218L15.7705 43.267V32.5083C15.7705 31.031 16.3726 30.1275 17.0848 29.5489C17.8786 28.9039 18.8059 28.6731 19.2433 28.6731C20.0405 28.6731 20.8635 28.797 21.4565 29.2179C21.9131 29.5421 22.6095 30.3087 22.6096 32.5083V56.2652ZM11.6032 35.4278C10.3568 34.8069 9.02271 34.6083 7.85016 34.6868C5.72547 34.8292 3.85203 35.718 2.7259 37.6779C1.70253 39.4592 1.4893 41.8136 1.7215 44.4927C2.04237 48.1949 2.99044 58.6457 2.99044 62.0292C2.99043 62.708 2.91997 63.6116 2.81865 64.7758C2.7202 65.907 2.59705 67.2389 2.51511 68.6606C2.35156 71.4987 2.34047 74.8383 3.03576 78.0987C3.76011 81.4953 5.7216 91.6918 16.0245 96.3108C21.0312 98.5551 27.7601 99.4936 34.0669 99.1838C40.3173 98.8767 46.6346 97.3189 50.5738 94.1122C54.2816 91.0936 58.7687 84.6307 60.6663 78.2589C62.8096 71.0619 67.4516 63.9646 68.6099 61.9533C69.292 60.7689 69.0785 59.3628 68.7606 58.4258C68.4018 57.3688 67.7071 56.2631 66.6632 55.4337C65.5867 54.5784 64.1582 54.0377 62.4749 54.1647C60.8256 54.2893 59.1163 55.0393 57.3791 56.4107C52.9084 59.9401 49.6283 65.5082 48.0201 68.9231C48.0035 68.7664 47.9835 68.6024 47.9684 68.4298C47.7597 66.0435 47.7233 62.3344 48.0159 56.7132C48.199 53.1942 48.5269 50.1809 48.8738 46.6828C49.22 43.1904 49.5785 39.2713 49.8076 34.0302C49.9903 29.8481 49.5613 26.6722 48.3953 24.471C47.7909 23.3302 46.9729 22.4223 45.9322 21.814C44.8964 21.2087 43.7676 20.974 42.6523 20.974C41.0038 20.974 38.9498 21.2062 37.3141 22.7678C37.1699 22.4576 37.0125 22.1652 36.842 21.8899C36.0864 20.6698 35.0817 19.8084 33.8509 19.2835C32.668 18.7791 31.3849 18.6309 30.1168 18.6311C27.5676 18.6315 25.5976 19.7565 24.3275 21.4683C23.5057 22.576 23.0121 23.8776 22.7771 25.1982C21.4248 24.5876 20.0718 24.5068 19.2433 24.5068C17.8299 24.5068 15.9789 25.0791 14.4573 26.3154C12.8543 27.6179 11.6033 29.6733 11.6032 32.5083V35.4278Z`,fill:`white`})]});export{r as t};
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{t as e}from"./react-CM_dJw1Z.js";import{o as t}from"./declaration-IA661TBv.js";e();var n=t(),r=e=>(0,n.jsxs)(`svg`,{width:47,height:30,viewBox:`0 0 148 100`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`path`,{d:`M71.754 16.863V2.97414C71.754 1.82355 72.6871 0.890503 73.8377 0.890503C74.9883 0.890503 75.9213 1.82355 75.9213 2.97414V16.863C75.9213 18.0136 74.9883 18.9466 73.8377 18.9466C72.6871 18.9466 71.754 18.0136 71.754 16.863Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M82.5273 18.9329L89.4717 6.90477C90.047 5.90832 91.3215 5.5668 92.318 6.1421C93.3144 6.7174 93.6559 7.99197 93.0806 8.98841L86.1362 21.0165C85.5609 22.0129 84.2864 22.3545 83.2899 21.7792C82.2935 21.2039 81.952 19.9293 82.5273 18.9329Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M65.1481 18.9329L58.2037 6.90477C57.6284 5.90832 56.3538 5.5668 55.3574 6.1421C54.3609 6.7174 54.0194 7.99197 54.5947 8.98841L61.5391 21.0165C62.1144 22.0129 63.389 22.3545 64.3854 21.7792C65.3819 21.2039 65.7234 19.9293 65.1481 18.9329Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M98.5045 92.4969C95.1427 89.7602 90.8793 83.6628 89.0929 77.664C86.8598 70.1655 82.0309 62.777 80.9578 60.9138C80.0056 59.2602 83.0313 53.2605 89.0929 58.0459C93.9421 61.8742 97.3878 68.466 98.5045 71.2833C98.9566 72.4239 103.006 79.2475 101.827 56.6051C101.455 49.445 100.49 44.3126 100.036 33.9388C99.6807 25.7997 101.824 23.057 105.11 23.057C108.396 23.057 111.106 24.1244 111.106 32.4283C111.106 22.8682 113.154 20.7141 117.646 20.7147C121.39 20.7153 123.069 23.9077 123.069 27.0952V32.5084C123.069 27.0952 126.669 26.5896 128.519 26.5896C130.37 26.5896 134.076 28.1957 134.076 32.5084V43.317C134.076 38.116 137.324 36.601 139.773 36.765C142.963 36.9786 144.405 39.2382 143.965 44.3126C143.651 47.9349 142.689 58.5273 142.689 62.0291C142.689 65.1712 143.965 71.6801 142.689 77.664C141.953 81.1168 140.137 90.2628 130.885 94.4102C121.634 98.5575 105.364 98.0807 98.5045 92.4969Z`,fill:`transparent`}),(0,n.jsx)(`path`,{d:`M140.606 62.0292C140.606 58.409 141.583 47.6748 141.89 44.1323C142.097 41.7374 141.809 40.4247 141.424 39.7542C141.141 39.2626 140.699 38.915 139.634 38.8436C138.865 38.7921 138.027 39.0114 137.401 39.5761C136.814 40.1052 136.159 41.1682 136.159 43.3176L136.155 43.4388L135.198 59.758C135.164 60.3451 134.883 60.8911 134.424 61.2599C133.966 61.6284 133.374 61.7859 132.793 61.6941L122.764 60.1068L111.948 58.6703C110.949 58.5376 110.188 57.7084 110.142 56.7016L109.545 43.8055L109.54 43.6959C109.274 38.5609 109.022 33.8767 109.022 32.4282C109.022 28.3859 108.338 26.6806 107.74 25.9634C107.263 25.3915 106.577 25.1402 105.11 25.1402C104.583 25.1402 104.212 25.2481 103.933 25.4111C103.659 25.5714 103.346 25.8587 103.049 26.4208C102.41 27.6257 101.945 29.891 102.118 33.8479C102.342 38.9804 102.692 42.8146 103.035 46.2718C103.377 49.7231 103.718 52.8561 103.908 56.4971C104.204 62.1966 104.178 66.1256 103.945 68.7924C103.828 70.124 103.656 71.1996 103.423 72.0501C103.202 72.8558 102.871 73.6757 102.296 74.2887C101.6 75.0303 100.608 75.3844 99.577 75.136C98.7592 74.9389 98.1847 74.4215 97.8706 74.0916C97.2141 73.4017 96.7501 72.5106 96.568 72.0512C95.5097 69.3812 92.2352 63.1808 87.8023 59.6811C86.5089 58.6599 85.5666 58.3652 84.9736 58.3204C84.4148 58.2783 84.0094 58.4436 83.6909 58.6967C83.34 58.9756 83.0781 59.3811 82.9479 59.7643C82.9019 59.8999 82.8823 59.9968 82.8741 60.0584C84.0759 62.0865 88.8421 69.5222 91.0896 77.069C92.7648 82.6941 96.8038 88.4259 99.8194 90.8809C102.74 93.258 107.988 94.7313 113.9 95.0218C119.756 95.3095 125.788 94.4121 130.033 92.5092C138.233 88.8334 139.903 80.7382 140.651 77.2292C141.232 74.5057 141.243 71.5987 141.087 68.9009C141.01 67.5551 140.894 66.2969 140.793 65.1373C140.695 64.0105 140.606 62.9215 140.606 62.0292ZM120.986 27.0953C120.986 25.8314 120.648 24.7049 120.089 23.9514C119.583 23.27 118.84 22.7987 117.646 22.7984C116.668 22.7982 116.011 22.9187 115.546 23.1167C115.13 23.2943 114.781 23.5699 114.463 24.0831C113.73 25.2671 113.192 27.6455 113.189 32.384L113.707 43.6021C113.901 47.3443 114.103 51.3994 114.236 54.7707L120.986 55.6666V27.0953ZM125.153 56.2652L131.172 57.218L131.992 43.267V32.5083C131.992 31.031 131.39 30.1275 130.678 29.5489C129.884 28.9039 128.957 28.6731 128.519 28.6731C127.722 28.6731 126.899 28.797 126.306 29.2179C125.849 29.5421 125.153 30.3087 125.153 32.5083V56.2652ZM136.159 35.4278C137.406 34.8069 138.74 34.6083 139.912 34.6868C142.037 34.8292 143.91 35.718 145.037 37.6779C146.06 39.4592 146.273 41.8136 146.041 44.4927C145.72 48.1949 144.772 58.6457 144.772 62.0292C144.772 62.708 144.843 63.6116 144.944 64.7758C145.042 65.907 145.165 67.2389 145.247 68.6606C145.411 71.4987 145.422 74.8383 144.727 78.0987C144.002 81.4953 142.041 91.6918 131.738 96.3108C126.731 98.5551 120.002 99.4936 113.696 99.1838C107.445 98.8767 101.128 97.3189 97.1887 94.1122C93.4809 91.0936 88.9938 84.6307 87.0962 78.2589C84.9529 71.0619 80.3109 63.9646 79.1527 61.9533C78.4706 60.7689 78.684 59.3628 79.0019 58.4258C79.3607 57.3688 80.0554 56.2631 81.0993 55.4337C82.1758 54.5784 83.6043 54.0377 85.2876 54.1647C86.9369 54.2893 88.6462 55.0393 90.3834 56.4107C94.8541 59.9401 98.1342 65.5082 99.7424 68.9231C99.759 68.7664 99.779 68.6024 99.7941 68.4298C100.003 66.0435 100.039 62.3344 99.7467 56.7132C99.5635 53.1942 99.2356 50.1809 98.8888 46.6828C98.5425 43.1904 98.184 39.2713 97.955 34.0302C97.7722 29.8481 98.2012 26.6722 99.3672 24.471C99.9716 23.3302 100.79 22.4223 101.83 21.814C102.866 21.2087 103.995 20.974 105.11 20.974C106.759 20.974 108.813 21.2062 110.448 22.7678C110.593 22.4576 110.75 22.1652 110.921 21.8899C111.676 20.6698 112.681 19.8084 113.912 19.2835C115.095 18.7791 116.378 18.6309 117.646 18.6311C120.195 18.6315 122.165 19.7565 123.435 21.4683C124.257 22.576 124.75 23.8776 124.985 25.1982C126.338 24.5876 127.691 24.5068 128.519 24.5068C129.933 24.5068 131.784 25.0791 133.305 26.3154C134.908 27.6179 136.159 29.6733 136.159 32.5083V35.4278Z`,fill:`white`}),(0,n.jsx)(`path`,{d:`M49.258 92.4969C52.6198 89.7602 56.8832 83.6628 58.6696 77.664C60.9027 70.1655 65.7316 62.777 66.8047 60.9138C67.757 59.2602 64.7312 53.2605 58.6696 58.0459C53.8204 61.8742 50.3747 68.466 49.258 71.2833C48.8059 72.4239 44.7566 79.2475 45.935 56.6051C46.3077 49.445 47.2728 44.3126 47.7261 33.9388C48.0818 25.7997 45.9381 23.057 42.6523 23.057C39.3666 23.057 36.6568 24.1244 36.6568 32.4283C36.6568 22.8682 34.6087 20.7141 30.1168 20.7147C26.3728 20.7153 24.6934 23.9077 24.6934 27.0952V32.5084C24.6934 27.0952 21.0938 26.5896 19.243 26.5896C17.3923 26.5896 13.687 28.1957 13.687 32.5084V43.317C13.687 38.116 10.4388 36.601 7.98968 36.765C4.79943 36.9786 3.3574 39.2382 3.79721 44.3126C4.11115 47.9349 5.07331 58.5273 5.07331 62.0291C5.07331 65.1712 3.79721 71.6801 5.07331 77.664C5.80964 81.1168 7.62551 90.2628 16.8772 94.4102C26.129 98.5575 42.3987 98.0807 49.258 92.4969Z`,fill:`transparent`}),(0,n.jsx)(`path`,{d:`M7.15667 62.0292C7.15667 58.409 6.18001 47.6748 5.87297 44.1323C5.66546 41.7374 5.95363 40.4247 6.33881 39.7542C6.62122 39.2626 7.06342 38.915 8.1284 38.8436C8.89765 38.7921 9.7355 39.0114 10.3617 39.5761C10.9484 40.1052 11.6032 41.1682 11.6032 43.3176L11.6075 43.4388L12.5644 59.758C12.5989 60.3451 12.8798 60.8911 13.338 61.2599C13.7961 61.6284 14.3888 61.7859 14.9695 61.6941L24.9988 60.1068L35.8144 58.6703C36.8136 58.5376 37.5741 57.7084 37.6208 56.7016L38.2174 43.8055L38.2226 43.6959C38.4887 38.5609 38.7401 33.8767 38.7401 32.4282C38.7401 28.3859 39.4246 26.6806 40.0228 25.9634C40.4997 25.3915 41.1851 25.1402 42.6523 25.1402C43.1795 25.1402 43.5506 25.2481 43.8296 25.4111C44.1038 25.5714 44.416 25.8587 44.7139 26.4208C45.3521 27.6257 45.8174 29.891 45.6445 33.8479C45.4202 38.9804 45.0703 42.8146 44.7276 46.2718C44.3854 49.7231 44.0444 52.8561 43.8549 56.4971C43.5583 62.1966 43.5848 66.1256 43.818 68.7924C43.9345 70.124 44.107 71.1996 44.3397 72.0501C44.5602 72.8558 44.891 73.6757 45.4664 74.2887C46.1626 75.0303 47.1547 75.3844 48.1855 75.136C49.0033 74.9389 49.5779 74.4215 49.8919 74.0916C50.5484 73.4017 51.0124 72.5106 51.1945 72.0512C52.2528 69.3812 55.5273 63.1808 59.9602 59.6811C61.2536 58.6599 62.1959 58.3652 62.7889 58.3204C63.3477 58.2783 63.7531 58.4436 64.0716 58.6967C64.4225 58.9756 64.6844 59.3811 64.8146 59.7643C64.8606 59.8999 64.8802 59.9968 64.8884 60.0584C63.6866 62.0865 58.9205 69.5222 56.6729 77.069C54.9978 82.6941 50.9587 88.4259 47.9431 90.8809C45.0229 93.258 39.7748 94.7313 33.8625 95.0218C28.0069 95.3095 21.9748 94.4121 17.7298 92.5092C9.52994 88.8334 7.85968 80.7382 7.11135 77.2292C6.5306 74.5057 6.51956 71.5987 6.67502 68.9009C6.75257 67.5551 6.86815 66.2969 6.96907 65.1373C7.06713 64.0105 7.15666 62.9215 7.15667 62.0292ZM26.7768 27.0953C26.7768 25.8314 27.1148 24.7049 27.6737 23.9514C28.1793 23.27 28.9221 22.7987 30.1168 22.7984C31.0942 22.7982 31.7519 22.9187 32.2162 23.1167C32.6327 23.2943 32.9818 23.5699 33.2997 24.0831C34.0329 25.2671 34.5706 27.6455 34.5739 32.384L34.0554 43.6021C33.8615 47.3443 33.6592 51.3994 33.5263 54.7707L26.7768 55.6666V27.0953ZM22.6096 56.2652L16.5905 57.218L15.7705 43.267V32.5083C15.7705 31.031 16.3726 30.1275 17.0848 29.5489C17.8786 28.9039 18.8059 28.6731 19.2433 28.6731C20.0405 28.6731 20.8635 28.797 21.4565 29.2179C21.9131 29.5421 22.6095 30.3087 22.6096 32.5083V56.2652ZM11.6032 35.4278C10.3568 34.8069 9.02271 34.6083 7.85016 34.6868C5.72547 34.8292 3.85203 35.718 2.7259 37.6779C1.70253 39.4592 1.4893 41.8136 1.7215 44.4927C2.04237 48.1949 2.99044 58.6457 2.99044 62.0292C2.99043 62.708 2.91997 63.6116 2.81865 64.7758C2.7202 65.907 2.59705 67.2389 2.51511 68.6606C2.35156 71.4987 2.34047 74.8383 3.03576 78.0987C3.76011 81.4953 5.7216 91.6918 16.0245 96.3108C21.0312 98.5551 27.7601 99.4936 34.0669 99.1838C40.3173 98.8767 46.6346 97.3189 50.5738 94.1122C54.2816 91.0936 58.7687 84.6307 60.6663 78.2589C62.8096 71.0619 67.4516 63.9646 68.6099 61.9533C69.292 60.7689 69.0785 59.3628 68.7606 58.4258C68.4018 57.3688 67.7071 56.2631 66.6632 55.4337C65.5867 54.5784 64.1582 54.0377 62.4749 54.1647C60.8256 54.2893 59.1163 55.0393 57.3791 56.4107C52.9084 59.9401 49.6283 65.5082 48.0201 68.9231C48.0035 68.7664 47.9835 68.6024 47.9684 68.4298C47.7597 66.0435 47.7233 62.3344 48.0159 56.7132C48.199 53.1942 48.5269 50.1809 48.8738 46.6828C49.22 43.1904 49.5785 39.2713 49.8076 34.0302C49.9903 29.8481 49.5613 26.6722 48.3953 24.471C47.7909 23.3302 46.9729 22.4223 45.9322 21.814C44.8964 21.2087 43.7676 20.974 42.6523 20.974C41.0038 20.974 38.9498 21.2062 37.3141 22.7678C37.1699 22.4576 37.0125 22.1652 36.842 21.8899C36.0864 20.6698 35.0817 19.8084 33.8509 19.2835C32.668 18.7791 31.3849 18.6309 30.1168 18.6311C27.5676 18.6315 25.5976 19.7565 24.3275 21.4683C23.5057 22.576 23.0121 23.8776 22.7771 25.1982C21.4248 24.5876 20.0718 24.5068 19.2433 24.5068C17.8299 24.5068 15.9789 25.0791 14.4573 26.3154C12.8543 27.6179 11.6033 29.6733 11.6032 32.5083V35.4278Z`,fill:`white`})]});export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./agent-server-client-options-
|
|
1
|
+
import{n as e}from"./agent-server-client-options-Dvgeb3x4.js";import{t}from"./llm-client-BnqeDPua.js";import{a as n}from"./agent-server-compatibility-BANjmMTo.js";var r=class{static async getModels(){let n=new t(e()),[r,i,a]=await Promise.all([n.getModels(),n.getVerifiedModels(),n.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 n(),{posthog_client_key:null,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{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,b as i,c as a,k as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{a as s,c,l,n as u,o as d,r as f,s as p,t as m,u as h}from"./suspense-C9MBE_9N.js";import{n as g}from"./QueryClientProvider-7oLZ1RtQ.js";import{c as _}from"./agent-server-client-options-Dvgeb3x4.js";import{r as v}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-DMH1jSwL.js";import{t as y}from"./proxy-wIasY2Po.js";function b(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function x(e,t,n){let r=e.slice(0);return r[t]=n,r}var S=class extends o{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,a.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),i=r.map(e=>e.getCurrentResult()),a=e.length!==r.length,o=r.some((t,n)=>t!==e[n]),s=a||o,c=s?!0:i.some((e,t)=>{let r=this.#t[t];return!r||!n(e,r)});!s&&!c||(s&&(this.#l=t,this.#i=r),this.#t=i,this.hasListeners()&&(s&&(b(e,r).forEach(e=>{e.destroy()}),b(r,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,a=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=i(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new h(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=x(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&a.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},C=e(t(),1);function w({queries:e,...t},n){let i=g(n),o=l(),_=c(),v=C.useMemo(()=>e.map(e=>{let t=i.defaultQueryOptions(e);return t._optimisticResults=o?`isRestoring`:`optimistic`,t}),[e,i,o]);v.forEach(e=>{m(e),s(e,_,i.getQueryCache().get(e.queryHash))}),p(_);let[y]=C.useState(()=>new S(i,v,t)),[b,x,w]=y.getOptimisticResult(v,t.combine),T=!o&&t.subscribed!==!1;C.useSyncExternalStore(C.useCallback(e=>T?y.subscribe(a.batchCalls(e)):r,[y,T]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),C.useEffect(()=>{y.setQueries(v,t)},[v,t,y]);let E=b.some((e,t)=>f(v[t],e))?b.flatMap((e,t)=>{let n=v[t];return n&&f(n,e)?u(n,new h(i,n),_):[]}):[];if(E.length>0)throw Promise.all(E);let D=b.find((e,t)=>{let n=v[t];return n&&d({result:e,errorResetBoundary:_,throwOnError:n.throwOnError,query:i.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(D?.error)throw D.error;return x(w())}function T(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function E(e){if(e)return e;let t=_().backend;if(t.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return t}async function D(e){return T(await y({backend:E(e),method:`GET`,path:`/api/organizations`}))}async function O(e){let t=E(e);try{return{orgId:(await y({backend:t,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(v.isAxiosError(e)&&e.response?.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function k(e,t){let n=await y({backend:E(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:n?.org_id??e,userId:n?.user_id??``}}export{w as i,D as n,O as r,k as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{u as n}from"./suspense-C9MBE_9N.js";import{n as r}from"./useQuery-JDs8UaWj.js";import{t as i}from"./createLucideIcon-C9OEnwvX.js";import{c as a,n as o}from"./agent-server-client-options-Dvgeb3x4.js";import{c as s,r as c,t as l}from"./agent-server-conversation-service.api-B82pNNTm.js";var u=class extends n{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(n,r){let{state:i}=n,a=super.createResult(n,r),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=i.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:t(r,i.data),hasPreviousPage:e(r,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function d(e,t){return r(e,u,t)}var f=i(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),p=i(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),m=async e=>{let t=(await l.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},h=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:r}=await m(e);if(a().backend.kind===`cloud`){if(!r)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await c(r),{success:!0}}return new s(o({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},g=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await m(e);return new s(o({conversationUrl:n,sessionApiKey:r})).askAgent(e,t)},_=async e=>{let{conversationUrl:t,sessionApiKey:n}=await m(e);return new s(o({conversationUrl:t,sessionApiKey:n})).runConversation(e)},v=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},y=(e,t,n)=>v(e,t,{execution_status:n}),b=(e,t,n)=>v(e,t,{llm_model:n}),x=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},S=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e},C=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n};export{v as a,y as c,f as d,d as f,x as i,b as l,S as n,h as o,g as r,_ as s,C as t,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-C9OEnwvX.js";var t=e(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-IA661TBv.js";import{t as r}from"./utils-CVcuFUYj.js";var i=e(t(),1);function a(e){let[t,n]=(0,i.useState)(!0),[r,a]=(0,i.useState)(!0),o=(0,i.useRef)(0),s=(0,i.useCallback)(e=>e.scrollTop+e.clientHeight>=e.scrollHeight-20,[]),c=(0,i.useCallback)(e=>{let t=s(e);a(t);let r=e.scrollTop,i=r<o.current;o.current=r,i&&n(!1),t&&n(!0)},[s]);return{scrollRef:e,autoScroll:t,setAutoScroll:n,scrollDomToBottom:(0,i.useCallback)(()=>{let t=e.current;t&&requestAnimationFrame(()=>{n(!0),a(!0),t.scrollTop=t.scrollHeight})},[e]),hitBottom:r,setHitBottom:a,onChatBodyScroll:c}}var o=n();function s(e){return{h1:({children:t,className:n})=>(0,o.jsx)(`h1`,{className:r(`text-lg text-white font-bold leading-6 mb-1.5 mt-3 first:mt-0`,n,e),children:t}),h2:({children:t,className:n})=>(0,o.jsx)(`h2`,{className:r(`text-base font-semibold leading-5 text-white mb-1 mt-2.5 first:mt-0`,n,e),children:t}),h3:({children:t,className:n})=>(0,o.jsx)(`h3`,{className:r(`text-sm font-semibold text-white mb-1 mt-2 first:mt-0`,n,e),children:t}),h4:({children:t,className:n})=>(0,o.jsx)(`h4`,{className:r(`text-sm font-semibold text-white mb-1 mt-2 first:mt-0`,n,e),children:t}),h5:({children:t,className:n})=>(0,o.jsx)(`h5`,{className:r(`text-xs font-semibold text-white mb-0.5 mt-1.5 first:mt-0`,n,e),children:t}),h6:({children:t,className:n})=>(0,o.jsx)(`h6`,{className:r(`text-xs font-medium text-[var(--oh-text-tertiary)] mb-0.5 mt-1.5 first:mt-0`,n,e),children:t}),p:({children:t,className:n})=>(0,o.jsx)(`p`,{className:r(`py-2.5 first:pt-0 last:pb-0`,n,e),children:t}),ul:({children:t,className:n})=>(0,o.jsx)(`ul`,{className:r(`list-disc ml-5 pl-2 whitespace-normal`,n,e),children:t}),ol:({children:t,className:n,start:i})=>(0,o.jsx)(`ol`,{className:r(`list-decimal ml-5 pl-2 whitespace-normal`,n,e),start:i,children:t}),li:({children:t,className:n})=>(0,o.jsx)(`li`,{className:r(n,e),children:t}),a:({children:t,className:n,href:i})=>(0,o.jsx)(`a`,{className:r(`text-blue-500 hover:underline`,n,e),href:i,target:`_blank`,rel:`noopener noreferrer`,children:t}),code:({children:t,className:n})=>(0,o.jsx)(`code`,{className:r(`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 rounded text-[var(--oh-foreground)] border border-[var(--oh-border-subtle)]`,n,e),children:t})}}var c=s();export{c as n,a as r,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-IA661TBv.js";import{t as i}from"./useTranslation-CbJtty1g.js";import{t as a}from"./brand-button-BoiPxAGm.js";import{t as o}from"./conversation-store-kHcewy1E.js";import{t as s}from"./lesson-plan-5O2tVbD1.js";import{t as c}from"./use-handle-plan-click-DYd5a6zN.js";import{t as l}from"./markdown-renderer-CZq_UdmE.js";import{n as u,r as d}from"./plan-components-BRiIX8Wn.js";import{t as f}from"./conversation-tab-empty-state-5bW9CQke.js";var p=e(t(),1),m=n();function h(){let{t:e}=i(`openhands`),{scrollRef:t,onChatBodyScroll:n,autoScroll:h,scrollDomToBottom:g}=d(p.useRef(null)),{planContent:_,conversationMode:v}=o();p.useEffect(()=>{h&&g()},[_,h,g]);let y=v===`plan`,{handlePlanClick:b}=c();return _==null?(0,m.jsx)(f,{icon:(0,m.jsx)(s,{}),action:(0,m.jsx)(a,{type:`button`,variant:`secondary`,onClick:b,isDisabled:y,className:`min-w-40 justify-center px-6`,children:e(r.COMMON$CREATE_A_PLAN)}),children:e(r.PLANNER$EMPTY_MESSAGE)}):(0,m.jsx)(`div`,{ref:t,onScroll:e=>n(e.currentTarget),className:`flex flex-col w-full h-full p-4 overflow-auto`,children:(0,m.jsx)(l,{includeStandard:!0,components:u,children:_})})}export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-C9OEnwvX.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./settings-client-BUlG0Gzq.js";var t=class{constructor(t){this.host=t.host.replace(/\/$/,``),this.apiKey=t.apiKey,this.client=new e({baseUrl:this.host,apiKey:this.apiKey,timeout:t.timeout||6e4})}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateProfile(e){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/activate`,{})).data}close(){this.client.close()}};export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{a as n,n as r,t as i}from"./query-client-config-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{a as n,n as r,t as i}from"./query-client-config-CITeuHD7.js";import{o as a}from"./declaration-IA661TBv.js";import{n as o,t as s}from"./QueryClientProvider-7oLZ1RtQ.js";import{t as c}from"./context-BBqptpXX.js";import{i as l,n as u,o as d,r as f}from"./i18n-CyvU1o95.js";import{t as p}from"./utils-CVcuFUYj.js";import{t as m}from"./active-backend-context-CQTk4wD8.js";import{t as h}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-CBEOG8NF.js";import{t as g}from"./option-service.api-DHOGfYKh.js";import{i as _,t as v}from"./query-keys-CQaji0wJ.js";import{n as y,t as b}from"./agent-server-ui-style-scope-Bhc5vpWO.js";var x=e(t());function S({i18n:e,defaultNS:t,children:n}){let r=(0,x.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,x.createElement)(c.Provider,{value:r},n)}var C=a(),w=`posthog_bootstrap`;function T(){let e=window.location.hash.substring(1),t=new URLSearchParams(e),n=t.get(`distinct_id`),r=t.get(`session_id`);if(n&&r){let e={distinctID:n,sessionID:r};return sessionStorage.setItem(w,JSON.stringify(e)),window.history.replaceState(null,``,window.location.pathname+window.location.search),e}let i=sessionStorage.getItem(w);if(i)return sessionStorage.removeItem(w),JSON.parse(i)}function E({children:e}){let t=o(),[n,r]=x.useState(null),[i,a]=x.useState(!0),s=x.useMemo(()=>T(),[]);return x.useEffect(()=>{(async()=>{try{r((await t.fetchQuery({queryKey:_.WEB_CLIENT_CONFIG,queryFn:g.getConfig,meta:{disableToast:!0},...v})).posthog_client_key)}catch{}finally{a(!1)}})()},[t]),i||!n?e:(0,C.jsx)(h,{apiKey:n,options:{api_host:`https://us.i.posthog.com`,person_profiles:`identified_only`,bootstrap:s},children:e})}function D({children:e,theme:t=y,className:n,style:r,styleOverrides:i,contentClassName:a,...o}){let s=x.useMemo(()=>({...b,...i,...r}),[r,i]);return(0,C.jsx)(`div`,{"data-agent-server-ui":``,...o,className:n,style:s,children:(0,C.jsx)(`div`,{className:p(t,a,`text-foreground`),"data-theme":t,children:e})})}var O={provider:`posthog`};function k({children:e,queryClient:t,analytics:a,i18n:o,className:c,contentClassName:p,style:h,styleOverrides:g,theme:_,withStyleRoot:v=!0}){let y=x.useMemo(()=>t??i(),[t]),b=x.useMemo(()=>o??f(),[o]),w=x.useRef(null);w.current||={queryClient:r(),i18n:l()},n(y),d(b),x.useEffect(()=>()=>{w.current&&(n(w.current.queryClient),d(w.current.i18n))},[]);let T=a&&a.provider===`posthog`?(0,C.jsx)(E,{children:e}):e;return(0,C.jsx)(S,{i18n:b,defaultNS:u,children:(0,C.jsx)(s,{client:y,children:(0,C.jsx)(m,{children:v?(0,C.jsx)(D,{className:c,contentClassName:p,style:h,styleOverrides:g,theme:_,children:T}):T})})})}export{O as n,D as r,k as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,c as t,t as n,x as r}from"./agent-server-client-options-Dvgeb3x4.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~e9ykmtgh-DMH1jSwL.js";function a(e){return e.apiKey?e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}:{}}function o(e){let t=e.authMode??`bearer`;return t===`bearer`?a(e.backend):t===`session-api-key`&&e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}}async function s(a){let s=t(),c=s.backend.id===a.backend.id&&s.orgId?{"X-Org-Id":s.orgId}:{},l={...o(a),...c,...a.headers??{}},u=a.hostOverride??a.backend.host;if(!a.hostOverride&&!a.forceProxy)return(await i.request({url:`${u.replace(/\/+$/,``)}${a.path}`,method:a.method,headers:l,...a.body===void 0?{}:{data:a.body},timeout:(a.timeoutSeconds??30)*1e3,...a.responseType?{responseType:a.responseType}:{}})).data;let d=r();if(!d)throw new n;let f=e();return(await i.post(`${d.replace(/\/+$/,``)}/api/cloud-proxy`,{host:u,method:a.method,path:a.path,headers:l,body:a.body??null,...a.timeoutSeconds?{timeout_seconds:a.timeoutSeconds}:{}},{headers:f,timeout:3e4,...a.responseType?{responseType:a.responseType}:{}})).data}export{a as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-BFRubm34.js";import{O as t,S as n,T as r,_ as i,c as a,d as o,f as s,g as c,h as l,k as u,p as d,s as f,t as p,v as m}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{t as h}from"./mutation-CaJwPR9O.js";import{t as g}from"./declaration-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-BFRubm34.js";import{O as t,S as n,T as r,_ as i,c as a,d as o,f as s,g as c,h as l,k as u,p as d,s as f,t as p,v as m}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{t as h}from"./mutation-CaJwPR9O.js";import{t as g}from"./declaration-IA661TBv.js";import{a as _}from"./i18n-CyvU1o95.js";import{t as v}from"./retrieve-axios-error-message-DbnSBc_1.js";import{n as y}from"./custom-toast-handlers-fgD4IYsu.js";import{i as b}from"./health-store-d-d2ssv4.js";var x=class extends u{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new h({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=S(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=S(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=S(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=S(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){a.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){a.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.batch(()=>Promise.all(e.map(e=>e.continue().catch(i))))}};function S(e){return e.options.scope?.id}var C=class extends u{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new p({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){a.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>c(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>c(e,t)):t}notify(e){a.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},w=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new C,this.#t=e.mutationCache||new x,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=f.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#e.build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(n(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=o(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return a.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;a.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return a.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=a.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(i).catch(i)}invalidateQueries(e,t={}){return a.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=a.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(i)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(i)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=this.#e.build(this,t);return r.isStaleByTime(n(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i).catch(i)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i).catch(i)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return f.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(s(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{m(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(s(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{m(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===r&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},T=e({createAgentServerQueryClient:()=>O,getDefaultQueryClient:()=>j,getQueryClient:()=>M,queryClient:()=>P,setQueryClient:()=>N}),E=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},D=new Set,O=()=>{let e=new w({queryCache:new C({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&b(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||E(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)){let e=v(t);D.has(e||``)||(y(e||_.t(g.ERROR$GENERIC)),D.add(e||``),setTimeout(()=>{D.delete(e||``)},3e3))}}}),mutationCache:new x({onError:(t,n,r,i)=>{E(t,e),(i?.meta?.disableToast??i?.options.meta?.disableToast)||y(v(t)||_.t(g.ERROR$GENERIC))}})});return e},k=null,A=null,j=()=>(k||=O(),k),M=()=>A??j(),N=e=>(A=e??j(),A),P=new Proxy({},{get:(e,t)=>{let n=M(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=M();return Reflect.set(r,t,n,r)}});export{N as a,T as i,M as n,P as r,j as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{b as n,c as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{o as i,t as a}from"./declaration-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{b as n,c as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~h07fzaqi-D15MEcqi.js";import{o as i,t as a}from"./declaration-IA661TBv.js";import{n as o}from"./QueryClientProvider-7oLZ1RtQ.js";import{t as s}from"./useTranslation-CbJtty1g.js";import{r as c}from"./vendor~root-layout~home~mcp~automations-list-BTTZ58Mb.js";import{a as l,i as u,o as d,r as f,t as p}from"./circle-plus-check-toggle-B3_W6-nt.js";import{t as m}from"./utils-CVcuFUYj.js";import{n as h}from"./active-backend-context-CQTk4wD8.js";import{n as g}from"./navigation-context-CszaA-CJ.js";import{a as _,o as v}from"./conversation-local-storage-D5Tre_GA.js";import{t as y}from"./conversation-store-kHcewy1E.js";import{i as b,r as x}from"./use-settings-Clf0Y_P3.js";import{t as S}from"./use-tracking-DQU60djN.js";import{t as C}from"./use-create-conversation-4iJytCT1.js";import{f as w,i as T,l as E,m as D,o as O,t as k,u as A}from"./install-server-modal--lZ1HSHB.js";import{n as j}from"./skill-card-pill-row-BXILn-GK.js";var M=e(t(),1);function N(e,t){let n=o(t);return F({filters:{...e,status:`pending`}},n).length}function P(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function F(e={},t){let i=o(t).getMutationCache(),a=M.useRef(e),s=M.useRef(null);return s.current===null&&(s.current=P(i,e)),M.useEffect(()=>{a.current=e}),M.useSyncExternalStore(M.useCallback(e=>i.subscribe(()=>{let t=n(s.current,P(i,a.current));s.current!==t&&(s.current=t,r.schedule(e))}),[i]),()=>s.current,()=>s.current)}var I=()=>{let e=g(),t=N({mutationKey:[`create-conversation`]}),{isNavigating:n}=e;return t>0||n},L=[{id:`github-pr-reviewer`,name:`GitHub PR review copilot`,category:`Code review`,description:`Watch pull requests, inspect the diff, and leave a concise review with risks and suggested follow-ups.`,requiredIntegrationIds:[`github`],popularityRank:100,estimatedSetupMinutes:4,prompt:`Create an automation that reviews GitHub pull requests when they are opened or updated. Use the GitHub MCP to inspect the PR diff, changed files, tests, and existing discussion. Post a short review that highlights correctness risks, security issues, missing tests, and concrete next steps. Ask me for the repositories, filters, review tone, and whether comments should be posted automatically or drafted first.`,exampleImplementation:`Trigger: github.pull_request.opened and github.pull_request.synchronize
|
|
2
2
|
Required MCP: GitHub
|
|
3
3
|
|
|
4
4
|
1. Read repository, pull_request, and sender from the event payload.
|