@openhands/agent-canvas 1.17.0 → 1.19.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-BQ4o4vqy.js +1 -0
- package/build/assets/active-backend-context-BsLfwrXB.js +2 -0
- package/build/assets/{agent-context-settings-CJUrcBut.js → agent-context-settings-D9i6ezoJ.js} +1 -1
- package/build/assets/{agent-profiles-service.api-Biieml2L.js → agent-profiles-service.api-U-9YzDFU.js} +1 -1
- package/build/assets/agent-profiles-settings-D-bUV2PX.js +1 -0
- package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
- package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
- package/build/assets/agent-server-conversation-service.api-BaVQ6NpE.js +88 -0
- package/build/assets/agent-settings-BZJHtaIK.js +2 -0
- package/build/assets/agent-settings-D4snDd6u.js +1 -0
- package/build/assets/alert-banner-BkVt_8Or.js +1 -0
- package/build/assets/{api-error-message-Ve79qDcN.js → api-error-message-BXo0lCI5.js} +1 -1
- package/build/assets/api-key-entry-screen-fAIld-n7.js +1 -0
- package/build/assets/app-settings-DITbrM2u.js +1 -0
- package/build/assets/automation-detail-DawHmaOl.js +3 -0
- package/build/assets/automation-disabled-reason-DtgC8Ppt.js +1 -0
- package/build/assets/{automation-export-DxY47m3T.js → automation-export-Kv6e0bHx.js} +1 -1
- package/build/assets/automation-git-sync-Dd98G_Oz.js +1 -0
- package/build/assets/automation-setup-route-Cdc109ZD.js +3 -0
- package/build/assets/{automation-templates-4C4PM8K7.js → automation-templates-Xhr-FDAB.js} +1 -1
- package/build/assets/automations-list-BeP1LuzQ.js +1 -0
- package/build/assets/{back-nav-button-B8tH0BEp.js → back-nav-button-DWNiN277.js} +1 -1
- package/build/assets/backend-form-modal-DeaUJIik.js +1 -0
- package/build/assets/backend-synced-settings-badge-Br85iWIY.js +1 -0
- package/build/assets/badge-Cdnei7Ly.js +1 -0
- package/build/assets/{base-modal-DTULovNc.js → base-modal-Ds7grR67.js} +1 -1
- package/build/assets/{bot-CLMxGFaq.js → bot-ByolqPEr.js} +1 -1
- package/build/assets/{brand-button-DxPO4Lf8.js → brand-button-mQq2Ld1I.js} +1 -1
- package/build/assets/browser-Bfum8fkE.js +46 -0
- package/build/assets/browser-tab-CmYT4j_r.js +1 -0
- package/build/assets/canvas-extension-page-CokKSVRG.js +1 -0
- package/build/assets/canvas-extensions-BoQEYG-2.js +1 -0
- package/build/assets/{canvas-extensions-runtime-DdnkgJXV.js → canvas-extensions-runtime-Du2M5iEX.js} +1 -1
- package/build/assets/{chat-send-button-B3SFSIg5.js → chat-send-button-DM3JgMc2.js} +1 -1
- package/build/assets/check-Bo8s5Ylg.js +1 -0
- package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
- package/build/assets/chevron-right-CfdfRn-8.js +1 -0
- package/build/assets/circle-check-5pH3qCji.js +1 -0
- package/build/assets/circle-plus-check-toggle-BbYBiUwv.js +1 -0
- package/build/assets/{cloud-funnel-analytics-BQanUEEC.js → cloud-funnel-analytics-D02kgq1s.js} +1 -1
- package/build/assets/{cog-VBlRo6iw.js → cog-Dy1eWbSZ.js} +1 -1
- package/build/assets/command-menu-mehU3Evb.js +1 -0
- package/build/assets/commits-tab-DhQW8CXi.js +1 -0
- package/build/assets/{condenser-settings-eVKFMvap.js → condenser-settings-eRk6Fkx6.js} +1 -1
- package/build/assets/confirmation-modal-BmVt_c0I.js +1 -0
- package/build/assets/{context-menu-list-item-DDROe12Z.js → context-menu-list-item-lx2zk9G7.js} +1 -1
- package/build/assets/{conversation-BnjJSFf5.js → conversation-BOj0ENI6.js} +8 -8
- package/build/assets/conversation-SouWlGvs.js +1 -0
- package/build/assets/conversation-panel-SouWlGvs.js +1 -0
- package/build/assets/conversation-state-store-C6YncQNo.js +1 -0
- package/build/assets/conversation-store-DC-JlJuq.js +6 -0
- package/build/assets/{conversation-tab-empty-state-DKlzAz5c.js → conversation-tab-empty-state-DIhwCC2J.js} +1 -1
- package/build/assets/copy-to-clipboard-button-DVNXLylP.js +1 -0
- package/build/assets/device-verify-LP-x7nra.js +1 -0
- package/build/assets/{dropdown-classes-B9kJVDIk.js → dropdown-classes-goDldkiu.js} +1 -1
- package/build/assets/edit-automation-modal-BJJR9wSW.js +1 -0
- package/build/assets/empty-state-Cd-TFe7i.js +1 -0
- package/build/assets/{entry.client-Ds8LVp-E.js → entry.client-CJdjIvMZ.js} +2 -2
- package/build/assets/enum-filter-dropdown-pocrz9AL.js +1 -0
- package/build/assets/environment-switch-overlay-Dwe78wRl.js +1 -0
- package/build/assets/error-state-SuWwztxV.js +1 -0
- package/build/assets/extensions-hub-O0esK3Er.js +1 -0
- package/build/assets/extensions-navigation-CgCVSXje.js +1 -0
- package/build/assets/{external-link-DQtv7eTh.js → external-link-Bd7Tga-1.js} +1 -1
- package/build/assets/files-tab-B_6t8ljw.js +1 -0
- package/build/assets/{form-control-classes-B-z85REi.js → form-control-classes-lQfLxzH4.js} +1 -1
- package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
- package/build/assets/get-git-path-Bp5rsUkl.js +1 -0
- package/build/assets/git-repo-dropdown-CbD0_LPN.js +1 -0
- package/build/assets/git-repo-dropdown-DPQVumZg.js +1 -0
- package/build/assets/highlighted-source-view-Bp0sgK-f.js +1 -0
- package/build/assets/home-BghzJd-D.js +1 -0
- package/build/assets/home-CXZ8zawS.js +1 -0
- package/build/assets/home-automation-run-tooltip-BdpCckKO.js +1 -0
- package/build/assets/home-store-DNQpfIEO.js +1 -0
- package/build/assets/hooks-service-DkxnQa4N.js +1 -0
- package/build/assets/index-home-Ca6Q5CtT.js +1 -0
- package/build/assets/info-BcajzHn1.js +1 -0
- package/build/assets/install-server-modal-DvxxYKia.js +1 -0
- package/build/assets/{key-CfXbJa8w.js → key-CwTE6XJj.js} +1 -1
- package/build/assets/launch-jsRGPRBx.js +1 -0
- package/build/assets/link-external-B4gx3EeM.js +1 -0
- package/build/assets/list-filter-B8PQk3RA.js +1 -0
- package/build/assets/{list-todo-ByXMdY4W.js → list-todo-Caa8E1X_.js} +1 -1
- package/build/assets/llm-not-configured-banner-DMdL1vaX.js +27 -0
- package/build/assets/llm-settings-dkQ5Oq7W.js +1 -0
- package/build/assets/llm-settings-lNDerSlu.js +1 -0
- package/build/assets/{llm-subscription-service-aDNBQ7Gq.js → llm-subscription-service-BiQaZbvv.js} +1 -1
- package/build/assets/loader-circle-BxJgk73D.js +1 -0
- package/build/assets/{loading-spinner-DfHI77BA.js → loading-spinner-DK1sAwVg.js} +1 -1
- package/build/assets/manage-backends-modal-DqCJohsX.js +1 -0
- package/build/assets/manifest-ff93dc8c.js +1 -0
- package/build/assets/manifest-subpage-layout-sxuPqfUr.js +1 -0
- package/build/assets/{map-provider-DXvssjw9.js → map-provider-iRs80q_6.js} +1 -1
- package/build/assets/markdown-renderer-BH5pqDuJ.js +8 -0
- package/build/assets/mcp-BtaJDXnP.js +1 -0
- package/build/assets/mcp-installed-servers-Br4ZLsjr.js +1 -0
- package/build/assets/mcp-marketplace-utils-BwEnDYqm.js +1 -0
- package/build/assets/mcp-page-DwbnQpVs.js +9 -0
- package/build/assets/messages-DmFJlW6c.js +41 -0
- package/build/assets/{modal-body-DJw4xBki.js → modal-body-DBweM2EN.js} +1 -1
- package/build/assets/{modal-classes-Dg0ngBPO.js → modal-classes-jvG85nkU.js} +1 -1
- package/build/assets/modal-close-button-BrM5fNnn.js +1 -0
- package/build/assets/{mouse-pointer-click-DEhsSUpu.js → mouse-pointer-click-BXlRN92t.js} +1 -1
- package/build/assets/onboarding-CQ8T6T0U.js +1 -0
- package/build/assets/onboarding-modal-CnliiaSN.js +1 -0
- package/build/assets/{organization-service.api-Cyg1Tn03.js → organization-service.api-DmFUEmu5.js} +1 -1
- package/build/assets/parse-git-remote-url-BG8pcKL8.js +1 -0
- package/build/assets/{pencil-D5c47kyN.js → pencil-q-ihqDYv.js} +1 -1
- package/build/assets/{pin-C7vMagvf.js → pin-BdroVQdN.js} +1 -1
- package/build/assets/planner-tab-CXph_C9F.js +1 -0
- package/build/assets/{plug-CeaqeF6u.js → plug-7ACOEbMs.js} +1 -1
- package/build/assets/{plugins-management-service-Bh_pBuf-.js → plugins-management-service-CcEpfNKz.js} +1 -1
- package/build/assets/plus-C2e21TFC.js +1 -0
- package/build/assets/{profiles-service.api-BbOK0EkF.js → profiles-service.api-DdF_4Zhe.js} +1 -1
- package/build/assets/providers-BWRnl31s.js +1 -0
- package/build/assets/proxy-DbEf3Nqr.js +1 -0
- package/build/assets/{puzzle-DdAqbUrb.js → puzzle-LJYnuxKe.js} +1 -1
- package/build/assets/react-BX7IV650.js +1 -0
- package/build/assets/recommended-automations-launcher-r0oI91HN.js +1 -0
- package/build/assets/{refresh-cw-DEQdPCpH.js → refresh-cw-BtdC3T8P.js} +1 -1
- package/build/assets/root-j2fFRlWS.js +2 -0
- package/build/assets/root-layout-CfGgm2lo.js +2 -0
- package/build/assets/root-sEWn3ha1.css +1 -0
- package/build/assets/schema-field-c3Ncgm4x.js +1 -0
- package/build/assets/sdk-section-page-DFEiuiFQ.js +1 -0
- package/build/assets/secret-form-WXXNFqTM.js +1 -0
- package/build/assets/{secrets-service-Cr8g8xuv.js → secrets-service-DU6wh3wX.js} +1 -1
- package/build/assets/secrets-settings-BEqbPvjy.js +1 -0
- package/build/assets/settings-DjaSQwFh.js +1 -0
- package/build/assets/settings-dropdown-input-BRR2OZwi.js +1 -0
- package/build/assets/settings-index-DHv4XFcM.js +1 -0
- package/build/assets/settings-input-Cm4VxUon.js +1 -0
- package/build/assets/{settings-list-classes-Ds4jPBHK.js → settings-list-classes-CaUfKZ33.js} +1 -1
- package/build/assets/settings-modal-djXuAnBO.js +1 -0
- package/build/assets/settings-nav-DFb3hBMr.js +16 -0
- package/build/assets/{settings-service.api-9_xdv_mh.js → settings-service.api-Q9lKW1TX.js} +1 -1
- package/build/assets/settings-switch-seaSJc7t.js +1 -0
- package/build/assets/{settings-utils-8GIIgOQL.js → settings-utils-BTaaRhLZ.js} +1 -1
- package/build/assets/shared-conversation-x3rxVCon.js +1 -0
- package/build/assets/{shield-check-DO7wa_eu.js → shield-check-C3Rl0NF8.js} +1 -1
- package/build/assets/{sidebar-layout-EPfWxk11.js → sidebar-layout-B6mcvvdV.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-CEqS8KnA.js +1 -0
- package/build/assets/{sidebar-nav-link-_t4_Ef-9.js → sidebar-nav-link-BTHX11LG.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-DbDX-Wvj.js → sidebar-onboarding-checklist-storage-BP1kzn6p.js} +1 -1
- package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
- package/build/assets/skill-card-pill-row-TD39nfP3.js +1 -0
- package/build/assets/{skill-filter-BBeZ4JEP.js → skill-filter-CdBbbwjm.js} +2 -2
- package/build/assets/{skill-icon-badge-BDhQ-tQ0.js → skill-icon-badge-vUEp7gsC.js} +1 -1
- package/build/assets/skill-scope-BTRBQt0-.js +1 -0
- package/build/assets/skills-plugins-k1tUNAw4.js +1 -0
- package/build/assets/skills-settings-CENviPT7.js +1 -0
- package/build/assets/{styled-tooltip-Pd22BIvr.js → styled-tooltip-DVAlWYnL.js} +1 -1
- package/build/assets/task-list-tab-BLKF_x9f.js +1 -0
- package/build/assets/{terminal-onXx0_Qz.js → terminal-Ckbnqb23.js} +1 -1
- package/build/assets/{toggle-switch-lwQtxDcm.js → toggle-switch-DeiG9Mf6.js} +1 -1
- package/build/assets/{trash-2-ZhKuTLiz.js → trash-2-Bb40zQzs.js} +1 -1
- package/build/assets/trash-CXN2R54L.js +1 -0
- package/build/assets/{triangle-alert-BajLPpQg.js → triangle-alert-DEdu-b_L.js} +1 -1
- package/build/assets/{typography-HLLg_FAn.js → typography-NarNyelM.js} +1 -1
- package/build/assets/usage-tab-Drd3O006.js +1 -0
- package/build/assets/use-acp-credential-form-CJ5wPsQm.js +1 -0
- package/build/assets/{use-activate-agent-profile-BLKML6vQ.js → use-activate-agent-profile-iQZ0U3qV.js} +1 -1
- package/build/assets/use-agent-profiles-LCvb5OXT.js +1 -0
- package/build/assets/{use-automation-health-BZkQNEA8.js → use-automation-health-DdgSa8sA.js} +1 -1
- package/build/assets/{use-automation-permissions-B_RpvL-s.js → use-automation-permissions-D3kEeieu.js} +1 -1
- package/build/assets/{use-automations-Cg0PDIZr.js → use-automations-CEubcYTD.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BbN6KfDr.js → use-can-manage-org-profiles-CB8ybxFK.js} +1 -1
- package/build/assets/{use-canvas-extensions-CFUpHat6.js → use-canvas-extensions-BMacwi2v.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Dk0rjr63.js → use-cloud-current-user-id-BEKRd6XZ.js} +1 -1
- package/build/assets/{use-config-DpafU_QP.js → use-config-3WYcJsgC.js} +1 -1
- package/build/assets/{use-create-conversation-1YgmAHt-.js → use-create-conversation-Be-eVpFp.js} +1 -1
- package/build/assets/use-create-secret-Bk9ZxTjl.js +1 -0
- package/build/assets/use-free-models-Ci3FkKEm.js +1 -0
- package/build/assets/{use-get-secrets-CQ4b0qK8.js → use-get-secrets-fqS0kxt6.js} +1 -1
- package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-DeYa1tFM.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
- package/build/assets/use-llm-configured-B71ZEVg2.js +1 -0
- package/build/assets/use-llm-profiles-xtCBMbef.js +1 -0
- package/build/assets/{use-manifest-capabilities-AOWGcu0j.js → use-manifest-capabilities-Bso6A_-A.js} +1 -1
- package/build/assets/{use-onboarding-completion-CoINurkm.js → use-onboarding-completion-CEgjL02y.js} +1 -1
- package/build/assets/{use-pinned-home-route-D6krwXjy.js → use-pinned-home-route-pK4IlJ-p.js} +1 -1
- package/build/assets/{use-plugins-marketplace-mLsIDhBv.js → use-plugins-marketplace-B8-ZEB34.js} +1 -1
- package/build/assets/use-save-agent-profile-D7hJuW_u.js +1 -0
- package/build/assets/{use-save-settings-3U5K9-8x.js → use-save-settings-CikTu5xV.js} +1 -1
- package/build/assets/{use-settings-Dn00UISA.js → use-settings-BWIH5EuN.js} +1 -1
- package/build/assets/use-settings-nav-items-DSKwLDnd.js +1 -0
- package/build/assets/use-tracking-ChnSFChv.js +3 -0
- package/build/assets/{use-user-conversation-ZWlXtbZb.js → use-user-conversation-C_l65DqW.js} +1 -1
- package/build/assets/{useInfiniteQuery-BzrRqjLg.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
- package/build/assets/{useMutation-CJuK90oc.js → useMutation-Cszf8mKy.js} +1 -1
- package/build/assets/useQueries-pUohFMSP.js +1 -0
- package/build/assets/useQuery-DAAacS7O.js +1 -0
- package/build/assets/useTranslation-CCgUjPJF.js +1 -0
- package/build/assets/utils-D-gOfhmN.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-4eJ0tml3.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
- package/build/assets/{vendor~root-layout-n8XCEXG8.js → vendor~root-layout-CcdIqs-C.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js +48 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +1 -1
- package/build/assets/{verification-settings-u2POabjH.js → verification-settings-PKtoIUUY.js} +1 -1
- package/build/assets/{wrench-CkgI4rxA.js → wrench-B8Wg_nbp.js} +1 -1
- package/build/assets/{x-By6qCmtY.js → x-CX8lVGwm.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +16 -2
- package/build/locales/ca/openhands.json +16 -2
- package/build/locales/de/openhands.json +16 -2
- package/build/locales/en/openhands.json +16 -2
- package/build/locales/es/openhands.json +16 -2
- package/build/locales/fr/openhands.json +16 -2
- package/build/locales/it/openhands.json +16 -2
- package/build/locales/ja/openhands.json +16 -2
- package/build/locales/ko-KR/openhands.json +16 -2
- package/build/locales/no/openhands.json +16 -2
- package/build/locales/pt/openhands.json +16 -2
- package/build/locales/tr/openhands.json +16 -2
- package/build/locales/uk/openhands.json +16 -2
- package/build/locales/zh-CN/openhands.json +16 -2
- package/build/locales/zh-TW/openhands.json +16 -2
- package/config/defaults.json +3 -3
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +9 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +6 -2
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.types.d.ts +13 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js +12 -16
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +39 -38
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +73 -72
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
- package/dist/components/features/automations/build-automation-menu-items.js +12 -11
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +8 -5
- package/dist/components/features/automations/detail/disabled-reason-banner.d.ts +16 -0
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +112 -112
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +27 -26
- package/dist/components/features/chat/model-messages.js.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
- package/dist/components/features/conversation-panel/budget-display.js +12 -19
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +38 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/images/image-lightbox.cjs +2 -0
- package/dist/components/features/images/image-lightbox.cjs.map +1 -0
- package/dist/components/features/images/image-lightbox.d.ts +11 -0
- package/dist/components/features/images/image-lightbox.js +37 -0
- package/dist/components/features/images/image-lightbox.js.map +1 -0
- package/dist/components/features/images/image-preview.cjs +1 -1
- package/dist/components/features/images/image-preview.cjs.map +1 -1
- package/dist/components/features/images/image-preview.d.ts +2 -1
- package/dist/components/features/images/image-preview.js +33 -13
- package/dist/components/features/images/image-preview.js.map +1 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
- package/dist/components/features/settings/agent-profiles/profile-scope-list.d.ts +20 -0
- package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
- package/dist/components/features/settings/cloud-settings-link.js +22 -21
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -1
- package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +2 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +143 -142
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +28 -27
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.js +33 -29
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/shared/buttons/remove-button.cjs +1 -1
- package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +2 -1
- package/dist/components/shared/buttons/remove-button.js +2 -1
- package/dist/components/shared/buttons/remove-button.js.map +1 -1
- package/dist/components/shared/free-models-note.cjs +2 -0
- package/dist/components/shared/free-models-note.cjs.map +1 -0
- package/dist/components/shared/free-models-note.d.ts +3 -0
- package/dist/components/shared/free-models-note.js +20 -0
- package/dist/components/shared/free-models-note.js.map +1 -0
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +102 -112
- package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +7 -0
- package/dist/constants/acp-providers.js +20 -16
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/profile-scope.d.ts +21 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +63 -62
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.js +3 -1
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/query/use-free-models.cjs +2 -0
- package/dist/hooks/query/use-free-models.cjs.map +1 -0
- package/dist/hooks/query/use-free-models.d.ts +23 -0
- package/dist/hooks/query/use-free-models.js +67 -0
- package/dist/hooks/query/use-free-models.js.map +1 -0
- package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
- package/dist/hooks/query/use-local-git-info.js.map +1 -1
- package/dist/hooks/query/use-provider-models.cjs +1 -1
- package/dist/hooks/query/use-provider-models.cjs.map +1 -1
- package/dist/hooks/query/use-provider-models.js +34 -25
- package/dist/hooks/query/use-provider-models.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +31 -19
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.js +8 -9
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.d.ts +1 -2
- package/dist/hooks/use-home-automation-actions.js +0 -1
- package/dist/hooks/use-home-automation-actions.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 +16 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +255 -17
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +16 -2
- package/dist/locales/ca/openhands.json +16 -2
- package/dist/locales/de/openhands.json +16 -2
- package/dist/locales/en/openhands.json +16 -2
- package/dist/locales/es/openhands.json +16 -2
- package/dist/locales/fr/openhands.json +16 -2
- package/dist/locales/it/openhands.json +16 -2
- package/dist/locales/ja/openhands.json +16 -2
- package/dist/locales/ko-KR/openhands.json +16 -2
- package/dist/locales/no/openhands.json +16 -2
- package/dist/locales/pt/openhands.json +16 -2
- package/dist/locales/tr/openhands.json +16 -2
- package/dist/locales/uk/openhands.json +16 -2
- package/dist/locales/zh-CN/openhands.json +16 -2
- package/dist/locales/zh-TW/openhands.json +16 -2
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +2 -2
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +15 -8
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +11 -13
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +6 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js +9 -12
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js +41 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +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 +199 -61
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js +9 -8
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +5 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +52 -47
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +137 -145
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/stores/free-models-store.cjs +2 -0
- package/dist/stores/free-models-store.cjs.map +1 -0
- package/dist/stores/free-models-store.d.ts +30 -0
- package/dist/stores/free-models-store.js +22 -0
- package/dist/stores/free-models-store.js.map +1 -0
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +23 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/utils/automation-disabled-reason.cjs +2 -0
- package/dist/utils/automation-disabled-reason.cjs.map +1 -0
- package/dist/utils/automation-disabled-reason.d.ts +32 -0
- package/dist/utils/automation-disabled-reason.js +19 -0
- package/dist/utils/automation-disabled-reason.js.map +1 -0
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +27 -6
- package/dist/utils/format-model-name.js +14 -6
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/parse-git-remote-url.cjs +1 -1
- package/dist/utils/parse-git-remote-url.cjs.map +1 -1
- package/dist/utils/parse-git-remote-url.d.ts +5 -1
- package/dist/utils/parse-git-remote-url.js +20 -13
- package/dist/utils/parse-git-remote-url.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +79 -8
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/static-server.mjs +24 -7
- package/build/assets/acp-providers-DrjNsPOH.js +0 -1
- package/build/assets/active-backend-context-rZiLJRUc.js +0 -2
- package/build/assets/agent-profiles-settings-x6RvPsq7.js +0 -1
- package/build/assets/agent-server-client-options-BikiNwTa.js +0 -1
- package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +0 -88
- package/build/assets/agent-settings-BJyovpJ_.js +0 -1
- package/build/assets/agent-settings-CpY3zObk.js +0 -2
- package/build/assets/alert-banner-vARz1idS.js +0 -1
- package/build/assets/api-key-entry-screen-CsMuBhoP.js +0 -1
- package/build/assets/app-settings-BaJ7nfHt.js +0 -1
- package/build/assets/automation-detail-CVoGDrKq.js +0 -3
- package/build/assets/automation-git-sync-CRMP9Bbm.js +0 -1
- package/build/assets/automation-setup-route-072beLz1.js +0 -3
- package/build/assets/automations-list-xuqTSQL4.js +0 -1
- package/build/assets/backend-form-modal-0aJmWdsa.js +0 -1
- package/build/assets/backend-synced-settings-badge-B7rKWBir.js +0 -1
- package/build/assets/badge-CcGx2TaV.js +0 -1
- package/build/assets/browser-C-_qBasq.js +0 -46
- package/build/assets/browser-tab-DZanIw5m.js +0 -1
- package/build/assets/canvas-extension-page-o_cWgE9B.js +0 -1
- package/build/assets/canvas-extensions-DSgNlCha.js +0 -1
- package/build/assets/check-fDEfgSzj.js +0 -1
- package/build/assets/chevron-down-CFrWHqu8.js +0 -1
- package/build/assets/chevron-right-C5roOrJu.js +0 -1
- package/build/assets/circle-check-ClTzJTdb.js +0 -1
- package/build/assets/circle-plus-check-toggle-Fr-h-mbL.js +0 -1
- package/build/assets/command-menu-BT3Ia5Ru.js +0 -1
- package/build/assets/commits-tab-2jhtaohl.js +0 -1
- package/build/assets/confirmation-modal-gIFHeZt6.js +0 -1
- package/build/assets/conversation-DZ578rOX.js +0 -1
- package/build/assets/conversation-panel-DZ578rOX.js +0 -1
- package/build/assets/conversation-state-store-D1_G_9I-.js +0 -1
- package/build/assets/conversation-store-DVVfkCsk.js +0 -6
- package/build/assets/copy-to-clipboard-button-B3w0X7WH.js +0 -1
- package/build/assets/device-verify-BfkCzyFB.js +0 -1
- package/build/assets/edit-automation-modal-BwhJ39JT.js +0 -1
- package/build/assets/empty-state-RZz0OfnY.js +0 -1
- package/build/assets/enum-filter-dropdown-C4pW0ORd.js +0 -1
- package/build/assets/environment-switch-overlay-P2ZAuzov.js +0 -1
- package/build/assets/error-state-B_5cgNPJ.js +0 -1
- package/build/assets/extensions-hub-DsaUr4ca.js +0 -1
- package/build/assets/extensions-navigation-CRMZd-FE.js +0 -1
- package/build/assets/files-tab-CCgAcVdc.js +0 -1
- package/build/assets/format-model-name-CasAP3nd.js +0 -1
- package/build/assets/get-git-path-EHrSDxTM.js +0 -1
- package/build/assets/git-repo-dropdown-D2WEQ97X.js +0 -1
- package/build/assets/git-repo-dropdown-DVeCUUXG.js +0 -1
- package/build/assets/highlighted-source-view-DjHO3SdW.js +0 -1
- package/build/assets/home-BorS_vdS.js +0 -1
- package/build/assets/home-aIMbHw5M.js +0 -1
- package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +0 -1
- package/build/assets/home-store-DyXz0w6d.js +0 -1
- package/build/assets/hooks-service-C6dpRtZM.js +0 -1
- package/build/assets/index-home-zKFuKK2B.js +0 -1
- package/build/assets/info-CTIdjttz.js +0 -1
- package/build/assets/install-server-modal-DUiZMc8u.js +0 -1
- package/build/assets/kebab-menu-item-content-mm04SBD3.js +0 -1
- package/build/assets/launch-BSIf9KEg.js +0 -1
- package/build/assets/link-external-BNZzCM1I.js +0 -1
- package/build/assets/list-filter-CNpqTWVY.js +0 -1
- package/build/assets/llm-not-configured-banner-z_QRSeV0.js +0 -27
- package/build/assets/llm-settings-B-5AHMiX.js +0 -1
- package/build/assets/llm-settings-B3SjHDmA.js +0 -1
- package/build/assets/loader-circle-Dex47vVW.js +0 -1
- package/build/assets/manage-backends-modal-q1NdFisr.js +0 -1
- package/build/assets/manifest-8920b615.js +0 -1
- package/build/assets/manifest-subpage-layout-BQQy5ipR.js +0 -1
- package/build/assets/markdown-renderer-rivLvYh-.js +0 -8
- package/build/assets/mcp-CEXDhQWn.js +0 -1
- package/build/assets/mcp-marketplace-utils-Cn_NIMWM.js +0 -1
- package/build/assets/mcp-page-LGYIICMG.js +0 -9
- package/build/assets/messages-DUSeANAh.js +0 -41
- package/build/assets/modal-close-button-B9j4nasm.js +0 -1
- package/build/assets/onboarding-BjFebfs5.js +0 -1
- package/build/assets/onboarding-modal-DDTjOpyd.js +0 -1
- package/build/assets/parse-git-remote-url-DpDM9bK6.js +0 -1
- package/build/assets/planner-tab-D8f2Y3rn.js +0 -1
- package/build/assets/plus-B3wvU06-.js +0 -1
- package/build/assets/providers-2gIIkz2N.js +0 -1
- package/build/assets/proxy-CBgMd2zf.js +0 -1
- package/build/assets/recommended-automations-launcher-YLAQTp4s.js +0 -1
- package/build/assets/root-Bye_XmEL.js +0 -2
- package/build/assets/root-Cnwwzgo0.css +0 -1
- package/build/assets/root-layout-CSAwxBGM.js +0 -2
- package/build/assets/schema-field-CK0xYNbO.js +0 -1
- package/build/assets/sdk-section-page-Da73Rs_o.js +0 -1
- package/build/assets/secret-form-CB2VwYYg.js +0 -1
- package/build/assets/secrets-settings-Bh0udeKv.js +0 -1
- package/build/assets/settings-DmyIgRxO.js +0 -1
- package/build/assets/settings-dropdown-input-DVpyD87C.js +0 -1
- package/build/assets/settings-index-BSJUFmjE.js +0 -1
- package/build/assets/settings-input-C0dd8Utu.js +0 -1
- package/build/assets/settings-modal-yStgEh2o.js +0 -1
- package/build/assets/settings-switch-B78Khmyz.js +0 -1
- package/build/assets/shared-conversation-DM96X4KV.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +0 -1
- package/build/assets/sidebar-store-CSDFK0W5.js +0 -1
- package/build/assets/skill-card-pill-row-989y15jV.js +0 -1
- package/build/assets/skill-scope-Dz3kPH3P.js +0 -1
- package/build/assets/skills-plugins-e3CYGdUJ.js +0 -1
- package/build/assets/skills-settings-3e-FuHw_.js +0 -1
- package/build/assets/task-list-tab-3Jg8ywch.js +0 -1
- package/build/assets/trash-B6OIe4yX.js +0 -1
- package/build/assets/usage-tab-Cm-9j3UK.js +0 -1
- package/build/assets/use-acp-credential-form-BARcvjYE.js +0 -1
- package/build/assets/use-agent-profiles-1P91KSXz.js +0 -1
- package/build/assets/use-create-secret-D8p9ybQj.js +0 -1
- package/build/assets/use-is-authed-BRPjCRKM.js +0 -1
- package/build/assets/use-llm-configured-DGm8FiRR.js +0 -1
- package/build/assets/use-llm-profiles-BTTtpW4z.js +0 -1
- package/build/assets/use-save-agent-profile-CxyO9YG-.js +0 -1
- package/build/assets/use-settings-nav-items-vrjxTqcu.js +0 -16
- package/build/assets/use-tracking-B9prBsrq.js +0 -3
- package/build/assets/useQueries-CykmpT-a.js +0 -1
- package/build/assets/useQuery-S6j94er1.js +0 -1
- package/build/assets/utils-BOco8mxR.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +0 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +0 -185
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js +0 -48
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +0 -1
|
@@ -0,0 +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{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as a}from"./useQuery-DAAacS7O.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{K as s,t as c}from"./utils-D-gOfhmN.js";import{n as l}from"./extensions-navigation-CgCVSXje.js";import{a as u,c as ee,d,f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,u as x}from"./skill-filter-CdBbbwjm.js";import{n as S}from"./use-settings-BWIH5EuN.js";import{t as C}from"./brand-button-mQq2Ld1I.js";import{n as w,o as T,t as E}from"./extension-module-card-classes-DpeaYhYo.js";import{a as D,o as O}from"./skill-scope-BTRBQt0-.js";import{n as te}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var k=e(t(),1),A=e=>a({queryKey:[`skills`,e??null],queryFn:()=>O.getSkills(e),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),j=n(),M=300;function N(){let{t:e}=o(`openhands`),{data:t,isLoading:n}=S(),{data:i,isLoading:a}=A(),{isEnabled:O,setEnabled:N}=D(),[P,F]=r(),[I,L]=k.useState(()=>P.get(`q`)??``),R=k.useRef(I),[z,B]=k.useState(null),[V,H]=k.useState(!1),[U,W]=k.useState(!1),G=n||a||!t,K=i??[],q=k.useMemo(()=>({..._(P),query:I}),[P,I]),J=k.useMemo(()=>y(K,O,q),[K,O,q]),Y=k.useMemo(()=>g(K,O,q),[K,O,q]),X=u(q);k.useEffect(()=>{let e=P.get(`q`)??``;e!==R.current&&(R.current=e,L(e))},[P]),k.useEffect(()=>{if((P.get(`q`)??``)===I)return;let e=setTimeout(()=>{R.current=I,F(e=>{let t=new URLSearchParams(e);return I?t.set(`q`,I):t.delete(`q`),t},{replace:!0})},M);return()=>clearTimeout(e)},[I,P,F]);let Z=e=>{e.query!==q.query&&L(e.query),b({...e,query:``}).toString()!==b({...q,query:``}).toString()&&F(b(e))},Q=(e,t)=>Z(ee(q,e,t)),$=()=>Z(p(q));return(0,j.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,j.jsx)(l,{}),(0,j.jsxs)(`main`,{className:c(te,`h-full`),children:[(0,j.jsxs)(`div`,{"data-testid":`skills-page`,className:`mx-auto flex w-full min-w-0 max-w-[1100px] flex-col gap-6`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,j.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,j.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(s.SETTINGS$SKILLS_TITLE)}),(0,j.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(s.SETTINGS$SKILLS_PAGE_DESCRIPTION)}),(0,j.jsx)(`div`,{"data-testid":`skills-new-conversation-notice`,className:`max-w-2xl text-xs text-tertiary-alt`,children:e(s.SETTINGS$SKILLS_NEW_CONVERSATION_NOTICE)})]}),(0,j.jsx)(C,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>H(!0),children:e(s.SETTINGS$SKILLS_ADD_BUTTON)})]}),G?(0,j.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,j.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}):null,!G&&K.length===0?(0,j.jsx)(`div`,{"data-testid":`skills-empty`,className:T,children:(0,j.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(s.SETTINGS$SKILLS_NO_SKILLS)})}):null,!G&&K.length>0?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(d,{search:q.query,onSearchChange:e=>Z({...q,query:e}),activeFilterCount:X,onOpenFilters:()=>W(!0)}),(0,j.jsxs)(`div`,{className:`flex min-w-0 gap-6`,children:[(0,j.jsx)(x,{groups:J,onToggle:Q,className:`hidden w-[240px] shrink-0 self-start md:flex`}),(0,j.jsxs)(`section`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs text-tertiary-light`,children:[(0,j.jsx)(`span`,{"data-testid":`skills-result-summary`,children:e(s.SETTINGS$SKILLS_RESULT_COUNT,{count:Y.length})}),X>0?(0,j.jsx)(`button`,{type:`button`,"data-testid":`skills-clear-filters`,onClick:$,className:`cursor-pointer underline hover:text-white`,children:e(s.SETTINGS$SKILLS_CLEAR_FILTERS)}):null]}),Y.length===0?(0,j.jsx)(`div`,{"data-testid":`skills-no-match`,className:T,children:(0,j.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(s.SETTINGS$SKILLS_NO_MATCH)})}):(0,j.jsx)(`div`,{className:c(w),children:(0,j.jsx)(`div`,{className:E,children:Y.map(e=>(0,j.jsx)(h,{skill:e,enabled:O(e),onOpen:()=>B(e),onToggle:t=>N(e.name,t)},e.name))})})]})]}),U?(0,j.jsx)(m,{groups:J,activeCount:X,onToggle:Q,onClearAll:$,onClose:()=>W(!1)}):null]}):null]}),z&&(0,j.jsx)(v,{skill:z,enabled:O(z),onToggle:e=>N(z.name,e),onClose:()=>B(null)}),V&&(0,j.jsx)(f,{onClose:()=>H(!1)})]})]})}var P=i(N);export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,i as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,i as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./utils-D-gOfhmN.js";var a=e(t(),1),o=r();function s(e){return a.Children.count(e)===1&&a.isValidElement(e)?e:(0,o.jsx)(`span`,{className:`inline-flex`,children:e})}function c({children:e,content:t,tooltipClassName:r,placement:a=`right`,showArrow:c=!1,closeDelay:l=100,shouldFlip:u,offset:d=7,isOpen:f}){return(0,o.jsx)(n,{content:t,closeDelay:l,placement:a,offset:d,shouldFlip:u,isOpen:f,className:i(`bg-white text-black`,r),showArrow:c,disableAnimation:!1,classNames:{content:i(`z-[9999] rounded-md px-2 py-1 text-xs font-medium shadow-md`,`!bg-white !text-black`,r)},children:s(e)})}export{c as t};
|
|
@@ -0,0 +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"./useTranslation-CCgUjPJF.js";import{K as i,t as a}from"./utils-D-gOfhmN.js";import{a as o,o as s}from"./messages-DmFJlW6c.js";import{r as c}from"./typography-NarNyelM.js";import{t as l}from"./u-check-circle-BKn1spCL.js";import{i as u}from"./conversation-BOj0ENI6.js";import{t as d}from"./conversation-tab-empty-state-DIhwCC2J.js";var f=e(t(),1),p=n();function m({task:e}){let{t}=r(`openhands`),n=(0,f.useMemo)(()=>{switch(e.status){case`todo`:return(0,p.jsx)(s,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(o,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,p.jsx)(l,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,p.jsx)(s,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),u=e.status===`done`;return(0,p.jsxs)(`div`,{className:`flex gap-2 items-center w-full`,"data-name":`item`,children:[(0,p.jsx)(`div`,{className:`shrink-0`,children:n}),(0,p.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[16px] text-nowrap whitespace-pre font-normal`,children:[(0,p.jsx)(c.Text,{className:a(`text-[12px]`,u?`text-[var(--oh-muted)]`:`text-white`),children:e.title}),e.notes&&(0,p.jsxs)(c.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(i.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function h(){let{t:e}=r(`openhands`),{taskList:t}=u();return t.length===0?(0,p.jsx)(d,{icon:(0,p.jsx)(l,{}),children:e(i.COMMON$NO_TASKS)}):(0,p.jsx)(`main`,{className:`h-full overflow-y-auto flex flex-col custom-scrollbar-always`,children:t.map(e=>(0,p.jsx)(`div`,{"data-active":e.status===`in_progress`?`true`:`false`,className:a(`px-4 py-2`,e.status===`in_progress`&&`bg-[var(--oh-surface-raised)]`),children:(0,p.jsx)(m,{task:e})},e.id))})}export{h as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
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"./
|
|
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"./useTranslation-CCgUjPJF.js";import{A as i,K as a,t as o}from"./utils-D-gOfhmN.js";import{c as s}from"./vendor~conversation-panel~conversation-C22sJuWZ.js";import{m as c}from"./llm-not-configured-banner-DMdL1vaX.js";import{$ as l,w as u}from"./markdown-renderer-BH5pqDuJ.js";import{n as d,t as f}from"./vendor~terminal-BVSbSr6V.js";import{t as p}from"./conversation-tab-empty-state-DIhwCC2J.js";var m=e(t(),1),h=`[Python Interpreter: `,g=e=>{let t=e.indexOf(h);if(t<0)return e;let n=t+21;return e.indexOf(`]`,n)<=n?e:e.substring(0,t).trim()},_=(e,t,n=!1)=>{let{content:r,type:i}=e;if(i===`input`&&n)return;let a=(r||``).replaceAll(`
|
|
2
2
|
`,`\r
|
|
3
3
|
`).trim();a&&t.writeln(g(a))},v=(e,t,n)=>{if(!e||!t||!n||window.getComputedStyle(n).display===`none`)return!1;let{clientWidth:r,clientHeight:i}=n;return!(r===0||i===0||!e.element)};function y(e){let t=e.ownerDocument.createElement(`span`);t.style.color=`var(--oh-surface-foreground)`,t.style.position=`absolute`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,e.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n&&n!==`rgba(0, 0, 0, 0)`?n:getComputedStyle(e).color}var b={current:0},x=()=>{let e=u(e=>e.commands),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),i=b,a=m.useRef(!1),o=e=>new f({fontFamily:`Menlo, Monaco, 'Courier New', monospace`,fontSize:14,scrollback:1e4,scrollSensitivity:1,fastScrollSensitivity:5,disableStdin:!0,allowTransparency:!0,theme:{background:`rgba(0, 0, 0, 0)`,foreground:y(e)}}),s=m.useCallback(()=>{a.current||v(t.current,n.current,r.current)&&n.current.fit()},[]),c=()=>{t.current&&(n.current&&t.current.loadAddon(n.current),r.current&&(t.current.open(r.current),t.current.write(`\x1B[?25l`),s()))};return m.useEffect(()=>{a.current=!1;let s=r.current;if(s){if(t.current=o(s),n.current=new d,r.current&&(c(),e.length>0)){for(let n=0;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),_(e[n],t.current,!1);i.current=e.length}return()=>{a.current=!0,t.current?.dispose(),i.current=0}}},[]),m.useEffect(()=>{if(t.current&&e.length>0&&i.current<e.length){for(let n=i.current;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),_(e[n],t.current,!1);i.current=e.length}},[e]),m.useEffect(()=>{let e=null;return e=new ResizeObserver(()=>{requestAnimationFrame(()=>{s()})}),r.current&&e.observe(r.current),()=>{e?.disconnect()}},[s]),r},S=n();function C({className:e,testId:t}){return(0,S.jsx)(c,{testId:t,className:e})}function w(){let{t:e}=r(`openhands`);return(0,S.jsx)(p,{className:`h-full`,icon:(0,S.jsx)(s,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(a.TERMINAL$NO_OUTPUT)})}function T(){let{curAgentState:e}=l(),t=u(e=>e.commands),n=i.includes(e),r=t.length>0,a=n||!r,s=x();return(0,S.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[n&&(0,S.jsx)(C,{className:`pt-16`}),!n&&!r&&(0,S.jsx)(w,{}),(0,S.jsx)(`div`,{className:o(`flex-1 min-h-0 p-4`,a&&`pointer-events-none absolute inset-0 h-0 w-0 overflow-hidden p-0 opacity-0`),children:(0,S.jsx)(`div`,{ref:s,className:`h-full w-full`})})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-D-gOfhmN.js";var n=e();function r({enabled:e,size:r=`md`,className:i}){let a=r===`sm`;return(0,n.jsx)(`span`,{"aria-hidden":`true`,className:t(`relative inline-flex shrink-0 items-center rounded-full`,`transition-colors duration-200 ease-in-out motion-reduce:transition-none`,a?`h-3.5 w-6 p-[3px]`:`h-[22px] w-[40px] border`,e?a?`bg-white`:`border-white bg-white`:a?`bg-[var(--oh-border)]`:`border-[var(--oh-border)] bg-surface-raised`,i),children:(0,n.jsx)(`span`,{className:t(`inline-block rounded-full`,`transition-transform duration-200 ease-in-out motion-reduce:transition-none`,a?`size-2`:`size-4`,e?a?`translate-x-[10px] bg-base-secondary`:`translate-x-[21px] bg-base-secondary`:a?`translate-x-0 bg-[var(--oh-muted)]`:`translate-x-[2px] bg-[var(--oh-muted)]`)})})}function i({enabled:e,label:i,onToggle:a,className:o}){return(0,n.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,onClick:e=>{e.stopPropagation(),a()},className:t(`cursor-pointer`,o),children:(0,n.jsx)(r,{enabled:e})})}export{r as n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-
|
|
1
|
+
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./useTranslation-CCgUjPJF.js";import{K as a,t as o}from"./utils-D-gOfhmN.js";import{r as s}from"./automation-disabled-reason-DtgC8Ppt.js";import{n as c,t as l}from"./context-menu-list-item-lx2zk9G7.js";import{r as u}from"./dropdown-classes-goDldkiu.js";var d=e(n(),1),f=e(t()),p=r(),m=e=>(0,p.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,viewBox:`0 0 20 20`,...e,children:(0,p.jsx)(`path`,{d:`M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z`})}),h=o(`inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,u);function g({items:e,triggerClassName:t}){let{t:n}=i(`openhands`),[r,u]=(0,f.useState)(!1),[g,_]=(0,f.useState)(),v=(0,f.useRef)(null),y=(0,f.useRef)(null);(0,f.useLayoutEffect)(()=>{if(!r||!v.current)return;let t=()=>{let t=v.current?.getBoundingClientRect();if(!t)return;let n=(y.current?.getBoundingClientRect().height??0)||e.length*36;_({position:`fixed`,zIndex:9999,...t.bottom+4+n>window.innerHeight?{bottom:window.innerHeight-t.top+4}:{top:t.bottom+4},right:window.innerWidth-t.right})};t();let n=window.requestAnimationFrame(t);return window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.cancelAnimationFrame(n),window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[r,e.length]),(0,f.useEffect)(()=>{if(!r)return;let e=e=>{let t=e.target;v.current?.contains(t)||y.current?.contains(t)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let b=r&&g?(0,p.jsx)(c,{ref:y,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,p.jsx)(`li`,{children:(0,p.jsx)(l,{onClick:t=>{t.stopPropagation(),e.onClick(),u(!1)},isDisabled:e.disabled,className:`group`,children:(0,p.jsx)(s,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{ref:v,type:`button`,onClick:e=>{e.stopPropagation(),u(e=>!e)},className:o(h,t),"aria-label":n(a.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":r,"aria-haspopup":`menu`,children:(0,p.jsx)(m,{className:`size-4`})}),r&&g&&typeof document<`u`?d.createPortal((0,p.jsx)(`div`,{style:g,children:b}),document.body):null]})}var _=e=>(0,p.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,p.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})});export{g as n,h as r,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-
|
|
1
|
+
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-D-gOfhmN.js";import{t as n}from"./dist-Bl64nBZL.js";var r=e(),i=n(``,{variants:{variant:{h1:`text-[32px] text-white font-medium leading-5`,h2:`text-xl font-medium leading-6 -tracking-[0.02em] text-white`,h3:`text-sm font-medium text-[var(--oh-text-tertiary)]`,span:`text-sm font-normal text-white leading-5.5`,p:`text-sm font-normal text-white leading-5.5`,codeBlock:`font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap`}},defaultVariants:{variant:`h1`}});function a({variant:e,className:n,testId:a,children:o}){return(0,r.jsx)(e,{"data-testid":a,className:t(i({variant:e}),n),children:o})}function o({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h1`,className:e,testId:t,children:n})}function s({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h2`,className:e,testId:t,children:n})}function c({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h3`,className:e,testId:t,children:n})}function l({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`span`,className:e,testId:t,children:n})}function u({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`codeBlock`,className:e,testId:t,children:n})}function d({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`p`,className:e,testId:t,children:n})}a.H1=o,a.H2=s,a.H3=c,a.Text=l,a.CodeBlock=u,a.Paragraph=d;export{l as n,a as r,o as t};
|
|
@@ -0,0 +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-DAAacS7O.js";import{t as i}from"./useTranslation-CCgUjPJF.js";import{n as a}from"./active-backend-context-BsLfwrXB.js";import{K as o,t as s}from"./utils-D-gOfhmN.js";import{n as c}from"./agent-server-client-options-EHB23gyx.js";import{r as l}from"./vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js";import{r as u}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js";import{t as d}from"./info-BcajzHn1.js";import{t as f}from"./loader-circle-BxJgk73D.js";import{t as p}from"./refresh-cw-BtdC3T8P.js";import{o as m}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{t as h}from"./brand-button-mQq2Ld1I.js";import{t as g}from"./styled-tooltip-DVAlWYnL.js";import{d as _,f as v,l as y,u as b}from"./llm-not-configured-banner-DMdL1vaX.js";import{g as x,tt as S}from"./markdown-renderer-BH5pqDuJ.js";import{t as C}from"./conversation-tab-empty-state-DIhwCC2J.js";var w=e(t(),1);function T(e=!0){let t=x(e=>e.cost),n=x(e=>e.max_budget_per_task),r=x(e=>e.usage),{data:i}=S(),{data:a}=v(i?.id,i?.conversation_url,i?.session_api_key,e);return(0,w.useMemo)(()=>t!==null||r!==null?{cost:t,max_budget_per_task:n,usage:r}:a?{cost:a.accumulated_cost,max_budget_per_task:a.max_budget_per_task,usage:a.accumulated_token_usage?{prompt_tokens:a.accumulated_token_usage.prompt_tokens??0,completion_tokens:a.accumulated_token_usage.completion_tokens??0,cache_read_tokens:a.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:a.accumulated_token_usage.cache_write_tokens??0,context_window:a.accumulated_token_usage.context_window??0,per_turn_token:a.accumulated_token_usage.per_turn_token??0}:null}:{cost:null,max_budget_per_task:null,usage:null},[a,t,n,r])}var E=n();function D({currentCost:e,maxBudget:t}){let n=e/t*100;return(0,E.jsx)(`div`,{className:`relative mt-1 h-1.5 w-full rounded-full bg-tertiary`,children:(0,E.jsx)(`div`,{className:s(`absolute inset-y-0 left-0 rounded-full transition-all duration-300`,n>80?`bg-red-500`:`bg-blue-500`),style:{width:`${Math.min(100,n)}%`}})})}function O({currentCost:e,maxBudget:t}){let{t:n}=i(`openhands`),r=e/t*100;return(0,E.jsx)(`div`,{className:`flex justify-end`,children:(0,E.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(o.CONVERSATION$BUDGET_USAGE_FORMAT,{currentCost:`$${e.toFixed(4)}`,maxBudget:`$${t.toFixed(4)}`,usagePercentage:r.toFixed(2),used:n(o.CONVERSATION$USED)})})})}function k({cost:e,maxBudgetPerTask:t}){return e===null||t===null||t<=0?null:(0,E.jsxs)(`div`,{children:[(0,E.jsx)(D,{currentCost:e,maxBudget:t}),(0,E.jsx)(O,{currentCost:e,maxBudget:t})]})}function A({cost:e,maxBudgetPerTask:t}){let{t:n}=i(`openhands`);return e===null?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(k,{cost:e,maxBudgetPerTask:t}),(0,E.jsxs)(`div`,{className:`flex justify-between items-center border-t border-[var(--oh-border-subtle)] pt-2`,children:[(0,E.jsx)(`span`,{className:`font-semibold`,children:n(o.CONVERSATION$TOTAL_COST)}),(0,E.jsxs)(`span`,{className:`font-semibold`,children:[`$`,e.toFixed(4)]})]})]})}function j({label:e,value:t,labelClassName:n=``,valueClassName:r=`font-semibold`,showBorder:i=!0}){return(0,E.jsxs)(`div`,{className:s(`flex justify-between items-center pb-2`,i&&`border-b border-[var(--oh-border-subtle)]`),children:[(0,E.jsx)(`span`,{className:n,children:e}),(0,E.jsx)(`span`,{className:r,children:t})]})}function M({usage:e}){let{t}=i(`openhands`);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(j,{label:t(o.CONVERSATION$INPUT),value:e.prompt_tokens.toLocaleString()}),(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 pl-4 text-sm`,children:[(0,E.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(o.CONVERSATION$CACHE_HIT)}),(0,E.jsx)(`span`,{className:`text-right`,children:e.cache_read_tokens.toLocaleString()}),(0,E.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(o.CONVERSATION$CACHE_WRITE)}),(0,E.jsx)(`span`,{className:`text-right`,children:e.cache_write_tokens.toLocaleString()})]}),(0,E.jsx)(j,{label:t(o.CONVERSATION$OUTPUT),value:e.completion_tokens.toLocaleString()}),(0,E.jsx)(j,{label:t(o.CONVERSATION$TOTAL),value:(e.prompt_tokens+e.completion_tokens).toLocaleString(),labelClassName:`font-semibold`,valueClassName:`font-bold`,showBorder:!1})]})}function N({fillPercent:e,perTurnToken:t=0}){let{t:n}=i(`openhands`),{handleCompact:r,isCompacting:a,isDisabled:s,description:c}=b(t),u=e>70;return(0,E.jsxs)(`div`,{"data-testid":`compact-context-section`,className:`flex flex-col gap-2 border-t border-[var(--oh-border-subtle)] pt-3`,children:[u&&(0,E.jsx)(`span`,{className:`text-xs text-amber-500`,children:n(o.CONVERSATION$CONTEXT_FILLING_UP)}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(h,{testId:`compact-context-button`,type:`button`,variant:u?`primary`:`secondary`,isDisabled:s,"aria-busy":a,onClick:r,startContent:a?(0,E.jsx)(f,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):(0,E.jsx)(l,{className:`h-4 w-4`,"aria-hidden":!0}),className:`w-fit`,children:n(o.CONVERSATION$COMPACT_CONTEXT)}),(0,E.jsx)(g,{content:c,placement:`top`,tooltipClassName:`max-w-[220px] text-xs font-normal leading-relaxed whitespace-normal`,children:(0,E.jsx)(`button`,{type:`button`,"data-testid":`compact-context-info`,"aria-label":c,className:`flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--oh-muted)] hover:text-[var(--oh-foreground)] transition-colors cursor-help`,children:(0,E.jsx)(d,{className:`size-3.5`,"aria-hidden":!0})})})]})]})}var P=`/api/llm/balance`,F=1e4;function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function L(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function R(e){return I(e)&&(e.name===`TimeoutError`||e.name===`AbortError`)}function z(e){return!I(e)||typeof e.provider!=`string`?null:{provider:e.provider,limit:L(e.limit),limitRemaining:L(e.limit_remaining),usage:L(e.usage)??0,usageDaily:L(e.usage_daily),usageWeekly:L(e.usage_weekly),usageMonthly:L(e.usage_monthly),isFreeTier:e.is_free_tier===!0}}var B=class{static async getBalance(){let{host:e,apiKey:t}=c(),n=new m({host:e,apiKey:t,timeout:F});try{return z(await n.get(P,{acceptableStatusCodes:new Set([200]),responseType:`json`,timeoutSeconds:Math.floor(F/1e3)}))}catch(e){if(e instanceof Error&&`status`in e&&e.status===404)return null;if(R(e))throw Error(`Balance request timed out after ${F}ms`);let t=e instanceof Error&&`status`in e&&e.status;throw Error(t?`Balance request failed with ${t}`:`Balance request failed: ${e instanceof Error?e.message:String(e)}`)}finally{n.close()}}},V=e=>{let{backend:t}=a();return r({queryKey:[`llm-balance`,t.id,e],queryFn:()=>B.getBalance(),enabled:t.kind!==`cloud`&&!!e,staleTime:1/0,gcTime:1e3*60*5,retry:!1,refetchOnWindowFocus:!1})};function H(e){return`$${e.toFixed(2)}`}function U(){let{t:e}=i(`openhands`),{data:t}=S(),{data:n,isError:r,isFetching:a,refetch:c}=V(t?.id);if(!n||r)return null;let l=n.limit!==null&&n.limitRemaining!==null;return(0,E.jsxs)(`div`,{"data-testid":`provider-balance-card`,className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between pb-2`,children:[(0,E.jsx)(`span`,{className:`font-semibold`,children:e(o.CONVERSATION$PROVIDER_BALANCE)}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxs)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:[n.provider,n.isFreeTier?` · ${e(o.CONVERSATION$FREE_TIER)}`:null]}),(0,E.jsx)(`button`,{type:`button`,"data-testid":`provider-balance-refresh`,"aria-label":e(o.BUTTON$REFRESH),disabled:a,onClick:()=>c(),className:`cursor-pointer text-[var(--oh-muted)] hover:text-[var(--oh-foreground)] disabled:cursor-default`,children:(0,E.jsx)(p,{className:s(`h-3.5 w-3.5`,a&&`animate-spin`)})})]})]}),(0,E.jsxs)(`div`,{className:`grid gap-3`,children:[l?(0,E.jsx)(j,{label:e(o.CONVERSATION$CREDITS_REMAINING),value:H(n.limitRemaining??0)}):null,(0,E.jsx)(j,{label:e(o.CONVERSATION$CREDITS_USED),value:H(n.usage),valueClassName:l?``:`font-semibold`,labelClassName:l?`text-[var(--oh-muted)]`:``})]})]})}function W(){let{t:e}=i(`openhands`),t=T(),{data:n}=S(),r=n?.agent_kind===`acp`,{usage:a}=t;return t.cost!==null||a!==null?(0,E.jsxs)(`main`,{"data-testid":`usage-panel`,className:`h-full overflow-y-auto custom-scrollbar-always flex flex-col gap-3 p-3`,children:[a!==null&&(0,E.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,E.jsxs)(`div`,{className:`grid gap-3`,children:[(0,E.jsx)(y,{perTurnToken:a.per_turn_token,contextWindow:a.context_window}),(0,E.jsx)(N,{fillPercent:_(a.per_turn_token,a.context_window),perTurnToken:a.per_turn_token})]})}),(0,E.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,E.jsxs)(`div`,{className:`grid gap-3`,children:[(0,E.jsx)(`div`,{className:`flex justify-between items-center pb-2`,children:(0,E.jsx)(`span`,{className:`text-lg font-semibold`,children:e(o.CONVERSATION$TOKEN_USAGE)})}),r&&(0,E.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:e(o.CONVERSATION$PLAN_USAGE_NOTE)}),a!==null&&(0,E.jsx)(M,{usage:a}),(0,E.jsx)(A,{cost:t.cost,maxBudgetPerTask:t.max_budget_per_task})]})}),(0,E.jsx)(U,{})]}):(0,E.jsx)(C,{icon:(0,E.jsx)(u,{}),children:e(o.CONVERSATION$NO_METRICS)})}function G(){return(0,E.jsx)(W,{})}export{G as default};
|
|
@@ -0,0 +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{f as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as a}from"./useQuery-DAAacS7O.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{ct as s,dt as c,n as l,st as u,ut as d}from"./active-backend-context-BsLfwrXB.js";import{K as f,t as p}from"./utils-D-gOfhmN.js";import{n as m}from"./agent-server-client-options-EHB23gyx.js";import{t as h}from"./check-Bo8s5Ylg.js";import{t as g}from"./loader-circle-BxJgk73D.js";import{y as _}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{l as v}from"./form-control-classes-lQfLxzH4.js";import{n as y,t as b}from"./settings-input-Cm4VxUon.js";import{a as x,l as S}from"./acp-providers-BQ4o4vqy.js";import{t as C}from"./use-get-secrets-fqS0kxt6.js";import{t as w}from"./use-create-secret-Bk9ZxTjl.js";var T=i(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),E=e(t(),1),D=n();function O({conflicts:e}){let{t}=o(`openhands`);return(0,D.jsx)(D.Fragment,{children:e.map(([e,n])=>(0,D.jsx)(`p`,{"data-testid":`acp-credential-conflict-warning`,className:`text-sm text-amber-300`,children:t(f.SETTINGS$ACP_CREDENTIAL_CONFLICT_WARNING,{credential:e,conflicting:n})},`${e}:${n}`))})}function k({status:e,isChecking:t,credentialsConfigured:n}){return e===`authenticated`?`signed-in`:t?`checking`:n?`configured`:`none`}function A({status:e,isChecking:t,providerName:n,credentialsConfigured:r=!1,testIdPrefix:i}){let{t:a}=o(`openhands`),s=k({status:e,isChecking:t,credentialsConfigured:r});return s===`signed-in`?(0,D.jsxs)(`div`,{"data-testid":`${i}-detected`,className:`flex items-start gap-2 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3 text-sm text-green-200`,children:[(0,D.jsx)(h,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,D.jsx)(`span`,{children:a(f.ONBOARDING$ACP_AUTH_DETECTED,{provider:n})})]}):s===`checking`?(0,D.jsxs)(`div`,{"data-testid":`${i}-checking`,className:`flex items-center gap-2 text-sm text-[var(--oh-muted)]`,children:[(0,D.jsx)(g,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,D.jsx)(`span`,{children:a(f.ONBOARDING$ACP_AUTH_CHECKING,{provider:n})})]}):s===`configured`?(0,D.jsxs)(`div`,{"data-testid":`${i}-configured`,className:`flex items-start gap-2 rounded-xl border border-blue-500/40 bg-blue-500/10 px-4 py-3 text-sm text-blue-200`,children:[(0,D.jsx)(T,{className:`mt-0.5 size-4 shrink-0 text-blue-400`,"aria-hidden":!0}),(0,D.jsx)(`span`,{children:a(f.ONBOARDING$ACP_CREDENTIALS_CONFIGURED,{provider:n})})]}):null}function j({field:e,value:t,onChange:n,alreadySet:r,testId:i,showOptionalTag:a}){let{t:s}=o(`openhands`),c=r?s(f.ONBOARDING$ACP_SECRET_ALREADY_SET):``;return(0,D.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.multiline?(0,D.jsxs)(`label`,{className:`flex flex-col gap-2.5`,children:[(0,D.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`span`,{className:`text-sm font-mono text-white`,children:e.name}),a&&(0,D.jsx)(y,{})]}),(0,D.jsx)(`textarea`,{"data-testid":i,name:e.name,rows:4,spellCheck:!1,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,value:t,placeholder:c,onChange:e=>n(e.target.value),className:p(v,`font-mono text-xs`)})]}):(0,D.jsx)(b,{testId:i,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:t,onChange:n,showOptionalTag:a,placeholder:c}),(0,D.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:s(e.hint_key,e.hint_values)})]})}var M=10;function N(e){return`${e.stdout??``}\n${e.stderr??``}`}function P(e){let t;try{t=JSON.parse((e.stdout??``).trim())}catch{return`unknown`}let n=t?.loggedIn;return typeof n==`boolean`?n?`authenticated`:`unauthenticated`:`unknown`}function F(e){let t=N(e).toLowerCase();return t.includes(`not logged in`)?`unauthenticated`:t.includes(`logged in`)?`authenticated`:`unknown`}function I(e){let t=(e.stdout??``).trim();return t===`present`?`authenticated`:t===`absent`?`unauthenticated`:`unknown`}var L={"claude-code":{command:`claude auth status --json`,classify:P},codex:{command:`codex login status`,classify:F},"gemini-cli":{command:`test -f "$HOME/.gemini/oauth_creds.json" && echo present || echo absent`,classify:I}},R=class{static async getAuthStatus(e){let t=L[e];if(!t)return`unknown`;let n=await new _(m()).executeCommand(t.command,void 0,M);return t.classify(n)}};async function z(e){try{return await R.getAuthStatus(e)}catch{return`unknown`}}function B(e,t={}){let{enabled:n=!0}=t,r=l(),i=r.backend.kind===`local`,o=n&&i&&!!e,s=a({queryKey:[`acp-auth-status`,r.backend.id,e],queryFn:()=>z(e),enabled:o,staleTime:1/0,gcTime:1e3*60*15,retry:!1,refetchOnWindowFocus:!1,refetchOnMount:!1});return{status:s.data??`unknown`,isChecking:o&&s.isFetching&&s.data===void 0,isSupported:i}}function V(e,t){let{t:n}=o(`openhands`),i=r(),{mutateAsync:a}=w(),[l,p]=E.useState(!1);return{saveFilled:async(r,{silent:o=!1}={})=>{let l=e.map(e=>({field:e,value:r[e.name]?.trim()})).filter(e=>!!e.value);if(l.length===0)return!0;p(!0);try{for(let{field:e,value:t}of l)await a({name:e.name,value:t});return await i.invalidateQueries({queryKey:[`secrets-search`]}),await i.invalidateQueries({queryKey:[`secrets`]}),!t&&l.some(({field:e})=>e.multiline)?d(n(f.ONBOARDING$ACP_SECRETS_ORPHANED_WARNING)):o||s(n(f.SETTINGS$SAVED)),!0}catch(e){return u(c(e)||n(f.ERROR$GENERIC)),!1}finally{p(!1)}},isSaving:l}}function H(e){let{data:t}=C(),n=E.useMemo(()=>S(e),[e]),[r,i]=E.useState({}),{saveFilled:a,isSaving:o}=V(n,!0);E.useEffect(()=>{i({})},[e]);let s=E.useCallback(e=>(t??[]).some(t=>t.name===e),[t]),c=E.useCallback(e=>!!r[e]?.trim()||s(e),[r,s]),l=E.useCallback((e,t)=>i(n=>({...n,[e]:t})),[]),u=E.useCallback(()=>i({}),[]);return{fields:n,values:r,setValue:l,secretExists:s,hasValueFor:c,conflicts:x(e,c),credentialsConfigured:n.some(e=>e.secret===!0&&s(e.name)),consumesFileCredentials:!0,isDirty:n.some(e=>!!r[e.name]?.trim()),save:e=>a(r,e),reset:u,isSaving:o}}export{O as a,A as i,B as n,T as o,j as r,H as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t}from"./useMutation-Cszf8mKy.js";import{O as n,V as r}from"./active-backend-context-BsLfwrXB.js";import{t as i}from"./settings-service.api-Q9lKW1TX.js";import{t as a}from"./agent-profiles-service.api-U-9YzDFU.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:n.all});let t=s.getQueriesData({queryKey:n.all});return s.setQueriesData({queryKey:n.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:n.all}),await s.invalidateQueries({queryKey:r.personal()})}})}export{s as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{M as t,O as n,k as r,n as i}from"./active-backend-context-BsLfwrXB.js";import{t as a}from"./agent-profiles-service.api-U-9YzDFU.js";function o(o={}){let{backend:s,orgId:c}=i();return e({queryKey:[...n.all,s.id,c],queryFn:a.listProfiles,...t,...r,enabled:o.enabled??!0,meta:{disableToast:!0}})}export{o as t};
|
package/build/assets/{use-automation-health-BZkQNEA8.js → use-automation-health-DdgSa8sA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useQuery-
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useQuery-DAAacS7O.js";import{n as r}from"./active-backend-context-BsLfwrXB.js";import{n as i}from"./use-tracking-ChnSFChv.js";e();var a=t(),o=e=>(0,a.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})}),s=[`automation-health`];function c(){let e=r();return n({queryKey:[...s,e.backend.id,e.orgId],queryFn:()=>i.checkHealth(),staleTime:30*1e3,retry:!1})}export{o as n,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{n as t}from"./active-backend-context-BsLfwrXB.js";import{t as n}from"./organization-service.api-DmFUEmu5.js";import{t as r}from"./use-cloud-current-user-id-BEKRd6XZ.js";var i=`view_automations`,a=`manage_automations`;function o(){let{backend:r,orgId:o}=t(),s=r.kind===`cloud`,{data:c,isLoading:l}=e({queryKey:[`cloud-current-user`,r.id,o,r.connectionRevision??0],queryFn:()=>n(o,r),enabled:s&&!!o,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});if(!s)return{canView:!0,canManage:!0,isLoading:!1};if(l||!c)return{canView:!1,canManage:!1,isLoading:l};if(c.permissions)return{canView:c.permissions.includes(i),canManage:c.permissions.includes(a),isLoading:!1};let u=c.role===`owner`||c.role===`admin`;return{canView:u||c.role===`member`,canManage:u,isLoading:!1}}function s(e){let{backend:n}=t(),i=r();if(n.kind!==`cloud`)return!0;let a=i[n.id];return!a||a.isLoading||!a.userId?!1:e.user_id===a.userId}export{s as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t}from"./useMutation-Cszf8mKy.js";import{t as n}from"./useQuery-DAAacS7O.js";import{n as r}from"./active-backend-context-BsLfwrXB.js";import{n as i,t as a}from"./use-tracking-ChnSFChv.js";import{t as o}from"./automation-C_eCrGyP.js";var s=[`automation-detail`],c=[`automation-runs`];function l(e){let{id:t,enabled:a=!0}=e,o=r();return n({queryKey:[...s,t,o.backend.id,o.orgId],queryFn:()=>i.getAutomation(t),staleTime:300*1e3,enabled:!!t&&a})}function u(e){let{id:t,limit:a=20,offset:s=0,enabled:l=!0}=e,u=r();return n({queryKey:[...c,t,{limit:a,offset:s},u.backend.id,u.orgId],queryFn:()=>i.getAutomationRuns(t,a,s),staleTime:60*1e3,enabled:!!t&&l,refetchInterval:e=>{let t=e.state.data;return t&&t.runs.some(e=>e.status===o.PENDING||e.status===o.RUNNING)?3e3:!1}})}var d=[`automations`];function f(e={}){let{limit:t=50,offset:a=0,enabled:o=!0}=e,s=r();return n({queryKey:[...d,{limit:t,offset:a},s.backend.id,s.orgId],queryFn:()=>i.getAutomations(t,a),staleTime:0,enabled:o})}function p(){let n=e(),o=r(),{trackAutomationDisableButton:c}=a();return t({mutationFn:({id:e,enabled:t})=>i.toggleAutomation(e,t),onSuccess:(e,t)=>{n.invalidateQueries({queryKey:d}),n.invalidateQueries({queryKey:s}),t.enabled||c({backendKind:o.backend.kind})}})}function m(){let n=e(),o=r(),{trackAutomationImported:s}=a();return t({mutationFn:e=>i.createAutomation({...e,enabled:!1}),onSuccess:()=>{n.invalidateQueries({queryKey:d}),s({backendKind:o.backend.kind})}})}function h(){let n=e(),o=r(),{trackAutomationEdited:c}=a();return t({mutationFn:({id:e,body:t})=>i.updateAutomation(e,t),onSuccess:()=>{n.invalidateQueries({queryKey:d}),n.invalidateQueries({queryKey:s}),c({backendKind:o.backend.kind})}})}function g(){let n=e(),o=r(),{trackAutomationDeleted:s}=a();return t({mutationFn:e=>i.deleteAutomation(e),onSuccess:()=>{n.invalidateQueries({queryKey:d}),s({backendKind:o.backend.kind})}})}function _(){let n=e(),o=r(),{trackAutomationExecuted:l}=a();return t({mutationFn:e=>i.dispatchAutomation(e),onSuccess:(e,t)=>{n.invalidateQueries({queryKey:d}),n.invalidateQueries({queryKey:s}),n.invalidateQueries({queryKey:[...c,t]}),n.invalidateQueries({queryKey:[`user`,`conversations`]}),l({backendKind:o.backend.kind})}})}function v(){let n=e();return t({mutationFn:({runId:e})=>i.cancelAutomationRun(e),onSuccess:(e,{automationId:t})=>{n.invalidateQueries({queryKey:d}),n.invalidateQueries({queryKey:s}),n.invalidateQueries({queryKey:[...c,t]}),n.invalidateQueries({queryKey:[`user`,`conversations`]})}})}export{m as a,c,_ as i,l,v as n,p as o,g as r,h as s,f as t,u};
|
|
@@ -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-DAAacS7O.js";import{n as i}from"./active-backend-context-BsLfwrXB.js";import{t as a}from"./utils-D-gOfhmN.js";import{t as o}from"./organization-service.api-DmFUEmu5.js";import{_ as s,u as c}from"./form-control-classes-lQfLxzH4.js";import{c as l,u}from"./dropdown-classes-goDldkiu.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-canvas-extensions-CFUpHat6.js → use-canvas-extensions-BMacwi2v.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{$ as t,j as n,n as r}from"./active-backend-context-BsLfwrXB.js";import{c as i,n as a,p as o}from"./agent-server-client-options-EHB23gyx.js";import{o as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";var c=`/api/canvas-extensions`,l=/^(?:github:|https?:\/\/|git:\/\/|file:\/\/|[\w.-]+@[\w.-]+:)/i,u=class extends Error{reason;constructor(e){super(e===`no-backend`?`Add an Agent Server backend to use Apps.`:e===`cloud-backend`?`Apps are not available on Cloud backends yet.`:`This Agent Server does not support Apps yet. Upgrade the backend and try again.`),this.name=`CanvasExtensionsUnsupportedError`,this.reason=e}};function d(e){return e instanceof u||typeof e==`object`&&!!e&&`name`in e&&e.name===`CanvasExtensionsUnsupportedError`}function f(){let{backend:e}=i();if(o(e))throw new u(`no-backend`);if(e.kind===`cloud`)throw new u(`cloud-backend`)}function p(){return f(),new s(a())}function m(e){if(o(e))throw new u(`no-backend`);if(e.kind===`cloud`)throw new u(`cloud-backend`);return new s({host:e.host,...e.apiKey?{apiKey:e.apiKey}:{},timeout:6e4})}async function h(e){try{return await e()}catch(e){throw t(e,404)?new u(`missing-api`):e}}function g(e){return`${c}/installed/${encodeURIComponent(e)}`}function _(e,t){let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`,r=e.replace(/[\\/]+$/,``),i=t.replace(/^[\\/]+/,``);return i?r?`${r}${n}${i}`:`${n}${i}`:e}function v(e){let t=e.repo_path?.trim();return!t||l.test(e.source)?e:{...e,source:_(e.source,t),repo_path:null}}var y=class{static async listInstalled(){let e=p();return(await h(()=>e.get(`${c}/installed`))).canvas_extensions??[]}static async install(e){let t=p();return h(()=>t.post(`${c}/install`,v(e)))}static async setEnabled(e,t){let n=p();return h(()=>n.patch(g(e),{enabled:t}))}static async uninstall(e){let t=p();return h(()=>t.delete(g(e)))}static async fetchBundle(e,t){let n=t?m(t):p();return h(()=>n.get(`${g(e)}/bundle`,{responseType:`text`}))}static async requestAgentServer(e,t){if(!e.path.startsWith(`/`)||e.path.startsWith(`//`))throw Error(`Canvas Extension Agent Server requests must use a root-relative path.`);return(t?m(t):p()).request({method:e.method??`GET`,path:e.path,body:e.body,headers:e.headers})}};function b(t={}){let i=r(),a=i.backend.connectionRevision??0,s=!o(i.backend)&&i.backend.kind===`local`;return e({queryKey:n.installed(i.backend.id,i.orgId,a),queryFn:()=>y.listInstalled(),enabled:(t.enabled??!0)&&s,retry:!1,staleTime:0,refetchOnWindowFocus:!0,meta:{backendId:i.backend.id,disableToast:!0}})}export{d as i,y as n,u as r,b as t};
|
package/build/assets/{use-cloud-current-user-id-Dk0rjr63.js → use-cloud-current-user-id-BEKRd6XZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQueries-
|
|
1
|
+
import{t as e}from"./useQueries-pUohFMSP.js";import{n as t,r as n}from"./active-backend-context-BsLfwrXB.js";import{i as r,r as i,t as a}from"./organization-service.api-DmFUEmu5.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 i(e);if(e.authMode===`cookie`)return t;let n=await r(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{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{B as t,M as n,Y as r,Z as i,et as a}from"./active-backend-context-BsLfwrXB.js";import{n as o}from"./agent-server-client-options-EHB23gyx.js";import{h as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";var c=class{static async getModels(){let e=new s(o()),[t,n,r]=await Promise.all([e.getModels(),e.getVerifiedModels(),e.getProviders()]),i=Object.keys(n??{}).sort(),a=i.flatMap(e=>n[e]??[]);return{models:t??[],verified_models:a,verified_providers:r?.filter(e=>i.includes(e))??i,default_model:a[0]??t?.[0]??``}}static async getConfig(){return await a(),{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=a=>e({queryKey:t.WEB_CLIENT_CONFIG,queryFn:c.getConfig,retry:(e,t)=>!i(t)&&!r(t)&&e<3,meta:{disableToast:!0},...n,enabled:a?.enabled});export{c as n,l as t};
|
package/build/assets/{use-create-conversation-1YgmAHt-.js → use-create-conversation-Be-eVpFp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t}from"./useMutation-Cszf8mKy.js";import{O as n,P as r,R as i,k as a,n as o}from"./active-backend-context-BsLfwrXB.js";import{t as s}from"./use-tracking-ChnSFChv.js";import{E as c,O as l,k as u,t as d}from"./agent-server-conversation-service.api-BaVQ6NpE.js";import{t as f}from"./profiles-service.api-DdF_4Zhe.js";import{t as p}from"./use-llm-profiles-xtCBMbef.js";import{t as m}from"./agent-profiles-service.api-U-9YzDFU.js";import{t as h}from"./use-agent-profiles-LCvb5OXT.js";import{t as g}from"./plugins-management-service-CcEpfNKz.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=await _.ensureQueryData({queryKey:[...n.all,S.id,C],queryFn:m.listProfiles,...a}),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,j=null;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{let t=await _.ensureQueryData({queryKey:[...r.all,S.id,C],queryFn:f.listProfiles,retry:!1});e=t.profiles.some(e=>e.name===O.llm_profile_ref),j=t.active_profile??null}catch{}e?!k&&!T&&j&&j!==O.llm_profile_ref&&(A=void 0):(console.warn(`Agent profile "${O.name}" references missing LLM profile "${O.llm_profile_ref}"; launching from agent_settings instead.`),A=void 0)}let M=await d.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}:{}}),N=M.app_conversation_id,P=s?.map(u)??[],F=P;if(N){let e=[];try{e=await _.ensureQueryData({queryKey:[...i.installed,S.id,C],queryFn:()=>g.listInstalledPlugins()})}catch{}let t=new Set(P.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)));F=[...P,...n]}let I=A&&O?.agent_kind===`openhands`?O.llm_profile_ref:j??y?.active_profile??null;if(N&&(I||F.length)){let e=c(N);l(N,{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:I??e?.active_profile??null,plugins:F.length?F:e?.plugins??null})}return{conversation_id:M.app_conversation_id?M.app_conversation_id:`task-${M.id}`,session_api_key:null,url:M.agent_server_url,task_id:M.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useMutation-Cszf8mKy.js";import{t}from"./secrets-service-DU6wh3wX.js";var n=()=>e({mutationFn:({name:e,value:n,description:r})=>t.createSecret(e,n,r)});export{n as t};
|
|
@@ -0,0 +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-DAAacS7O.js";import{n as r}from"./active-backend-context-BsLfwrXB.js";import{c as i,n as a}from"./agent-server-client-options-EHB23gyx.js";import{h as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{t as s}from"./proxy-DbEf3Nqr.js";import{t as c}from"./react-BX7IV650.js";var l=e(t(),1);function u(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n))}function d(e,t){return t===void 0?e:e.filter(e=>e.verified===t)}function f(e,t){return!t||t<=0?e:e.slice(0,t)}function p(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}var m=class{static async searchModels(e={},t){let n=i();if(n.backend.kind===`cloud`){let t=p({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq,provider__eq:e.provider__eq});return s({backend:n.backend,method:`GET`,path:`/api/v1/config/models/search${t}`})}let r=new o(a()),c=t===void 0?r.getVerifiedModels():Promise.resolve(t),[l,m]=await Promise.all([r.getModels(),c]),h=e.provider__eq??null,g=new Set(h?m?.[h]??[]:[]),_=[...g].map(e=>({provider:h,name:e,verified:!0,free:!1,default:!1})),v=h?(l??[]).filter(e=>e.startsWith(`${h}/`)).map(e=>e.slice(h.length+1)).filter(e=>e.length>0&&!g.has(e)).map(e=>({provider:h,name:e,verified:!1,free:!1,default:!1})):[];return{items:f(d(u([..._,...v],e.query),e.verified__eq),e.limit),next_page_id:null}}static async searchProviders(e={},t){let n=i();if(n.backend.kind===`cloud`){let t=p({page_id:e.page_id,limit:e.limit,query:e.query,verified__eq:e.verified__eq});return s({backend:n.backend,method:`GET`,path:`/api/v1/config/providers/search${t}`})}let r=new o(a()),c=t===void 0?r.getVerifiedModels():Promise.resolve(t),[l,m]=await Promise.all([r.getProviders(),c]),h=new Set(Object.keys(m??{}));return{items:f(d(u([...new Set([...h,...l??[]])].map(e=>({name:e,verified:h.has(e)})),e.query),e.verified__eq),e.limit),next_page_id:null}}},h=new Set,g=c()(e=>({freeModels:h,defaultModel:null,defaultModelReady:!1,setFlags:t=>e({freeModels:t.freeModels,defaultModel:t.defaultModel,defaultModelReady:!0}),markDefaultModelReady:()=>e({defaultModelReady:!0}),resetFlags:()=>e({freeModels:h,defaultModel:null,defaultModelReady:!1})})),_=[`config`,`verified-models`],v=1e3*60*5,y=1e3*60*15;async function b(){return i().backend.kind===`cloud`?{}:await new o(a()).getVerifiedModels()??{}}var x=`openhands`,S=100,C=10;async function w(e,t,n,r){if(r>=C)throw Error(`Too many pagination requests while fetching OpenHands models (depth=${r})`);let i=await m.searchModels({provider__eq:x,limit:S,...t?{page_id:t}:{}},e);if(!i.next_page_id)return i.items;if(n.has(i.next_page_id))throw Error(`Repeated page id while fetching OpenHands models: ${i.next_page_id}`);n.add(i.next_page_id);let a=await w(e,i.next_page_id,n,r+1);return[...i.items,...a]}var T=()=>{let{backend:e,orgId:t}=r(),i=[e.id,e.connectionRevision??0,t];return n({queryKey:[`config`,`models`,x,`flags`,...i],queryFn:async({client:e})=>w(await e.fetchQuery({queryKey:[..._,...i],queryFn:b,staleTime:v}),null,new Set,0),staleTime:v,gcTime:y})},E=()=>{let{backend:e,orgId:t}=r(),{data:n,isError:i}=T(),a=g(e=>e.setFlags),o=g(e=>e.markDefaultModelReady),s=g(e=>e.resetFlags);l.useEffect(()=>{s()},[e.id,e.connectionRevision,t,s]),l.useEffect(()=>{if(!n)return;let e=new Set(n.filter(e=>e.free).map(e=>`${x}/${e.name}`)),t=n.find(e=>e.default);a({freeModels:e,defaultModel:t?`${x}/${t.name}`:null})},[n,a]),l.useEffect(()=>{i&&o()},[i,o])},D=()=>g(e=>e.freeModels),O=()=>g(e=>e.defaultModel),k=()=>g(e=>e.defaultModelReady);export{y as a,b as c,E as i,m as l,k as n,_ as o,D as r,v as s,O 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"./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-DAAacS7O.js";import{n as r}from"./active-backend-context-BsLfwrXB.js";import{t as i}from"./secrets-service-DU6wh3wX.js";var a=e(t(),1),o=(e={})=>{let{nameContains:t,enabled:o=!0}=e,s=r(),c=n({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:i.getSecrets,enabled:o,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,a.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}};export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.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};
|
package/build/assets/{use-launch-skill-in-chat-DeYa1tFM.js → use-launch-skill-in-chat-QbXDhiHr.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-DC-JlJuq.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{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{f as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as a}from"./useMutation-Cszf8mKy.js";import{t as o}from"./useQuery-DAAacS7O.js";import{t as s}from"./useTranslation-CCgUjPJF.js";import{M as c,P as l,n as u,ot as d,st as f}from"./active-backend-context-BsLfwrXB.js";import{D as p,K as m,a as h,t as g}from"./utils-D-gOfhmN.js";import{_,p as v}from"./agent-server-client-options-EHB23gyx.js";import{t as y}from"./use-config-3WYcJsgC.js";import{t as b}from"./use-tracking-ChnSFChv.js";import{n as x}from"./use-settings-BWIH5EuN.js";import{n as S}from"./navigation-context-CQZwH_tC.js";import{t as C}from"./dist-Bl64nBZL.js";import{n as w}from"./conversation-store-DC-JlJuq.js";import{t as T}from"./agent-server-conversation-service.api-BaVQ6NpE.js";import{t as E}from"./profiles-service.api-DdF_4Zhe.js";import{f as D}from"./llm-subscription-DTqtBCWz.js";import{f as O,p as k}from"./conversation-state-store-C6YncQNo.js";import{t as A}from"./use-llm-profiles-xtCBMbef.js";import"./agent-profiles-service.api-U-9YzDFU.js";import{t as j}from"./use-agent-profiles-LCvb5OXT.js";import{a as M,o as N,t as P}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js";import{r as F}from"./settings-utils-BTaaRhLZ.js";var I=n(),L=C(`shrink-0 self-stretch min-w-full bg-[var(--oh-border)]`,{variants:{orientation:{horizontal:`h-[1px]`},color:{light:`bg-[var(--oh-border)]`},size:{thin:`h-[1px]`},inset:{none:``,menu:``}},defaultVariants:{orientation:`horizontal`,color:`light`,size:`thin`,inset:`none`}});function R({orientation:e,color:t,size:n,inset:r,className:i,testId:a}){return r===`menu`?(0,I.jsx)(`div`,{"data-testid":a,role:`separator`,className:g(`relative min-w-full shrink-0 self-stretch`,`h-3`,i),children:(0,I.jsx)(`div`,{"aria-hidden":!0,className:`absolute top-1/2 -left-1 -right-1 h-px -translate-y-1/2 bg-[var(--oh-border)]`})}):(0,I.jsx)(`div`,{"data-testid":a,role:`separator`,className:g(L({orientation:e,color:t,size:n,inset:r}),i)})}var z=e(t(),1);function B(){let e=u();return z.useCallback(t=>v(e.backend)?t:_(t,e),[e])}var V=()=>{let e=r();return a({mutationFn:e=>T.deleteConversation(e.conversationId),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.filter(e=>e.conversation_id!==t.conversationId)),{previousConversations:n}},onSuccess:(e,t)=>{w(t.conversationId)},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`start-tasks`]})}})},H=()=>{let{t:e}=s(`openhands`),t=r(),{conversationId:n,navigate:o}=S();return a({mutationKey:[`stop-conversation`],mutationFn:async e=>k(e.conversationId),onMutate:async()=>{let n=i.loading(e(m.TOAST$STOPPING_CONVERSATION),d);return await t.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:t.getQueryData([`user`,`conversations`]),toastId:n}},onError:(n,r,a)=>{a?.toastId&&i.dismiss(a.toastId),f(e(m.TOAST$FAILED_TO_STOP_CONVERSATION)),a?.previousConversations&&t.setQueryData([`user`,`conversations`],a.previousConversations)},onSuccess:(r,a,s)=>{s?.toastId&&i.dismiss(s.toastId),i.success(e(m.TOAST$CONVERSATION_STOPPED),d),O(t,a.conversationId,{execution_status:p.PAUSED,sandbox_status:`PAUSED`}),n===a.conversationId&&o(`/conversations`)}})};function U(e){return e===`MISSING`||e===`ERROR`}var W=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,I.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M22.1595 5.22752L20.9895 4.95152L17.8275 8.09552L16.0365 6.27152L19.1205 3.03602L18.8505 1.84802C18.1988 1.62999 17.5172 1.51461 16.83 1.50602C16.0804 1.49449 15.3365 1.63746 14.6445 1.92602C13.9764 2.22843 13.3725 2.65616 12.8655 3.18602C12.3011 3.72063 11.8542 4.36683 11.553 5.08352C10.9732 6.50984 10.9732 8.10619 11.553 9.53252C8.42587 12.609 5.3391 15.7263 2.29351 18.8835C1.97851 19.296 1.82851 19.8105 1.86751 20.328C1.89825 20.8846 2.14856 21.4063 2.56351 21.7785C2.74951 21.981 2.97151 22.149 3.21901 22.2705C3.47401 22.383 3.74851 22.4475 4.02601 22.461C4.50001 22.452 4.95451 22.272 5.30701 21.9555C7.62901 19.77 12.078 15.2805 14.6055 12.6495C15.291 12.9405 16.0275 13.0905 16.7715 13.089C17.5204 13.0884 18.2616 12.9377 18.9513 12.6458C19.641 12.3539 20.2652 11.9267 20.787 11.3895C21.8588 10.2964 22.4575 8.82543 22.4535 7.29452C22.4708 6.59398 22.3715 5.89544 22.1595 5.22752ZM4.39951 20.892C4.34178 20.9433 4.27218 20.9794 4.19701 20.997C4.12306 21.0098 4.04746 21.0098 3.97351 20.997C3.89598 20.9852 3.82213 20.956 3.75751 20.9115C3.68817 20.8709 3.62955 20.8144 3.58651 20.7465C3.37651 20.532 3.18001 20.124 3.37651 19.8945C5.43151 17.709 9.66301 13.437 12.309 10.8255C12.459 11.0235 12.624 11.2125 12.801 11.3895C12.978 11.574 13.1685 11.745 13.371 11.901C10.812 14.526 6.63901 18.747 4.40101 20.892H4.39951ZM21.0765 7.29452C21.0795 8.44202 20.6325 9.54452 19.8285 10.3665C19.0262 11.1536 17.9472 11.5944 16.8233 11.5944C15.6994 11.5944 14.6203 11.1536 13.818 10.3665C13.23 9.75286 12.8283 8.98485 12.6597 8.15183C12.4911 7.31882 12.5624 6.45505 12.8655 5.66102C13.0673 5.12062 13.3802 4.62858 13.784 4.21671C14.1879 3.80485 14.6737 3.48233 15.21 3.27002C15.7192 3.05688 16.266 2.94774 16.818 2.94902H17.199L14.4735 5.75852V6.80252L17.316 9.63152H18.306L21.0765 6.90752V7.29452ZM4.86001 10.032H7.15651L8.21401 11.1075L9.23101 10.0965L8.23351 9.07952V9.01502L8.31901 6.54152L7.98901 5.88602L3.69901 3.06302L2.81251 3.16202L1.56601 4.43552L1.46701 5.33402L4.22401 9.71102L4.86001 10.0335V10.032ZM3.44251 4.58402L6.91351 6.87002L6.85501 8.55452H5.24101L3.00301 5.01152L3.44251 4.58402ZM14.1 15.024L15.111 14.0145L19.77 18.792C20.1624 19.2045 20.3813 19.752 20.3813 20.3213C20.3813 20.8906 20.1624 21.4381 19.77 21.8505C19.4749 22.1535 19.0955 22.3605 18.6811 22.4448C18.2667 22.5291 17.8365 22.4866 17.4465 22.323C17.1976 22.2126 16.9744 22.0517 16.791 21.8505L12.078 17.046L13.0965 16.029L17.7945 20.82C17.8577 20.8897 17.9363 20.9436 18.024 20.9775C18.1967 21.0476 18.3899 21.0476 18.5625 20.9775C18.6502 20.9436 18.7288 20.8897 18.792 20.82C18.8577 20.755 18.9088 20.6768 18.942 20.5905C18.9764 20.5025 18.9947 20.409 18.996 20.3145C18.9945 20.2202 18.9767 20.1268 18.9435 20.0385C18.9103 19.9523 18.8592 19.8741 18.7935 19.809L14.1 15.024Z`,fill:`currentColor`})}),G=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,I.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 13.0605L17.469 18.531L18.531 17.4705L13.0605 12L18.531 6.53099L17.4705 5.46899L12 10.9395L6.53099 5.46899L5.47049 6.53099L10.9395 12L5.47049 17.469L6.53099 18.531L12 13.0605Z`,fill:`currentColor`})}),K=e=>(0,I.jsx)(`svg`,{height:24,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,I.jsx)(`path`,{fill:`currentColor`,d:`m22 18-5 4-8-3v3l-4.19-5.75 12.91 1.05v-10.96l4.28-.69zm-17.19-1.75v-7.29l12.91-2.62-7.12-4.34v2.84l-6.63 1.92-1.97 2.62v5.69z`})}),q=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,I.jsx)(`path`,{d:`M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM7.79289 7.79289C8.18342 7.40237 8.81658 7.40237 9.20711 7.79289L12 10.5858L14.7929 7.79289C15.1834 7.40237 15.8166 7.40237 16.2071 7.79289C16.5976 8.18342 16.5976 8.81658 16.2071 9.20711L13.4142 12L16.2071 14.7929C16.5976 15.1834 16.5976 15.8166 16.2071 16.2071C15.8166 16.5976 15.1834 16.5976 14.7929 16.2071L12 13.4142L9.20711 16.2071C8.81658 16.5976 8.18342 16.5976 7.79289 16.2071C7.40237 15.8166 7.40237 15.1834 7.79289 14.7929L10.5858 12L7.79289 9.20711C7.40237 8.81658 7.40237 8.18342 7.79289 7.79289Z`,fill:`currentColor`})}),J=()=>{let{trackDownloadTrajectoryButtonClicked:e}=b(),{t}=s(`openhands`);return a({mutationKey:[`conversations`,`download`],mutationFn:async t=>{e(),h(await T.downloadConversation(t),`conversation_${t}.zip`)},onError:()=>{f(t(m.CONVERSATION$DOWNLOAD_ERROR))}})};function Y({gitProvider:e,className:t}){return(0,I.jsxs)(I.Fragment,{children:[e===`github`&&(0,I.jsx)(M,{size:14,className:t}),e===`gitlab`&&(0,I.jsx)(N,{size:14,className:t}),e===`bitbucket`&&(0,I.jsx)(P,{size:14,className:t}),e===`bitbucket_data_center`&&(0,I.jsx)(P,{size:14,className:t}),e===`azure_devops`&&(0,I.jsx)(K,{className:g(t,`w-[14px] h-[14px]`)})]})}function X(){let{data:e,isLoading:t}=j(),n=e?.active_agent_profile_id??null;return{activeProfile:e?.profiles?.find(e=>e.id!=null&&e.id===n)??null,isLoading:t}}function Z(){let{activeProfile:e}=X();return e?.agent_kind}function Q(){let{data:e,isLoading:t,isError:n}=x(),{data:r,isLoading:i,isError:a}=y(),{data:s,isLoading:d,isError:f}=A(),{backend:p,orgId:m}=u(),h=p.kind===`local`,{activeProfile:g,isLoading:_}=X(),v=(g?.agent_kind??e?.agent_settings?.agent_kind)===`acp`,b=e?.llm_api_key_set===!0,S=g?.agent_kind===`openhands`&&!(h&&g.name==="default")?g.llm_profile_ref:void 0,C=(S?s?.profiles.find(e=>e.name===S):void 0)??s?.profiles.find(e=>e.name===s?.active_profile),w=C?.api_key_set===!0,T=h&&!!C&&!w,{data:O,isLoading:k,isError:j}=o({queryKey:[...l.all,p.id,m,`detail`,C?.name],queryFn:()=>E.getProfile(C.name),...c,enabled:T,meta:{disableToast:!0}}),M=T&&D(O?.config),N=F(`/settings/llm`,r?.feature_flags);return{isConfigured:v||N||(h?w||M:b),isLoading:t||n&&!e||i||a&&!r||d||f&&!s||_||T&&(k||j&&!O)}}export{J as a,G as c,H as d,V as f,Y as i,W as l,R as m,Z as n,q as o,B as p,X as r,K as s,Q as t,U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{M as t,P as n,n as r}from"./active-backend-context-BsLfwrXB.js";import{t as i}from"./profiles-service.api-DdF_4Zhe.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-AOWGcu0j.js → use-manifest-capabilities-Bso6A_-A.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{H as t,n}from"./active-backend-context-BsLfwrXB.js";import{n as r}from"./use-tracking-ChnSFChv.js";function i(e,t){return t.filter(t=>!e.includes(t))}function a(e,t){return i(t.features??[],e).length===0}function o(e,t){let n=e.setup.actions??{};return Object.keys(n).filter(e=>a(n[e]?.features??[],t))}function s(e,t){return Object.keys(e.setup.form.triggers??{}).filter(e=>(t.triggerKinds??[]).includes(e))}function c(e,t){if(!t.ready)return{supported:!1,unmet:[]};let n=i(t.features??[],e.requires.features??[]),r=Object.keys(e.setup.form.triggers??{}),o=r.length===0||r.some(e=>(t.triggerKinds??[]).includes(e)),s=e.setup.actions??{},c=Object.values(s).map(e=>e?.features??[]),l=c.length===0||c.some(e=>a(e,t))?[]:Array.from(new Set(c.flat())).filter(e=>!(t.features??[]).includes(e)),u=[...n,...l,...o?[]:r];return{supported:u.length===0,unmet:u}}function l(){let{backend:i,orgId:a}=n();return e({queryKey:[...t.capabilities(),i.id,a],queryFn:()=>r.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{s as i,u as n,o as r,l as t};
|
package/build/assets/{use-onboarding-completion-CoINurkm.js → use-onboarding-completion-CEgjL02y.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{l as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{l as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as r}from"./useQueries-pUohFMSP.js";import{U as i,tt as a}from"./active-backend-context-BsLfwrXB.js";import{A as o,C as s,E as c,S as l,k as u,w as d}from"./agent-server-client-options-EHB23gyx.js";import{T as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js";import{i as p,r as m}from"./organization-service.api-DmFUEmu5.js";var h=e(t(),1),g=3e4,_=4e3,v=`API key required`,y=`Cloud API key or network issue`,b=`Logged out`;function x(e){return e===i}function S(e){return e===v}function C(e){return e===y}function w(e){return e.kind===`cloud`&&e.authMode!==`cookie`&&!e.apiKey.trim()}function T(e){return e===b}async function E(e){if(e.kind===`cloud`){if(e.authMode!==`cookie`&&!e.apiKey?.trim())throw Error(v);try{e.authMode===`cookie`?await m(e):await p(e)}catch(e){throw n.isAxiosError(e)&&e.response?.status===401||e instanceof f&&e.status===401?Error(b):u(e)?Error(y):e}return!0}return await a(e,_),!0}var D=2,O=300;function k(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function A(e){for(let t=0;;t+=1)try{return await E(e)}catch(e){if(t>=D||!k(e))throw e;await new Promise(e=>{setTimeout(e,O)})}}function j(e,t={}){let{probeDisabledOnce:n=!1}=t,i=h.useSyncExternalStore(c,l,l),a=r({queries:e.map(e=>{let t=i[e.id],r=w(e),a=t?.disabled===!0,c=a&&e.kind===`cloud`&&o(t?.lastError),l=!r&&(!a||n||c);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await A(e);return d(e.id),t}catch(t){throw s(e.id,t),t}},enabled:l,refetchInterval:a||r?!1:g,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!r,refetchOnWindowFocus:!a&&!r,retry:!1,staleTime:a?0:g,meta:{disableToast:!0}}})}),u={};return e.forEach((e,t)=>{let n=a[t],r=i[e.id],o=w(e),s=o?!1:r?.disabled===!0,c=o?0:r?.consecutiveFailures??0,l=o?v:r?.lastError??null,d;d=o||s?!1:n.isSuccess?!0:n.isError?!1:null,u[e.id]={isConnected:d,consecutiveFailures:c,lastError:l,disabled:s}}),u}var M=`openhands-onboarded`;function N(){if(typeof window>`u`)return!0;try{return window.localStorage.getItem(M)!==null}catch{return!0}}function P(){let[e,t]=h.useState(()=>N());return h.useEffect(()=>{let e=e=>{e.key===`openhands-onboarded`&&t(N())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{isCompleted:e,markCompleted:h.useCallback(()=>{try{window.localStorage.setItem(M,`1`)}catch{}t(!0)},[])}}export{S as a,x as i,C as n,j as o,T as r,P as t};
|
package/build/assets/{use-pinned-home-route-D6krwXjy.js → use-pinned-home-route-pK4IlJ-p.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{n}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{n}from"./active-backend-context-BsLfwrXB.js";import{c as r,p as i}from"./agent-server-client-options-EHB23gyx.js";import{t as a}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js";import{C as o,P as s}from"./use-tracking-ChnSFChv.js";var c=e(t(),1),l=`oh:pinned-home-route`,u=`/customize`;function d(e,t){return`${l}:${e}:${t??`-`}`}function f(e){return e===`/customize`?!0:e===o()?s():!1}function p(e){return typeof e!=`string`||!e?null:f(e)?e:null}function m(){let e=r();if(i(e.backend))return null;let t=null;try{t=window.localStorage.getItem(d(e.backend.id,e.orgId))}catch{return null}if(t===null)return null;try{return p(JSON.parse(t))}catch{return null}}function h(){let e=n(),[t,r]=a(d(e.backend.id,e.orgId),null),i=(0,c.useMemo)(()=>p(t),[t]);return{pinnedRoute:i,isPinnedRoute:(0,c.useCallback)(e=>i===e,[i]),togglePinnedRoute:(0,c.useCallback)(e=>{if(i===e){r(null);return}f(e)&&r(e)},[i,r])}}export{m as n,h as r,u as t};
|
package/build/assets/{use-plugins-marketplace-mLsIDhBv.js → use-plugins-marketplace-B8-ZEB34.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-
|
|
1
|
+
import{t as e}from"./useQuery-DAAacS7O.js";import{R as t,n}from"./active-backend-context-BsLfwrXB.js";import{c as r,n as i}from"./agent-server-client-options-EHB23gyx.js";import{_ as a,u as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";function s(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 c=class{static async getPluginsMarketplace(){if(r().backend.kind===`cloud`)return[];try{return(await new o(i()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(r().backend.kind===`cloud`)return[];try{return(await new o(i()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}static async getPluginFileContent(e,t){if(r().backend.kind===`cloud`)throw Error(`Reading plugin files is only available on a local backend.`);let n=await new a(i()).downloadFile(`${e}/${t}`);return s(n)?{kind:`binary`,text:null}:{kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(n)}}},l=()=>{let{backend:r,orgId:i}=n();return e({queryKey:[...t.marketplace,r.id,i],queryFn:()=>c.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1})};export{c as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t}from"./useMutation-Cszf8mKy.js";import{O as n}from"./active-backend-context-BsLfwrXB.js";import{t as r}from"./agent-profiles-service.api-U-9YzDFU.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{
|
|
1
|
+
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t}from"./useMutation-Cszf8mKy.js";import{V as n}from"./active-backend-context-BsLfwrXB.js";import{t as r}from"./use-tracking-ChnSFChv.js";import{t as i}from"./settings-service.api-Q9lKW1TX.js";import{n as a}from"./use-settings-BWIH5EuN.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-
|
|
1
|
+
import{l as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t}from"./useQuery-DAAacS7O.js";import{V as n,n as r}from"./active-backend-context-BsLfwrXB.js";import{p as i}from"./agent-server-client-options-EHB23gyx.js";import{t as a}from"./settings-CKqk8ZnH.js";import{l as o,t as s}from"./settings-service.api-Q9lKW1TX.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=r(),s=!i(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};
|
|
@@ -0,0 +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{i as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as i}from"./useTranslation-CCgUjPJF.js";import{E as a,G as o,n as s,r as c}from"./active-backend-context-BsLfwrXB.js";import{K as l,t as u}from"./utils-D-gOfhmN.js";import{p as d}from"./agent-server-client-options-EHB23gyx.js";import{n as f}from"./settings-nav-DFb3hBMr.js";import{t as p}from"./check-Bo8s5Ylg.js";import{a as m,i as h,n as g,o as _,r as v,s as y}from"./key-CwTE6XJj.js";import{t as b}from"./circle-check-5pH3qCji.js";import{r as x}from"./map-provider-iRs80q_6.js";import{t as S}from"./external-link-Bd7Tga-1.js";import{t as C}from"./puzzle-LJYnuxKe.js";import{t as w}from"./refresh-cw-BtdC3T8P.js";import{u as T}from"./agent-server-config-C_x8Otd9.js";import{t as E}from"./use-config-3WYcJsgC.js";import{t as D}from"./modal-backdrop-BSzNhM4r.js";import{n as O}from"./modal-body-DBweM2EN.js";import{r as k}from"./base-modal-Ds7grR67.js";import{t as A}from"./brand-button-mQq2Ld1I.js";import{a as j,f as M,o as N,u as P}from"./sidebar-layout-B6mcvvdV.js";import{t as F}from"./modal-close-button-BrM5fNnn.js";import{r as I}from"./settings-utils-BTaaRhLZ.js";var L=r(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),R=e(t(),1),z=n(),B=2e3,V=[`npm`,`docker`];function H(e){return e===`npm`?l.SETTINGS$VERSION_NPM_RECOMMENDED:l.SETTINGS$VERSION_DOCKER}function U({tab:e}){return e===`npm`?(0,z.jsx)(g,{className:`size-4 shrink-0`,"aria-hidden":!0}):(0,z.jsx)(v,{className:`size-5 shrink-0`,"aria-hidden":!0})}function W(){let{t:e}=i(`openhands`),[t,n]=(0,R.useState)(`npm`),[r,a]=(0,R.useState)(!1),o=(0,R.useRef)(null),s=t===`npm`?_.npm:_.docker;(0,R.useEffect)(()=>()=>{o.current!==null&&window.clearTimeout(o.current)},[]),(0,R.useEffect)(()=>{a(!1),o.current!==null&&(window.clearTimeout(o.current),o.current=null)},[t]);let c=(0,R.useCallback)(()=>{navigator.clipboard?.writeText(s),a(!0),o.current!==null&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{a(!1),o.current=null},B)},[s]);return(0,z.jsxs)(`div`,{className:`w-full`,children:[(0,z.jsx)(`div`,{className:`flex justify-center`,children:V.map(r=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>n(r),className:u(`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,z.jsx)(U,{tab:r}),e(H(r))]},r))}),(0,z.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,z.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,z.jsx)(`button`,{type:`button`,"data-testid":`copy-to-clipboard`,onClick:c,"aria-label":e(r?l.BUTTON$COPIED:l.SETTINGS$VERSION_COPY_COMMAND),disabled:r,className:`shrink-0 text-[var(--oh-muted)] hover:text-white disabled:hover:text-[var(--oh-muted)]`,children:r?(0,z.jsx)(p,{className:`size-4 text-[var(--oh-status-success)]`,"aria-hidden":!0}):(0,z.jsx)(x,{className:`size-4`,"aria-hidden":!0})})]})]})}function G({onClose:e,latestVersion:t,isPending:n,isFetching:r,updateAvailable:o,upToDate:s,onCheckForUpdates:c}){let{t:d}=i(`openhands`);return(0,z.jsx)(D,{onClose:e,children:(0,z.jsxs)(O,{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,z.jsx)(F,{onClose:e,testId:`close-agent-canvas-update-modal`}),(0,z.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pr-10`,children:[(0,z.jsx)(k,{title:d(l.SETTINGS$APP_UPDATE_CARD_TITLE)}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[(0,z.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:d(l.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,z.jsx)(`span`,{className:`text-white`,children:a})]})]}),(0,z.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,z.jsx)(A,{testId:`agent-canvas-update-check-button`,type:`button`,variant:`secondary`,className:`w-full`,isDisabled:r,"aria-busy":r,onClick:c,startContent:(0,z.jsx)(w,{className:u(`size-4`,r&&`animate-spin`),"aria-hidden":!0}),children:d(l.SETTINGS$APP_UPDATE_CHECK_BUTTON)}),(0,z.jsx)(`div`,{"data-testid":`agent-canvas-update-status`,className:`w-full`,children:n||r?(0,z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:d(l.SETTINGS$APP_UPDATE_CHECKING)}):o?(0,z.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,z.jsx)(y,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,z.jsxs)(`span`,{children:[d(l.SETTINGS$APP_UPDATE_AVAILABLE_MESSAGE,{version:t}),` `,(0,z.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:m,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:[d(l.SETTINGS$VERSION_RELEASE_NOTES),(0,z.jsx)(S,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]})]})]}):s?(0,z.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,z.jsx)(b,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,z.jsxs)(`span`,{children:[d(l.SETTINGS$APP_UPDATE_LATEST_MESSAGE),` `,(0,z.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:m,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:[d(l.SETTINGS$VERSION_RELEASE_NOTES),(0,z.jsx)(S,{className:`size-3.5 shrink-0`,"aria-hidden":!0})]})]})]}):(0,z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:d(l.SETTINGS$APP_UPDATE_CHECK_FAILED)})}),o?(0,z.jsxs)(`div`,{className:`flex w-full flex-col border-t border-[var(--oh-border)] pt-3`,children:[(0,z.jsx)(`span`,{className:`text-sm font-medium text-white`,children:d(l.SETTINGS$APP_UPDATE_HOW_TO_UPDATE)}),(0,z.jsx)(`span`,{className:`mt-1 mb-4 text-sm text-[var(--oh-text-dim)]`,children:d(l.SETTINGS$APP_UPDATE_RUN_COMMANDS)}),(0,z.jsx)(W,{})]}):null]})]})})}function K({hideWhenUpToDate:e=!1}){let{t}=i(`openhands`),[n,r]=(0,R.useState)(!1),s=T()!==null,c=h({enabled:!s});if(s)return null;let d=c.data,f=d===void 0?null:o(d,a),p=f===1,m=f!==null&&f<=0;return e&&!p?null:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`section`,{"data-testid":`agent-canvas-update-card`,children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>r(!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,z.jsxs)(`span`,{className:`flex w-full items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`flex-1 truncate text-sm font-semibold leading-5 text-white`,children:t(l.SETTINGS$APP_UPDATE_CARD_TITLE)}),f!==null&&(0,z.jsxs)(`span`,{"data-testid":`agent-canvas-update-badge`,className:u(`inline-flex shrink-0 items-center gap-1 text-[10px] font-medium leading-none`,p?`rounded-full border border-transparent bg-[#1E3A5F] px-1.5 py-0.5 text-[#3B82F6]`:`text-success`),children:[p?(0,z.jsx)(y,{className:`size-3 shrink-0`,"aria-hidden":!0}):(0,z.jsx)(b,{className:`size-3 shrink-0`,"aria-hidden":!0}),t(p?l.SETTINGS$APP_UPDATE_BADGE_UPDATE_AVAILABLE:l.SETTINGS$APP_UPDATE_BADGE_UP_TO_DATE)]})]}),(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs leading-5 text-[var(--oh-muted)]`,children:[(0,z.jsx)(`span`,{children:t(l.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,z.jsx)(`span`,{className:`text-white`,children:a})]})]})}),n&&(0,z.jsx)(G,{onClose:()=>r(!1),latestVersion:d,isPending:c.isPending,isFetching:c.isFetching,updateAvailable:p,upToDate:m,onCheckForUpdates:()=>c.refetch()})]})}function q(){let{t:e}=i(`openhands`),{active:t}=c(),{backend:n,orgId:r}=t;if(d(n)||n.kind!==`cloud`)return null;let a=T()!==null,o=r?`?org=${encodeURIComponent(r)}`:``;return(0,z.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${n.host.replace(/\/+$/,``)}/settings${o}`,target:a?void 0:`_blank`,rel:a?void 0:`noopener noreferrer`,className:u(M({collapsed:!1}),N.idle),children:[(0,z.jsx)(`span`,{className:j,children:(0,z.jsx)(L,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,z.jsx)(`span`,{className:u(P(!1),`flex-1`),children:e(l.SETTINGS$CLOUD_SETTINGS_LINK)}),!a&&(0,z.jsx)(S,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}function J(){let{t:e}=i(`openhands`),{active:t}=c(),{backend:n,orgId:r}=t;if(d(n)||n.kind!==`cloud`||T()!==null)return null;let a=r?`?org=${encodeURIComponent(r)}`:``;return(0,z.jsxs)(`a`,{"data-testid":`settings-integrations-link`,href:`${n.host.replace(/\/+$/,``)}/settings/integrations${a}`,target:`_blank`,rel:`noopener noreferrer`,className:u(M({collapsed:!1}),N.idle),children:[(0,z.jsx)(`span`,{className:j,children:(0,z.jsx)(C,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,z.jsx)(`span`,{className:u(P(!1),`flex-1`),children:e(l.SETTINGS$INTEGRATIONS_SETTINGS_LINK)}),(0,z.jsx)(S,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}function Y(){let{data:e}=E(),{backend:t}=s(),n=e?.feature_flags,r=T()!==null;return f.filter(e=>!I(e.to,n)&&(!r||e.to===`/settings/app`)).map(e=>({type:`item`,item:e.to===`/settings`?{...e,text:t.kind===`local`?l.SETTINGS$LLM_PROFILES:e.text,subtitle:t.kind===`local`?l.SETTINGS$PAGE_LLM_PROFILES_SUBLINE:e.subtitle}:e}))}export{K as i,J as n,q as r,Y as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{u as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{l as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as i}from"./useQuery-DAAacS7O.js";import{C as a,D as o,a as s,b as c,d as l,f as u,gt as d,h as ee,n as te,p as ne,q as re,rt as ie,w as ae}from"./active-backend-context-BsLfwrXB.js";import{K as oe}from"./utils-D-gOfhmN.js";import{c as f,p as se,t as ce,u as le}from"./agent-server-client-options-EHB23gyx.js";import{a as ue,c as de,i as fe,l as pe,n as me,o as he,s as ge,t as p}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js";import{t as _e}from"./bot-ByolqPEr.js";import{t as m}from"./proxy-DbEf3Nqr.js";import{n as ve}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js";var h=e(t(),1),ye={"layout-dashboard":ge,sparkles:ue,library:he,bot:_e,"circle-alert":de,activity:pe,timer:fe},be=/\{\{([A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)*)\}\}/g;function xe(e,t){return t.split(`.`).reduce((e,t)=>{if(!(typeof e!=`object`||!e))return e[t]},e)}function g(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?e.map(g).filter(Boolean).join(`, `):``}function Se(e){let t=/^\{\{([A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)*)\}\}$/.exec(e);return t?t[1]:null}function _(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?!0:Array.isArray(e)?e.every(_):typeof e!=`object`||Object.getPrototypeOf(e)!==Object.prototype?!1:Object.values(e).every(_)}function Ce(e,t){let n=Se(e);if(n===null)return v(e,t);let r=xe(t,n);return _(r)?r:g(r)}function v(e,t){return e.replace(be,(e,n)=>g(xe(t,n)))}function we(e,t){return e.replace(be,(e,n)=>g(t[n]))}var Te=new Map(ve.map(e=>[e.name,e]));function Ee(e){let t=e.icon;return t?ye[t]??null:null}function De(e){return Object.keys(e.requires.integrations)}function Oe(e){return Object.entries(e.requires.integrations).filter(([,e])=>e.required!==!1).map(([e])=>e)}function y(e){return Te.get(e.skill??e.id)?.triggers[0]??null}function ke(e){return y(e)??`Set up the ${e.name} automation`}var Ae=new Map(p.map(e=>[e.id,e])),je=/<[A-Za-z/!]/,Me=/\{\{(?!count\}\})/,Ne=`{{count}}`;function Pe(e){return typeof e==`string`&&e.length>0&&!je.test(e)&&!Me.test(e)}function Fe(e){let{impact:t}=e;if(typeof t!=`object`||!t)return null;let{basis:n,one:r,other:i}=t;return n!==`completed-runs`||!Pe(r)||!Pe(i)||!i.includes(Ne)?null:{one:r,other:i}}function Ie(e){let t=e.preset_metadata;if(typeof t!=`object`||!t)return null;let{template:n}=t;if(typeof n!=`object`||!n)return null;let{id:r}=n;return typeof r!=`string`||r.length===0?null:Ae.get(r)??null}function Le(e,t){if(t===null||t<1)return null;let n=Ie(e);if(!n)return null;let r=Fe(n);return r?we(t===1?r.one:r.other,{count:t.toLocaleString()}):null}var Re=[`form`,`automation`],ze=`config.json`,Be=[`list`,`templates`],Ve=[`layout-dashboard`,`sparkles`,`library`,`bot`,`circle-alert`,`activity`,`timer`],He=[`automations`,`needs-attention`,`total-runs`,`average-duration`],Ue={automations:[`active`],"needs-attention":[],"total-runs":[],"average-duration":[]},We={status:[`all`,`active`,`failing`,`disabled`],trigger:[`all`,`schedule`,`event`]},Ge=Object.keys(We),Ke=[`last-run`,`runs`,`name`],qe=/<[A-Za-z/!]/,Je=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ye=`https://docs.openhands.dev/`,Xe=/^[a-z][a-z-]*$/,Ze=/^\.[a-z][a-z.]*json$/,Qe=/^[a-z0-9][a-z0-9.-]*$/,$e=/^\/[A-Za-z0-9/{}_-]*$/,et=/^[^{}]*\{id\}[^{}]*$/,tt=[`github`,`gitlab`,`bitbucket`],nt={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}},rt=Object.keys(nt),it=[`list`,`health`,`capabilities`,`validate`,`createPrompt`,`createPlugin`],at=[`createBundle`,`uploads`],ot=[`detail`,`dispatch`,`runs`,`tarball`];function b(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function x(e,t){return typeof e==`string`&&t.includes(e)}var st=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`):qe.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 b(e)?!0:(this.fail(t,`must be an object`),!1)}};function ct(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 lt(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;x(a,Be)?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`),ut(e,s,`${i}.icon`)})}function ut(e,t,n){x(t,Ve)||e.fail(n,`is not an icon this host ships`)}function dt(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&<(e,t.subPages)}}function ft(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&&pt(e,t.list.overview),t.list.filters!==void 0&>(e,t.list.filters),t.list.sort!==void 0&&yt(e,t.list.sort),t.list.insights!==void 0&&bt(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&&xt(e,t.templates))}function pt(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)=>{mt(e,t,i,`${n}.tiles[${r}]`)})}function mt(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`),ut(e,c,`${r}.icon`),!x(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),ht(e,o,i,`${r}.detail`),s!==void 0&&ht(e,s,i,`${r}.zeroDetail`)}function ht(e,t,n,r){if(!e.copy(t,r))return;let i=Ue[n];(i.length===0?/\{\{/:RegExp(`\\{\\{(?!(?:${i.join(`|`)})\\}\\})`)).test(t)&&e.fail(r,`uses a placeholder this metric does not expose`)}function gt(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)=>{_t(e,t,r,`${n}[${i}]`)})}function _t(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`),!x(i,Ge)){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),vt(e,o,We[i],`${r}.options`)}function vt(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;x(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 yt(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),x(t.value,Ke)?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 S={health:[`healthy`,`failing`,`running`,`disabled`,`neverRun`,`checking`],lastRun:[`label`,`never`,`justNow`],stats:[`runs`,`recentSuccess`,`averageDuration`]};function bt(e,t){let n=`pages.list.insights`;e.record(t,n)&&(e.closed(t,Object.keys(S),n),Object.keys(S).forEach(r=>{let i=`${n}.${r}`,a=t[r];if(!e.record(a,i))return;let o=S[r];e.closed(a,o,i),o.forEach(t=>{e.copy(a[t],`${i}.${t}`)})}))}function xt(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 St(e,t){let n=b(t.routes)?t.routes:{},r=b(t.navigation)?t.navigation:{},i=b(t.pages)?t.pages:{},a=b(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 Ct(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 wt(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(!rt.includes(n)){e.fail(`attributes.${n}`,`is not a settable attribute`);return}Ct(e,nt[n],t[n],`attributes.${n}`)})}function Tt(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`||!Ze.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`||!tt.includes(a.repoProvider))&&e.fail(`importExport.importDefaults.repoProvider`,`is not a supported provider`),(typeof a.placeholderEventSource!=`string`||!Qe.test(a.placeholderEventSource))&&e.fail(`importExport.importDefaults.placeholderEventSource`,`must be a lowercase event source`))}function Et(e,t){if(!e.record(t,`endpoints`))return;let n=[...it,...at,...ot];e.closed(t,n,`endpoints`);let r=n=>{let r=t[n];return typeof r!=`string`||!$e.test(r)||r.includes(`//`)?(e.fail(`endpoints.${n}`,`must be a rooted service-relative path`),null):r};[...it,...at.filter(e=>e in t)].forEach(t=>{let n=r(t);n!==null&&/[{}]/.test(n)&&e.fail(`endpoints.${t}`,`must not carry a substitution`)}),ot.forEach(t=>{let n=r(t);n!==null&&!et.test(n)&&e.fail(`endpoints.${t}`,`must carry exactly one {id}`)})}function Dt(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`&&Je.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 Ot=[`version`,`routes`,`navigation`,`pages`,`docsUrl`,`attributes`,`importExport`,`endpoints`,`featuredAutomationIds`,`responderIntegrationIds`];function kt(e,t){if(!b(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 st;return n.closed(e,Ot,`interface`),ct(n,e.routes,t.mountedRoutes),dt(n,e.navigation),ft(n,e.pages),(typeof e.docsUrl!=`string`||!e.docsUrl.startsWith(Ye))&&n.fail(`docsUrl`,`must start with ${Ye}`),wt(n,e.attributes),Tt(n,e.importExport),Et(n,e.endpoints),Dt(n,e.featuredAutomationIds,`featuredAutomationIds`).forEach(e=>{t.catalogIds.has(e)||n.fail(`featuredAutomationIds`,`${e} is not a catalog entry`)}),Dt(n,e.responderIntegrationIds,`responderIntegrationIds`),St(n,e),{valid:n.errors.length===0,errors:n.errors}}var At=/^[a-z0-9]+(-[a-z0-9]+)*$/,jt=/^[a-z][A-Za-z0-9]*$/,Mt=/<[A-Za-z/!]/,Nt=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,Pt=/^[A-Za-z0-9 ._/-]+$/,Ft=/^[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)*$/,It=/^(skills|automations|plugins)\/[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)*$/,Lt=RegExp(`\\{\\{(?!(?:${Re.join(`|`)})\\.[A-Za-z0-9_.]+\\}\\})`),Rt=[`direct`,`assisted`],zt=[`text`,`textarea`,`select`,`number`,`cron`,`timezone`,`repo-picker`,`llm-profile`,`event-source`,`event-type`,`plugin-sources`,`tarball-upload`],Bt=[`github`,`gitlab`,`bitbucket`],Vt=[`cron`,`event`],Ht=[`safeExpressionLiteral`],Ut=2e3;function C(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function w(e,t){return typeof e==`string`&&t.includes(e)}function T(e,t){return typeof e==`number`&&Number.isInteger(e)&&e>=t}var Wt=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`):Mt.test(e)?this.fail(t,`must not contain markup`):!0}placeholders(e,t){return Lt.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 Gt(e,t){return typeof e==`string`&&t.test(e)&&!e.split(`/`).some(e=>e===`.`||e===`..`)}function Kt(e){if(typeof e!=`string`||!Pt.test(e))return!1;let t=e.split(` `).filter(e=>e.length>0);return t.length>0&&t.every(e=>!e.startsWith(`/`)&&!e.split(`/`).some(e=>e===`..`))}function qt(e,t){if(!C(t)){e.fail(`requires`,`must be an object`);return}let{integrations:n,features:r}=t;C(n)?Object.entries(n).forEach(([t,n])=>{let r=`requires.integrations.${t}`;if(!C(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`))}):e.fail(`requires.integrations`,`must be an object`),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 Jt(e,t,n){if(!C(t)||Object.keys(t).length===0){e.fail(n,`must be a non-empty object`);return}let{minLength:r,maxLength:i,min:a,max:o,format:s}=t;r!==void 0&&!T(r,0)&&e.fail(`${n}.minLength`,`must be a non-negative integer`),i!==void 0&&!T(i,1)&&e.fail(`${n}.maxLength`,`must be a positive integer`),a!==void 0&&!T(a,0)&&e.fail(`${n}.min`,`must be a non-negative integer`),o!==void 0&&!T(o,1)&&e.fail(`${n}.max`,`must be a positive integer`),s!==void 0&&!w(s,Ht)&&e.fail(`${n}.format`,`is not a supported format`)}function Yt(e,t,n){if(!C(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;w(r,zt)||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`&&typeof t.default!=`number`&&typeof t.default!=`boolean`&&t.default!==null&&e.fail(`${n}.default`,`must be a string, number, boolean or null`),typeof s!=`boolean`&&e.fail(`${n}.required`,`must be a boolean`),c!==void 0&&!w(c,Bt)&&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`),t.multiple!==void 0&&(t.multiple!==!0||r!==`repo-picker`)&&e.fail(`${n}.multiple`,`may only be true, and only on 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(!C(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&&Jt(e,t.constraints,`${n}.constraints`)}function E(e,t,n){return!C(t)||Object.keys(t).length===0?(e.fail(n,`must be a non-empty object`),[]):Object.entries(t).map(([t,r])=>(jt.test(t)||e.fail(`${n}.${t}`,`is not a valid field name`),Yt(e,r,`${n}.${t}`),t))}function Xt(e,t){if(!C(t))return e.fail(`setup.form`,`must be an object`),{kinds:[],fieldNames:[]};t.note!==void 0&&e.copy(t.note,`setup.form.note`);let n=E(e,t.args,`setup.form.args`),r=[];t.triggers!==void 0&&(!C(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(!w(t,Vt)){e.fail(`setup.form.triggers.${t}`,`is not a trigger kind`);return}r.push(t),n.push(...E(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`)),{kinds:r,fieldNames:n}}function Zt(e,t,n){if(!Array.isArray(t)||t.length===0){e.fail(n,`must be a non-empty array`);return}t.forEach((t,r)=>{(typeof t!=`string`||t.length===0)&&e.fail(`${n}[${r}]`,`must be a non-empty string`)})}function Qt(e,t,n,r){let i=`setup.actions.${t}`;if(!C(n)){e.fail(i,`must be an object`);return}e.copy(n.label,`${i}.label`),e.copy(n.help,`${i}.help`),Zt(e,n.features,`${i}.features`),E(e,n.args,`${i}.args`).filter(e=>r.includes(e)).forEach(t=>e.fail(`${i}.args.${t}`,`is already declared by the form`)),t===`prompt`?e.templateValue(n.prompt,`${i}.prompt`):t===`plugin`?(e.templateValue(n.prompt,`${i}.prompt`),e.templateValue(n.plugins,`${i}.plugins`)):t===`upload`?(e.templateValue(n.tarballPath,`${i}.tarballPath`),e.templateValue(n.entrypoint,`${i}.entrypoint`),n.setupScript!==void 0&&e.templateValue(n.setupScript,`${i}.setupScript`)):e.fail(i,`is not a supported action kind`);let a={prompt:[`label`,`help`,`features`,`args`,`prompt`],plugin:[`label`,`help`,`features`,`args`,`prompt`,`plugins`],upload:[`label`,`help`,`features`,`args`,`tarballPath`,`entrypoint`,`setupScript`]}[t]??[];Object.keys(n).filter(e=>!a.includes(e)).forEach(t=>e.fail(`${i}.${t}`,`is not allowed`))}function $t(e,t,n){if(!C(t)||Object.keys(t).length===0){e.fail(`setup.actions`,`must be a non-empty object`);return}Object.entries(t).forEach(([t,r])=>Qt(e,t,r,n))}function D(e,t){return C(e)?Object.values(e).some(e=>C(e)&&e.type===t):!1}function en(e){return C(e)&&D(e.args,`repo-picker`)}function tn(e){let t=C(e.form)?e.form:{},n=C(t.triggers)?t.triggers:{},r=n.event;return D(r,`event-source`)||`event`in n&&Object.keys(n).length===1&&D(r,`repo-picker`)||D(t.args,`repo-picker`)?!0:!C(e.actions)||Object.keys(e.actions).length===0?!1:Object.values(e.actions).every(en)}function nn(e,t){e.templateCopy(t,`setup.message`)&&t.length>Ut&&e.fail(`setup.message`,`must be at most ${Ut} characters`)}function rn(e,t){if(!C(t)){e.fail(`setup.bundle`,`must be an object`);return}(typeof t.version!=`string`||!Nt.test(t.version))&&e.fail(`setup.bundle.version`,`must be a semantic version`),Kt(t.entrypoint)||e.fail(`setup.bundle.entrypoint`,`must be a plain command that stays inside the archive`),t.setupScript!==void 0&&!Gt(t.setupScript,Ft)&&e.fail(`setup.bundle.setupScript`,`must be a relative path`),t.timeout!==void 0&&!T(t.timeout,1)&&e.fail(`setup.bundle.timeout`,`must be a positive integer`),!C(t.files)||Object.keys(t.files).length===0?e.fail(`setup.bundle.files`,`must be a non-empty object`):(Object.entries(t.files).forEach(([t,n])=>{Gt(t,Ft)||e.fail(`setup.bundle.files.${t}`,`is not a packed path`),t===`config.json`&&e.fail(`setup.bundle.files.${t}`,`is the name the rendered config is packed under`),Gt(n,It)||e.fail(`setup.bundle.files.${t}`,`must name a file under skills/, automations/, or plugins/`)}),typeof t.setupScript==`string`&&!(t.setupScript in t.files)&&e.fail(`setup.bundle.setupScript`,`must name a packed file`)),!C(t.config)||Object.keys(t.config).length===0?e.fail(`setup.bundle.config`,`must be a non-empty object`):an(e,t.config,`setup.bundle.config`)}function an(e,t,n){if(typeof t==`string`){e.templateValue(t,n);return}if(Array.isArray(t)){t.forEach((t,r)=>an(e,t,`${n}[${r}]`));return}if(C(t)){Object.entries(t).forEach(([t,r])=>an(e,r,`${n}.${t}`));return}t!==null&&typeof t!=`number`&&typeof t!=`boolean`&&e.fail(n,`must be a string, number, boolean, null, array or object`)}function on(e,t,n,r){if(!w(t.mode,Rt)){e.fail(`setup.mode`,`is not a supported mode`);return}if(t.mode===`direct`){let i=t.prompt!==void 0,a=t.bundle!==void 0,o=t.actions!==void 0;[i,a,o].filter(Boolean).length===1?a?rn(e,t.bundle):o?$t(e,t.actions,r):e.templateValue(t.prompt,`setup.prompt`):e.fail(`setup`,`must declare exactly one of prompt, bundle or actions for direct setup`),t.message!==void 0&&nn(e,t.message),n.length===0&&e.fail(`setup.form.triggers`,`must declare at least one trigger kind`),n.includes(`event`)&&!tn(t)&&e.fail(`setup.form.triggers.event`,`must declare an event source field or repository picker`),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}nn(e,t.message),e.absent(t,`prompt`,`setup`,`is only allowed for direct setup`),e.absent(t,`bundle`,`setup`,`is only allowed for direct setup`),e.absent(t,`actions`,`setup`,`is only allowed for direct setup`),e.absent(t,`filter`,`setup`,`is only allowed for direct setup`)}function sn(e){return C(e)&&e.setup!==void 0}function cn(e){let t=new Wt;if(!C(e))return{valid:!1,errors:[`manifest: must be an object`]};let{setup:n}=e;if(!C(n))return{valid:!1,errors:[`setup: must be an object`]};if(n.version!==`1.0`)return{valid:!1,errors:[`setup.version: must be "1.0"`]};(typeof e.id!=`string`||!At.test(e.id))&&t.fail(`id`,`must be a lowercase slug`),t.copy(e.name,`name`),t.copy(e.description,`description`),e.version!==void 0&&(typeof e.version!=`string`||!Nt.test(e.version))&&t.fail(`version`,`must be a semantic version`),e.skill!==void 0&&(typeof e.skill!=`string`||!At.test(e.skill))&&t.fail(`skill`,`must be a lowercase slug`),qt(t,e.requires);let{kinds:r,fieldNames:i}=Xt(t,n.form);return on(t,n,r,i),{valid:t.errors.length===0,errors:t.errors}}function ln(e){let t=[],n=new Map;return e.forEach(e=>{if(!sn(e))return;let{valid:r,errors:i}=cn(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 un=ln(p),dn=me,fn=`AUTOMATION_INTERFACE`in dn?dn.AUTOMATION_INTERFACE:void 0,O={list:`/automations`,setup:`/automations/new/:automationId`,detail:`/automations/:automationId`,templates:`/automations/templates`},pn=`https://docs.openhands.dev/openhands/usage/agent-canvas/managing-automations#exported-file-format`;function mn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function hn(){return new Set(p.flatMap(e=>mn(e)&&typeof e.id==`string`?[e.id]:[]))}function gn(e){if(e===void 0)return null;let t=kt(e,{catalogIds:hn(),mountedRoutes:O});return t.valid?e:(console.warn(`Rejected the automation interface manifest:`,t.errors.join(`; `)),null)}var k=gn(fn);function _n(){return k!==null}function A(){if(!k)throw Error(`No automation interface manifest is admitted, so this surface should not have rendered.`);return k}function vn(e,t){return e.replace(`:automationId`,encodeURIComponent(t))}function yn(){return O.list}function bn(e){return vn(O.setup,e)}function xn(e){return vn(O.detail,e)}function Sn(){return O.templates}function Cn(e){return e===O.list||e.startsWith(`${O.list}/`)}function j(e){return A().endpoints[e]??``}function M(e,t){return j(e).replace(`{id}`,encodeURIComponent(t))}function wn(){let e=A();return{sidebarLabel:e.navigation.sidebar.label,commandMenuTitle:e.navigation.commandMenu.title,commandMenuDescription:e.navigation.commandMenu.description,commandMenuKeywords:e.navigation.commandMenu.keywords,listTitle:e.pages.list.title,listSubtitle:e.pages.list.subtitle,detailBackLabel:e.pages.detail.backLabel,editTitle:e.pages.edit.title}}var Tn={present:!1,label:``,help:null,required:!1,min:null,max:null};function En(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}:Tn}function Dn(){return A().importExport}function On(){return A().docsUrl}function kn(){return A().featuredAutomationIds}function An(){return A().responderIntegrationIds}function jn(){let e=k?.navigation.subPages;return e?e.map(e=>({page:e.page,to:e.page===`templates`?Sn():yn(),label:e.label,icon:e.icon})):null}function Mn(){let e=k?.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 Nn(){return k?.pages.templates??null}var Pn=/["'\\]/;function Fn(e){return Object.keys(e.form.triggers??{})}function In(e){return Fn(e)[0]??null}function N(e){return Object.keys(e.actions??{})}function Ln(e){return N(e)[0]??null}function P(e,t,n){let r=e.form.triggers??{},i=Object.entries(r),a=t&&t in r?r[t]:i.length===1?i[0][1]:{},o=e.actions??{},s=Object.entries(o),c=n&&n in o?o[n]?.args:s.length===1?s[0][1]?.args:{};return Object.assign({},a,e.form.args,c)}function Rn(e,t,n,r){let i={},a=P(e,n,r),o=t?.triggers?.cron?.timezones;if(o?.length){let e=o.map(e=>({value:e,label:e}));Object.entries(a).filter(([,e])=>e.type===`timezone`).forEach(([t])=>{i[t]={options:e}})}if(t?.eventSources?.length){let e=t.eventSources.map(e=>({value:e,label:e}));Object.entries(a).filter(([,e])=>e.type===`event-source`).forEach(([t])=>{i[t]={options:e}})}if(t?.eventTypes?.length){let e=t.eventTypes.map(e=>({value:e,label:e}));Object.entries(a).filter(([,e])=>e.type===`event-type`).forEach(([t])=>{i[t]={options:e}})}return i}function zn(e,t,n={}){return n[e]?.options??t.options??[]}function Bn(e){return typeof File<`u`&&e instanceof File}function F(e){return Array.isArray(e)?e.filter(e=>e.trim()!==``):Bn(e)?e.name?[e.name]:[]:typeof e==`string`&&e.trim()===``||e==null?[]:[String(e)]}function I(e){return Array.isArray(e)||e==null?``:Bn(e)?e.name:String(e)}function Vn(e,t,n){return Object.fromEntries(Object.entries(P(e,t,n)).map(([e,t])=>[e,t.multiple?[]:t.default??``]))}function Hn(e,t,n,r){let i=F(n);return i.length===0?t.required?{code:`required`}:null:i.map(n=>Un(e,t,n.trim(),r)).filter(e=>e!==null)[0]??null}function Un(e,t,n,r){let{minLength:i,maxLength:a,min:o,max:s,format:c}=t.constraints??{};if(i!==void 0&&n.length<i)return{code:`minLength`,length:i};if(a!==void 0&&n.length>a)return{code:`maxLength`,length:a};if(t.type===`number`){let e=Number(n);if(Number.isNaN(e))return{code:`invalidOption`};if(o!==void 0&&e<o)return{code:`min`,value:o};if(s!==void 0&&e>s)return{code:`max`,value:s}}if(c===`safeExpressionLiteral`&&Pn.test(n))return{code:`unsafeExpressionLiteral`};let l=zn(e,t,r);return l.length>0&&!l.some(e=>e.value===n)?{code:`invalidOption`}:null}function Wn(e,t,n={},r,i){return Object.entries(P(e,r,i)).reduce((e,[r,i])=>{let a=Hn(r,i,t[r],n);return a?{...e,[r]:a}:e},{})}function Gn(e,t){let n=z(e,t);return n===`plugin`?j(`createPlugin`):n===`upload`||n===`bundle`?Jn(`createBundle`):j(`createPrompt`)}function Kn(){return Jn(`uploads`)}var qn=[`createBundle`,`uploads`];function Jn(e){let t=j(e);if(!t)throw Error(`The published automation interface declares no '${e}' endpoint, so this deployment cannot create an automation from a script bundle.`);return t}function L(e){return e===`upload`||e===`bundle`?qn.filter(e=>!j(e)):[]}function Yn(e,t){if(R(e))return L(`bundle`);if(!e.setup.actions)return[];if(t&&t in e.setup.actions)return L(t);let n=N(e.setup).map(L);return n.some(e=>e.length===0)?[]:Array.from(new Set(n.flat()))}function R(e){return e.setup.mode===`direct`&&e.setup.bundle!==void 0}function Xn(e,t){return z(e,t)===`upload`}function z(e,t){if(!e)return`prompt`;if(R(e))return`bundle`;let n=e.setup.actions??{};if(t&&t in n)return t;let r=N(e.setup);return r.length===1?r[0]:`prompt`}var B=`oh-internal://uploads/00000000-0000-0000-0000-000000000000`,Zn={cron:[`schedule`,`timezone`],event:[`source`,`on`]},Qn=[`model`,`timeout`],$n=[`ref`],er=/\{\{form\.([A-Za-z0-9_.]+)\}\}/g;function V(e,t){let n=Object.entries(P(e,null,t)).find(([,e])=>e.type===`repo-picker`);return n?{name:n[0],field:n[1]}:null}function tr(e,t,n){let r=V(e,n);return r?F(t[r.name]):[]}function H(e,t,n){if(`name`in P(e.setup,null,n)&&`name`in t)return I(t.name);let r=tr(e.setup,t,n);if(r.length===0)return e.name;if(r.length===1)return`${e.name} - ${r[0]}`;let i=d.t(oe.SETUP$REPOSITORY_COUNT,{total:r.length});return`${e.name} - ${i}`}function nr(e,t){let n=e.form.triggers??{},r=Object.entries(n);if(r.length===0)return null;let i=t&&t in n?[t,n[t]]:r.length===1?r[0]:null;if(!i)return null;let[a,o]=i;return{kind:a,fields:o??{}}}function U(e){return e!=null&&e!==``}function rr(e,t){if(e===`number`){let e=I(t);return e===``?void 0:Number(e)}return I(t)}function ir(e,t,n){return Object.fromEntries(Qn.flatMap(r=>{let i=P(e,null,n)[r],a=rr(i?.type,t[r]);return U(a)?[[r,a]]:[]}))}function ar(e,t,n){let r=V(e,n),i=tr(e,t,n);if(i.length===0||!r?.field.provider)return{};let a=$n.filter(e=>U(I(t[e])));return{repos:i.map(e=>({url:e,...Object.fromEntries(a.map(e=>[e,I(t[e])])),provider:r.field.provider}))}}function or(e){if(!U(e)||typeof e!=`string`)return e;let t=e.trim();if(!t)return[];if(t.startsWith(`[`))try{return JSON.parse(t)}catch{return[{source:t}]}return t.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(e=>{let[t,...n]=e.split(/\s+/),r={source:t};return n.forEach(e=>{let[t,...n]=e.split(`=`),i=n.join(`=`);(t===`ref`||t===`repo_path`)&&i&&(r[t]=i)}),r})}function W(e,t,n=B,r,i){let{setup:a}=e;if(a.mode!==`direct`)return null;if(a.bundle)return lr(e,t,n,r);if(a.actions)return sr(e,t,n,r,i);if(!a.prompt)return null;let o={form:t,automation:e},s={name:H(e,t),prompt:v(a.prompt,o),...ir(a,t),...ar(a,t)},c=G(e,t,r);c&&(s.trigger=c);let l=cr(e,t);return l&&(s.template=l),s}function sr(e,t,n,r,i){let a=z(e,i);if(a===`bundle`)return null;let o=e.setup,s={form:t,automation:e},c={name:H(e,t,i)},l=G(e,t,r,i);if(l&&(c.trigger=l),Object.assign(c,ir(o,t,i)),a===`upload`){let e=o.actions?.upload;if(!e)return null;if(c.tarball_path=n||v(e.tarballPath,s),c.entrypoint=v(e.entrypoint,s),e.setupScript){let t=v(e.setupScript,s);U(t)&&(c.setup_script_path=t)}return c}let u=a===`plugin`?o.actions?.plugin:o.actions?.prompt;if(!u)return null;if(c.prompt=v(u.prompt,s),Object.assign(c,ar(o,t,i)),a===`plugin`){let e=o.actions?.plugin;if(!e)return null;c.plugins=or(Ce(e.plugins,s))}let d=cr(e,t);return d&&(c.template=d),c}function cr(e,t){if(e.version)return{id:e.id,version:e.version,config:{...t}}}function G(e,t,n,r){let i=nr(e.setup,n);if(!i)return;let a=Zn[i.kind],o=Object.keys(i.fields).filter(e=>a.includes(e)),s=V(e.setup,r),c=Object.fromEntries(o.map(e=>[e,I(t[e])]).filter(([,e])=>U(e))),l=e.setup.filter?v(e.setup.filter,{form:t,automation:e}):void 0;return{type:i.kind,...c,...i.kind===`event`&&{...!(`source`in c)&&{source:s?.field.provider??``},...U(l)&&{filter:l}}}}function lr(e,t,n,r){let i=e.setup.bundle,a={form:t,automation:e},o={name:H(e,t)},s=G(e,t,r);return s&&(o.trigger=s),o.tarball_path=n,o.entrypoint=i.entrypoint,i.setupScript&&(o.setup_script_path=i.setupScript),i.timeout!==void 0&&(o.timeout=i.timeout),o.template={id:e.id,version:i.version,config:K(i.config,a)},o}function K(e,t){return typeof e==`string`?Ce(e,t):Array.isArray(e)?e.map(e=>K(e,t)):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,K(n,t)])):e}function ur(e,t,n,r){let i=W(e,t,B,n,r);return i?{automationId:e.id,endpoint:Gn(e,r),draft:i}:null}function dr(e,t){return[y(e),e.setup.message?v(e.setup.message,{form:t,automation:e}):``].filter(Boolean).join(`
|
|
2
|
+
|
|
3
|
+
`)}function fr(e){let t=Array.from(e.matchAll(er),e=>e[1]);return Array.from(new Set(t))}function pr(e,t,n){let r={},i=Object.keys(e.setup.form.triggers??{}),a=t?[t]:i.length>1?i:[null],o=N(e.setup),s=n?[n]:o.length>1?o:[null],c=(e,t)=>{if(Array.isArray(e)){e.forEach((e,n)=>c(e,`${t}[${n}]`));return}if(typeof e==`object`&&e){Object.entries(e).forEach(([e,n])=>c(n,t?`${t}.${e}`:e));return}if(typeof e==`string`){let n=fr(e);n.length>0&&(r[t]=Array.from(new Set([...r[t]??[],...n])))}};return s.forEach(t=>{a.forEach(n=>{let r=Object.keys(P(e.setup,n,t)),i=W(e,Object.fromEntries(r.map(e=>[e,`{{form.${e}}}`])),t===`upload`?``:B,n,t);i&&c(i,``)})}),r}var q=`/api/automation`,J=r.create();async function Y(e={}){let t=await u();return{...ae,...t?{[o]:t}:{},...e}}J.interceptors.request.use(async e=>{let t=await Y();if(Object.entries(t).forEach(([t,n])=>{e.headers.set(t,n)}),e.baseURL)return e;let n=le();if(!n)throw new ce;e.baseURL=n.host;let r=n.apiKey?.trim();return r&&e.headers.set(`X-Session-API-Key`,r),e});function X(e){return typeof e==`string`&&e.trim()||null}function mr(e){return typeof e==`string`?X(e):X(e.sdk_version)??X(e.version)}function hr(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function gr(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 _r(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function vr(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let{importDefaults:t}=Dn(),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:`${q}${j(e.plugins?.length?`createPlugin`:`createPrompt`)}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:t.placeholderEventSource,on:_r()},...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 Z(e){let t=e.apiKey.trim();return{baseURL:e.host,headers:await Y(t?{"X-Session-API-Key":t}:{})}}async function Q(e){return Y(e.orgId?{"X-Org-Id":e.orgId}:{})}var $=class e{static async syncTelemetryConsent(e=l()){if(f().backend.kind!==`local`)return;let t=await ne();await J.post(`${q}/v1/telemetry/consent`,{consent_granted:e===`granted`,frontend_distinct_id:t},{timeout:5e3}),e!==`granted`&&t&&s(t)}static async getSdkVersion(){let e=f(),t=`${q}/sdk-version`;try{let n;if(e.backend.kind===`cloud`)n=await m({backend:e.backend,method:`GET`,path:t,headers:await Q(e),timeoutSeconds:5});else{let{data:e}=await J.get(t,{timeout:5e3});n=e}return mr(n)}catch{return null}}static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=f().backend;if(r.kind===`cloud`)return m({backend:r,method:`GET`,path:`${q}${j(`list`)}?${hr(t,n)}`,headers:await Y()});let{data:i}=await J.get(`${q}${j(`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=f().backend,n=`${q}${M(`detail`,e)}`;if(t.kind===`cloud`)return m({backend:t,method:`GET`,path:n,headers:await Y()});let{data:r}=await J.get(n);return r}static async createAutomation(e){let t=f(),{path:n,body:r}=vr(e),i;if(t.backend.kind===`cloud`)i=await m({backend:t.backend,method:`POST`,path:n,body:r,headers:await Q(t)});else{let{data:e}=await J.post(n,r,await Z(t.backend));i=e}let a=`${q}${M(`detail`,i.id)}`,o={trigger:gr(e),enabled:!1};try{if(t.backend.kind===`cloud`)return await m({backend:t.backend,method:`PATCH`,path:a,body:o,headers:await Q(t)});let{data:e}=await J.patch(a,o,await Z(t.backend));return e}catch(e){try{t.backend.kind===`cloud`?await m({backend:t.backend,method:`DELETE`,path:a,headers:await Q(t)}):await J.delete(a,await Z(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=f().backend,r=`${q}${M(`detail`,e)}`;if(n.kind===`cloud`)return m({backend:n,method:`PATCH`,path:r,body:t,headers:await Y()});let{data:i}=await J.patch(r,t);return i}static async deleteAutomation(e){let t=f().backend,n=`${q}${M(`detail`,e)}`;if(t.kind===`cloud`){await m({backend:t,method:`DELETE`,path:n,headers:await Y()});return}await J.delete(n)}static async dispatchAutomation(e){let t=f().backend,n=`${q}${M(`dispatch`,e)}`;if(t.kind===`cloud`)return m({backend:t,method:`POST`,path:n,headers:await Y()});let{data:r}=await J.post(n);return r}static async cancelAutomationRun(e){let t=f().backend,n=`${q}/v1/runs/${encodeURIComponent(e)}/cancel`;if(t.kind===`cloud`)return m({backend:t,method:`POST`,path:n,headers:await Y()});let{data:r}=await J.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,i=f().backend,a=`${q}${M(`runs`,e)}`;if(i.kind===`cloud`)return m({backend:i,method:`GET`,path:`${a}?${hr(n,r)}`,headers:await Y()});let{data:o}=await J.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=f().backend,r=`${q}${M(`tarball`,e)}`,i;if(n.kind===`cloud`)i=await m({backend:n,method:`GET`,path:r,responseType:`blob`,headers:await Y()});else{let{data:e}=await J.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=f().backend,t=`${q}${j(`capabilities`)}`;if(e.kind===`cloud`)return m({backend:e,method:`GET`,path:t,headers:await Y()});let{data:n}=await J.get(t);return n}static async validateDraft(e){let t=f().backend,n=`${q}${j(`validate`)}`;if(t.kind===`cloud`)return m({backend:t,method:`POST`,path:n,body:e,headers:await Y()});let{data:r}=await J.post(n,e);return r}static async createAutomationDraft(e,t,n){let r=f().backend,i=`${q}${Gn(t,n)}`;if(r.kind===`cloud`)return m({backend:r,method:`POST`,path:i,body:e,headers:await Y()});let{data:a}=await J.post(i,e);return a}static async uploadAutomationTarball(e,t){let n=f().backend,i=`${q}${Kn()}?name=${encodeURIComponent(e)}`,a={"Content-Type":`application/gzip`},o;if(n.kind===`cloud`){let{orgId:e}=f();o=(await r.post(`${n.host.replace(/\/+$/,``)}${i}`,t,{headers:{...await Y(),...a,...n.apiKey?{Authorization:`Bearer ${n.apiKey}`}:{},...e?{"X-Org-Id":e}:{}}})).data}else o=(await J.post(i,t,{headers:a})).data;let s=o.tarball_path;if(typeof s!=`string`||!s)throw Error(`The upload returned no tarball path.`);return s}static async getGitSyncStatus(){let e=f().backend,t=`${q}/v1/git-sync/status`;if(e.kind===`cloud`)return m({backend:e,method:`GET`,path:t});let{data:n}=await J.get(t);return n}static async updateGitSyncConfig(e){let t=f().backend,n=`${q}/v1/git-sync/config`;if(t.kind===`cloud`)return m({backend:t,method:`PUT`,path:n,body:e});let{data:r}=await J.put(n,e);return r}static async checkGitSyncConfig(e){let t=f().backend,n=`${q}/v1/git-sync/check`;if(t.kind===`cloud`)return m({backend:t,method:`POST`,path:n,body:e});let{data:r}=await J.post(n,e);return r}static async triggerGitSync(){let e=f().backend,t=`${q}/v1/git-sync/sync`;if(e.kind===`cloud`)return m({backend:e,method:`POST`,path:t});let{data:n}=await J.post(t);return n}static async checkHealth(){let e=f().backend,t=`${q}${j(`health`)}`;try{if(e.kind===`cloud`)return await m({backend:e,method:`GET`,path:t,timeoutSeconds:5,headers:await Y()});let{data:n}=await J.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},yr=`automation-sdk-version`,br=3600*1e3;async function xr(){if(typeof $.getSdkVersion!=`function`)return null;try{return await $.getSdkVersion()}catch{return null}}function Sr(){let e=te(),{backend:t}=e,r=h.useContext(n),a=!se(t)&&typeof $.getSdkVersion==`function`,{data:o}=i({queryKey:[yr,t.id,t.kind,t.host,e.orgId??``],queryFn:xr,enabled:a,initialData:a?void 0:null,staleTime:br,gcTime:br,refetchOnWindowFocus:!1,refetchOnReconnect:!1},r??ie());return o??null}var Cr=()=>{let{backend:e}=te(),t=Sr(),n=h.useCallback(()=>({backendKind:e.kind,agentServerVersion:e.kind===`local`?re(e.host):null,automationSdkVersion:t??null}),[t,e.host,e.kind]);h.useEffect(()=>{ee(n())},[n]);let r={current_url:window.location.href},i=(e,t={})=>{ee(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})},trackGitSyncConfigUpdated:({backendKind:e})=>{i(`git_sync_config_updated`,{backend_kind:e})},trackGitSyncTriggered:({backendKind:e})=>{i(`git_sync_triggered`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,hasApiKey:n,source:r,agentServerVersion:o,backendVersion:s})=>{i(`backend_added`,{...a({backendKind:e,agentServerVersion:o,backendVersion:s,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})},trackOnboardingLinkClicked:({linkId:e,destinationType:t,surface:n,checklistItem:r,stepId:a,isExternal:o})=>{i(`onboarding_link_clicked`,{link_id:e,destination_type:t,surface:n,checklist_item:r,step_id:a,is_external:o})}}};export{wn as A,ke as B,yn as C,Mn as D,On as E,Cn as F,ye as G,Oe as H,un as I,ze as L,jn as M,Nn as N,kn as O,_n as P,y as R,xn as S,En as T,Le as U,De as V,we as W,In as _,ur as a,Wn as b,Xn as c,P as d,I as f,Ln as g,Vn as h,W as i,An as j,Dn as k,Yn as l,zn as m,$ as n,pr as o,F as p,dr as r,R as s,Cr as t,N as u,Rn as v,bn as w,pn as x,Fn as y,Ee as z};
|
package/build/assets/{use-user-conversation-ZWlXtbZb.js → use-user-conversation-C_l65DqW.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-DAAacS7O.js";import{n as r}from"./active-backend-context-BsLfwrXB.js";import{t as i}from"./agent-server-conversation-service.api-BaVQ6NpE.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{
|
|
1
|
+
import{g as e,h as t,p as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{n as r}from"./useQuery-DAAacS7O.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:t(r,i.data),hasPreviousPage:e(r,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function a(e,t){return r(e,i,t)}export{a as t};
|