@openhands/agent-canvas 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-BkL3HWa3.js → acp-providers-D1PORKc0.js} +1 -1
- package/build/assets/active-backend-context-IqOjobNK.js +2 -0
- package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DMrObcIS.js} +1 -1
- package/build/assets/agent-profiles-settings-DororXN5.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DWBe0rbX.js +86 -0
- package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-BJVk92PU.js} +1 -1
- package/build/assets/agent-settings-COfJsQ1d.js +1 -0
- package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-CzZsm7ms.js} +1 -1
- package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-D8Fade_-.js} +1 -1
- package/build/assets/{app-settings-D0OKHB3M.js → app-settings-CpyGB3AT.js} +1 -1
- package/build/assets/{automation-detail-C0SxWTnQ.js → automation-detail-B-jQ39Mm.js} +1 -1
- package/build/assets/{automation-export-BjQa_fT6.js → automation-export-B1dywoqk.js} +1 -1
- package/build/assets/{automation-setup-route-BzCNpljP.js → automation-setup-route-C-bWUZBi.js} +1 -1
- package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DgpCGOJV.js} +1 -1
- package/build/assets/{automations-list-dZg8zOCl.js → automations-list-DnMxlxsL.js} +1 -1
- package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-HHEneWMw.js} +1 -1
- package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-DiVrD4Cm.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-7MIjpr8M.js} +1 -1
- package/build/assets/{badge-Dpn3-LTV.js → badge-CpYmcVZV.js} +1 -1
- package/build/assets/{base-modal-3NmIOKDm.js → base-modal-Fnh6Uln9.js} +1 -1
- package/build/assets/bot-BQZx8e2i.js +1 -0
- package/build/assets/{brand-button-CJcwjnfb.js → brand-button-swT1RyO0.js} +1 -1
- package/build/assets/browser-B9AbV6kG.js +7 -0
- package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-zAY12m_i.js} +1 -1
- package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-DsJtivmL.js} +1 -1
- package/build/assets/check-WAFXrrs_.js +1 -0
- package/build/assets/chevron-down-CifNWzme.js +1 -0
- package/build/assets/circle-check-CtnimJa8.js +1 -0
- package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-Cuzx55bo.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CcSez21r.js → cloud-funnel-analytics-86CwNdSh.js} +1 -1
- package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-D0fRotFi.js} +1 -1
- package/build/assets/{command-menu-BKOLj-TC.js → command-menu-BXy03FBl.js} +1 -1
- package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BmZa0ui_.js} +1 -1
- package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-BgoN6lbN.js} +1 -1
- package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-Bq02tc-P.js} +1 -1
- package/build/assets/conversation-BPo8SvLN.js +1 -0
- package/build/assets/conversation-CPCVsCUY.js +90 -0
- package/build/assets/conversation-panel-BPo8SvLN.js +1 -0
- package/build/assets/{conversation-state-store-CtgILxWF.js → conversation-state-store-C5YpjMNy.js} +1 -1
- package/build/assets/conversation-store-Blc5xysY.js +6 -0
- package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-CMqo_0Bd.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-Cg1pF0xn.js} +1 -1
- package/build/assets/{device-verify-BIjXeW9N.js → device-verify-BfQLgNyq.js} +1 -1
- package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-BIqQr5mx.js} +1 -1
- package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-CxFjRYqH.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-C_yV4_bo.js} +1 -1
- package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-Bi4qbh2g.js} +1 -1
- package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-BqUINAhp.js} +1 -1
- package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-lraj88Wk.js} +1 -1
- package/build/assets/external-link-CgtpA_a1.js +1 -0
- package/build/assets/{file-text-RecuaId_.js → file-text-DEK4LSVw.js} +1 -1
- package/build/assets/files-tab-DV0L-lFE.js +1 -0
- package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-7yFSQJq_.js} +1 -1
- package/build/assets/{format-relative-time-BerVamGl.js → format-relative-time-DSErAuVr.js} +1 -1
- package/build/assets/git-provider-icon-BvlLAche.js +1 -0
- package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-ByMzpNko.js} +1 -1
- package/build/assets/git-repo-dropdown-C6R7hgM8.js +1 -0
- package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_sfncLZ.js} +1 -1
- package/build/assets/{home-Y0aDou-a.js → home-BOrlwLqG.js} +1 -1
- package/build/assets/home-BvMNC6E-.js +1 -0
- package/build/assets/{home-store-Cubdq0uP.js → home-store-CxqsY9Fi.js} +1 -1
- package/build/assets/index-home-BvMNC6E-.js +1 -0
- package/build/assets/info-BRVcJAUg.js +1 -0
- package/build/assets/{install-server-modal-DW6dSyGr.js → install-server-modal-Bl4G1zF4.js} +1 -1
- package/build/assets/{kebab-menu-item-content-CKydZrbH.js → kebab-menu-item-content-BGoGFEAg.js} +1 -1
- package/build/assets/{launch-c4GEP8oo.js → launch-CkqiSCqi.js} +1 -1
- package/build/assets/{list-todo-CheUtB7F.js → list-todo-DNWlzfaM.js} +1 -1
- package/build/assets/llm-not-configured-banner-DLw_tu-G.js +27 -0
- package/build/assets/llm-settings-B-pkVCrt.js +1 -0
- package/build/assets/llm-settings-DSC0-IQ7.js +1 -0
- package/build/assets/llm-subscription-service-BAdOl5Xx.js +1 -0
- package/build/assets/loader-circle-B47W9XqT.js +1 -0
- package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-xhnrGP4Y.js} +1 -1
- package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-DhGk5mJt.js} +1 -1
- package/build/assets/manifest-653b89aa.js +1 -0
- package/build/assets/{manifest-subpage-layout-Ds7G5GZ8.js → manifest-subpage-layout-CKWvL2ig.js} +1 -1
- package/build/assets/{map-provider-7Bp2aih5.js → map-provider-Mx8mZuE-.js} +1 -1
- package/build/assets/markdown-renderer-DUmk7pFc.js +8 -0
- package/build/assets/{mcp-Da7wFU7A.js → mcp-DCkvl6K0.js} +2 -2
- package/build/assets/mcp-marketplace-utils-DEbMXlQr.js +1 -0
- package/build/assets/messages-DSXvyc21.js +40 -0
- package/build/assets/{modal-body-duRaxj_K.js → modal-body-gIe21fDv.js} +1 -1
- package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D66dlgZ7.js} +1 -1
- package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-B6iOGYpI.js} +1 -1
- package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-BYX1Pw5W.js} +1 -1
- package/build/assets/{npm-Cswluf6-.js → npm-DLckoeJc.js} +1 -1
- package/build/assets/{onboarding-BKbTYlW1.js → onboarding-D7WDG66N.js} +1 -1
- package/build/assets/{onboarding-modal-DrrGlEQq.js → onboarding-modal-C_xVrFNv.js} +1 -1
- package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-D-s9z18a.js} +1 -1
- package/build/assets/pencil-BGOCPRyu.js +1 -0
- package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-AKaXIIfg.js} +1 -1
- package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-wtmY4QQw.js} +1 -1
- package/build/assets/plus-zNEL8rcX.js +1 -0
- package/build/assets/{profiles-service.api-vcE_jJCe.js → profiles-service.api-DCMYxHMi.js} +1 -1
- package/build/assets/{providers-CdrPPm0z.js → providers-BjrtjX4L.js} +1 -1
- package/build/assets/{proxy-b4aqL4SX.js → proxy-9Z_WZggZ.js} +1 -1
- package/build/assets/{puzzle-B3v361yY.js → puzzle-BWLmN8z4.js} +1 -1
- package/build/assets/recommended-automations-launcher-CFlzhu1o.js +1 -0
- package/build/assets/refresh-cw-CXtFWpwv.js +1 -0
- package/build/assets/root-CanxKlNV.css +1 -0
- package/build/assets/{root-CBBi6IAe.js → root-DkfG_UWR.js} +2 -2
- package/build/assets/root-layout-D75LHYhh.js +2 -0
- package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-OnM5Uob_.js} +1 -1
- package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-m5WQm2sy.js} +1 -1
- package/build/assets/search-CycosyjN.js +1 -0
- package/build/assets/{secrets-service-BHF4fxML.js → secrets-service-B26R61C1.js} +1 -1
- package/build/assets/{secrets-settings-aBGXtQhX.js → secrets-settings-CbLYCKOX.js} +1 -1
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DCspm2U5.js} +1 -1
- package/build/assets/{settings-CZPGNens.js → settings-BJQI_iBM.js} +1 -1
- package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-BI8V_Nov.js} +1 -1
- package/build/assets/{settings-index-Dtlegd6s.js → settings-index-BiTqJoH7.js} +1 -1
- package/build/assets/{settings-input-D61Vzp9e.js → settings-input-Cz62hWVW.js} +1 -1
- package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-z_3FW5H3.js} +1 -1
- package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-BIrIVn97.js} +1 -1
- package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api--rJmnuLa.js} +1 -1
- package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-BRsSI8Vs.js} +1 -1
- package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-Ba7vel6T.js} +1 -1
- package/build/assets/shared-conversation-CQK_PqHx.js +1 -0
- package/build/assets/shield-check-T3JsDJiM.js +1 -0
- package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-Bhi3hVcu.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-YWJNRN4p.js} +1 -1
- package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-BSUlY5Ml.js} +1 -1
- package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-Cl1cUv_F.js} +1 -1
- package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-BXz8L8Rn.js} +1 -1
- package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-QgfKv31M.js} +1 -1
- package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-Dc3JPW-8.js} +1 -1
- package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-CpTV27n3.js} +1 -1
- package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-CSW__IW4.js} +1 -1
- package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-TJ0mdECe.js} +1 -1
- package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-BUMSbgrF.js} +1 -1
- package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-mAHMOkUz.js} +1 -1
- package/build/assets/{terminal-DRrJo-cR.js → terminal-BzxBaHx2.js} +1 -1
- package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-O5v1FgxW.js} +1 -1
- package/build/assets/trash-2-C0xNVp9c.js +1 -0
- package/build/assets/{typography-D9tiHct7.js → typography-NOKSk9_R.js} +1 -1
- package/build/assets/usage-tab-tEmVN0KD.js +1 -0
- package/build/assets/{use-acp-credential-form-DGyo0QvL.js → use-acp-credential-form-BPNi0Zbm.js} +1 -1
- package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-D9YRQPTF.js} +1 -1
- package/build/assets/{use-agent-profiles-B37XWDLq.js → use-agent-profiles-Cb2zUW3l.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dxzq2AEd.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-Co2eJk2A.js} +1 -1
- package/build/assets/{use-config-DapX3pjC.js → use-config-DKAMiI5R.js} +1 -1
- package/build/assets/use-create-conversation-CoHTiCbI.js +1 -0
- package/build/assets/{use-create-secret-DcpT3RPw.js → use-create-secret-2zBlCDsF.js} +1 -1
- package/build/assets/use-is-authed-C52-ivnB.js +1 -0
- package/build/assets/{use-is-creating-conversation-CVefC9Ns.js → use-is-creating-conversation-DdaAE6jV.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js} +1 -1
- package/build/assets/use-llm-profiles-C_BHue65.js +1 -0
- package/build/assets/{use-manifest-capabilities-zihHDbMW.js → use-manifest-capabilities-DPrQsaPP.js} +1 -1
- package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-CCE8OQgV.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-CEiak69h.js} +1 -1
- package/build/assets/use-save-agent-profile-DK9idD6a.js +1 -0
- package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-DNmnbG6f.js} +1 -1
- package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-BlFL7YhM.js} +1 -1
- package/build/assets/{use-settings-BmLzQjnC.js → use-settings-wCwPaSIv.js} +1 -1
- package/build/assets/{use-tracking-salbPJxT.js → use-tracking-CVwPmhlX.js} +1 -1
- package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-DVtfg0B_.js} +1 -1
- package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-p1xq35r2.js} +1 -1
- package/build/assets/{useMutation-ChpkYxI5.js → useMutation-BFDQmgk9.js} +1 -1
- package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-DF1NAAeC.js} +1 -1
- package/build/assets/{useQuery-BCnzy4LX.js → useQuery-DRv--6bK.js} +1 -1
- package/build/assets/utils-zxEjKE70.js +1 -0
- package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js} +3 -3
- package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-D9wR9yM2.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-Ipoe6hvY.js +13 -0
- package/build/assets/vendor~root-layout-C-IgVx6e.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-Dhd_I4H4.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-Cc0f9kPP.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-d7svw-BB.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-4WsUP-tz.js} +2 -2
- package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-B8UMQ7MG.js} +1 -1
- package/build/assets/{wrench-B1_H-tL1.js → wrench-DIka3hCq.js} +1 -1
- package/build/assets/x-BWKA2Ver.js +1 -0
- package/build/assets/zap-DHddTPc0.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +28 -1
- package/build/locales/ca/openhands.json +28 -1
- package/build/locales/de/openhands.json +28 -1
- package/build/locales/en/openhands.json +28 -1
- package/build/locales/es/openhands.json +28 -1
- package/build/locales/fr/openhands.json +28 -1
- package/build/locales/it/openhands.json +28 -1
- package/build/locales/ja/openhands.json +28 -1
- package/build/locales/ko-KR/openhands.json +28 -1
- package/build/locales/no/openhands.json +28 -1
- package/build/locales/pt/openhands.json +28 -1
- package/build/locales/tr/openhands.json +28 -1
- package/build/locales/uk/openhands.json +28 -1
- package/build/locales/zh-CN/openhands.json +28 -1
- package/build/locales/zh-TW/openhands.json +28 -1
- package/config/defaults.json +3 -3
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.js +1 -1
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +24 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +116 -97
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/llm-balance-service.cjs +2 -0
- package/dist/api/llm-balance-service.cjs.map +1 -0
- package/dist/api/llm-balance-service.d.ts +33 -0
- package/dist/api/llm-balance-service.js +53 -0
- package/dist/api/llm-balance-service.js.map +1 -0
- package/dist/api/llm-subscription-service.cjs +1 -1
- package/dist/api/llm-subscription-service.cjs.map +1 -1
- package/dist/api/llm-subscription-service.js +42 -34
- package/dist/api/llm-subscription-service.js.map +1 -1
- package/dist/components/conversation/index.cjs +1 -1
- package/dist/components/conversation/index.d.ts +0 -1
- package/dist/components/conversation/index.js +0 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +24 -23
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/group-events.cjs +1 -1
- package/dist/components/conversation-events/chat/group-events.cjs.map +1 -1
- package/dist/components/conversation-events/chat/group-events.d.ts +3 -3
- package/dist/components/conversation-events/chat/group-events.js +27 -26
- package/dist/components/conversation-events/chat/group-events.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +123 -118
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-grip.js +7 -7
- package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
- package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
- package/dist/components/features/chat/components/context-window-meter.js +131 -0
- package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
- package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
- package/dist/components/features/chat/components/context-window-ring.js +45 -0
- package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.js +68 -67
- package/dist/components/features/chat/custom-chat-input.js.map +1 -1
- package/dist/components/features/chat/path-component.cjs +1 -1
- package/dist/components/features/chat/path-component.cjs.map +1 -1
- package/dist/components/features/chat/path-component.js +9 -6
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/chat/plan-preview.cjs +1 -1
- package/dist/components/features/chat/plan-preview.js +4 -4
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.d.ts +0 -8
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +92 -50
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +7 -2
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +15 -9
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs +2 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map +1 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.d.ts +20 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js +76 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map +1 -0
- package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu.cjs.map +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +5 -3
- package/dist/components/features/controls/server-status-context-menu.js +8 -8
- package/dist/components/features/controls/server-status-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.js +58 -61
- package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +74 -46
- package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
- package/dist/components/features/conversation/conversation-name.cjs +1 -1
- package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name.js +69 -71
- package/dist/components/features/conversation/conversation-name.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +7 -6
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +92 -86
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +81 -71
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.js +6 -6
- package/dist/components/features/conversation/metrics-modal/cost-section.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +2 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.js +10 -9
- package/dist/components/features/conversation/metrics-modal/metric-row.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js +2 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js.map +1 -1
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.d.ts +16 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js +59 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.d.ts +19 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js +46 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.d.ts +7 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js +57 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.d.ts +9 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.js +68 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.js.map +1 -0
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.js +10 -13
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.js +2 -2
- package/dist/components/features/conversation-panel/budget-progress-bar.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +25 -17
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +9 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +27 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +230 -165
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +22 -25
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.js +2 -2
- package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/llm-balance.cjs +2 -0
- package/dist/constants/llm-balance.cjs.map +1 -0
- package/dist/constants/llm-balance.d.ts +13 -0
- package/dist/constants/llm-balance.js +6 -0
- package/dist/constants/llm-balance.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +217 -209
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
- package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
- package/dist/hooks/chat/use-grip-resize.js +39 -30
- package/dist/hooks/chat/use-grip-resize.js.map +1 -1
- package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
- package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
- package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
- package/dist/hooks/mutation/use-condense-conversation.js +17 -0
- package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
- 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 +30 -21
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.js +1 -1
- package/dist/hooks/query/use-conversation-metrics.js.map +1 -1
- package/dist/hooks/query/use-llm-balance.cjs +2 -0
- package/dist/hooks/query/use-llm-balance.cjs.map +1 -0
- package/dist/hooks/query/use-llm-balance.d.ts +10 -0
- package/dist/hooks/query/use-llm-balance.js +24 -0
- package/dist/hooks/query/use-llm-balance.js.map +1 -0
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +1 -1
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/use-await-context-compaction.cjs +2 -0
- package/dist/hooks/use-await-context-compaction.cjs.map +1 -0
- package/dist/hooks/use-await-context-compaction.d.ts +38 -0
- package/dist/hooks/use-await-context-compaction.js +61 -0
- package/dist/hooks/use-await-context-compaction.js.map +1 -0
- package/dist/hooks/use-compact-context-action.cjs +2 -0
- package/dist/hooks/use-compact-context-action.cjs.map +1 -0
- package/dist/hooks/use-compact-context-action.d.ts +10 -0
- package/dist/hooks/use-compact-context-action.js +61 -0
- package/dist/hooks/use-compact-context-action.js.map +1 -0
- package/dist/hooks/use-context-window-usage.cjs +2 -0
- package/dist/hooks/use-context-window-usage.cjs.map +1 -0
- package/dist/hooks/use-context-window-usage.d.ts +5 -0
- package/dist/hooks/use-context-window-usage.js +20 -0
- package/dist/hooks/use-context-window-usage.js.map +1 -0
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
- package/dist/hooks/use-conversation-name-context-menu.d.ts +0 -3
- package/dist/hooks/use-conversation-name-context-menu.js +54 -57
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.d.ts +8 -0
- package/dist/hooks/use-drag-resize.js +21 -18
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-live-conversation-metrics.cjs +2 -0
- package/dist/hooks/use-live-conversation-metrics.cjs.map +1 -0
- package/dist/hooks/use-live-conversation-metrics.d.ts +18 -0
- package/dist/hooks/use-live-conversation-metrics.js +37 -0
- package/dist/hooks/use-live-conversation-metrics.js.map +1 -0
- package/dist/hooks/use-select-conversation-tab.cjs +1 -1
- package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
- package/dist/hooks/use-select-conversation-tab.js +2 -2
- package/dist/hooks/use-select-conversation-tab.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 +27 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +474 -15
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +28 -29
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +0 -1
- package/dist/locales/ar/openhands.json +28 -1
- package/dist/locales/ca/openhands.json +28 -1
- package/dist/locales/de/openhands.json +28 -1
- package/dist/locales/en/openhands.json +28 -1
- package/dist/locales/es/openhands.json +28 -1
- package/dist/locales/fr/openhands.json +28 -1
- package/dist/locales/it/openhands.json +28 -1
- package/dist/locales/ja/openhands.json +28 -1
- package/dist/locales/ko-KR/openhands.json +28 -1
- package/dist/locales/no/openhands.json +28 -1
- package/dist/locales/pt/openhands.json +28 -1
- package/dist/locales/tr/openhands.json +28 -1
- package/dist/locales/uk/openhands.json +28 -1
- package/dist/locales/zh-CN/openhands.json +28 -1
- package/dist/locales/zh-TW/openhands.json +28 -1
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs +5 -5
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs.map +1 -1
- package/dist/node_modules/@microlink/react-json-view/dist/main.js +5194 -5187
- package/dist/node_modules/@microlink/react-json-view/dist/main.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +22 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +33 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +56 -22
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +31 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +9 -5
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.js +2 -2
- package/dist/node_modules/i18next-http-backend/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js +31 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js.map +1 -0
- package/dist/node_modules/zustand/esm/middleware.cjs +3 -3
- package/dist/node_modules/zustand/esm/middleware.cjs.map +1 -1
- package/dist/node_modules/zustand/esm/middleware.js +33 -31
- package/dist/node_modules/zustand/esm/middleware.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +17 -16
- package/dist/package.js.map +1 -1
- package/dist/routes/usage-tab.cjs +2 -0
- package/dist/routes/usage-tab.cjs.map +1 -0
- package/dist/routes/usage-tab.d.ts +2 -0
- package/dist/routes/usage-tab.js +10 -0
- package/dist/routes/usage-tab.js.map +1 -0
- package/dist/services/child-conversation-launch.cjs +1 -1
- package/dist/services/child-conversation-launch.cjs.map +1 -1
- package/dist/services/child-conversation-launch.js +11 -5
- package/dist/services/child-conversation-launch.js.map +1 -1
- package/dist/stores/archived-conversations-store.cjs +2 -0
- package/dist/stores/archived-conversations-store.cjs.map +1 -0
- package/dist/stores/archived-conversations-store.d.ts +24 -0
- package/dist/stores/archived-conversations-store.js +33 -0
- package/dist/stores/archived-conversations-store.js.map +1 -0
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +3 -0
- package/dist/stores/conversation-panel-preferences-store.js +4 -0
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +1 -1
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/metrics-store.cjs +1 -1
- package/dist/stores/metrics-store.cjs.map +1 -1
- package/dist/stores/metrics-store.d.ts +1 -0
- package/dist/stores/metrics-store.js +7 -4
- package/dist/stores/metrics-store.js.map +1 -1
- package/dist/types/agent-server/core/events/condensation-event.d.ts +3 -0
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +4 -6
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +5 -0
- package/dist/types/agent-server/type-guards.js +3 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/utils/conversation-local-storage.cjs +1 -1
- package/dist/utils/conversation-local-storage.cjs.map +1 -1
- package/dist/utils/conversation-local-storage.js +2 -1
- package/dist/utils/conversation-local-storage.js.map +1 -1
- package/dist/utils/format-token-count.cjs +2 -0
- package/dist/utils/format-token-count.cjs.map +1 -0
- package/dist/utils/format-token-count.d.ts +3 -0
- package/dist/utils/format-token-count.js +19 -0
- package/dist/utils/format-token-count.js.map +1 -0
- package/dist/utils/hover-reveal-classes.cjs +2 -0
- package/dist/utils/hover-reveal-classes.cjs.map +1 -0
- package/dist/utils/hover-reveal-classes.d.ts +34 -0
- package/dist/utils/hover-reveal-classes.js +41 -0
- package/dist/utils/hover-reveal-classes.js.map +1 -0
- package/dist/utils/is-markdown-file-path.cjs +2 -0
- package/dist/utils/is-markdown-file-path.cjs.map +1 -0
- package/dist/utils/is-markdown-file-path.d.ts +4 -0
- package/dist/utils/is-markdown-file-path.js +14 -0
- package/dist/utils/is-markdown-file-path.js.map +1 -0
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.d.ts +7 -0
- package/dist/utils/mcp-marketplace-utils.js +19 -16
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/transcript-export/index.cjs +3 -3
- package/dist/utils/transcript-export/index.cjs.map +1 -1
- package/dist/utils/transcript-export/index.js +12 -12
- package/dist/utils/transcript-export/index.js.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.js +4 -4
- package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
- package/dist/utils/workspace-relative-path.cjs +2 -0
- package/dist/utils/workspace-relative-path.cjs.map +1 -0
- package/dist/utils/workspace-relative-path.d.ts +10 -0
- package/dist/utils/workspace-relative-path.js +22 -0
- package/dist/utils/workspace-relative-path.js.map +1 -0
- package/package.json +17 -16
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-process-utils.mjs +6 -1
- package/scripts/dev-safe.mjs +57 -2
- package/build/assets/active-backend-context-B_bg5h9O.js +0 -2
- package/build/assets/agent-profiles-settings-hd2cAIZM.js +0 -1
- package/build/assets/agent-server-conversation-service.api-BheU4HX3.js +0 -86
- package/build/assets/agent-settings-D_SVrWhI.js +0 -1
- package/build/assets/bot-DuN83i3p.js +0 -1
- package/build/assets/browser--eoQOo4M.js +0 -6
- package/build/assets/check-DLOKoFU9.js +0 -1
- package/build/assets/chevron-down-CnIbtM6i.js +0 -1
- package/build/assets/circle-check-CxCYJrpZ.js +0 -1
- package/build/assets/conversation-Cmyw9bFh.js +0 -90
- package/build/assets/conversation-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-panel-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-store-B8Eahyeg.js +0 -6
- package/build/assets/external-link-zWbg5KXS.js +0 -1
- package/build/assets/files-tab-D5zuU5TY.js +0 -1
- package/build/assets/git-provider-icon-zuKz2cwo.js +0 -1
- package/build/assets/git-repo-dropdown-Bo7ciSNX.js +0 -1
- package/build/assets/home-DqyeeFA_.js +0 -1
- package/build/assets/index-home-DqyeeFA_.js +0 -1
- package/build/assets/info-C9lpK5pw.js +0 -1
- package/build/assets/llm-not-configured-banner-DCE_0B4I.js +0 -27
- package/build/assets/llm-settings-8eWBF3Ij.js +0 -1
- package/build/assets/llm-settings-D9ko42Pi.js +0 -1
- package/build/assets/llm-subscription-service-B3K-97lP.js +0 -1
- package/build/assets/loader-circle-C5AnEN8r.js +0 -1
- package/build/assets/manifest-e1c3bc3b.js +0 -1
- package/build/assets/markdown-renderer-DzvgdZey.js +0 -8
- package/build/assets/mcp-marketplace-utils-DSLou4n7.js +0 -1
- package/build/assets/messages-B2l0qLVk.js +0 -40
- package/build/assets/pencil-Bl3GWhgq.js +0 -1
- package/build/assets/plus-CtzlyAoF.js +0 -1
- package/build/assets/recommended-automations-launcher-DIYgUdMm.js +0 -1
- package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
- package/build/assets/root-CRK9fOFd.css +0 -1
- package/build/assets/root-layout-BFN2rCOy.js +0 -2
- package/build/assets/search-CYaiKHRp.js +0 -1
- package/build/assets/shared-conversation-BIAcuORk.js +0 -1
- package/build/assets/shield-check-D2cpEpv3.js +0 -1
- package/build/assets/trash-2-CzDVN-Iw.js +0 -1
- package/build/assets/use-create-conversation-CRf1dCm5.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
- package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
- package/build/assets/utils-DPQfkd-7.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js +0 -13
- package/build/assets/x-RYDBg-e2.js +0 -1
- package/build/assets/zap-tbKDzCe3.js +0 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/context-window-section.js +0 -46
- package/dist/components/features/conversation/metrics-modal/context-window-section.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.js +0 -18
- package/dist/components/features/conversation/metrics-modal/empty-state.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +0 -5
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js +0 -20
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js +0 -57
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js.map +0 -1
- package/dist/icons/u-credit-card.cjs +0 -2
- package/dist/icons/u-credit-card.cjs.map +0 -1
- package/dist/icons/u-credit-card.js +0 -21
- package/dist/icons/u-credit-card.js.map +0 -1
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t}from"./useMutation-BFDQmgk9.js";import{R as n,k as r}from"./active-backend-context-IqOjobNK.js";import{t as i}from"./settings-service.api--rJmnuLa.js";import{n as a}from"./use-agent-profiles-Cb2zUW3l.js";var o=[`activate-agent-profile`];function s(){let s=e();return t({mutationKey:o,mutationFn:e=>a.activateProfile(e),onMutate:async e=>{await s.cancelQueries({queryKey:r.all});let t=s.getQueriesData({queryKey:r.all});return s.setQueriesData({queryKey:r.all},t=>t&&{...t,active_agent_profile_id:e}),{snapshots:t}},onError:(e,t,n)=>{n?.snapshots?.forEach(([e,t])=>{s.setQueryData(e,t)})},onSuccess:async()=>{i.invalidateCache(),await s.invalidateQueries({queryKey:r.all}),await s.invalidateQueries({queryKey:n.personal()})}})}export{s as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t}from"./useQuery-DRv--6bK.js";import{$ as n,A as r,M as i,ct as a,k as o,n as s}from"./active-backend-context-IqOjobNK.js";import{t as c}from"./proxy-9Z_WZggZ.js";var l=`/api/agent-profiles`;function u(){let e=a().backend;if(e.kind!==`cloud`)throw Error(`Cloud agent-profile call requires a cloud backend.`);return e}async function d(){return c({backend:u(),method:`GET`,path:l})}async function f(e){return c({backend:u(),method:`GET`,path:`${l}/${encodeURIComponent(e)}`})}async function p(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}`,body:t})}async function m(e){return c({backend:u(),method:`DELETE`,path:`${l}/${encodeURIComponent(e)}`})}async function h(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/rename`,body:{new_name:t}})}async function g(e){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/activate`,body:{}})}function _(){return a().backend.kind===`cloud`}var v=`default`,y=class{static async listProfiles(){return _()?d():new e(n()).listAgentProfiles()}static async getProfile(t,r){if(_())return f(t);let i=r?{exposeSecrets:r}:{};return new e(n()).getAgentProfile(t,i)}static async saveProfile(t,r){return _()?p(t,r):new e(n()).saveAgentProfile(t,r)}static async deleteProfile(t){return _()?m(t):new e(n()).deleteAgentProfile(t)}static async renameProfile(t,r){return _()?h(t,r):new e(n()).renameAgentProfile(t,r)}static async activateProfile(t){return _()?g(t):new e(n()).activateAgentProfile(t)}};function b(e={}){let{backend:n,orgId:a}=s();return t({queryKey:[...o.all,n.id,a],queryFn:y.listProfiles,...i,...r,enabled:e.enabled??!0,meta:{disableToast:!0}})}export{y as n,v as r,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useQuery-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useQuery-DRv--6bK.js";import{n as i}from"./active-backend-context-IqOjobNK.js";import{t as a}from"./utils-zxEjKE70.js";import{t as o}from"./organization-service.api-D-s9z18a.js";import{_ as s,u as c}from"./form-control-classes-7yFSQJq_.js";import{c as l,u}from"./dropdown-classes-BIqQr5mx.js";var d=n();function f({icon:e,text:t,className:n}){return(0,d.jsxs)(`div`,{className:a(`flex min-w-0 w-full items-center`,l,n),children:[(0,d.jsx)(`span`,{className:u,"aria-hidden":!0,children:e}),(0,d.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}var p=e(t()),m=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{d:`M7 4C7 2.89543 7.89543 2 9 2H15C16.1046 2 17 2.89543 17 4V6H18.9897C18.9959 5.99994 19.0021 5.99994 19.0083 6H21C21.5523 6 22 6.44772 22 7C22 7.55228 21.5523 8 21 8H19.9311L19.0638 20.1425C18.989 21.1891 18.1182 22 17.0689 22H6.93112C5.88184 22 5.01096 21.1891 4.9362 20.1425L4.06888 8H3C2.44772 8 2 7.55228 2 7C2 6.44772 2.44772 6 3 6H4.99174C4.99795 5.99994 5.00414 5.99994 5.01032 6H7V4ZM9 6H15V4H9V6ZM6.07398 8L6.93112 20H17.0689L17.926 8H6.07398ZM10 10C10.5523 10 11 10.4477 11 11V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V17C15 17.5523 14.5523 18 14 18C13.4477 18 13 17.5523 13 17V11C13 10.4477 13.4477 10 14 10Z`,fill:`currentColor`})}),h=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{d:`M14.25 19.5C14.25 20.7426 13.2426 21.75 12 21.75C10.7574 21.75 9.75 20.7426 9.75 19.5C9.75 18.2574 10.7574 17.25 12 17.25C13.2426 17.25 14.25 18.2574 14.25 19.5ZM14.25 12C14.25 13.2426 13.2426 14.25 12 14.25C10.7574 14.25 9.75 13.2426 9.75 12C9.75 10.7574 10.7574 9.75 12 9.75C13.2426 9.75 14.25 10.7574 14.25 12ZM14.25 4.5C14.25 5.74264 13.2426 6.75 12 6.75C10.7574 6.75 9.75 5.74264 9.75 4.5C9.75 3.25736 10.7574 2.25 12 2.25C13.2426 2.25 14.25 3.25736 14.25 4.5Z`,fill:`currentColor`})}),g=p.forwardRef(function({onClick:e,className:t,iconClassName:n,ariaLabel:r,testId:i=`ellipsis-button`},o){return(0,d.jsx)(`button`,{ref:o,"data-testid":i,type:`button`,onClick:e,"aria-label":r,className:a(`p-1 rounded-md cursor-pointer`,s,`text-[var(--oh-muted)]`,c,`flex items-center justify-center`,t),children:(0,d.jsx)(h,{className:n??`w-4 h-4`})})}),_=`edit_org_settings`;function v(){let{backend:e,orgId:t}=i(),n=e.kind===`cloud`,{data:a}=r({queryKey:[`cloud-current-user`,e.id,t,e.connectionRevision??0],queryFn:()=>o(t,e),enabled:n&&!!t,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});return n?a?.permissions?a.permissions.includes(_):a?.role===`owner`||a?.role===`admin`:!0}export{f as a,m as i,g as n,h as r,v as t};
|
package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-Co2eJk2A.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQueries-
|
|
1
|
+
import{t as e}from"./useQueries-DF1NAAeC.js";import{n as t,r as n}from"./active-backend-context-IqOjobNK.js";import{n as r,r as i,t as a}from"./organization-service.api-D-s9z18a.js";function o(){let{backends:t}=n(),a=t.filter(e=>e.kind===`cloud`),o=e({queries:a.map(e=>({queryKey:[`cloud-organizations`,e.id,e.connectionRevision??0],queryFn:async()=>{let t=await r(e);if(e.authMode===`cookie`)return t;let n=await i(e);return n.isLegacyKey||n.orgId===null?t:{...t,items:t.items.filter(e=>e.id===n.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return a.forEach((e,t)=>{let n=o[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[],currentOrgId:n.data?.currentOrgId??null}}),s}function s(){let{backends:r}=n(),i=t(),s=o(),c=[];for(let e of r)if(e.kind===`cloud`){let t=s[e.id],n=e.id===i.backend.id&&i.orgId?i.orgId:t?.orgs[0]?.id??null;n&&c.push({backendId:e.id,connectionRevision:e.connectionRevision??0,orgIdForMe:n})}let l=e({queries:c.map(({backendId:e,connectionRevision:t,orgIdForMe:n})=>{let i=r.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,n,t],queryFn:async()=>i?a(n,i):{orgId:n,userId:``},enabled:!!i,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),u={};return c.forEach((e,t)=>{let n=l[t];u[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),u}export{o as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t}from"./useQuery-DRv--6bK.js";import{$ as n,J as r,K as i,L as a,M as o,Z as s}from"./active-backend-context-IqOjobNK.js";var c=class{static async getModels(){let t=new e(n()),[r,i,a]=await Promise.all([t.getModels(),t.getVerifiedModels(),t.getProviders()]),o=Object.keys(i??{}).sort(),s=o.flatMap(e=>i[e]??[]);return{models:r??[],verified_models:s,verified_providers:a?.filter(e=>o.includes(e))??o,default_model:s[0]??r?.[0]??``}}static async getConfig(){return await s(),{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()}}},l=e=>t({queryKey:a.WEB_CLIENT_CONFIG,queryFn:c.getConfig,retry:(e,t)=>!r(t)&&!i(t)&&e<3,meta:{disableToast:!0},...o,enabled:e?.enabled});export{c as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t}from"./useMutation-BFDQmgk9.js";import{A as n,I as r,N as i,k as a,n as o}from"./active-backend-context-IqOjobNK.js";import{t as s}from"./use-tracking-CVwPmhlX.js";import{C as c,S as l,t as u,x as d}from"./agent-server-conversation-service.api-DWBe0rbX.js";import{t as f}from"./profiles-service.api-DCMYxHMi.js";import{t as p}from"./use-llm-profiles-C_BHue65.js";import{n as m,t as h}from"./use-agent-profiles-Cb2zUW3l.js";import{t as g}from"./plugins-management-service-wtmY4QQw.js";function _(e){if(e.name)return e.name;if(e.repo_path){let t=e.repo_path.split(`/`).filter(Boolean);if(t.length>0)return t[t.length-1]}let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`/`)&&t.split(`/`).pop()?.replace(/\.git$/,``)||t}function v(e){let{source:t}=e;return!(t.startsWith(`github:`)||/^[a-z][a-z0-9+.-]*:\/\//i.test(t))}function y(e){let t=e.source.startsWith(`github:`)?e.source.replace(`github:`,``):e.source;return e.ref?`${t} @ ${e.ref}`:t}function b(e){return[e.source,e.ref??``,e.repo_path??``].join(` `)}var x=[`create-conversation`],S=()=>{let _=e(),{trackConversationCreated:v}=s(),{data:y}=p(),{backend:S,orgId:C}=o();return h(),t({mutationKey:x,mutationFn:async e=>{let{query:t,conversationInstructions:o,plugins:s,repository:p,workingDir:h,workspaceMode:v,parentConversationId:x,agentType:w,agentProfileId:T}=e,E;try{E=await _.ensureQueryData({queryKey:[...a.all,S.id,C],queryFn:m.listProfiles,...n})}catch{}let D=T??E?.active_agent_profile_id??void 0,O=D?E?.profiles?.find(e=>e.id===D):void 0,k=S.kind===`cloud`,A=D;if(!k&&O?.name==="default"&&O?.agent_kind===`openhands`)A=void 0;else if(O?.agent_kind===`openhands`&&O.llm_profile_ref){let e=!1;try{e=(await _.ensureQueryData({queryKey:[...i.all,S.id,C],queryFn:f.listProfiles,retry:!1})).profiles.some(e=>e.name===O.llm_profile_ref)}catch{}e||(console.warn(`Agent profile "${O.name}" references missing LLM profile "${O.llm_profile_ref}"; launching from agent_settings instead.`),A=void 0)}let j=await u.createConversation({initialUserMsg:t,conversationInstructions:o,plugins:s,metadata:p?{selected_repository:p.name,selected_branch:p.branch??null,git_provider:p.gitProvider}:null,workingDirOverride:h,workspaceMode:v,parentConversationId:x,agentType:w,...A?{agentProfileId:A,agentProfileKind:O?.agent_kind}:{}}),M=j.app_conversation_id,N=s?.map(c)??[],P=N;if(M){let e=[];try{e=await _.ensureQueryData({queryKey:r.installed,queryFn:()=>g.listInstalledPlugins()})}catch{}let t=new Set(N.map(b)),n=e.filter(e=>e.enabled).map(e=>({source:e.source,ref:e.resolved_ref??null,repo_path:e.repo_path??null,name:e.name})).filter(e=>!t.has(b(e)));P=[...N,...n]}let F=A&&O?.agent_kind===`openhands`?O.llm_profile_ref:y?.active_profile??null;if(M&&(F||P.length)){let e=d(M);l(M,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:F??e?.active_profile??null,plugins:P.length?P:e?.plugins??null})}return{conversation_id:j.app_conversation_id?j.app_conversation_id:`task-${j.id}`,session_api_key:null,url:j.agent_server_url,task_id:j.id}},onSuccess:async(e,t)=>{v({conversationId:e.conversation_id,taskId:e.task_id,hasRepository:!!t.repository,gitProvider:t.repository?.gitProvider,hasWorkspace:!!t.workingDir,workspaceMode:t.workspaceMode,hasInitialQuery:!!t.query,agentType:t.agentType,hasParentConversation:!!t.parentConversationId,entryPoint:t.entryPoint}),_.invalidateQueries({queryKey:[`user`,`conversations`]}),_.invalidateQueries({queryKey:[`start-tasks`]})}})};export{v as a,y as i,S as n,b as o,_ as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useMutation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useMutation-BFDQmgk9.js";import{t as r}from"./useQuery-DRv--6bK.js";import{n as i}from"./active-backend-context-IqOjobNK.js";import{t as a}from"./secrets-service-B26R61C1.js";var o=e(t(),1),s=(e={})=>{let{nameContains:t,enabled:n=!0}=e,s=i(),c=r({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:a.getSecrets,enabled:n,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,o.useMemo)(()=>{if(!c.data)return[];if(!t)return c.data;let e=t.toLowerCase();return c.data.filter(t=>t.name.toLowerCase().includes(e))},[c.data,t]),isLoading:c.isLoading,isError:c.isError,hasNextPage:!1,isFetchingNextPage:!1,fetchNextPage:()=>{},onLoadMore:()=>{},refetch:c.refetch}},c=()=>n({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)});export{s as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DRv--6bK.js";var t=()=>e({queryKey:[`user`,`authenticated`],queryFn:async()=>!0,staleTime:1e3*60*5,gcTime:1e3*60*15,retry:!1,meta:{disableToast:!0}});export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{S as n,n as r,u as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{S as n,n as r,u as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{n as a}from"./navigation-context-CQZwH_tC.js";var o=e(t(),1);function s(e,t){let n=r(t);return l({filters:{...e,status:`pending`}},n).length}function c(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function l(e={},t){let a=r(t).getMutationCache(),s=o.useRef(e),l=o.useRef(null);return l.current===null&&(l.current=c(a,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(e=>a.subscribe(()=>{let t=n(l.current,c(a,s.current));l.current!==t&&(l.current=t,i.schedule(e))}),[a]),()=>l.current,()=>l.current)}var u=()=>{let e=a(),t=s({mutationKey:[`create-conversation`]}),{isNavigating:n}=e;return t>0||n};export{s as n,u as t};
|
package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./navigation-context-CQZwH_tC.js";import{t as i}from"./conversation-store-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./navigation-context-CQZwH_tC.js";import{t as i}from"./conversation-store-Blc5xysY.js";var a=e(t()),o=n(),s=e=>(0,o.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,o.jsx)(`path`,{d:`M12 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4`}),(0,o.jsx)(`path`,{d:`M16 3h6v6`}),(0,o.jsx)(`path`,{d:`m16 9 6-6`})]});function c(){let{navigate:e}=r(),t=i(e=>e.setMessageToSend);return(0,a.useCallback)((n,r)=>{r?.(),e(`/conversations`),window.setTimeout(()=>{t(n)},0)},[e,t])}export{s as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DRv--6bK.js";import{M as t,N as n,n as r}from"./active-backend-context-IqOjobNK.js";import{t as i}from"./profiles-service.api-DCMYxHMi.js";function a(a={}){let{backend:o,orgId:s}=r();return e({queryKey:[...n.all,o.id,s],queryFn:i.listProfiles,...t,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{a as t};
|
package/build/assets/{use-manifest-capabilities-zihHDbMW.js → use-manifest-capabilities-DPrQsaPP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t}from"./useQuery-DRv--6bK.js";import{n,z as r}from"./active-backend-context-IqOjobNK.js";import{n as i}from"./use-tracking-CVwPmhlX.js";function a(t){if(e.isAxiosError(t))return t.response?.data;if(t instanceof Error&&`response`in t)return t.response}function o(e,t){let n=a(e);if(n&&typeof n==`object`){let{message:e,detail:t}=n;if(typeof e==`string`&&e)return e;if(typeof t==`string`&&t)return t}return e instanceof Error&&e.message?e.message:t}function s(e,t){return t.filter(t=>!e.includes(t))}function c(e,t){if(!t.ready)return{supported:!1,unmet:[]};let n=[...s(t.features??[],e.requires.features??[]),...s(t.triggerKinds??[],Object.keys(e.setup.form.triggers??{}))];return{supported:n.length===0,unmet:n}}function l(){let{backend:e,orgId:a}=n();return t({queryKey:[...r.capabilities(),e.id,a],queryFn:()=>i.getCapabilities(),retry:!1,staleTime:1e3*60*5,meta:{disableToast:!0}})}function u(e){let t=l();if(t.isLoading)return{capabilities:null,supported:`unknown`,unmet:[],isLoading:!0};if(!t.data)return{capabilities:null,supported:`unknown`,unmet:[],isLoading:!1};let n=c(e,t.data);return{capabilities:t.data,supported:n.supported,unmet:n.unmet,isLoading:!1}}export{o as i,u as n,a as r,l as t};
|
package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-CCE8OQgV.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{C as n,M as r,b as i,f as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t as o}from"./useQueries-DF1NAAeC.js";import{$ as s,B as c,Dt as l,Et as u,Lt as d,Ot as f,Rt as p,Tt as m,X as h}from"./active-backend-context-IqOjobNK.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-4WsUP-tz.js";import{n as g,r as _}from"./organization-service.api-D-s9z18a.js";var v=e(t(),1),y=1e4,b=4e3,x=`Invalid API key`,S=`API key required`,C=`Cloud API key or network issue`,w=`Logged out`;function T(e){return e===x}function E(e){return e===S}function D(e){return e===C}function O(e){return e.kind===`cloud`&&e.authMode!==`cookie`&&!e.apiKey.trim()}function k(e){return e===w}async function A(e){if(e.kind===`cloud`){if(e.authMode!==`cookie`&&!e.apiKey?.trim())throw Error(S);try{e.authMode===`cookie`?await g(e):await _(e)}catch(e){throw r.isAxiosError(e)&&e.response?.status===401||e instanceof n&&e.status===401?Error(w):d(e)?Error(C):e}return!0}try{let t=s({host:e.host,sessionApiKey:e.apiKey||null,timeout:b});await new a(t).getSettings(),c(await new i(t).getServerInfo())}catch(e){throw h(e,401)?Error(x):e}return!0}var j=2,M=300;function N(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function P(e){for(let t=0;;t+=1)try{return await A(e)}catch(e){if(t>=j||!N(e))throw e;await new Promise(e=>{setTimeout(e,M)})}}function F(e,t={}){let{probeDisabledOnce:n=!1}=t,r=v.useSyncExternalStore(f,m,m),i=o({queries:e.map(e=>{let t=r[e.id],i=O(e),a=t?.disabled===!0,o=a&&e.kind===`cloud`&&p(t?.lastError),s=!i&&(!a||n||o);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await P(e);return l(e.id),t}catch(t){throw u(e.id,t),t}},enabled:s,refetchInterval:a||i?!1:y,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!i,refetchOnWindowFocus:!a&&!i,retry:!1,staleTime:a?0:y,meta:{disableToast:!0}}})}),a={};return e.forEach((e,t)=>{let n=i[t],o=r[e.id],s=O(e),c=s?!1:o?.disabled===!0,l=s?0:o?.consecutiveFailures??0,u=s?S:o?.lastError??null,d;d=s||c?!1:n.isSuccess?!0:n.isError?!1:null,a[e.id]={isConnected:d,consecutiveFailures:l,lastError:u,disabled:c}}),a}var I=`openhands-onboarded`;function L(){if(typeof window>`u`)return!0;try{return window.localStorage.getItem(I)!==null}catch{return!0}}function R(){let[e,t]=v.useState(()=>L());return v.useEffect(()=>{let e=e=>{e.key===`openhands-onboarded`&&t(L())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{isCompleted:e,markCompleted:v.useCallback(()=>{try{window.localStorage.setItem(I,`1`)}catch{}t(!0)},[])}}export{E as a,T as i,D as n,F as o,k as r,R as t};
|
package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-CEiak69h.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,u as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t as n}from"./useQuery-DRv--6bK.js";import{$ as r,ct as i}from"./active-backend-context-IqOjobNK.js";function a(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}var o=class{static async getPluginsMarketplace(){if(i().backend.kind===`cloud`)return[];try{return(await new t(r()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(i().backend.kind===`cloud`)return[];try{return(await new t(r()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}static async getPluginFileContent(t,n){if(i().backend.kind===`cloud`)throw Error(`Reading plugin files is only available on a local backend.`);let o=await new e(r()).downloadFile(`${t}/${n}`);return a(o)?{kind:`binary`,text:null}:{kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(o)}}},s=()=>n({queryKey:[`plugins-marketplace`],queryFn:()=>o.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{o as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t}from"./useMutation-BFDQmgk9.js";import{k as n}from"./active-backend-context-IqOjobNK.js";import{n as r}from"./use-agent-profiles-Cb2zUW3l.js";function i(){let i=e();return t({mutationFn:({name:e,profile:t})=>r.saveProfile(e,t),onSuccess:async()=>{await i.invalidateQueries({queryKey:n.all})},meta:{disableToast:!0}})}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t}from"./useMutation-BFDQmgk9.js";import{R as n}from"./active-backend-context-IqOjobNK.js";import{t as r}from"./use-tracking-CVwPmhlX.js";import{t as i}from"./settings-service.api--rJmnuLa.js";import{n as a}from"./use-settings-wCwPaSIv.js";var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let r=t.agent_settings_diff,a=r?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}r&&Object.keys(r).length>0?t.agent_settings_diff=r:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await i.saveSettings(t)},s=(i=`personal`,{retry:s}={})=>{let{trackMcpConfigUpdated:c}=r(),l=e(),{data:u}=a(i);return t({...s===void 0?{}:{retry:s},mutationFn:async e=>{let t=e.mcp_config,n=u?.mcp_config;if(t&&n!==t){let e=Object.values(t);c({sseServersCount:e.filter(e=>e.transport===`sse`).length,stdioServersCount:e.filter(e=>e.transport===`stdio`).length})}await o(e)},onSuccess:async()=>{await l.invalidateQueries({queryKey:n.byScope(i)})},meta:{disableToast:!0}})};export{s as t};
|
package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-BlFL7YhM.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{E as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{D as a,H as o,dt as s,n as c,r as l,xt as u}from"./active-backend-context-B_bg5h9O.js";import{t as d,z as f}from"./utils-DPQfkd-7.js";import{t as p}from"./check-DLOKoFU9.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./npm-Cswluf6-.js";import{t as b}from"./circle-check-CxCYJrpZ.js";import{r as x}from"./map-provider-7Bp2aih5.js";import{t as S}from"./external-link-zWbg5KXS.js";import{t as C}from"./puzzle-B3v361yY.js";import{t as w}from"./refresh-cw-B9GhC3QC.js";import{t as T}from"./use-config-DapX3pjC.js";import{t as E}from"./modal-backdrop-BSzNhM4r.js";import{n as D}from"./modal-body-duRaxj_K.js";import{r as O}from"./base-modal-3NmIOKDm.js";import{t as k}from"./brand-button-CJcwjnfb.js";import{a as A,f as j,o as M,u as N}from"./sidebar-layout-Dxg6zc2K.js";import{t as P}from"./modal-close-button-D0aT02hs.js";import{t as F}from"./u-robot-BvAOA2ZD.js";import{r as I}from"./settings-utils-gw2ppAvw.js";var L=i(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),R=i(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),z=i(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),B=i(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),V=e(t(),1),H=n(),U=2e3,W=[`npm`,`docker`];function G(e){return e===`npm`?f.SETTINGS$VERSION_NPM_RECOMMENDED:f.SETTINGS$VERSION_DOCKER}function K({tab:e}){return e===`npm`?(0,H.jsx)(y,{className:`size-4 shrink-0`,"aria-hidden":!0}):(0,H.jsx)(g,{className:`size-5 shrink-0`,"aria-hidden":!0})}function q(){let{t:e}=r(`openhands`),[t,n]=(0,V.useState)(`npm`),[i,a]=(0,V.useState)(!1),o=(0,V.useRef)(null),s=t===`npm`?m.npm:m.docker;(0,V.useEffect)(()=>()=>{o.current!==null&&window.clearTimeout(o.current)},[]),(0,V.useEffect)(()=>{a(!1),o.current!==null&&(window.clearTimeout(o.current),o.current=null)},[t]);let c=(0,V.useCallback)(()=>{navigator.clipboard?.writeText(s),a(!0),o.current!==null&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{a(!1),o.current=null},U)},[s]);return(0,H.jsxs)(`div`,{className:`w-full`,children:[(0,H.jsx)(`div`,{className:`flex justify-center`,children:W.map(r=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>n(r),className:d(`inline-flex items-center gap-1.5 px-3 pb-2 text-sm font-medium`,t===r?`border-b border-white text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[(0,H.jsx)(K,{tab:r}),e(G(r))]},r))}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-4 py-3`,children:[(0,H.jsx)(`code`,{"data-testid":t===`npm`?`agent-canvas-update-command-npm`:`agent-canvas-update-command-docker`,className:`min-w-0 flex-1 overflow-visible whitespace-nowrap font-mono text-sm text-white`,children:s}),(0,H.jsx)(`button`,{type:`button`,"data-testid":`copy-to-clipboard`,onClick:c,"aria-label":e(i?f.BUTTON$COPIED:f.SETTINGS$VERSION_COPY_COMMAND),disabled:i,className:`shrink-0 text-[var(--oh-muted)] hover:text-white disabled:hover:text-[var(--oh-muted)]`,children:i?(0,H.jsx)(p,{className:`size-4 text-[var(--oh-status-success)]`,"aria-hidden":!0}):(0,H.jsx)(x,{className:`size-4`,"aria-hidden":!0})})]})]})}function J({onClose:e,latestVersion:t,isPending:n,isFetching:i,updateAvailable:o,upToDate:s,onCheckForUpdates:c}){let{t:l}=r(`openhands`);return(0,H.jsx)(E,{onClose:e,children:(0,H.jsxs)(D,{width:`md`,className:`relative flex max-h-[80vh] flex-col items-start overflow-auto border border-[var(--oh-border)]`,testID:`agent-canvas-update-modal`,children:[(0,H.jsx)(P,{onClose:e,testId:`close-agent-canvas-update-modal`}),(0,H.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pr-10`,children:[(0,H.jsx)(O,{title:l(f.SETTINGS$APP_UPDATE_CARD_TITLE)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,H.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:l(f.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,H.jsx)(`span`,{className:`text-white`,children:a})]})]}),(0,H.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,H.jsx)(k,{testId:`agent-canvas-update-check-button`,type:`button`,variant:`secondary`,className:`w-full`,isDisabled:i,"aria-busy":i,onClick:c,startContent:(0,H.jsx)(w,{className:d(`size-4`,i&&`animate-spin`),"aria-hidden":!0}),children:l(f.SETTINGS$APP_UPDATE_CHECK_BUTTON)}),(0,H.jsx)(`div`,{"data-testid":`agent-canvas-update-status`,className:`w-full`,children:n||i?(0,H.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:l(f.SETTINGS$APP_UPDATE_CHECKING)}):o?(0,H.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[#3B82F6]/30 bg-[#1E3A5F] px-3 py-2 text-xs text-[#3B82F6]`,children:[(0,H.jsx)(_,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,H.jsxs)(`span`,{children:[l(f.SETTINGS$APP_UPDATE_AVAILABLE_MESSAGE,{version:t}),` `,(0,H.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:h,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 whitespace-nowrap font-medium text-white hover:text-[var(--oh-text)]`,children:[l(f.SETTINGS$VERSION_RELEASE_NOTES),(0,H.jsx)(S,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]})]})]}):s?(0,H.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--oh-status-success)]/30 bg-[var(--oh-status-success)]/10 px-3 py-2 text-xs text-[var(--oh-status-success)]`,children:[(0,H.jsx)(b,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,H.jsxs)(`span`,{children:[l(f.SETTINGS$APP_UPDATE_LATEST_MESSAGE),` `,(0,H.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:h,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 whitespace-nowrap font-medium text-white hover:text-[var(--oh-text)]`,children:[l(f.SETTINGS$VERSION_RELEASE_NOTES),(0,H.jsx)(S,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]})]})]}):(0,H.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:l(f.SETTINGS$APP_UPDATE_CHECK_FAILED)})}),o?(0,H.jsxs)(`div`,{className:`flex w-full flex-col border-t border-[var(--oh-border)] pt-3`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium text-white`,children:l(f.SETTINGS$APP_UPDATE_HOW_TO_UPDATE)}),(0,H.jsx)(`span`,{className:`mt-1 mb-4 text-sm text-[var(--oh-text-dim)]`,children:l(f.SETTINGS$APP_UPDATE_RUN_COMMANDS)}),(0,H.jsx)(q,{})]}):null]})]})})}function Y({hideWhenUpToDate:e=!1}){let{t}=r(`openhands`),[n,i]=(0,V.useState)(!1),s=u()!==null,c=v({enabled:!s});if(s)return null;let l=c.data,p=l===void 0?null:o(l,a),m=p===1,h=p!==null&&p<=0;return e&&!m?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`section`,{"data-testid":`agent-canvas-update-card`,children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),"aria-haspopup":`dialog`,"data-testid":`agent-canvas-update-toggle`,className:`flex w-full cursor-pointer flex-col gap-1 rounded-md border border-[var(--oh-border)] bg-base-secondary px-3 py-2 text-left hover:bg-[var(--oh-surface-raised)]`,children:[(0,H.jsxs)(`span`,{className:`flex w-full items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`flex-1 truncate text-sm font-semibold leading-5 text-white`,children:t(f.SETTINGS$APP_UPDATE_CARD_TITLE)}),p!==null&&(0,H.jsxs)(`span`,{"data-testid":`agent-canvas-update-badge`,className:d(`inline-flex shrink-0 items-center gap-1 text-[10px] font-medium leading-none`,m?`rounded-full border border-transparent bg-[#1E3A5F] px-1.5 py-0.5 text-[#3B82F6]`:`text-success`),children:[m?(0,H.jsx)(_,{className:`size-3 shrink-0`,"aria-hidden":!0}):(0,H.jsx)(b,{className:`size-3 shrink-0`,"aria-hidden":!0}),t(m?f.SETTINGS$APP_UPDATE_BADGE_UPDATE_AVAILABLE:f.SETTINGS$APP_UPDATE_BADGE_UP_TO_DATE)]})]}),(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs leading-5 text-[var(--oh-muted)]`,children:[(0,H.jsx)(`span`,{children:t(f.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,H.jsx)(`span`,{className:`text-white`,children:a})]})]})}),n&&(0,H.jsx)(J,{onClose:()=>i(!1),latestVersion:l,isPending:c.isPending,isFetching:c.isFetching,updateAvailable:m,upToDate:h,onCheckForUpdates:()=>c.refetch()})]})}function X(){let{t:e}=r(`openhands`),{active:t}=l(),{backend:n}=t;return s(n)||n.kind!==`cloud`?null:(0,H.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${n.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:d(j({collapsed:!1}),M.idle),children:[(0,H.jsx)(`span`,{className:A,children:(0,H.jsx)(z,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,H.jsx)(`span`,{className:d(N(!1),`flex-1`),children:e(f.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,H.jsx)(S,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}function Z(){let{t:e}=r(`openhands`),{active:t}=l(),{backend:n}=t;return s(n)||n.kind!==`cloud`?null:(0,H.jsxs)(`a`,{"data-testid":`settings-integrations-link`,href:`${n.host.replace(/\/+$/,``)}/settings/integrations`,target:`_blank`,rel:`noopener noreferrer`,className:d(j({collapsed:!1}),M.idle),children:[(0,H.jsx)(`span`,{className:A,children:(0,H.jsx)(C,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,H.jsx)(`span`,{className:d(N(!1),`flex-1`),children:e(f.SETTINGS$INTEGRATIONS_SETTINGS_LINK)}),(0,H.jsx)(S,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}var Q=[{icon:(0,H.jsx)(F,{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,H.jsx)(e=>(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,H.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`},{icon:(0,H.jsx)(e=>(0,H.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,H.jsx)(`defs`,{children:(0,H.jsx)(`style`,{children:`
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{D as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{D as a,H as o,dt as s,n as c,r as l,xt as u}from"./active-backend-context-IqOjobNK.js";import{t as d,z as f}from"./utils-zxEjKE70.js";import{t as p}from"./check-WAFXrrs_.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./npm-DLckoeJc.js";import{t as b}from"./circle-check-CtnimJa8.js";import{r as x}from"./map-provider-Mx8mZuE-.js";import{t as S}from"./external-link-CgtpA_a1.js";import{t as C}from"./puzzle-BWLmN8z4.js";import{t as w}from"./refresh-cw-CXtFWpwv.js";import{t as T}from"./use-config-DKAMiI5R.js";import{t as E}from"./modal-backdrop-BSzNhM4r.js";import{n as D}from"./modal-body-gIe21fDv.js";import{r as O}from"./base-modal-Fnh6Uln9.js";import{t as k}from"./brand-button-swT1RyO0.js";import{a as A,f as j,o as M,u as N}from"./sidebar-layout-Bhi3hVcu.js";import{t as P}from"./modal-close-button-B6iOGYpI.js";import{t as F}from"./u-robot-BvAOA2ZD.js";import{r as I}from"./settings-utils-Ba7vel6T.js";var L=i(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),R=i(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),z=i(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),B=i(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),V=e(t(),1),H=n(),U=2e3,W=[`npm`,`docker`];function G(e){return e===`npm`?f.SETTINGS$VERSION_NPM_RECOMMENDED:f.SETTINGS$VERSION_DOCKER}function K({tab:e}){return e===`npm`?(0,H.jsx)(y,{className:`size-4 shrink-0`,"aria-hidden":!0}):(0,H.jsx)(g,{className:`size-5 shrink-0`,"aria-hidden":!0})}function q(){let{t:e}=r(`openhands`),[t,n]=(0,V.useState)(`npm`),[i,a]=(0,V.useState)(!1),o=(0,V.useRef)(null),s=t===`npm`?m.npm:m.docker;(0,V.useEffect)(()=>()=>{o.current!==null&&window.clearTimeout(o.current)},[]),(0,V.useEffect)(()=>{a(!1),o.current!==null&&(window.clearTimeout(o.current),o.current=null)},[t]);let c=(0,V.useCallback)(()=>{navigator.clipboard?.writeText(s),a(!0),o.current!==null&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{a(!1),o.current=null},U)},[s]);return(0,H.jsxs)(`div`,{className:`w-full`,children:[(0,H.jsx)(`div`,{className:`flex justify-center`,children:W.map(r=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>n(r),className:d(`inline-flex items-center gap-1.5 px-3 pb-2 text-sm font-medium`,t===r?`border-b border-white text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[(0,H.jsx)(K,{tab:r}),e(G(r))]},r))}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-4 py-3`,children:[(0,H.jsx)(`code`,{"data-testid":t===`npm`?`agent-canvas-update-command-npm`:`agent-canvas-update-command-docker`,className:`min-w-0 flex-1 overflow-visible whitespace-nowrap font-mono text-sm text-white`,children:s}),(0,H.jsx)(`button`,{type:`button`,"data-testid":`copy-to-clipboard`,onClick:c,"aria-label":e(i?f.BUTTON$COPIED:f.SETTINGS$VERSION_COPY_COMMAND),disabled:i,className:`shrink-0 text-[var(--oh-muted)] hover:text-white disabled:hover:text-[var(--oh-muted)]`,children:i?(0,H.jsx)(p,{className:`size-4 text-[var(--oh-status-success)]`,"aria-hidden":!0}):(0,H.jsx)(x,{className:`size-4`,"aria-hidden":!0})})]})]})}function J({onClose:e,latestVersion:t,isPending:n,isFetching:i,updateAvailable:o,upToDate:s,onCheckForUpdates:c}){let{t:l}=r(`openhands`);return(0,H.jsx)(E,{onClose:e,children:(0,H.jsxs)(D,{width:`md`,className:`relative flex max-h-[80vh] flex-col items-start overflow-auto border border-[var(--oh-border)]`,testID:`agent-canvas-update-modal`,children:[(0,H.jsx)(P,{onClose:e,testId:`close-agent-canvas-update-modal`}),(0,H.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pr-10`,children:[(0,H.jsx)(O,{title:l(f.SETTINGS$APP_UPDATE_CARD_TITLE)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,H.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:l(f.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,H.jsx)(`span`,{className:`text-white`,children:a})]})]}),(0,H.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,H.jsx)(k,{testId:`agent-canvas-update-check-button`,type:`button`,variant:`secondary`,className:`w-full`,isDisabled:i,"aria-busy":i,onClick:c,startContent:(0,H.jsx)(w,{className:d(`size-4`,i&&`animate-spin`),"aria-hidden":!0}),children:l(f.SETTINGS$APP_UPDATE_CHECK_BUTTON)}),(0,H.jsx)(`div`,{"data-testid":`agent-canvas-update-status`,className:`w-full`,children:n||i?(0,H.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:l(f.SETTINGS$APP_UPDATE_CHECKING)}):o?(0,H.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[#3B82F6]/30 bg-[#1E3A5F] px-3 py-2 text-xs text-[#3B82F6]`,children:[(0,H.jsx)(_,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,H.jsxs)(`span`,{children:[l(f.SETTINGS$APP_UPDATE_AVAILABLE_MESSAGE,{version:t}),` `,(0,H.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:h,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 whitespace-nowrap font-medium text-white hover:text-[var(--oh-text)]`,children:[l(f.SETTINGS$VERSION_RELEASE_NOTES),(0,H.jsx)(S,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]})]})]}):s?(0,H.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--oh-status-success)]/30 bg-[var(--oh-status-success)]/10 px-3 py-2 text-xs text-[var(--oh-status-success)]`,children:[(0,H.jsx)(b,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,H.jsxs)(`span`,{children:[l(f.SETTINGS$APP_UPDATE_LATEST_MESSAGE),` `,(0,H.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:h,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 whitespace-nowrap font-medium text-white hover:text-[var(--oh-text)]`,children:[l(f.SETTINGS$VERSION_RELEASE_NOTES),(0,H.jsx)(S,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]})]})]}):(0,H.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:l(f.SETTINGS$APP_UPDATE_CHECK_FAILED)})}),o?(0,H.jsxs)(`div`,{className:`flex w-full flex-col border-t border-[var(--oh-border)] pt-3`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium text-white`,children:l(f.SETTINGS$APP_UPDATE_HOW_TO_UPDATE)}),(0,H.jsx)(`span`,{className:`mt-1 mb-4 text-sm text-[var(--oh-text-dim)]`,children:l(f.SETTINGS$APP_UPDATE_RUN_COMMANDS)}),(0,H.jsx)(q,{})]}):null]})]})})}function Y({hideWhenUpToDate:e=!1}){let{t}=r(`openhands`),[n,i]=(0,V.useState)(!1),s=u()!==null,c=v({enabled:!s});if(s)return null;let l=c.data,p=l===void 0?null:o(l,a),m=p===1,h=p!==null&&p<=0;return e&&!m?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`section`,{"data-testid":`agent-canvas-update-card`,children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),"aria-haspopup":`dialog`,"data-testid":`agent-canvas-update-toggle`,className:`flex w-full cursor-pointer flex-col gap-1 rounded-md border border-[var(--oh-border)] bg-base-secondary px-3 py-2 text-left hover:bg-[var(--oh-surface-raised)]`,children:[(0,H.jsxs)(`span`,{className:`flex w-full items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`flex-1 truncate text-sm font-semibold leading-5 text-white`,children:t(f.SETTINGS$APP_UPDATE_CARD_TITLE)}),p!==null&&(0,H.jsxs)(`span`,{"data-testid":`agent-canvas-update-badge`,className:d(`inline-flex shrink-0 items-center gap-1 text-[10px] font-medium leading-none`,m?`rounded-full border border-transparent bg-[#1E3A5F] px-1.5 py-0.5 text-[#3B82F6]`:`text-success`),children:[m?(0,H.jsx)(_,{className:`size-3 shrink-0`,"aria-hidden":!0}):(0,H.jsx)(b,{className:`size-3 shrink-0`,"aria-hidden":!0}),t(m?f.SETTINGS$APP_UPDATE_BADGE_UPDATE_AVAILABLE:f.SETTINGS$APP_UPDATE_BADGE_UP_TO_DATE)]})]}),(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs leading-5 text-[var(--oh-muted)]`,children:[(0,H.jsx)(`span`,{children:t(f.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,H.jsx)(`span`,{className:`text-white`,children:a})]})]})}),n&&(0,H.jsx)(J,{onClose:()=>i(!1),latestVersion:l,isPending:c.isPending,isFetching:c.isFetching,updateAvailable:m,upToDate:h,onCheckForUpdates:()=>c.refetch()})]})}function X(){let{t:e}=r(`openhands`),{active:t}=l(),{backend:n}=t;return s(n)||n.kind!==`cloud`?null:(0,H.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${n.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:d(j({collapsed:!1}),M.idle),children:[(0,H.jsx)(`span`,{className:A,children:(0,H.jsx)(z,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,H.jsx)(`span`,{className:d(N(!1),`flex-1`),children:e(f.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,H.jsx)(S,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}function Z(){let{t:e}=r(`openhands`),{active:t}=l(),{backend:n}=t;return s(n)||n.kind!==`cloud`?null:(0,H.jsxs)(`a`,{"data-testid":`settings-integrations-link`,href:`${n.host.replace(/\/+$/,``)}/settings/integrations`,target:`_blank`,rel:`noopener noreferrer`,className:d(j({collapsed:!1}),M.idle),children:[(0,H.jsx)(`span`,{className:A,children:(0,H.jsx)(C,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,H.jsx)(`span`,{className:d(N(!1),`flex-1`),children:e(f.SETTINGS$INTEGRATIONS_SETTINGS_LINK)}),(0,H.jsx)(S,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}var Q=[{icon:(0,H.jsx)(F,{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,H.jsx)(e=>(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,H.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`},{icon:(0,H.jsx)(e=>(0,H.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,H.jsx)(`defs`,{children:(0,H.jsx)(`style`,{children:`
|
|
2
2
|
.st0 {
|
|
3
3
|
stroke-miterlimit: 10;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t}from"./useQuery-DRv--6bK.js";import{R as n,dt as r,n as i}from"./active-backend-context-IqOjobNK.js";import{t as a}from"./settings-CWFxymAf.js";import{l as o,t as s}from"./settings-service.api--rJmnuLa.js";var c=(...e)=>e.find(e=>typeof e==`boolean`),l=(...e)=>e.find(e=>typeof e==`number`),u=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},d=t=>{if(typeof t==`object`&&t&&`status`in t){let{status:e}=t;if(typeof e==`number`)return e}if(e.isAxiosError(t))return t.response?.status},f=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},p=(e,t,n,r=!1)=>{let i=f(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},m=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}},r=t.mcp_config===void 0?e.mcp_config??a.mcp_config:o(t.mcp_config);return{...a,...e,llm_model:p(t,`llm.model`,a.llm_model),llm_base_url:p(t,`llm.base_url`,a.llm_base_url,!0),agent:p(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:c(n.confirmation_mode)??a.confirmation_mode,security_analyzer:u(n.security_analyzer)??a.security_analyzer,max_iterations:l(n.max_iterations)??a.max_iterations,enable_default_condenser:c(f(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:l(f(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:r,search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||a.git_user_name,git_user_email:e.git_user_email||a.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??a.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??a.agent_settings,conversation_settings_schema:e.conversation_settings_schema??a.conversation_settings_schema,conversation_settings:n}},h=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return m(await s.getSettings())},g=(e=`personal`)=>{let o=i(),s=!r(o.backend),c=t({queryKey:[...n.byScope(e),o.backend.id,o.orgId],queryFn:()=>h(e),retry:(e,t)=>d(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?d(c.error)===404?{data:a,error:c.error,isError:c.isError,isLoading:c.isLoading,isFetching:c.isFetching,isFetched:c.isFetched,isSuccess:c.isSuccess,status:c.status,fetchStatus:c.fetchStatus,refetch:c.refetch}:c:{data:a,error:null,isError:!1,isLoading:!1,isFetching:!1,isFetched:!1,isSuccess:!0,status:`success`,fetchStatus:`idle`,refetch:c.refetch}};export{g as n,d as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{j as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{O as r,Q as i,T as a,W as o,a as s,b as c,ct as l,d as u,dt as ee,f as te,h as d,lt as ne,n as re,p as ie,w as ae}from"./active-backend-context-B_bg5h9O.js";import{t as f}from"./proxy-b4aqL4SX.js";import{t as oe}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js";import{n as se,t as p}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js";var m=e(t(),1),ce=new Map(oe.map(e=>[e.name,e]));function le(e){return Object.keys(e.requires.integrations)}function ue(e){return Object.entries(e.requires.integrations).filter(([,e])=>e.required!==!1).map(([e])=>e)}function h(e){return ce.get(e.skill??e.id)?.triggers[0]??null}function de(e){return h(e)??`Set up the ${e.name} automation`}var fe=[`form`,`automation`],pe=[`list`,`templates`],me=[`layout-dashboard`,`sparkles`,`bot`,`circle-alert`,`activity`,`timer`],he=[`automations`,`needs-attention`,`total-runs`,`average-duration`],ge={automations:[`active`],"needs-attention":[],"total-runs":[],"average-duration":[]},g={status:[`all`,`active`,`failing`,`disabled`],trigger:[`all`,`schedule`,`event`]},_e=Object.keys(g),ve=[`last-run`,`runs`,`name`],ye=/<[A-Za-z/!]/,be=/^[a-z0-9]+(-[a-z0-9]+)*$/,_=`https://docs.openhands.dev/`,xe=/^[a-z][a-z-]*$/,Se=/^\.[a-z][a-z.]*json$/,Ce=/^[a-z0-9][a-z0-9.-]*$/,we=/^\/[A-Za-z0-9/{}_-]*$/,Te=/^[^{}]*\{id\}[^{}]*$/,Ee=[`github`,`gitlab`,`bitbucket`],v={name:{type:`text`,required:!0},prompt:{type:`textarea`,required:!1},model:{type:`llm-profile`,required:!1},timeout:{type:`number`,required:!1},schedule:{type:`schedule`,required:!1}},De=Object.keys(v),y=[`list`,`health`,`capabilities`,`validate`,`createPrompt`,`createPlugin`],b=[`detail`,`dispatch`,`runs`,`tarball`];function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function S(e,t){return typeof e==`string`&&t.includes(e)}var Oe=class{errors=[];fail(e,t){return this.errors.push(`${e}: ${t}`),!1}copy(e,t){return typeof e!=`string`||e.length===0?this.fail(t,`must be a non-empty string`):ye.test(e)?this.fail(t,`must not contain markup`):!0}closed(e,t,n){Object.keys(e).filter(e=>!t.includes(e)).forEach(e=>this.fail(`${n}.${e}`,`is not allowed`))}record(e,t){return x(e)?!0:(this.fail(t,`must be an object`),!1)}};function ke(e,t,n){e.record(t,`routes`)&&(e.closed(t,[`list`,`setup`,`detail`,`templates`],`routes`),[`list`,`setup`,`detail`].forEach(r=>{t[r]!==n[r]&&e.fail(`routes.${r}`,`must be "${n[r]}"`)}),t.templates!==void 0&&t.templates!==n.templates&&e.fail(`routes.templates`,n.templates===void 0?`is not a route this host mounts`:`must be "${n.templates}"`))}function Ae(e,t){if(!Array.isArray(t)||t.length===0){e.fail(`navigation.subPages`,`must be a non-empty array`);return}let n=new Set;t.forEach((t,r)=>{let i=`navigation.subPages[${r}]`;if(!e.record(t,i))return;e.closed(t,[`page`,`label`,`icon`],i);let{page:a,label:o,icon:s}=t;S(a,pe)?n.has(a)?e.fail(`${i}.page`,`repeats a page`):n.add(a):e.fail(`${i}.page`,`is not a sub-page this host serves`),e.copy(o,`${i}.label`),je(e,s,`${i}.icon`)})}function je(e,t,n){S(t,me)||e.fail(n,`is not an icon this host ships`)}function Me(e,t){if(e.record(t,`navigation`)){if(e.closed(t,[`sidebar`,`commandMenu`,`subPages`],`navigation`),e.record(t.sidebar,`navigation.sidebar`)&&(e.closed(t.sidebar,[`label`],`navigation.sidebar`),e.copy(t.sidebar.label,`navigation.sidebar.label`)),e.record(t.commandMenu,`navigation.commandMenu`)){let n=t.commandMenu;e.closed(n,[`title`,`description`,`keywords`],`navigation.commandMenu`),e.copy(n.title,`navigation.commandMenu.title`),e.copy(n.description,`navigation.commandMenu.description`),e.copy(n.keywords,`navigation.commandMenu.keywords`)}t.subPages!==void 0&&Ae(e,t.subPages)}}function Ne(e,t){e.record(t,`pages`)&&(e.closed(t,[`list`,`detail`,`edit`,`templates`],`pages`),e.record(t.list,`pages.list`)&&(e.closed(t.list,[`title`,`subtitle`,`overview`,`filters`,`sort`,`insights`],`pages.list`),e.copy(t.list.title,`pages.list.title`),e.copy(t.list.subtitle,`pages.list.subtitle`),t.list.overview!==void 0&&Pe(e,t.list.overview),t.list.filters!==void 0&&Le(e,t.list.filters),t.list.sort!==void 0&&Be(e,t.list.sort),t.list.insights!==void 0&&Ve(e,t.list.insights)),e.record(t.detail,`pages.detail`)&&(e.closed(t.detail,[`backLabel`],`pages.detail`),e.copy(t.detail.backLabel,`pages.detail.backLabel`)),e.record(t.edit,`pages.edit`)&&(e.closed(t.edit,[`title`],`pages.edit`),e.copy(t.edit.title,`pages.edit.title`)),t.templates!==void 0&&He(e,t.templates))}function Pe(e,t){let n=`pages.list.overview`;if(!e.record(t,n))return;e.closed(t,[`label`,`tiles`],n),e.copy(t.label,`${n}.label`);let{tiles:r}=t;if(!Array.isArray(r)||r.length===0){e.fail(`${n}.tiles`,`must be a non-empty array`);return}let i=new Set;r.forEach((t,r)=>{Fe(e,t,i,`${n}.tiles[${r}]`)})}function Fe(e,t,n,r){if(!e.record(t,r))return;e.closed(t,[`metric`,`label`,`detail`,`zeroDetail`,`icon`],r);let{metric:i,label:a,detail:o,zeroDetail:s,icon:c}=t;if(e.copy(a,`${r}.label`),je(e,c,`${r}.icon`),!S(i,he)){e.fail(`${r}.metric`,`is not a metric this host computes`),e.copy(o,`${r}.detail`),s!==void 0&&e.copy(s,`${r}.zeroDetail`);return}n.has(i)?e.fail(`${r}.metric`,`repeats a metric`):n.add(i),Ie(e,o,i,`${r}.detail`),s!==void 0&&Ie(e,s,i,`${r}.zeroDetail`)}function Ie(e,t,n,r){if(!e.copy(t,r))return;let i=ge[n];(i.length===0?/\{\{/:RegExp(`\\{\\{(?!(?:${i.join(`|`)})\\}\\})`)).test(t)&&e.fail(r,`uses a placeholder this metric does not expose`)}function Le(e,t){let n=`pages.list.filters`;if(!Array.isArray(t)||t.length===0){e.fail(n,`must be a non-empty array`);return}let r=new Set;t.forEach((t,i)=>{Re(e,t,r,`${n}[${i}]`)})}function Re(e,t,n,r){if(!e.record(t,r))return;e.closed(t,[`id`,`label`,`options`],r);let{id:i,label:a,options:o}=t;if(e.copy(a,`${r}.label`),!S(i,_e)){e.fail(`${r}.id`,`is not a filter this host implements`);return}n.has(i)?e.fail(`${r}.id`,`repeats a filter`):n.add(i),ze(e,o,g[i],`${r}.options`)}function ze(e,t,n,r){if(!Array.isArray(t)||t.length<2){e.fail(r,`must offer at least two options`);return}let i=new Set;t.forEach((t,a)=>{let o=`${r}[${a}]`;if(!e.record(t,o))return;e.closed(t,[`value`,`label`],o);let{value:s,label:c}=t;S(s,n)?i.has(s)?e.fail(`${o}.value`,`repeats a value`):i.add(s):e.fail(`${o}.value`,`is not a value this host implements`),e.copy(c,`${o}.label`)}),i.has(`all`)||e.fail(r,`must offer the "all" option`)}function Be(e,t){let n=`pages.list.sort`;if(!e.record(t,n))return;e.closed(t,[`label`,`options`,`default`],n);let{label:r,options:i,default:a}=t;e.copy(r,`${n}.label`);let o=new Set;!Array.isArray(i)||i.length===0?e.fail(`${n}.options`,`must be a non-empty array`):i.forEach((t,r)=>{let i=`${n}.options[${r}]`;e.record(t,i)&&(e.closed(t,[`value`,`label`],i),S(t.value,ve)?o.has(t.value)?e.fail(`${i}.value`,`repeats a value`):o.add(t.value):e.fail(`${i}.value`,`is not a sort this host implements`),e.copy(t.label,`${i}.label`))}),(typeof a!=`string`||!o.has(a))&&e.fail(`${n}.default`,`must be one of the declared option values`)}var C={health:[`healthy`,`failing`,`running`,`disabled`,`neverRun`,`checking`],lastRun:[`label`,`never`,`justNow`],stats:[`runs`,`recentSuccess`,`averageDuration`]};function Ve(e,t){let n=`pages.list.insights`;e.record(t,n)&&(e.closed(t,Object.keys(C),n),Object.keys(C).forEach(r=>{let i=`${n}.${r}`,a=t[r];if(!e.record(a,i))return;let o=C[r];e.closed(a,o,i),o.forEach(t=>{e.copy(a[t],`${i}.${t}`)})}))}function He(e,t){let n=`pages.templates`;e.record(t,n)&&(e.closed(t,[`title`,`description`],n),e.copy(t.title,`${n}.title`),e.copy(t.description,`${n}.description`))}function Ue(e,t){let n=x(t.routes)?t.routes:{},r=x(t.navigation)?t.navigation:{},i=x(t.pages)?t.pages:{},a=x(i.list)?i.list:{},o=[[`routes.templates`,n.templates],[`navigation.subPages`,r.subPages],[`pages.templates`,i.templates],[`pages.list.overview`,a.overview],[`pages.list.filters`,a.filters],[`pages.list.sort`,a.sort],[`pages.list.insights`,a.insights]],s=o.filter(([,e])=>e===void 0).map(([e])=>e);s.length===0||s.length===o.length||e.fail(`interface`,`the sub-page surface must be declared whole; missing ${s.join(`, `)}`)}function We(e,t,n,r){if(!e.record(n,r))return;e.closed(n,[`type`,`label`,`help`,`required`,`constraints`],r);let{type:i,label:a,help:o,required:s,constraints:c}=n;if(i!==t.type&&e.fail(`${r}.type`,`must be "${t.type}", the control this host renders`),e.copy(a,`${r}.label`),o!==void 0&&e.copy(o,`${r}.help`),s!==t.required&&e.fail(`${r}.required`,`must be ${t.required}, what this host enforces`),c!==void 0){if(t.type!==`number`)e.fail(`${r}.constraints`,`is only allowed on a number attribute`);else if(e.record(c,`${r}.constraints`)){e.closed(c,[`min`,`max`],`${r}.constraints`);let{min:t,max:n}=c;t!==void 0&&t!==1&&e.fail(`${r}.constraints.min`,`must be the 1 this host enforces`),n!==void 0&&(!Number.isInteger(n)||n<1)&&e.fail(`${r}.constraints.max`,`must be a positive integer`)}}}function Ge(e,t){if(!e.record(t,`attributes`))return;let n=Object.keys(t);n.length===0&&e.fail(`attributes`,`must declare at least one attribute`),n.forEach(n=>{if(!De.includes(n)){e.fail(`attributes.${n}`,`is not a settable attribute`);return}We(e,v[n],t[n],`attributes.${n}`)})}function Ke(e,t){if(!e.record(t,`importExport`))return;e.closed(t,[`fileKind`,`fileVersion`,`filenameSuffix`,`importDefaults`],`importExport`);let{fileKind:n,fileVersion:r,filenameSuffix:i,importDefaults:a}=t;(typeof n!=`string`||!xe.test(n))&&e.fail(`importExport.fileKind`,`must be a lowercase slug`),r!==1&&e.fail(`importExport.fileVersion`,`must be 1`),(typeof i!=`string`||!Se.test(i))&&e.fail(`importExport.filenameSuffix`,`must be a .json suffix`),e.record(a,`importExport.importDefaults`)&&(e.closed(a,[`repoProvider`,`placeholderEventSource`],`importExport.importDefaults`),(typeof a.repoProvider!=`string`||!Ee.includes(a.repoProvider))&&e.fail(`importExport.importDefaults.repoProvider`,`is not a supported provider`),(typeof a.placeholderEventSource!=`string`||!Ce.test(a.placeholderEventSource))&&e.fail(`importExport.importDefaults.placeholderEventSource`,`must be a lowercase event source`))}function qe(e,t){if(!e.record(t,`endpoints`))return;let n=[...y,...b];e.closed(t,n,`endpoints`);let r=n=>{let r=t[n];return typeof r!=`string`||!we.test(r)||r.includes(`//`)?(e.fail(`endpoints.${n}`,`must be a rooted service-relative path`),null):r};y.forEach(t=>{let n=r(t);n!==null&&/[{}]/.test(n)&&e.fail(`endpoints.${t}`,`must not carry a substitution`)}),b.forEach(t=>{let n=r(t);n!==null&&!Te.test(n)&&e.fail(`endpoints.${t}`,`must carry exactly one {id}`)})}function w(e,t,n){if(!Array.isArray(t)||t.length===0)return e.fail(n,`must be a non-empty array`),[];let r=t.filter(t=>typeof t==`string`&&be.test(t)?!0:(e.fail(n,`must contain only lowercase slugs`),!1));return new Set(r).size!==r.length&&e.fail(n,`must not repeat an id`),r}var Je=[`version`,`routes`,`navigation`,`pages`,`docsUrl`,`attributes`,`importExport`,`endpoints`,`featuredAutomationIds`,`responderIntegrationIds`];function Ye(e,t){if(!x(e))return{valid:!1,errors:[`interface: must be an object`]};if(e.version!==`1.0`)return{valid:!1,errors:[`interface.version: must be "1.0"`]};let n=new Oe;return n.closed(e,Je,`interface`),ke(n,e.routes,t.mountedRoutes),Me(n,e.navigation),Ne(n,e.pages),(typeof e.docsUrl!=`string`||!e.docsUrl.startsWith(_))&&n.fail(`docsUrl`,`must start with ${_}`),Ge(n,e.attributes),Ke(n,e.importExport),qe(n,e.endpoints),w(n,e.featuredAutomationIds,`featuredAutomationIds`).forEach(e=>{t.catalogIds.has(e)||n.fail(`featuredAutomationIds`,`${e} is not a catalog entry`)}),w(n,e.responderIntegrationIds,`responderIntegrationIds`),Ue(n,e),{valid:n.errors.length===0,errors:n.errors}}var T=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xe=/^[a-z][A-Za-z0-9]*$/,Ze=/<[A-Za-z/!]/,Qe=RegExp(`\\{\\{(?!(?:${fe.join(`|`)})\\.[A-Za-z0-9_.]+\\}\\})`),$e=[`direct`,`assisted`],et=[`text`,`textarea`,`select`,`cron`,`timezone`,`repo-picker`],tt=[`github`,`gitlab`,`bitbucket`],nt=[`cron`,`event`],rt=[`safeExpressionLiteral`],E=2e3;function D(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function O(e,t){return typeof e==`string`&&t.includes(e)}function it(e,t){return typeof e==`number`&&Number.isInteger(e)&&e>=t}var at=class{errors=[];fail(e,t){return this.errors.push(`${e}: ${t}`),!1}copy(e,t){return typeof e!=`string`||e.length===0?this.fail(t,`must be a non-empty string`):Ze.test(e)?this.fail(t,`must not contain markup`):!0}placeholders(e,t){return Qe.test(e)?this.fail(t,`uses an unknown placeholder namespace`):!0}templateCopy(e,t){return this.copy(e,t)&&this.placeholders(e,t)}templateValue(e,t){return typeof e!=`string`||e.length===0?this.fail(t,`must be a non-empty string`):this.placeholders(e,t)}absent(e,t,n,r){return t in e?this.fail(`${n}.${t}`,r):!0}};function ot(e,t){if(!D(t)){e.fail(`requires`,`must be an object`);return}let{integrations:n,features:r}=t;!D(n)||Object.keys(n).length===0?e.fail(`requires.integrations`,`must be a non-empty object`):Object.entries(n).forEach(([t,n])=>{let r=`requires.integrations.${t}`;if(!D(n)){e.fail(r,`must be an object`);return}e.copy(n.message,`${r}.message`),`required`in n&&n.required!==!1&&e.fail(`${r}.required`,`may only be false`);let i=[`message`,`required`];Object.keys(n).filter(e=>!i.includes(e)).forEach(t=>e.fail(`${r}.${t}`,`is not allowed`))}),r!==void 0&&(!Array.isArray(r)||r.length===0?e.fail(`requires.features`,`must be a non-empty array`):r.forEach((t,n)=>{(typeof t!=`string`||t.length===0)&&e.fail(`requires.features[${n}]`,`must be a non-empty string`)}))}function st(e,t,n){if(!D(t)||Object.keys(t).length===0){e.fail(n,`must be a non-empty object`);return}let{minLength:r,maxLength:i,format:a}=t;r!==void 0&&!it(r,0)&&e.fail(`${n}.minLength`,`must be a non-negative integer`),i!==void 0&&!it(i,1)&&e.fail(`${n}.maxLength`,`must be a positive integer`),a!==void 0&&!O(a,rt)&&e.fail(`${n}.format`,`is not a supported format`)}function ct(e,t,n){if(!D(t)){e.fail(n,`must be an object`);return}let{type:r,label:i,help:a,placeholder:o,required:s,provider:c,options:l}=t;O(r,et)||e.fail(`${n}.type`,`is not a supported field type`),e.copy(i,`${n}.label`),e.copy(a,`${n}.help`),o!==void 0&&e.copy(o,`${n}.placeholder`),t.default!==void 0&&typeof t.default!=`string`&&e.fail(`${n}.default`,`must be a string`),typeof s!=`boolean`&&e.fail(`${n}.required`,`must be a boolean`),c!==void 0&&!O(c,tt)&&e.fail(`${n}.provider`,`is not a supported provider`),r===`repo-picker`&&c===void 0&&e.fail(`${n}.provider`,`is required for a repository field`),l!==void 0&&(r===`select`?!Array.isArray(l)||l.length===0?e.fail(`${n}.options`,`must be a non-empty array`):l.forEach((t,r)=>{let i=`${n}.options[${r}]`;if(!D(t)){e.fail(i,`must be an object`);return}(typeof t.value!=`string`||t.value.length===0)&&e.fail(`${i}.value`,`must be a non-empty string`),e.copy(t.label,`${i}.label`)}):e.fail(`${n}.options`,`is only allowed on a select field`)),t.constraints!==void 0&&st(e,t.constraints,`${n}.constraints`)}function lt(e,t,n){return!D(t)||Object.keys(t).length===0?(e.fail(n,`must be a non-empty object`),[]):Object.entries(t).map(([t,r])=>(Xe.test(t)||e.fail(`${n}.${t}`,`is not a valid field name`),ct(e,r,`${n}.${t}`),t))}function ut(e,t){if(!D(t))return e.fail(`setup.form`,`must be an object`),[];t.note!==void 0&&e.copy(t.note,`setup.form.note`);let n=lt(e,t.args,`setup.form.args`),r=[];t.triggers!==void 0&&(!D(t.triggers)||Object.keys(t.triggers).length===0?e.fail(`setup.form.triggers`,`must be a non-empty object`):Object.entries(t.triggers).forEach(([t,i])=>{if(!O(t,nt)){e.fail(`setup.form.triggers.${t}`,`is not a trigger kind`);return}r.push(t),n.push(...lt(e,i,`setup.form.triggers.${t}`))}));let i=n.filter((e,t)=>n.indexOf(e)!==t);return Array.from(new Set(i)).forEach(t=>e.fail(`setup.form.${t}`,`is declared more than once`)),r}function dt(e){return D(e)?[e.args,...Object.values(D(e.triggers)?e.triggers:{})].some(e=>D(e)&&Object.values(e).some(e=>D(e)&&e.type===`repo-picker`)):!1}function ft(e,t){e.templateCopy(t,`setup.message`)&&t.length>E&&e.fail(`setup.message`,`must be at most ${E} characters`)}function pt(e,t,n){if(!O(t.mode,$e)){e.fail(`setup.mode`,`is not a supported mode`);return}if(t.mode===`direct`){e.templateValue(t.prompt,`setup.prompt`),t.message!==void 0&&ft(e,t.message),n.length!==1&&e.fail(`setup.form.triggers`,`must declare exactly one trigger kind`),n.includes(`event`)&&!dt(t.form)&&e.fail(`setup.form`,`must declare a repository field for an event trigger`),t.filter!==void 0&&(n.includes(`event`)?e.templateValue(t.filter,`setup.filter`):e.fail(`setup.filter`,`is only allowed for an event trigger`));return}ft(e,t.message),e.absent(t,`prompt`,`setup`,`is only allowed for direct setup`),e.absent(t,`filter`,`setup`,`is only allowed for direct setup`)}function mt(e){return D(e)&&e.setup!==void 0}function ht(e){let t=new at;if(!D(e))return{valid:!1,errors:[`manifest: must be an object`]};let{setup:n}=e;return D(n)?n.version===`1.0`?((typeof e.id!=`string`||!T.test(e.id))&&t.fail(`id`,`must be a lowercase slug`),t.copy(e.name,`name`),t.copy(e.description,`description`),e.skill!==void 0&&(typeof e.skill!=`string`||!T.test(e.skill))&&t.fail(`skill`,`must be a lowercase slug`),ot(t,e.requires),pt(t,n,ut(t,n.form)),{valid:t.errors.length===0,errors:t.errors}):{valid:!1,errors:[`setup.version: must be "1.0"`]}:{valid:!1,errors:[`setup: must be an object`]}}function gt(e){let t=[],n=new Map;return e.forEach(e=>{if(!mt(e))return;let{valid:r,errors:i}=ht(e);if(!r){console.warn(`Rejected a setup manifest:`,i.join(`; `));return}let a=e;if(n.has(a.id)){console.warn(`Rejected a setup manifest: id "${a.id}" is already registered`);return}t.push(a),n.set(a.id,a)}),{entries:t,findById:e=>n.get(e)??null}}var _t=gt(p),vt=se,yt=`AUTOMATION_INTERFACE`in vt?vt.AUTOMATION_INTERFACE:void 0,k={list:`/automations`,setup:`/automations/new/:automationId`,detail:`/automations/:automationId`,templates:`/automations/templates`},bt={list:`/v1`,detail:`/v1/{id}`,dispatch:`/v1/{id}/dispatch`,runs:`/v1/{id}/runs`,tarball:`/v1/{id}/tarball`,health:`/health`,capabilities:`/v1/capabilities`,validate:`/v1/validate`,createPrompt:`/v1/preset/prompt`,createPlugin:`/v1/preset/plugin`},xt={fileKind:`automation`,fileVersion:1,filenameSuffix:`.automation.json`,importDefaults:{repoProvider:`github`,placeholderEventSource:`agent-canvas-import`}},St=`https://docs.openhands.dev/openhands/usage/automations/overview`,Ct=[`github-pr-reviewer`,`github-repo-monitor`,`slack-channel-monitor`],wt=[`github`,`slack`],Tt={present:!1,label:null,help:null,required:!1,min:null,max:null},Et={name:{present:!0,label:null,help:null,required:!0,min:null,max:null},prompt:{present:!0,label:null,help:null,required:!1,min:null,max:null},model:{present:!0,label:null,help:null,required:!1,min:null,max:null},timeout:{present:!0,label:null,help:null,required:!1,min:1,max:null},schedule:{present:!0,label:null,help:null,required:!1,min:null,max:null}};function Dt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ot(){return new Set(p.flatMap(e=>Dt(e)&&typeof e.id==`string`?[e.id]:[]))}function kt(e){if(e===void 0)return null;let t=Ye(e,{catalogIds:Ot(),mountedRoutes:k});return t.valid?e:(console.warn(`Rejected the automation interface manifest:`,t.errors.join(`; `)),null)}var A=kt(yt);function At(e,t){return e.replace(`:automationId`,encodeURIComponent(t))}function j(){return(A?.routes??k).list}function jt(e){return At((A?.routes??k).setup,e)}function Mt(e){return At((A?.routes??k).detail,e)}function Nt(){return A?.routes.templates??k.templates}function M(e){return(A?.endpoints??bt)[e]}function N(e,t){return M(e).replace(`{id}`,encodeURIComponent(t))}var Pt={sidebarLabel:null,commandMenuTitle:null,commandMenuDescription:null,commandMenuKeywords:null,listTitle:null,listSubtitle:null,detailBackLabel:null,editTitle:null};function Ft(){return A?{sidebarLabel:A.navigation.sidebar.label,commandMenuTitle:A.navigation.commandMenu.title,commandMenuDescription:A.navigation.commandMenu.description,commandMenuKeywords:A.navigation.commandMenu.keywords,listTitle:A.pages.list.title,listSubtitle:A.pages.list.subtitle,detailBackLabel:A.pages.detail.backLabel,editTitle:A.pages.edit.title}:Pt}function It(e){if(!A)return Et[e];let t=A.attributes[e];return t?{present:!0,label:t.label,help:t.help??null,required:t.required,min:t.constraints?.min??null,max:t.constraints?.max??null}:Tt}function P(){return A?.importExport??xt}function Lt(){return A?.docsUrl??St}function Rt(){return A?.featuredAutomationIds??Ct}function zt(){return A?.responderIntegrationIds??wt}function Bt(){let e=A?.navigation.subPages;return e?e.map(e=>({page:e.page,to:e.page===`templates`?Nt():j(),label:e.label,icon:e.icon})):null}function Vt(){let e=A?.pages.list;return!e?.overview||!e.filters||!e.sort||!e.insights?null:{overview:e.overview,filters:e.filters,sort:e.sort,insights:e.insights}}function Ht(){return A?.pages.templates??null}var Ut=/["'\\]/;function F(e){let t=Object.values(e.form.triggers??{});return Object.assign({},...t,e.form.args)}function Wt(e,t){let n=t?.triggers?.cron?.timezones;if(!n?.length)return{};let r=n.map(e=>({value:e,label:e}));return Object.fromEntries(Object.entries(F(e)).filter(([,e])=>e.type===`timezone`).map(([e])=>[e,{options:r}]))}function I(e,t,n={}){return n[e]?.options??t.options??[]}function Gt(e){return Object.fromEntries(Object.entries(F(e)).map(([e,t])=>[e,t.default??``]))}function Kt(e,t,n,r){let i=(n??``).trim();if(!i)return t.required?{code:`required`}:null;let{minLength:a,maxLength:o,format:s}=t.constraints??{};if(a!==void 0&&i.length<a)return{code:`minLength`,length:a};if(o!==void 0&&i.length>o)return{code:`maxLength`,length:o};if(s===`safeExpressionLiteral`&&Ut.test(i))return{code:`unsafeExpressionLiteral`};let c=I(e,t,r);return c.length>0&&!c.some(e=>e.value===i)?{code:`invalidOption`}:null}function qt(e,t,n={}){return Object.entries(F(e)).reduce((e,[r,i])=>{let a=Kt(r,i,t[r],n);return a?{...e,[r]:a}:e},{})}var L=/\{\{([A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)*)\}\}/g;function Jt(e,t){return t.split(`.`).reduce((e,t)=>{if(!(typeof e!=`object`||!e))return e[t]},e)}function R(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):``}function z(e,t){return e.replace(L,(e,n)=>R(Jt(t,n)))}function Yt(e,t){return e.replace(L,(e,n)=>R(t[n]))}var B=M(`createPrompt`),Xt={cron:[`schedule`,`timezone`],event:[`on`]},Zt=[`ref`],Qt=/\{\{form\.([A-Za-z0-9_.]+)\}\}/g;function $t(e){let t=Object.entries(F(e)).find(([,e])=>e.type===`repo-picker`);return t?{name:t[0],field:t[1]}:null}function en(e){let t=Object.entries(e.form.triggers??{});if(t.length===0)return null;let[n,r]=t[0];return{kind:n,fields:r??{}}}function V(e,t){let{setup:n}=e;if(n.mode!==`direct`||!n.prompt)return null;let r={form:t,automation:e},i=$t(n),a=i?t[i.name]:void 0,o={name:a?`${e.name} - ${a}`:e.name,prompt:z(n.prompt,r)};if(a&&i?.field.provider){let e=Zt.filter(e=>e in t);o.repos=[{url:a,...Object.fromEntries(e.map(e=>[e,t[e]])),provider:i.field.provider}]}let s=en(n);if(s){let e=Xt[s.kind],a=Object.keys(s.fields).filter(t=>e.includes(t));o.trigger={type:s.kind,...Object.fromEntries(a.map(e=>[e,t[e]??``])),...s.kind===`event`&&{source:i?.field.provider??``,...n.filter&&{filter:z(n.filter,r)}}}}return o}function tn(e,t){let n=V(e,t);return n?{automationId:e.id,endpoint:B,draft:n}:null}function nn(e,t){return[h(e),e.setup.message?z(e.setup.message,{form:t,automation:e}):``].filter(Boolean).join(`
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{M as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{O as r,Q as i,T as a,W as o,a as s,b as c,ct as l,d as u,dt as ee,f as te,h as d,lt as ne,n as re,p as ie,w as ae}from"./active-backend-context-IqOjobNK.js";import{t as f}from"./proxy-9Z_WZggZ.js";import{t as oe}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js";import{n as se,t as p}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js";var m=e(t(),1),ce=new Map(oe.map(e=>[e.name,e]));function le(e){return Object.keys(e.requires.integrations)}function ue(e){return Object.entries(e.requires.integrations).filter(([,e])=>e.required!==!1).map(([e])=>e)}function h(e){return ce.get(e.skill??e.id)?.triggers[0]??null}function de(e){return h(e)??`Set up the ${e.name} automation`}var fe=[`form`,`automation`],pe=[`list`,`templates`],me=[`layout-dashboard`,`sparkles`,`bot`,`circle-alert`,`activity`,`timer`],he=[`automations`,`needs-attention`,`total-runs`,`average-duration`],ge={automations:[`active`],"needs-attention":[],"total-runs":[],"average-duration":[]},g={status:[`all`,`active`,`failing`,`disabled`],trigger:[`all`,`schedule`,`event`]},_e=Object.keys(g),ve=[`last-run`,`runs`,`name`],ye=/<[A-Za-z/!]/,be=/^[a-z0-9]+(-[a-z0-9]+)*$/,_=`https://docs.openhands.dev/`,xe=/^[a-z][a-z-]*$/,Se=/^\.[a-z][a-z.]*json$/,Ce=/^[a-z0-9][a-z0-9.-]*$/,we=/^\/[A-Za-z0-9/{}_-]*$/,Te=/^[^{}]*\{id\}[^{}]*$/,Ee=[`github`,`gitlab`,`bitbucket`],v={name:{type:`text`,required:!0},prompt:{type:`textarea`,required:!1},model:{type:`llm-profile`,required:!1},timeout:{type:`number`,required:!1},schedule:{type:`schedule`,required:!1}},De=Object.keys(v),y=[`list`,`health`,`capabilities`,`validate`,`createPrompt`,`createPlugin`],b=[`detail`,`dispatch`,`runs`,`tarball`];function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function S(e,t){return typeof e==`string`&&t.includes(e)}var Oe=class{errors=[];fail(e,t){return this.errors.push(`${e}: ${t}`),!1}copy(e,t){return typeof e!=`string`||e.length===0?this.fail(t,`must be a non-empty string`):ye.test(e)?this.fail(t,`must not contain markup`):!0}closed(e,t,n){Object.keys(e).filter(e=>!t.includes(e)).forEach(e=>this.fail(`${n}.${e}`,`is not allowed`))}record(e,t){return x(e)?!0:(this.fail(t,`must be an object`),!1)}};function ke(e,t,n){e.record(t,`routes`)&&(e.closed(t,[`list`,`setup`,`detail`,`templates`],`routes`),[`list`,`setup`,`detail`].forEach(r=>{t[r]!==n[r]&&e.fail(`routes.${r}`,`must be "${n[r]}"`)}),t.templates!==void 0&&t.templates!==n.templates&&e.fail(`routes.templates`,n.templates===void 0?`is not a route this host mounts`:`must be "${n.templates}"`))}function Ae(e,t){if(!Array.isArray(t)||t.length===0){e.fail(`navigation.subPages`,`must be a non-empty array`);return}let n=new Set;t.forEach((t,r)=>{let i=`navigation.subPages[${r}]`;if(!e.record(t,i))return;e.closed(t,[`page`,`label`,`icon`],i);let{page:a,label:o,icon:s}=t;S(a,pe)?n.has(a)?e.fail(`${i}.page`,`repeats a page`):n.add(a):e.fail(`${i}.page`,`is not a sub-page this host serves`),e.copy(o,`${i}.label`),je(e,s,`${i}.icon`)})}function je(e,t,n){S(t,me)||e.fail(n,`is not an icon this host ships`)}function Me(e,t){if(e.record(t,`navigation`)){if(e.closed(t,[`sidebar`,`commandMenu`,`subPages`],`navigation`),e.record(t.sidebar,`navigation.sidebar`)&&(e.closed(t.sidebar,[`label`],`navigation.sidebar`),e.copy(t.sidebar.label,`navigation.sidebar.label`)),e.record(t.commandMenu,`navigation.commandMenu`)){let n=t.commandMenu;e.closed(n,[`title`,`description`,`keywords`],`navigation.commandMenu`),e.copy(n.title,`navigation.commandMenu.title`),e.copy(n.description,`navigation.commandMenu.description`),e.copy(n.keywords,`navigation.commandMenu.keywords`)}t.subPages!==void 0&&Ae(e,t.subPages)}}function Ne(e,t){e.record(t,`pages`)&&(e.closed(t,[`list`,`detail`,`edit`,`templates`],`pages`),e.record(t.list,`pages.list`)&&(e.closed(t.list,[`title`,`subtitle`,`overview`,`filters`,`sort`,`insights`],`pages.list`),e.copy(t.list.title,`pages.list.title`),e.copy(t.list.subtitle,`pages.list.subtitle`),t.list.overview!==void 0&&Pe(e,t.list.overview),t.list.filters!==void 0&&Le(e,t.list.filters),t.list.sort!==void 0&&Be(e,t.list.sort),t.list.insights!==void 0&&Ve(e,t.list.insights)),e.record(t.detail,`pages.detail`)&&(e.closed(t.detail,[`backLabel`],`pages.detail`),e.copy(t.detail.backLabel,`pages.detail.backLabel`)),e.record(t.edit,`pages.edit`)&&(e.closed(t.edit,[`title`],`pages.edit`),e.copy(t.edit.title,`pages.edit.title`)),t.templates!==void 0&&He(e,t.templates))}function Pe(e,t){let n=`pages.list.overview`;if(!e.record(t,n))return;e.closed(t,[`label`,`tiles`],n),e.copy(t.label,`${n}.label`);let{tiles:r}=t;if(!Array.isArray(r)||r.length===0){e.fail(`${n}.tiles`,`must be a non-empty array`);return}let i=new Set;r.forEach((t,r)=>{Fe(e,t,i,`${n}.tiles[${r}]`)})}function Fe(e,t,n,r){if(!e.record(t,r))return;e.closed(t,[`metric`,`label`,`detail`,`zeroDetail`,`icon`],r);let{metric:i,label:a,detail:o,zeroDetail:s,icon:c}=t;if(e.copy(a,`${r}.label`),je(e,c,`${r}.icon`),!S(i,he)){e.fail(`${r}.metric`,`is not a metric this host computes`),e.copy(o,`${r}.detail`),s!==void 0&&e.copy(s,`${r}.zeroDetail`);return}n.has(i)?e.fail(`${r}.metric`,`repeats a metric`):n.add(i),Ie(e,o,i,`${r}.detail`),s!==void 0&&Ie(e,s,i,`${r}.zeroDetail`)}function Ie(e,t,n,r){if(!e.copy(t,r))return;let i=ge[n];(i.length===0?/\{\{/:RegExp(`\\{\\{(?!(?:${i.join(`|`)})\\}\\})`)).test(t)&&e.fail(r,`uses a placeholder this metric does not expose`)}function Le(e,t){let n=`pages.list.filters`;if(!Array.isArray(t)||t.length===0){e.fail(n,`must be a non-empty array`);return}let r=new Set;t.forEach((t,i)=>{Re(e,t,r,`${n}[${i}]`)})}function Re(e,t,n,r){if(!e.record(t,r))return;e.closed(t,[`id`,`label`,`options`],r);let{id:i,label:a,options:o}=t;if(e.copy(a,`${r}.label`),!S(i,_e)){e.fail(`${r}.id`,`is not a filter this host implements`);return}n.has(i)?e.fail(`${r}.id`,`repeats a filter`):n.add(i),ze(e,o,g[i],`${r}.options`)}function ze(e,t,n,r){if(!Array.isArray(t)||t.length<2){e.fail(r,`must offer at least two options`);return}let i=new Set;t.forEach((t,a)=>{let o=`${r}[${a}]`;if(!e.record(t,o))return;e.closed(t,[`value`,`label`],o);let{value:s,label:c}=t;S(s,n)?i.has(s)?e.fail(`${o}.value`,`repeats a value`):i.add(s):e.fail(`${o}.value`,`is not a value this host implements`),e.copy(c,`${o}.label`)}),i.has(`all`)||e.fail(r,`must offer the "all" option`)}function Be(e,t){let n=`pages.list.sort`;if(!e.record(t,n))return;e.closed(t,[`label`,`options`,`default`],n);let{label:r,options:i,default:a}=t;e.copy(r,`${n}.label`);let o=new Set;!Array.isArray(i)||i.length===0?e.fail(`${n}.options`,`must be a non-empty array`):i.forEach((t,r)=>{let i=`${n}.options[${r}]`;e.record(t,i)&&(e.closed(t,[`value`,`label`],i),S(t.value,ve)?o.has(t.value)?e.fail(`${i}.value`,`repeats a value`):o.add(t.value):e.fail(`${i}.value`,`is not a sort this host implements`),e.copy(t.label,`${i}.label`))}),(typeof a!=`string`||!o.has(a))&&e.fail(`${n}.default`,`must be one of the declared option values`)}var C={health:[`healthy`,`failing`,`running`,`disabled`,`neverRun`,`checking`],lastRun:[`label`,`never`,`justNow`],stats:[`runs`,`recentSuccess`,`averageDuration`]};function Ve(e,t){let n=`pages.list.insights`;e.record(t,n)&&(e.closed(t,Object.keys(C),n),Object.keys(C).forEach(r=>{let i=`${n}.${r}`,a=t[r];if(!e.record(a,i))return;let o=C[r];e.closed(a,o,i),o.forEach(t=>{e.copy(a[t],`${i}.${t}`)})}))}function He(e,t){let n=`pages.templates`;e.record(t,n)&&(e.closed(t,[`title`,`description`],n),e.copy(t.title,`${n}.title`),e.copy(t.description,`${n}.description`))}function Ue(e,t){let n=x(t.routes)?t.routes:{},r=x(t.navigation)?t.navigation:{},i=x(t.pages)?t.pages:{},a=x(i.list)?i.list:{},o=[[`routes.templates`,n.templates],[`navigation.subPages`,r.subPages],[`pages.templates`,i.templates],[`pages.list.overview`,a.overview],[`pages.list.filters`,a.filters],[`pages.list.sort`,a.sort],[`pages.list.insights`,a.insights]],s=o.filter(([,e])=>e===void 0).map(([e])=>e);s.length===0||s.length===o.length||e.fail(`interface`,`the sub-page surface must be declared whole; missing ${s.join(`, `)}`)}function We(e,t,n,r){if(!e.record(n,r))return;e.closed(n,[`type`,`label`,`help`,`required`,`constraints`],r);let{type:i,label:a,help:o,required:s,constraints:c}=n;if(i!==t.type&&e.fail(`${r}.type`,`must be "${t.type}", the control this host renders`),e.copy(a,`${r}.label`),o!==void 0&&e.copy(o,`${r}.help`),s!==t.required&&e.fail(`${r}.required`,`must be ${t.required}, what this host enforces`),c!==void 0){if(t.type!==`number`)e.fail(`${r}.constraints`,`is only allowed on a number attribute`);else if(e.record(c,`${r}.constraints`)){e.closed(c,[`min`,`max`],`${r}.constraints`);let{min:t,max:n}=c;t!==void 0&&t!==1&&e.fail(`${r}.constraints.min`,`must be the 1 this host enforces`),n!==void 0&&(!Number.isInteger(n)||n<1)&&e.fail(`${r}.constraints.max`,`must be a positive integer`)}}}function Ge(e,t){if(!e.record(t,`attributes`))return;let n=Object.keys(t);n.length===0&&e.fail(`attributes`,`must declare at least one attribute`),n.forEach(n=>{if(!De.includes(n)){e.fail(`attributes.${n}`,`is not a settable attribute`);return}We(e,v[n],t[n],`attributes.${n}`)})}function Ke(e,t){if(!e.record(t,`importExport`))return;e.closed(t,[`fileKind`,`fileVersion`,`filenameSuffix`,`importDefaults`],`importExport`);let{fileKind:n,fileVersion:r,filenameSuffix:i,importDefaults:a}=t;(typeof n!=`string`||!xe.test(n))&&e.fail(`importExport.fileKind`,`must be a lowercase slug`),r!==1&&e.fail(`importExport.fileVersion`,`must be 1`),(typeof i!=`string`||!Se.test(i))&&e.fail(`importExport.filenameSuffix`,`must be a .json suffix`),e.record(a,`importExport.importDefaults`)&&(e.closed(a,[`repoProvider`,`placeholderEventSource`],`importExport.importDefaults`),(typeof a.repoProvider!=`string`||!Ee.includes(a.repoProvider))&&e.fail(`importExport.importDefaults.repoProvider`,`is not a supported provider`),(typeof a.placeholderEventSource!=`string`||!Ce.test(a.placeholderEventSource))&&e.fail(`importExport.importDefaults.placeholderEventSource`,`must be a lowercase event source`))}function qe(e,t){if(!e.record(t,`endpoints`))return;let n=[...y,...b];e.closed(t,n,`endpoints`);let r=n=>{let r=t[n];return typeof r!=`string`||!we.test(r)||r.includes(`//`)?(e.fail(`endpoints.${n}`,`must be a rooted service-relative path`),null):r};y.forEach(t=>{let n=r(t);n!==null&&/[{}]/.test(n)&&e.fail(`endpoints.${t}`,`must not carry a substitution`)}),b.forEach(t=>{let n=r(t);n!==null&&!Te.test(n)&&e.fail(`endpoints.${t}`,`must carry exactly one {id}`)})}function w(e,t,n){if(!Array.isArray(t)||t.length===0)return e.fail(n,`must be a non-empty array`),[];let r=t.filter(t=>typeof t==`string`&&be.test(t)?!0:(e.fail(n,`must contain only lowercase slugs`),!1));return new Set(r).size!==r.length&&e.fail(n,`must not repeat an id`),r}var Je=[`version`,`routes`,`navigation`,`pages`,`docsUrl`,`attributes`,`importExport`,`endpoints`,`featuredAutomationIds`,`responderIntegrationIds`];function Ye(e,t){if(!x(e))return{valid:!1,errors:[`interface: must be an object`]};if(e.version!==`1.0`)return{valid:!1,errors:[`interface.version: must be "1.0"`]};let n=new Oe;return n.closed(e,Je,`interface`),ke(n,e.routes,t.mountedRoutes),Me(n,e.navigation),Ne(n,e.pages),(typeof e.docsUrl!=`string`||!e.docsUrl.startsWith(_))&&n.fail(`docsUrl`,`must start with ${_}`),Ge(n,e.attributes),Ke(n,e.importExport),qe(n,e.endpoints),w(n,e.featuredAutomationIds,`featuredAutomationIds`).forEach(e=>{t.catalogIds.has(e)||n.fail(`featuredAutomationIds`,`${e} is not a catalog entry`)}),w(n,e.responderIntegrationIds,`responderIntegrationIds`),Ue(n,e),{valid:n.errors.length===0,errors:n.errors}}var T=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xe=/^[a-z][A-Za-z0-9]*$/,Ze=/<[A-Za-z/!]/,Qe=RegExp(`\\{\\{(?!(?:${fe.join(`|`)})\\.[A-Za-z0-9_.]+\\}\\})`),$e=[`direct`,`assisted`],et=[`text`,`textarea`,`select`,`cron`,`timezone`,`repo-picker`],tt=[`github`,`gitlab`,`bitbucket`],nt=[`cron`,`event`],rt=[`safeExpressionLiteral`],E=2e3;function D(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function O(e,t){return typeof e==`string`&&t.includes(e)}function it(e,t){return typeof e==`number`&&Number.isInteger(e)&&e>=t}var at=class{errors=[];fail(e,t){return this.errors.push(`${e}: ${t}`),!1}copy(e,t){return typeof e!=`string`||e.length===0?this.fail(t,`must be a non-empty string`):Ze.test(e)?this.fail(t,`must not contain markup`):!0}placeholders(e,t){return Qe.test(e)?this.fail(t,`uses an unknown placeholder namespace`):!0}templateCopy(e,t){return this.copy(e,t)&&this.placeholders(e,t)}templateValue(e,t){return typeof e!=`string`||e.length===0?this.fail(t,`must be a non-empty string`):this.placeholders(e,t)}absent(e,t,n,r){return t in e?this.fail(`${n}.${t}`,r):!0}};function ot(e,t){if(!D(t)){e.fail(`requires`,`must be an object`);return}let{integrations:n,features:r}=t;!D(n)||Object.keys(n).length===0?e.fail(`requires.integrations`,`must be a non-empty object`):Object.entries(n).forEach(([t,n])=>{let r=`requires.integrations.${t}`;if(!D(n)){e.fail(r,`must be an object`);return}e.copy(n.message,`${r}.message`),`required`in n&&n.required!==!1&&e.fail(`${r}.required`,`may only be false`);let i=[`message`,`required`];Object.keys(n).filter(e=>!i.includes(e)).forEach(t=>e.fail(`${r}.${t}`,`is not allowed`))}),r!==void 0&&(!Array.isArray(r)||r.length===0?e.fail(`requires.features`,`must be a non-empty array`):r.forEach((t,n)=>{(typeof t!=`string`||t.length===0)&&e.fail(`requires.features[${n}]`,`must be a non-empty string`)}))}function st(e,t,n){if(!D(t)||Object.keys(t).length===0){e.fail(n,`must be a non-empty object`);return}let{minLength:r,maxLength:i,format:a}=t;r!==void 0&&!it(r,0)&&e.fail(`${n}.minLength`,`must be a non-negative integer`),i!==void 0&&!it(i,1)&&e.fail(`${n}.maxLength`,`must be a positive integer`),a!==void 0&&!O(a,rt)&&e.fail(`${n}.format`,`is not a supported format`)}function ct(e,t,n){if(!D(t)){e.fail(n,`must be an object`);return}let{type:r,label:i,help:a,placeholder:o,required:s,provider:c,options:l}=t;O(r,et)||e.fail(`${n}.type`,`is not a supported field type`),e.copy(i,`${n}.label`),e.copy(a,`${n}.help`),o!==void 0&&e.copy(o,`${n}.placeholder`),t.default!==void 0&&typeof t.default!=`string`&&e.fail(`${n}.default`,`must be a string`),typeof s!=`boolean`&&e.fail(`${n}.required`,`must be a boolean`),c!==void 0&&!O(c,tt)&&e.fail(`${n}.provider`,`is not a supported provider`),r===`repo-picker`&&c===void 0&&e.fail(`${n}.provider`,`is required for a repository field`),l!==void 0&&(r===`select`?!Array.isArray(l)||l.length===0?e.fail(`${n}.options`,`must be a non-empty array`):l.forEach((t,r)=>{let i=`${n}.options[${r}]`;if(!D(t)){e.fail(i,`must be an object`);return}(typeof t.value!=`string`||t.value.length===0)&&e.fail(`${i}.value`,`must be a non-empty string`),e.copy(t.label,`${i}.label`)}):e.fail(`${n}.options`,`is only allowed on a select field`)),t.constraints!==void 0&&st(e,t.constraints,`${n}.constraints`)}function lt(e,t,n){return!D(t)||Object.keys(t).length===0?(e.fail(n,`must be a non-empty object`),[]):Object.entries(t).map(([t,r])=>(Xe.test(t)||e.fail(`${n}.${t}`,`is not a valid field name`),ct(e,r,`${n}.${t}`),t))}function ut(e,t){if(!D(t))return e.fail(`setup.form`,`must be an object`),[];t.note!==void 0&&e.copy(t.note,`setup.form.note`);let n=lt(e,t.args,`setup.form.args`),r=[];t.triggers!==void 0&&(!D(t.triggers)||Object.keys(t.triggers).length===0?e.fail(`setup.form.triggers`,`must be a non-empty object`):Object.entries(t.triggers).forEach(([t,i])=>{if(!O(t,nt)){e.fail(`setup.form.triggers.${t}`,`is not a trigger kind`);return}r.push(t),n.push(...lt(e,i,`setup.form.triggers.${t}`))}));let i=n.filter((e,t)=>n.indexOf(e)!==t);return Array.from(new Set(i)).forEach(t=>e.fail(`setup.form.${t}`,`is declared more than once`)),r}function dt(e){return D(e)?[e.args,...Object.values(D(e.triggers)?e.triggers:{})].some(e=>D(e)&&Object.values(e).some(e=>D(e)&&e.type===`repo-picker`)):!1}function ft(e,t){e.templateCopy(t,`setup.message`)&&t.length>E&&e.fail(`setup.message`,`must be at most ${E} characters`)}function pt(e,t,n){if(!O(t.mode,$e)){e.fail(`setup.mode`,`is not a supported mode`);return}if(t.mode===`direct`){e.templateValue(t.prompt,`setup.prompt`),t.message!==void 0&&ft(e,t.message),n.length!==1&&e.fail(`setup.form.triggers`,`must declare exactly one trigger kind`),n.includes(`event`)&&!dt(t.form)&&e.fail(`setup.form`,`must declare a repository field for an event trigger`),t.filter!==void 0&&(n.includes(`event`)?e.templateValue(t.filter,`setup.filter`):e.fail(`setup.filter`,`is only allowed for an event trigger`));return}ft(e,t.message),e.absent(t,`prompt`,`setup`,`is only allowed for direct setup`),e.absent(t,`filter`,`setup`,`is only allowed for direct setup`)}function mt(e){return D(e)&&e.setup!==void 0}function ht(e){let t=new at;if(!D(e))return{valid:!1,errors:[`manifest: must be an object`]};let{setup:n}=e;return D(n)?n.version===`1.0`?((typeof e.id!=`string`||!T.test(e.id))&&t.fail(`id`,`must be a lowercase slug`),t.copy(e.name,`name`),t.copy(e.description,`description`),e.skill!==void 0&&(typeof e.skill!=`string`||!T.test(e.skill))&&t.fail(`skill`,`must be a lowercase slug`),ot(t,e.requires),pt(t,n,ut(t,n.form)),{valid:t.errors.length===0,errors:t.errors}):{valid:!1,errors:[`setup.version: must be "1.0"`]}:{valid:!1,errors:[`setup: must be an object`]}}function gt(e){let t=[],n=new Map;return e.forEach(e=>{if(!mt(e))return;let{valid:r,errors:i}=ht(e);if(!r){console.warn(`Rejected a setup manifest:`,i.join(`; `));return}let a=e;if(n.has(a.id)){console.warn(`Rejected a setup manifest: id "${a.id}" is already registered`);return}t.push(a),n.set(a.id,a)}),{entries:t,findById:e=>n.get(e)??null}}var _t=gt(p),vt=se,yt=`AUTOMATION_INTERFACE`in vt?vt.AUTOMATION_INTERFACE:void 0,k={list:`/automations`,setup:`/automations/new/:automationId`,detail:`/automations/:automationId`,templates:`/automations/templates`},bt={list:`/v1`,detail:`/v1/{id}`,dispatch:`/v1/{id}/dispatch`,runs:`/v1/{id}/runs`,tarball:`/v1/{id}/tarball`,health:`/health`,capabilities:`/v1/capabilities`,validate:`/v1/validate`,createPrompt:`/v1/preset/prompt`,createPlugin:`/v1/preset/plugin`},xt={fileKind:`automation`,fileVersion:1,filenameSuffix:`.automation.json`,importDefaults:{repoProvider:`github`,placeholderEventSource:`agent-canvas-import`}},St=`https://docs.openhands.dev/openhands/usage/automations/overview`,Ct=[`github-pr-reviewer`,`github-repo-monitor`,`slack-channel-monitor`],wt=[`github`,`slack`],Tt={present:!1,label:null,help:null,required:!1,min:null,max:null},Et={name:{present:!0,label:null,help:null,required:!0,min:null,max:null},prompt:{present:!0,label:null,help:null,required:!1,min:null,max:null},model:{present:!0,label:null,help:null,required:!1,min:null,max:null},timeout:{present:!0,label:null,help:null,required:!1,min:1,max:null},schedule:{present:!0,label:null,help:null,required:!1,min:null,max:null}};function Dt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ot(){return new Set(p.flatMap(e=>Dt(e)&&typeof e.id==`string`?[e.id]:[]))}function kt(e){if(e===void 0)return null;let t=Ye(e,{catalogIds:Ot(),mountedRoutes:k});return t.valid?e:(console.warn(`Rejected the automation interface manifest:`,t.errors.join(`; `)),null)}var A=kt(yt);function At(e,t){return e.replace(`:automationId`,encodeURIComponent(t))}function j(){return(A?.routes??k).list}function jt(e){return At((A?.routes??k).setup,e)}function Mt(e){return At((A?.routes??k).detail,e)}function Nt(){return A?.routes.templates??k.templates}function M(e){return(A?.endpoints??bt)[e]}function N(e,t){return M(e).replace(`{id}`,encodeURIComponent(t))}var Pt={sidebarLabel:null,commandMenuTitle:null,commandMenuDescription:null,commandMenuKeywords:null,listTitle:null,listSubtitle:null,detailBackLabel:null,editTitle:null};function Ft(){return A?{sidebarLabel:A.navigation.sidebar.label,commandMenuTitle:A.navigation.commandMenu.title,commandMenuDescription:A.navigation.commandMenu.description,commandMenuKeywords:A.navigation.commandMenu.keywords,listTitle:A.pages.list.title,listSubtitle:A.pages.list.subtitle,detailBackLabel:A.pages.detail.backLabel,editTitle:A.pages.edit.title}:Pt}function It(e){if(!A)return Et[e];let t=A.attributes[e];return t?{present:!0,label:t.label,help:t.help??null,required:t.required,min:t.constraints?.min??null,max:t.constraints?.max??null}:Tt}function P(){return A?.importExport??xt}function Lt(){return A?.docsUrl??St}function Rt(){return A?.featuredAutomationIds??Ct}function zt(){return A?.responderIntegrationIds??wt}function Bt(){let e=A?.navigation.subPages;return e?e.map(e=>({page:e.page,to:e.page===`templates`?Nt():j(),label:e.label,icon:e.icon})):null}function Vt(){let e=A?.pages.list;return!e?.overview||!e.filters||!e.sort||!e.insights?null:{overview:e.overview,filters:e.filters,sort:e.sort,insights:e.insights}}function Ht(){return A?.pages.templates??null}var Ut=/["'\\]/;function F(e){let t=Object.values(e.form.triggers??{});return Object.assign({},...t,e.form.args)}function Wt(e,t){let n=t?.triggers?.cron?.timezones;if(!n?.length)return{};let r=n.map(e=>({value:e,label:e}));return Object.fromEntries(Object.entries(F(e)).filter(([,e])=>e.type===`timezone`).map(([e])=>[e,{options:r}]))}function I(e,t,n={}){return n[e]?.options??t.options??[]}function Gt(e){return Object.fromEntries(Object.entries(F(e)).map(([e,t])=>[e,t.default??``]))}function Kt(e,t,n,r){let i=(n??``).trim();if(!i)return t.required?{code:`required`}:null;let{minLength:a,maxLength:o,format:s}=t.constraints??{};if(a!==void 0&&i.length<a)return{code:`minLength`,length:a};if(o!==void 0&&i.length>o)return{code:`maxLength`,length:o};if(s===`safeExpressionLiteral`&&Ut.test(i))return{code:`unsafeExpressionLiteral`};let c=I(e,t,r);return c.length>0&&!c.some(e=>e.value===i)?{code:`invalidOption`}:null}function qt(e,t,n={}){return Object.entries(F(e)).reduce((e,[r,i])=>{let a=Kt(r,i,t[r],n);return a?{...e,[r]:a}:e},{})}var L=/\{\{([A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)*)\}\}/g;function Jt(e,t){return t.split(`.`).reduce((e,t)=>{if(!(typeof e!=`object`||!e))return e[t]},e)}function R(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):``}function z(e,t){return e.replace(L,(e,n)=>R(Jt(t,n)))}function Yt(e,t){return e.replace(L,(e,n)=>R(t[n]))}var B=M(`createPrompt`),Xt={cron:[`schedule`,`timezone`],event:[`on`]},Zt=[`ref`],Qt=/\{\{form\.([A-Za-z0-9_.]+)\}\}/g;function $t(e){let t=Object.entries(F(e)).find(([,e])=>e.type===`repo-picker`);return t?{name:t[0],field:t[1]}:null}function en(e){let t=Object.entries(e.form.triggers??{});if(t.length===0)return null;let[n,r]=t[0];return{kind:n,fields:r??{}}}function V(e,t){let{setup:n}=e;if(n.mode!==`direct`||!n.prompt)return null;let r={form:t,automation:e},i=$t(n),a=i?t[i.name]:void 0,o={name:a?`${e.name} - ${a}`:e.name,prompt:z(n.prompt,r)};if(a&&i?.field.provider){let e=Zt.filter(e=>e in t);o.repos=[{url:a,...Object.fromEntries(e.map(e=>[e,t[e]])),provider:i.field.provider}]}let s=en(n);if(s){let e=Xt[s.kind],a=Object.keys(s.fields).filter(t=>e.includes(t));o.trigger={type:s.kind,...Object.fromEntries(a.map(e=>[e,t[e]??``])),...s.kind===`event`&&{source:i?.field.provider??``,...n.filter&&{filter:z(n.filter,r)}}}}return o}function tn(e,t){let n=V(e,t);return n?{automationId:e.id,endpoint:B,draft:n}:null}function nn(e,t){return[h(e),e.setup.message?z(e.setup.message,{form:t,automation:e}):``].filter(Boolean).join(`
|
|
2
2
|
|
|
3
3
|
`)}function rn(e){let t=Array.from(e.matchAll(Qt),e=>e[1]);return Array.from(new Set(t))}function an(e){let t={},n=V(e,Object.fromEntries(Object.keys(F(e.setup)).map(e=>[e,`{{form.${e}}}`])));if(!n)return t;let r=(e,n)=>{if(Array.isArray(e)){e.forEach((e,t)=>r(e,`${n}[${t}]`));return}if(typeof e==`object`&&e){Object.entries(e).forEach(([e,t])=>r(t,n?`${n}.${e}`:e));return}if(typeof e==`string`){let r=rn(e);r.length>0&&(t[n]=r)}};return r(n,``),t}var H=`/api/automation`,U=n.create();async function W(e={}){let t=await te();return{...a,...t?{[r]:t}:{},...e}}U.interceptors.request.use(async e=>{let t=await W();if(Object.entries(t).forEach(([t,n])=>{e.headers.set(t,n)}),e.baseURL)return e;let n=ne();if(!n)throw new i;e.baseURL=n.host;let r=n.apiKey?.trim();return r&&e.headers.set(`X-Session-API-Key`,r),e});function G(e){return typeof e==`string`&&e.trim()||null}function on(e){return typeof e==`string`?G(e):G(e.sdk_version)??G(e.version)}function K(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function sn(e){return e.trigger.type===`event`?{type:`event`,source:e.trigger.source,on:e.trigger.on,...e.trigger.filter&&{filter:e.trigger.filter}}:{type:`cron`,schedule:e.trigger.schedule,timezone:e.timezone??e.trigger.timezone??`UTC`}}function cn(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function ln(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let{importDefaults:t}=P(),n=e.repository?[{url:e.repository,...e.branch&&{ref:e.branch},...!e.repository.includes(`://`)&&!e.repository.startsWith(`git@`)&&{provider:t.repoProvider}}]:void 0;return{path:`${H}${M(e.plugins?.length?`createPlugin`:`createPrompt`)}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:t.placeholderEventSource,on:cn()},...e.model&&{model:e.model},...n&&{repos:n},...e.plugins?.length&&{plugins:e.plugins.map(e=>({source:e}))},...e.timeout!=null&&{timeout:e.timeout}}}}async function q(e){let t=e.apiKey.trim();return{baseURL:e.host,headers:await W(t?{"X-Session-API-Key":t}:{})}}async function J(e){return W(e.orgId?{"X-Org-Id":e.orgId}:{})}var Y=class e{static async syncTelemetryConsent(e=u()){if(l().backend.kind!==`local`)return;let t=await ie();await U.post(`${H}/v1/telemetry/consent`,{consent_granted:e===`granted`,frontend_distinct_id:t},{timeout:5e3}),e!==`granted`&&t&&s(t)}static async getSdkVersion(){let e=l(),t=`${H}/sdk-version`;try{let n;if(e.backend.kind===`cloud`)n=await f({backend:e.backend,method:`GET`,path:t,headers:await J(e),timeoutSeconds:5});else{let{data:e}=await U.get(t,{timeout:5e3});n=e}return on(n)}catch{return null}}static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=l().backend;if(r.kind===`cloud`)return f({backend:r,method:`GET`,path:`${H}${M(`list`)}?${K(t,n)}`,headers:await W()});let{data:i}=await U.get(`${H}${M(`list`)}`,{params:{limit:t,offset:n}});return i}static async getAutomations(t=50,n=0){return e.listAutomations({limit:t,offset:n})}static async getAutomation(e){let t=l().backend,n=`${H}${N(`detail`,e)}`;if(t.kind===`cloud`)return f({backend:t,method:`GET`,path:n,headers:await W()});let{data:r}=await U.get(n);return r}static async createAutomation(e){let t=l(),{path:n,body:r}=ln(e),i;if(t.backend.kind===`cloud`)i=await f({backend:t.backend,method:`POST`,path:n,body:r,headers:await J(t)});else{let{data:e}=await U.post(n,r,await q(t.backend));i=e}let a=`${H}${N(`detail`,i.id)}`,o={trigger:sn(e),enabled:!1};try{if(t.backend.kind===`cloud`)return await f({backend:t.backend,method:`PATCH`,path:a,body:o,headers:await J(t)});let{data:e}=await U.patch(a,o,await q(t.backend));return e}catch(e){try{t.backend.kind===`cloud`?await f({backend:t.backend,method:`DELETE`,path:a,headers:await J(t)}):await U.delete(a,await q(t.backend))}catch(t){throw AggregateError([e,t],`Failed to disable the imported automation and clean it up.`)}throw e}}static async updateAutomation(e,t){let n=l().backend,r=`${H}${N(`detail`,e)}`;if(n.kind===`cloud`)return f({backend:n,method:`PATCH`,path:r,body:t,headers:await W()});let{data:i}=await U.patch(r,t);return i}static async deleteAutomation(e){let t=l().backend,n=`${H}${N(`detail`,e)}`;if(t.kind===`cloud`){await f({backend:t,method:`DELETE`,path:n,headers:await W()});return}await U.delete(n)}static async dispatchAutomation(e){let t=l().backend,n=`${H}${N(`dispatch`,e)}`;if(t.kind===`cloud`)return f({backend:t,method:`POST`,path:n,headers:await W()});let{data:r}=await U.post(n);return r}static async cancelAutomationRun(e){let t=l().backend,n=`${H}/v1/runs/${encodeURIComponent(e)}/cancel`;if(t.kind===`cloud`)return f({backend:t,method:`POST`,path:n,headers:await W()});let{data:r}=await U.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,i=l().backend,a=`${H}${N(`runs`,e)}`;if(i.kind===`cloud`)return f({backend:i,method:`GET`,path:`${a}?${K(n,r)}`,headers:await W()});let{data:o}=await U.get(a,{params:{limit:n,offset:r}});return o}static async getAutomationRuns(t,n=50,r=0){return e.listAutomationRuns(t,{limit:n,offset:r})}static async toggleAutomation(t,n){return e.updateAutomation(t,{enabled:n})}static async downloadTarball(e,t){let n=l().backend,r=`${H}${N(`tarball`,e)}`,i;if(n.kind===`cloud`)i=await f({backend:n,method:`GET`,path:r,responseType:`blob`,headers:await W()});else{let{data:e}=await U.get(r,{responseType:`blob`});i=e}let a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`${t}.tar`,o.click(),URL.revokeObjectURL(a)}static async getCapabilities(){let e=l().backend,t=`${H}${M(`capabilities`)}`;if(e.kind===`cloud`)return f({backend:e,method:`GET`,path:t,headers:await W()});let{data:n}=await U.get(t);return n}static async validateDraft(e){let t=l().backend,n=`${H}${M(`validate`)}`;if(t.kind===`cloud`)return f({backend:t,method:`POST`,path:n,body:e,headers:await W()});let{data:r}=await U.post(n,e);return r}static async createAutomationDraft(e){let t=l().backend,n=`${H}${B}`;if(t.kind===`cloud`)return f({backend:t,method:`POST`,path:n,body:e,headers:await W()});let{data:r}=await U.post(n,e);return r}static async checkHealth(){let e=l().backend,t=`${H}${M(`health`)}`;try{if(e.kind===`cloud`)return await f({backend:e,method:`GET`,path:t,timeoutSeconds:5,headers:await W()});let{data:n}=await U.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},un=`automation-sdk-version`,dn=3600*1e3,fn=`\0`,X=new Map,Z=new Map;function Q(e){let t=X.get(e);if(t){if(t.expiresAt<=Date.now()){X.delete(e);return}return t.version}}function $(e,t){X.set(e,{expiresAt:Date.now()+dn,version:t})}function pn(e){let t=Q(e);if(t!==void 0)return Promise.resolve(t);let n=Z.get(e);if(n)return n;if(typeof Y.getSdkVersion!=`function`)return $(e,null),Promise.resolve(null);let r=Y.getSdkVersion().then(t=>($(e,t),t)).catch(()=>($(e,null),null)).finally(()=>{Z.delete(e)});return Z.set(e,r),r}function mn(){let e=re(),{backend:t}=e,n=[un,t.id,t.kind,t.host,e.orgId??``].join(fn),[r,i]=m.useState(()=>Q(n)??null);return m.useEffect(()=>{if(ee(t)){i(null);return}let e=Q(n);if(e!==void 0){i(e);return}let r=!0;return i(null),pn(n).then(e=>{r&&i(e)}),()=>{r=!1}},[t,n]),r}var hn=()=>{let{backend:e}=re(),t=mn(),n=m.useCallback(()=>({backendKind:e.kind,agentServerVersion:e.kind===`local`?o(e.host):null,automationSdkVersion:t??null}),[t,e.host,e.kind]);m.useEffect(()=>{d(n())},[n]);let r={current_url:window.location.href},i=(e,t={})=>{d(n()),c(e,{...r,...t})};return{trackLoginButtonClick:({provider:e})=>{i(`login_button_clicked`,{provider:e})},trackConversationCreated:({conversationId:e,taskId:t,hasRepository:n,gitProvider:r,hasWorkspace:a,workspaceMode:o,hasInitialQuery:s,agentType:c,hasParentConversation:l,entryPoint:u})=>{i(`conversation_start_requested`,{conversation_id:e,task_id:t,is_start_task:e.startsWith(`task-`),has_repository:n,git_provider:r,has_workspace:a,workspace_mode:o,has_initial_query:s,agent_type:c,has_parent_conversation:l,entry_point:u})},trackPushButtonClick:()=>{i(`push_button_clicked`)},trackPullButtonClick:()=>{i(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{i(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{i(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{i(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackAutomationSetupOpened:({automationId:e})=>{i(`automation_setup_opened`,{automation_id:e})},trackAutomationSetupValidated:({automationId:e})=>{i(`automation_setup_validated`,{automation_id:e})},trackAutomationSetupCreated:({automationId:e,setupMode:t})=>{i(`automation_setup_created`,{automation_id:e,setup_mode:t})},trackAutomationSetupFailed:({automationId:e,setupMode:t})=>{i(`automation_setup_failed`,{automation_id:e,setup_mode:t})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{i(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{i(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{i(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{i(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{i(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{i(`download_trajectory_button_clicked`)},trackConversationExported:e=>{i(`conversation_exported`,{format:e})},trackAutomationCreatedButton:({backendKind:e})=>{i(`automation_created_button`,{backend_kind:e})},trackAutomationExecuted:({backendKind:e})=>{i(`automation_executed`,{backend_kind:e})},trackAutomationDeleted:({backendKind:e})=>{i(`automation_deleted`,{backend_kind:e})},trackAutomationDisableButton:({backendKind:e})=>{i(`automation_disable_button`,{backend_kind:e})},trackAutomationEdited:({backendKind:e})=>{i(`automation_edited`,{backend_kind:e})},trackAutomationExported:({backendKind:e})=>{i(`automation_exported`,{backend_kind:e})},trackAutomationActivityLogExported:({backendKind:e,format:t})=>{i(`automation_activity_log_exported`,{backend_kind:e,format:t})},trackAutomationImported:({backendKind:e})=>{i(`automation_imported`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,hasApiKey:n,source:r,agentServerVersion:a,backendVersion:o})=>{i(`backend_added`,{...ae({backendKind:e,agentServerVersion:a,backendVersion:o,connectionMethod:t}),has_api_key:n,source:r})},trackOnboardingStarted:()=>{i(`onboarding_started`)},trackOnboardingStepViewed:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_step_viewed`,{step:e,step_index:t,total_steps:n,agent:r})},trackOnboardingCompleted:({agent:e})=>{i(`onboarding_completed`,{agent:e})},trackOnboardingSkipped:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{i(`onboarding_skipped`,{step:e,step_index:t,total_steps:n,agent:r})}}};export{Bt as C,de as D,h as E,le as O,zt as S,_t as T,Lt as _,tn as a,P as b,F as c,Wt as d,qt as f,It as g,jt as h,V as i,ue as k,I as l,j as m,Y as n,an as o,Mt as p,nn as r,Yt as s,hn as t,Gt as u,Vt as v,Ht as w,Ft as x,Rt as y};
|
package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-DVtfg0B_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useQuery-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useQuery-DRv--6bK.js";import{n as r}from"./active-backend-context-IqOjobNK.js";import{t as i}from"./agent-server-conversation-service.api-DWBe0rbX.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,o as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e,o as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{h as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{n as r}from"./useQuery-DRv--6bK.js";var i=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:e(r,i.data),hasPreviousPage:t(r,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function a(e,t){return r(e,i,t)}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{E as n,T as r,j as i,m as a,n as o,u as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{E as n,T as r,j as i,m as a,n as o,u as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{R as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";var u=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=o(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let a=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(s.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=d.useCallback((e,t)=>{i.mutate(e,t).catch(c)},[i]);if(a.error&&n(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}export{f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{S as n,T as r,j as i,n as a,u as o,y as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{S as n,T as r,j as i,n as a,u as o,y as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{c,d as l,f as u,h as d,m as f,o as p,p as m,s as h,u as g}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";function _(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function v(e,t,n){let r=e.slice(0);return r[t]=n,r}var y=class extends i{#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,o.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),i=n.map(e=>e.getCurrentResult()),a=e.length!==n.length,o=n.some((t,n)=>t!==e[n]),s=a||o,c=s?!0:i.some((e,t)=>{let n=this.#t[t];return!n||!r(e,n)});!s&&!c||(s&&(this.#l=t,this.#i=n),this.#t=i,this.hasListeners()&&(s&&(_(e,n).forEach(e=>{e.destroy()}),_(n,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,r){if(t){let i=this.#c,a=r!==void 0&&i!==void 0&&(i.length!==r.length||r.some((e,t)=>e!==i[t]));return(!this.#a||this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,r!==void 0&&(this.#c=r),this.#a=n(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 d(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=v(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)&&o.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},b=e(t(),1);function x({queries:e,...t},n){let r=a(n),i=f(),_=m(),v=b.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);v.forEach(e=>{p(e),g(e,_,r.getQueryCache().get(e.queryHash))}),u(_);let[x]=b.useState(()=>new y(r,v,t)),[S,C,w]=x.getOptimisticResult(v,t.combine),T=!i&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(e=>T?x.subscribe(o.batchCalls(e)):s,[x,T]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),b.useEffect(()=>{x.setQueries(v,t)},[v,t,x]);let E=S.some((e,t)=>c(v[t],e))?S.flatMap((e,t)=>{let n=v[t];return n&&c(n,e)?h(n,new d(r,n),_):[]}):[];if(E.length>0)throw Promise.all(E);let D=S.find((e,t)=>{let n=v[t];return n&&l({result:e,errorResetBoundary:_,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(D?.error)throw D.error;return C(w())}export{x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{f as n,n as r,u as i,y as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{f as n,n as r,u as i,y as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{c as o,d as s,f as c,h as l,l as u,m as d,o as f,p,s as m,u as h}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";var g=e(t(),1);function _(e,t,l){let _=d(),v=p(),y=r(l),b=y.defaultQueryOptions(e);y.getDefaultOptions().queries?._experimental_beforeQuery?.(b);let x=y.getQueryCache().get(b.queryHash),S=e.subscribed!==!1;b._optimisticResults=_?`isRestoring`:S?`optimistic`:void 0,f(b),h(b,v,x),c(v);let C=!y.getQueryCache().get(b.queryHash),[w]=g.useState(()=>new t(y,b)),T=w.getOptimisticResult(b),E=!_&&S;if(g.useSyncExternalStore(g.useCallback(e=>{let t=E?w.subscribe(i.batchCalls(e)):a;return w.updateResult(),t},[w,E]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),g.useEffect(()=>{w.setOptions(b)},[b,w]),o(b,T))throw m(b,w,v);if(s({result:T,errorResetBoundary:v,throwOnError:b.throwOnError,query:x,suspense:b.suspense}))throw T.error;return y.getDefaultOptions().queries?._experimental_afterQuery?.(b,T),b.experimental_prefetchInRender&&!n.isServer()&&u(T,_)&&(C?m(b,w,v):x?.promise)?.catch(a).finally(()=>{w.updateResult()}),b.notifyOnChangeProps?T:w.trackResult(T)}function v(e,t){return _(e,l,t)}export{_ as n,v as t};
|