@openhands/agent-canvas 1.14.0 → 1.15.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-BKvmTf82.js +1 -0
- package/build/assets/active-backend-context-DKFSMbn3.js +2 -0
- package/build/assets/agent-context-settings-D3PjSTU1.js +1 -0
- package/build/assets/agent-profiles-settings-D4cY5U2T.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DozDKIW_.js +86 -0
- package/build/assets/agent-settings-351vXWc9.js +2 -0
- package/build/assets/agent-settings-Ce7BDZ6I.js +1 -0
- package/build/assets/alert-banner-Kyy1YWZU.js +1 -0
- package/build/assets/api-error-message-BJyfWp6p.js +1 -0
- package/build/assets/api-key-entry-screen-INIxqAMs.js +1 -0
- package/build/assets/app-settings-CbHqzQus.js +1 -0
- package/build/assets/automation-detail-DXDhUwPq.js +3 -0
- package/build/assets/automation-export-BRopEHMu.js +2 -0
- package/build/assets/automation-git-sync-CzyS4cn1.js +1 -0
- package/build/assets/automation-setup-route-FRr05f_g.js +1 -0
- package/build/assets/automation-templates-C_0FZgLG.js +1 -0
- package/build/assets/automations-list-CERuQWE6.js +1 -0
- package/build/assets/back-nav-button-Dm9tIjVf.js +1 -0
- package/build/assets/backend-form-modal-DK78-jn1.js +1 -0
- package/build/assets/backend-synced-settings-badge-3fOwg6Bd.js +1 -0
- package/build/assets/badge-D4SqUCsR.js +1 -0
- package/build/assets/base-modal-C7_BDl_U.js +1 -0
- package/build/assets/bot-C-0Wu7vQ.js +1 -0
- package/build/assets/brand-button-Dxv6PDeN.js +1 -0
- package/build/assets/browser-11etCQ04.js +7 -0
- package/build/assets/browser-tab-BAl4ckJE.js +1 -0
- package/build/assets/chat-send-button-DWwR2cgI.js +1 -0
- package/build/assets/check-Cf2YoT90.js +1 -0
- package/build/assets/chevron-down-C3OQ-ehx.js +1 -0
- package/build/assets/chevron-right-CN1uUiJ1.js +1 -0
- package/build/assets/circle-check-g5yeGMd-.js +1 -0
- package/build/assets/circle-plus-check-toggle-CBh_qomE.js +1 -0
- package/build/assets/cloud-funnel-analytics-287iIERo.js +1 -0
- package/build/assets/cog-C4rrw-ZK.js +1 -0
- package/build/assets/command-menu-BZQ8S3Ke.js +1 -0
- package/build/assets/commits-tab-DZtJgaDM.js +1 -0
- package/build/assets/condenser-settings-BcNmYR4s.js +1 -0
- package/build/assets/confirmation-modal-Bk4JRcCM.js +1 -0
- package/build/assets/context-menu-list-item-lVYETtY5.js +1 -0
- package/build/assets/conversation-CchMzpGl.js +1 -0
- package/build/assets/conversation-Dpzftz57.js +93 -0
- package/build/assets/conversation-panel-CchMzpGl.js +1 -0
- package/build/assets/conversation-state-store-a9d2fxRc.js +1 -0
- package/build/assets/conversation-store-Ca3ghXap.js +6 -0
- package/build/assets/conversation-tab-empty-state-HJtkmHZj.js +1 -0
- package/build/assets/copy-to-clipboard-button-Cjkswvnj.js +1 -0
- package/build/assets/device-verify-EZhHhBT7.js +1 -0
- package/build/assets/dropdown-classes-DJe-E6MC.js +1 -0
- package/build/assets/edit-automation-modal-D-urtv8n.js +1 -0
- package/build/assets/empty-state-CvaVahVr.js +1 -0
- package/build/assets/entry.client-C7Bi2tkU.js +2 -0
- package/build/assets/enum-filter-dropdown-DliX_Lo0.js +1 -0
- package/build/assets/environment-switch-overlay-CEKrFiMw.js +1 -0
- package/build/assets/error-state-BALXiBNy.js +1 -0
- package/build/assets/extension-module-card-classes-DpeaYhYo.js +1 -0
- package/build/assets/extensions-hub-CFduxBnk.js +1 -0
- package/build/assets/extensions-navigation-BeC224yX.js +1 -0
- package/build/assets/external-link-DFpYunfj.js +1 -0
- package/build/assets/files-tab-CL3J9b3p.js +1 -0
- package/build/assets/form-control-classes-CGw40z5h.js +1 -0
- package/build/assets/get-git-path-DlAJa_i6.js +1 -0
- package/build/assets/git-repo-dropdown-DGMEhz7d.js +1 -0
- package/build/assets/git-repo-dropdown-ai8qaNkD.js +1 -0
- package/build/assets/highlighted-source-view-C3sxykQi.js +1 -0
- package/build/assets/home-BCGlNJCA.js +1 -0
- package/build/assets/home-DB1pRqTC.js +1 -0
- package/build/assets/home-automation-run-tooltip-CooFQRIG.js +1 -0
- package/build/assets/home-store-Dl1dPE58.js +1 -0
- package/build/assets/index-home-DB1pRqTC.js +1 -0
- package/build/assets/info-uYSVzX86.js +1 -0
- package/build/assets/install-server-modal-BbJdhzet.js +1 -0
- package/build/assets/kebab-menu-item-content-BYokkRHi.js +1 -0
- package/build/assets/key-Cn5za3rg.js +1 -0
- package/build/assets/launch-C1ieiOGe.js +1 -0
- package/build/assets/list-filter-OFkpRrmi.js +1 -0
- package/build/assets/list-todo-Cuu-STFc.js +1 -0
- package/build/assets/llm-not-configured-banner-BqqYnJ1t.js +27 -0
- package/build/assets/llm-settings-CnDbbmVW.js +1 -0
- package/build/assets/llm-settings-S8Yjg__1.js +1 -0
- package/build/assets/llm-subscription-service-BpPfzW4x.js +1 -0
- package/build/assets/loader-circle-nvrwthvj.js +1 -0
- package/build/assets/loading-spinner-0L3ZTToZ.js +1 -0
- package/build/assets/manage-backends-modal-BCUPswyl.js +1 -0
- package/build/assets/manifest-58597dde.js +1 -0
- package/build/assets/manifest-subpage-layout-BGhiUQbA.js +1 -0
- package/build/assets/map-provider-B9LTm23I.js +1 -0
- package/build/assets/markdown-renderer-Cb2sBWtV.js +8 -0
- package/build/assets/mcp-CKbR4Vft.js +1 -0
- package/build/assets/mcp-marketplace-utils-C13fFccR.js +1 -0
- package/build/assets/mcp-page-Bm4K2NQq.js +9 -0
- package/build/assets/messages-BTN5thLe.js +40 -0
- package/build/assets/modal-body-CMOc2tLl.js +1 -0
- package/build/assets/modal-classes-BAb4Y_BG.js +1 -0
- package/build/assets/modal-close-button-CkJ0Ktjj.js +1 -0
- package/build/assets/mouse-pointer-click-CsgRs_-r.js +1 -0
- package/build/assets/onboarding-Cx_kaiD1.js +1 -0
- package/build/assets/onboarding-modal-vMwn7ihv.js +1 -0
- package/build/assets/organization-service.api-C8XpQ0pM.js +1 -0
- package/build/assets/parse-git-remote-url-DpDM9bK6.js +1 -0
- package/build/assets/pencil-Clh1Wjvh.js +1 -0
- package/build/assets/planner-tab-DQvDU3ap.js +1 -0
- package/build/assets/plug-BuQhHSSG.js +1 -0
- package/build/assets/plugins-management-service-BjYeF0b0.js +1 -0
- package/build/assets/plus-CEKne-Yp.js +1 -0
- package/build/assets/profiles-service.api-QB-T_u-g.js +1 -0
- package/build/assets/providers-FfSZ5TXP.js +1 -0
- package/build/assets/proxy-tcFL2yTQ.js +1 -0
- package/build/assets/puzzle-A9pGxxai.js +1 -0
- package/build/assets/recommended-automations-launcher-Bw8uC4V6.js +1 -0
- package/build/assets/refresh-cw-Bh69DyYO.js +1 -0
- package/build/assets/root-BLeQfBEq.css +1 -0
- package/build/assets/root-ZKKYPR1Z.js +2 -0
- package/build/assets/root-layout-luJoE9IG.js +2 -0
- package/build/assets/schema-field-Csw5fhtN.js +1 -0
- package/build/assets/scroll-fade-state-Dw-i4SGq.js +1 -0
- package/build/assets/sdk-section-page-HTffvm7Q.js +1 -0
- package/build/assets/secret-form-HTUbYw5o.js +1 -0
- package/build/assets/secrets-service-BTor9uAU.js +1 -0
- package/build/assets/secrets-settings-BizaTEr1.js +1 -0
- package/build/assets/server-process-C9RKzd1x.js +1 -0
- package/build/assets/settings-BlmrkwRi.js +1 -0
- package/build/assets/settings-dropdown-input-tM0A0ipy.js +1 -0
- package/build/assets/settings-index-CKq0b0Vg.js +1 -0
- package/build/assets/settings-input-C03KUoSC.js +1 -0
- package/build/assets/settings-list-classes-BJ0g8rWj.js +1 -0
- package/build/assets/settings-modal-AzEF1QPP.js +1 -0
- package/build/assets/settings-service.api-B2agVfjL.js +1 -0
- package/build/assets/settings-switch-CQE0EGC-.js +1 -0
- package/build/assets/settings-utils-ClYOkbbI.js +1 -0
- package/build/assets/shared-conversation-B55pCyBG.js +1 -0
- package/build/assets/shield-check-CFDViW82.js +1 -0
- package/build/assets/sidebar-layout-D3hE08wK.js +1 -0
- package/build/assets/sidebar-mobile-menu-toggle-BOtyJHwE.js +1 -0
- package/build/assets/sidebar-nav-link-CPzhyHQg.js +1 -0
- package/build/assets/sidebar-onboarding-checklist-storage-3qYflszY.js +1 -0
- package/build/assets/sidebar-store-DtpU7zaI.js +1 -0
- package/build/assets/skill-card-pill-row-CFxjoqxn.js +1 -0
- package/build/assets/skill-filter-CWZ5kjcg.js +2 -0
- package/build/assets/skill-icon-badge-CPQJ6A-I.js +1 -0
- package/build/assets/skill-scope-CV1dkAbW.js +1 -0
- package/build/assets/skills-plugins-DGHULTq6.js +1 -0
- package/build/assets/skills-settings-CM1lFv3e.js +1 -0
- package/build/assets/styled-tooltip-Dl06rkpY.js +1 -0
- package/build/assets/task-list-tab-04GNQuii.js +1 -0
- package/build/assets/terminal-Cj0iHIW7.js +3 -0
- package/build/assets/toggle-switch-Fd_QGz0r.js +1 -0
- package/build/assets/trash-2-Dl8_RGz0.js +1 -0
- package/build/assets/trash-_RMt7Ayc.js +1 -0
- package/build/assets/triangle-alert-SM-q4NU_.js +1 -0
- package/build/assets/typography-SgFy466J.js +1 -0
- package/build/assets/usage-tab-BcfWV6db.js +1 -0
- package/build/assets/use-acp-credential-form-BsSW5NHG.js +1 -0
- package/build/assets/use-activate-agent-profile-B2NS8nA5.js +1 -0
- package/build/assets/use-agent-profiles-DWBPC0Si.js +1 -0
- package/build/assets/use-automation-health-BxXdzZMP.js +1 -0
- package/build/assets/use-automations-zYb0dUny.js +1 -0
- package/build/assets/use-can-manage-org-profiles-BWMahtUh.js +1 -0
- package/build/assets/use-cloud-current-user-id-CPHMDG-C.js +1 -0
- package/build/assets/use-config-Bft35DOK.js +1 -0
- package/build/assets/use-create-conversation-DwN5vv2f.js +1 -0
- package/build/assets/use-create-secret-BSxJMxHp.js +1 -0
- package/build/assets/use-get-secrets-BT4ihRwj.js +1 -0
- package/build/assets/use-has-permission-B3C8rQmR.js +1 -0
- package/build/assets/use-is-authed-CFGkY3-Z.js +1 -0
- package/build/assets/use-launch-skill-in-chat-BYjYihBP.js +1 -0
- package/build/assets/use-llm-configured-BI6obxsc.js +1 -0
- package/build/assets/use-llm-profiles-djGAhTWL.js +1 -0
- package/build/assets/use-manifest-capabilities-3z0-1G59.js +1 -0
- package/build/assets/use-onboarding-completion-BXpyUSsJ.js +1 -0
- package/build/assets/use-plugins-marketplace-DI4_pK56.js +1 -0
- package/build/assets/use-save-agent-profile-DdBSTdpN.js +1 -0
- package/build/assets/use-save-settings-CUZW6yXP.js +1 -0
- package/build/assets/use-settings-C5VhGpqd.js +1 -0
- package/build/assets/use-settings-nav-items-DHaUu1Dg.js +16 -0
- package/build/assets/use-tracking-D5t9otIF.js +3 -0
- package/build/assets/use-user-conversation-DT0_QCnL.js +1 -0
- package/build/assets/useInfiniteQuery-CgeUQPfs.js +1 -0
- package/build/assets/useMutation-DFnzkf6f.js +1 -0
- package/build/assets/useQueries-BhbrGEf1.js +1 -0
- package/build/assets/useQuery-BXWbZBZl.js +1 -0
- package/build/assets/utils-DaCIEEQP.js +1 -0
- package/build/assets/vendor~browser-hbU4u2Ag.js +47 -0
- package/build/assets/vendor~commits-tab-BaO2Ce3e.js +11 -0
- package/build/assets/vendor~conversation-panel~conversation-CTvDDiXg.js +1 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js +186 -0
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-BTyukeM-.js +13 -0
- package/build/assets/vendor~root-layout-BlUaZ18v.js +1 -0
- package/build/assets/vendor~root-layout~conversation-panel~conversation-BYAWJwQX.js +1 -0
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-CHaLEBVR.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-B2OLKL7N.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js +1 -0
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js +48 -0
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js +1 -0
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js +4949 -0
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js +8420 -0
- package/build/assets/verification-settings-Bj6bo097.js +1 -0
- package/build/assets/wrench-hi7Q13dF.js +1 -0
- package/build/assets/x-DkgltWa0.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +124 -43
- package/build/locales/ca/openhands.json +124 -43
- package/build/locales/de/openhands.json +124 -43
- package/build/locales/en/openhands.json +124 -43
- package/build/locales/es/openhands.json +124 -43
- package/build/locales/fr/openhands.json +124 -43
- package/build/locales/it/openhands.json +124 -43
- package/build/locales/ja/openhands.json +124 -43
- package/build/locales/ko-KR/openhands.json +124 -43
- package/build/locales/no/openhands.json +124 -43
- package/build/locales/pt/openhands.json +124 -43
- package/build/locales/tr/openhands.json +124 -43
- package/build/locales/uk/openhands.json +124 -43
- package/build/locales/zh-CN/openhands.json +124 -43
- package/build/locales/zh-TW/openhands.json +124 -43
- package/config/defaults.json +2 -2
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +10 -1
- package/dist/api/agent-server-adapter.js +115 -110
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +13 -2
- package/dist/api/automation-service/automation-service.api.js +99 -84
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/url-selection.cjs +1 -1
- package/dist/api/backend-registry/url-selection.cjs.map +1 -1
- package/dist/api/backend-registry/url-selection.d.ts +2 -1
- package/dist/api/backend-registry/url-selection.js +2 -2
- package/dist/api/backend-registry/url-selection.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +29 -24
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/git-provider-items-service.cjs +2 -0
- package/dist/api/git-provider-items-service.cjs.map +1 -0
- package/dist/api/git-provider-items-service.d.ts +25 -0
- package/dist/api/git-provider-items-service.js +127 -0
- package/dist/api/git-provider-items-service.js.map +1 -0
- package/dist/api/mcp-health/probe-mcp-server-health.cjs +1 -1
- package/dist/api/mcp-health/probe-mcp-server-health.js +31 -31
- package/dist/api/open-hands.types.d.ts +0 -19
- package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.d.ts +16 -2
- package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs +2 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.d.ts +34 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.js +50 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -0
- package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.js +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/create-skill-ready-event.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +1 -1
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
- package/dist/components/conversation-events/chat/messages.js.map +1 -1
- package/dist/components/features/automations/add-automation-menu.d.ts +7 -0
- package/dist/components/features/automations/add-automation-modal.cjs +2 -0
- package/dist/components/features/automations/add-automation-modal.cjs.map +1 -0
- package/dist/components/features/automations/add-automation-modal.js +42 -0
- package/dist/components/features/automations/add-automation-modal.js.map +1 -0
- package/dist/components/features/automations/automation-action-button-classes.cjs +2 -0
- package/dist/components/features/automations/automation-action-button-classes.cjs.map +1 -0
- package/dist/components/features/automations/automation-action-button-classes.d.ts +0 -2
- package/dist/components/features/automations/automation-action-button-classes.js +8 -0
- package/dist/components/features/automations/automation-action-button-classes.js.map +1 -0
- package/dist/components/features/automations/automation-card-skeleton.cjs +2 -0
- package/dist/components/features/automations/automation-card-skeleton.cjs.map +1 -0
- package/dist/components/features/automations/automation-card-skeleton.js +33 -0
- package/dist/components/features/automations/automation-card-skeleton.js.map +1 -0
- package/dist/components/features/automations/automation-card.cjs +2 -0
- package/dist/components/features/automations/automation-card.cjs.map +1 -0
- package/dist/components/features/automations/automation-card.d.ts +1 -1
- package/dist/components/features/automations/automation-card.js +160 -0
- package/dist/components/features/automations/automation-card.js.map +1 -0
- package/dist/components/features/automations/automation-group.cjs +2 -0
- package/dist/components/features/automations/automation-group.cjs.map +1 -0
- package/dist/components/features/automations/automation-group.js +54 -0
- package/dist/components/features/automations/automation-group.js.map +1 -0
- package/dist/components/features/automations/automation-list-row.cjs +2 -0
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -0
- package/dist/components/features/automations/automation-list-row.js +152 -0
- package/dist/components/features/automations/automation-list-row.js.map +1 -0
- package/dist/components/features/automations/automation-run-insights.cjs +2 -0
- package/dist/components/features/automations/automation-run-insights.cjs.map +1 -0
- package/dist/components/features/automations/automation-run-insights.js +46 -0
- package/dist/components/features/automations/automation-run-insights.js.map +1 -0
- package/dist/components/features/automations/automation-view-mode.cjs +2 -0
- package/dist/components/features/automations/automation-view-mode.cjs.map +1 -0
- package/dist/components/features/automations/automation-view-mode.d.ts +5 -1
- package/dist/components/features/automations/automation-view-mode.js +6 -0
- package/dist/components/features/automations/automation-view-mode.js.map +1 -0
- package/dist/components/features/automations/backend-not-configured.cjs +2 -0
- package/dist/components/features/automations/backend-not-configured.cjs.map +1 -0
- package/dist/components/features/automations/backend-not-configured.js +34 -0
- package/dist/components/features/automations/backend-not-configured.js.map +1 -0
- package/dist/components/features/automations/build-automation-menu-items.cjs +2 -0
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -0
- package/dist/components/features/automations/build-automation-menu-items.js +53 -0
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -0
- package/dist/components/features/automations/build-automation-pills.cjs +2 -0
- package/dist/components/features/automations/build-automation-pills.cjs.map +1 -0
- package/dist/components/features/automations/build-automation-pills.js +71 -0
- package/dist/components/features/automations/build-automation-pills.js.map +1 -0
- package/dist/components/features/automations/create-instructions.cjs +2 -0
- package/dist/components/features/automations/create-instructions.cjs.map +1 -0
- package/dist/components/features/automations/create-instructions.js +102 -0
- package/dist/components/features/automations/create-instructions.js.map +1 -0
- package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +4 -3
- package/dist/components/features/automations/detail/run-status-badge.cjs +2 -0
- package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -0
- package/dist/components/features/automations/detail/run-status-badge.js +102 -0
- package/dist/components/features/automations/detail/run-status-badge.js.map +1 -0
- package/dist/components/features/automations/empty-state.cjs +2 -0
- package/dist/components/features/automations/empty-state.cjs.map +1 -0
- package/dist/components/features/automations/empty-state.js +35 -0
- package/dist/components/features/automations/empty-state.js.map +1 -0
- package/dist/components/features/automations/error-state.cjs +2 -0
- package/dist/components/features/automations/error-state.cjs.map +1 -0
- package/dist/components/features/automations/error-state.js +28 -0
- package/dist/components/features/automations/error-state.js.map +1 -0
- package/dist/components/features/automations/import-automation-modal.d.ts +2 -1
- package/dist/components/features/automations/kebab-menu-item-content.cjs +2 -0
- package/dist/components/features/automations/kebab-menu-item-content.cjs.map +1 -0
- package/dist/components/features/automations/kebab-menu-item-content.js +21 -0
- package/dist/components/features/automations/kebab-menu-item-content.js.map +1 -0
- package/dist/components/features/automations/kebab-menu.cjs +2 -0
- package/dist/components/features/automations/kebab-menu.cjs.map +1 -0
- package/dist/components/features/automations/kebab-menu.d.ts +2 -1
- package/dist/components/features/automations/kebab-menu.js +76 -0
- package/dist/components/features/automations/kebab-menu.js.map +1 -0
- package/dist/components/features/automations/recommended-automations-launcher.cjs +2 -0
- package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -0
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +7 -1
- package/dist/components/features/automations/recommended-automations-launcher.js +134 -0
- package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -0
- package/dist/components/features/automations/recommended-automations-rail.cjs +2 -0
- package/dist/components/features/automations/recommended-automations-rail.cjs.map +1 -0
- package/dist/components/features/automations/recommended-automations-rail.d.ts +9 -0
- package/dist/components/features/automations/recommended-automations-rail.js +127 -0
- package/dist/components/features/automations/recommended-automations-rail.js.map +1 -0
- package/dist/components/features/automations/recommended-automations-section.cjs +2 -0
- package/dist/components/features/automations/recommended-automations-section.cjs.map +1 -0
- package/dist/components/features/automations/recommended-automations-section.d.ts +2 -2
- package/dist/components/features/automations/recommended-automations-section.js +198 -0
- package/dist/components/features/automations/recommended-automations-section.js.map +1 -0
- package/dist/components/features/automations/responder-deployment-modal.cjs +2 -0
- package/dist/components/features/automations/responder-deployment-modal.cjs.map +1 -0
- package/dist/components/features/automations/responder-deployment-modal.js +75 -0
- package/dist/components/features/automations/responder-deployment-modal.js.map +1 -0
- package/dist/components/features/automations/status-badge.cjs +2 -0
- package/dist/components/features/automations/status-badge.cjs.map +1 -0
- package/dist/components/features/automations/status-badge.js +12 -0
- package/dist/components/features/automations/status-badge.js.map +1 -0
- package/dist/components/features/automations/to-latest-run-state.cjs +2 -0
- package/dist/components/features/automations/to-latest-run-state.cjs.map +1 -0
- package/dist/components/features/automations/to-latest-run-state.d.ts +6 -0
- package/dist/components/features/automations/to-latest-run-state.js +21 -0
- package/dist/components/features/automations/to-latest-run-state.js.map +1 -0
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.js +10 -10
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +5 -5
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +179 -177
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/command-menu/command-menu-items.d.ts +10 -4
- package/dist/components/features/conversation/conversation-git-actions-menu.cjs +2 -0
- package/dist/components/features/conversation/conversation-git-actions-menu.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-git-actions-menu.d.ts +15 -0
- package/dist/components/features/conversation/conversation-git-actions-menu.js +123 -0
- package/dist/components/features/conversation/conversation-git-actions-menu.js.map +1 -0
- package/dist/components/features/conversation/conversation-git-actions-toggle.cjs +2 -0
- package/dist/components/features/conversation/conversation-git-actions-toggle.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-git-actions-toggle.d.ts +10 -0
- package/dist/components/features/conversation/conversation-git-actions-toggle.js +60 -0
- package/dist/components/features/conversation/conversation-git-actions-toggle.js.map +1 -0
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.cjs +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.js +46 -10
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.js.map +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.cjs +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.js +49 -43
- package/dist/components/features/conversation/conversation-main/conversation-main.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +49 -40
- package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
- package/dist/components/features/conversation/conversation-name.cjs +1 -1
- package/dist/components/features/conversation/conversation-name.js +4 -4
- package/dist/components/features/conversation/conversation-overview-automations-panel.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-automations-panel.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-automations-panel.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-automations-panel.js +48 -0
- package/dist/components/features/conversation/conversation-overview-automations-panel.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-context-menu.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-context-menu.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-context-menu.d.ts +10 -0
- package/dist/components/features/conversation/conversation-overview-context-menu.js +221 -0
- package/dist/components/features/conversation/conversation-overview-context-menu.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-diffs-row.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-diffs-row.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-diffs-row.d.ts +2 -0
- package/dist/components/features/conversation/conversation-overview-diffs-row.js +88 -0
- package/dist/components/features/conversation/conversation-overview-diffs-row.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer-content.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-drawer-content.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer-content.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-drawer-content.js +138 -0
- package/dist/components/features/conversation/conversation-overview-drawer-content.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer-context.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-drawer-context.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer-context.d.ts +17 -0
- package/dist/components/features/conversation/conversation-overview-drawer-context.js +43 -0
- package/dist/components/features/conversation/conversation-overview-drawer-context.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-drawer.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer.constants.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-drawer.constants.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer.constants.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-drawer.constants.js +6 -0
- package/dist/components/features/conversation/conversation-overview-drawer.constants.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer.d.ts +7 -0
- package/dist/components/features/conversation/conversation-overview-drawer.js +45 -0
- package/dist/components/features/conversation/conversation-overview-drawer.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer.types.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-drawer.types.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-drawer.types.d.ts +12 -0
- package/dist/components/features/conversation/conversation-overview-drawer.types.js +13 -0
- package/dist/components/features/conversation/conversation-overview-drawer.types.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-git-items-panel.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-git-items-panel.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-git-items-panel.d.ts +7 -0
- package/dist/components/features/conversation/conversation-overview-git-items-panel.js +81 -0
- package/dist/components/features/conversation/conversation-overview-git-items-panel.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-git-section.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-git-section.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-git-section.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-git-section.js +143 -0
- package/dist/components/features/conversation/conversation-overview-git-section.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-mcp-panel.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-mcp-panel.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-mcp-panel.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-mcp-panel.js +108 -0
- package/dist/components/features/conversation/conversation-overview-mcp-panel.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-panel.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-panel.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-panel.constants.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-panel.constants.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-panel.constants.d.ts +24 -0
- package/dist/components/features/conversation/conversation-overview-panel.constants.js +12 -0
- package/dist/components/features/conversation/conversation-overview-panel.constants.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-panel.d.ts +2 -0
- package/dist/components/features/conversation/conversation-overview-panel.js +102 -0
- package/dist/components/features/conversation/conversation-overview-panel.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-project-scope-toggle.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-project-scope-toggle.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-project-scope-toggle.d.ts +8 -0
- package/dist/components/features/conversation/conversation-overview-project-scope-toggle.js +29 -0
- package/dist/components/features/conversation/conversation-overview-project-scope-toggle.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-secrets-panel.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-secrets-panel.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-secrets-panel.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-secrets-panel.js +89 -0
- package/dist/components/features/conversation/conversation-overview-secrets-panel.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-sections.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-sections.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-sections.d.ts +43 -0
- package/dist/components/features/conversation/conversation-overview-sections.js +27 -0
- package/dist/components/features/conversation/conversation-overview-sections.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-skills-panel.d.ts +6 -0
- package/dist/components/features/conversation/conversation-overview-skills-panel.js +138 -0
- package/dist/components/features/conversation/conversation-overview-skills-panel.js.map +1 -0
- package/dist/components/features/conversation/conversation-overview-toggle.cjs +2 -0
- package/dist/components/features/conversation/conversation-overview-toggle.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-overview-toggle.d.ts +11 -0
- package/dist/components/features/conversation/conversation-overview-toggle.js +99 -0
- package/dist/components/features/conversation/conversation-overview-toggle.js.map +1 -0
- package/dist/components/features/conversation/conversation-secondary-drawer.classes.cjs +2 -0
- package/dist/components/features/conversation/conversation-secondary-drawer.classes.cjs.map +1 -0
- package/dist/components/features/conversation/conversation-secondary-drawer.classes.d.ts +4 -0
- package/dist/components/features/conversation/conversation-secondary-drawer.classes.js +7 -0
- package/dist/components/features/conversation/conversation-secondary-drawer.classes.js.map +1 -0
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +10 -9
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +68 -62
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +98 -88
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
- package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
- package/dist/components/features/conversation/right-panel-toggle.d.ts +3 -2
- package/dist/components/features/conversation/right-panel-toggle.js +34 -33
- package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +14 -7
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +252 -225
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js +4 -4
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
- package/dist/components/features/diff-viewer/accordion-panel.cjs +2 -0
- package/dist/components/features/diff-viewer/accordion-panel.cjs.map +1 -0
- package/dist/components/features/diff-viewer/accordion-panel.d.ts +13 -0
- package/dist/components/features/diff-viewer/accordion-panel.js +41 -0
- package/dist/components/features/diff-viewer/accordion-panel.js.map +1 -0
- package/dist/components/features/diff-viewer/commit-list.cjs +1 -1
- package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -1
- package/dist/components/features/diff-viewer/commit-list.d.ts +5 -1
- package/dist/components/features/diff-viewer/commit-list.js +30 -16
- package/dist/components/features/diff-viewer/commit-list.js.map +1 -1
- package/dist/components/features/diff-viewer/commit-row.cjs +1 -1
- package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -1
- package/dist/components/features/diff-viewer/commit-row.d.ts +1 -2
- package/dist/components/features/diff-viewer/commit-row.js +38 -34
- package/dist/components/features/diff-viewer/commit-row.js.map +1 -1
- package/dist/components/features/diff-viewer/diff-change-list.cjs +2 -0
- package/dist/components/features/diff-viewer/diff-change-list.cjs.map +1 -0
- package/dist/components/features/diff-viewer/diff-change-list.d.ts +18 -0
- package/dist/components/features/diff-viewer/diff-change-list.js +22 -0
- package/dist/components/features/diff-viewer/diff-change-list.js.map +1 -0
- package/dist/components/features/diff-viewer/editor-container.cjs +1 -1
- package/dist/components/features/diff-viewer/editor-container.cjs.map +1 -1
- package/dist/components/features/diff-viewer/editor-container.d.ts +2 -1
- package/dist/components/features/diff-viewer/editor-container.js +8 -7
- package/dist/components/features/diff-viewer/editor-container.js.map +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +10 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.js +138 -112
- package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
- package/dist/components/features/diff-viewer/uncommitted-changes-row.cjs +2 -0
- package/dist/components/features/diff-viewer/uncommitted-changes-row.cjs.map +1 -0
- package/dist/components/features/diff-viewer/uncommitted-changes-row.d.ts +12 -0
- package/dist/components/features/diff-viewer/uncommitted-changes-row.js +51 -0
- package/dist/components/features/diff-viewer/uncommitted-changes-row.js.map +1 -0
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +0 -1
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/files-tab/file-quick-row.cjs +1 -1
- package/dist/components/features/files-tab/file-quick-row.cjs.map +1 -1
- package/dist/components/features/files-tab/file-quick-row.d.ts +9 -7
- package/dist/components/features/files-tab/file-quick-row.js +63 -34
- package/dist/components/features/files-tab/file-quick-row.js.map +1 -1
- package/dist/components/features/files-tab/files-tab-tree.constants.cjs +2 -0
- package/dist/components/features/files-tab/files-tab-tree.constants.cjs.map +1 -0
- package/dist/components/features/files-tab/files-tab-tree.constants.d.ts +7 -0
- package/dist/components/features/files-tab/files-tab-tree.constants.js +6 -0
- package/dist/components/features/files-tab/files-tab-tree.constants.js.map +1 -0
- package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
- package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +5 -3
- package/dist/components/features/files-tab/segmented-toggle.js +10 -13
- package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
- package/dist/components/features/files-tab/tree-node.cjs +1 -1
- package/dist/components/features/files-tab/tree-node.cjs.map +1 -1
- package/dist/components/features/files-tab/tree-node.js +34 -32
- package/dist/components/features/files-tab/tree-node.js.map +1 -1
- package/dist/components/features/files-tab/workspace-path.cjs +2 -0
- package/dist/components/features/files-tab/workspace-path.cjs.map +1 -0
- package/dist/components/features/files-tab/workspace-path.d.ts +6 -0
- package/dist/components/features/files-tab/workspace-path.js +41 -0
- package/dist/components/features/files-tab/workspace-path.js.map +1 -0
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +2 -0
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -0
- package/dist/components/features/home/featured-automations/automation-health-indicator.js +22 -0
- package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +2 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +45 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +2 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +108 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -0
- package/dist/components/features/home/featured-automations/automation-run-health.cjs +2 -0
- package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -0
- package/dist/components/features/home/featured-automations/automation-run-health.js +75 -0
- package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +2 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +74 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -0
- package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +3 -3
- package/dist/components/features/home/git-repo-dropdown/use-url-search.cjs +1 -1
- package/dist/components/features/home/git-repo-dropdown/use-url-search.cjs.map +1 -1
- package/dist/components/features/home/git-repo-dropdown/use-url-search.js +1 -1
- package/dist/components/features/home/git-repo-dropdown/use-url-search.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js +6 -6
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.js +6 -6
- package/dist/components/features/manifest/manifest-form-field.d.ts +4 -3
- package/dist/components/features/manifest/manifest-icons.cjs +2 -0
- package/dist/components/features/manifest/manifest-icons.cjs.map +1 -0
- package/dist/components/features/manifest/manifest-icons.d.ts +1 -0
- package/dist/components/features/manifest/manifest-icons.js +21 -0
- package/dist/components/features/manifest/manifest-icons.js.map +1 -0
- package/dist/components/features/manifest/manifest-repository-list.d.ts +25 -0
- package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.d.ts +2 -6
- package/dist/components/features/markdown/markdown-table-scroll.js +15 -21
- package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
- package/dist/components/features/mcp-logo-badge.cjs +1 -1
- package/dist/components/features/mcp-logo-badge.cjs.map +1 -1
- package/dist/components/features/mcp-logo-badge.d.ts +1 -1
- package/dist/components/features/mcp-logo-badge.js +1 -0
- package/dist/components/features/mcp-logo-badge.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +16 -16
- package/dist/components/features/mcp-page/index.cjs +1 -1
- package/dist/components/features/mcp-page/index.js +2 -2
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.js +25 -25
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.js +5 -5
- package/dist/components/features/mcp-page/marketplace-card.cjs +1 -1
- package/dist/components/features/mcp-page/marketplace-card.js +4 -4
- package/dist/components/features/mcp-page/marketplace-section.cjs +1 -1
- package/dist/components/features/mcp-page/marketplace-section.js +3 -3
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.cjs +2 -0
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.cjs.map +1 -0
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.js +60 -0
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.js.map +1 -0
- package/dist/components/features/mcp-page/mcp-server-health.cjs +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.js +18 -18
- package/dist/components/features/onboarding/use-onboarding-completion.cjs +2 -0
- package/dist/components/features/onboarding/use-onboarding-completion.cjs.map +1 -0
- package/dist/components/features/onboarding/use-onboarding-completion.js +32 -0
- package/dist/components/features/onboarding/use-onboarding-completion.js.map +1 -0
- package/dist/components/features/settings/app-settings/getting-started-checklist-switch.cjs +2 -0
- package/dist/components/features/settings/app-settings/getting-started-checklist-switch.cjs.map +1 -0
- package/dist/components/features/settings/app-settings/getting-started-checklist-switch.d.ts +1 -0
- package/dist/components/features/settings/app-settings/getting-started-checklist-switch.js +22 -0
- package/dist/components/features/settings/app-settings/getting-started-checklist-switch.js.map +1 -0
- package/dist/components/features/settings/brand-button.cjs +1 -1
- package/dist/components/features/settings/brand-button.cjs.map +1 -1
- package/dist/components/features/settings/brand-button.d.ts +2 -0
- package/dist/components/features/settings/brand-button.js +4 -2
- package/dist/components/features/settings/brand-button.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/delete-provider-connection-modal.cjs +1 -0
- package/dist/components/features/settings/llm-profiles/delete-provider-connection-modal.d.ts +7 -0
- package/dist/components/features/settings/llm-profiles/delete-provider-connection-modal.js +7 -0
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.js +3 -0
- 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 +1 -0
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +20 -1
- package/dist/components/features/settings/llm-profiles/provider-connection-modal.cjs +1 -0
- package/dist/components/features/settings/llm-profiles/provider-connection-modal.d.ts +19 -0
- package/dist/components/features/settings/llm-profiles/provider-connection-modal.js +10 -0
- package/dist/components/features/settings/llm-profiles/provider-connection-row.cjs +1 -0
- package/dist/components/features/settings/llm-profiles/provider-connection-row.d.ts +10 -0
- package/dist/components/features/settings/llm-profiles/provider-connection-row.js +6 -0
- package/dist/components/features/settings/llm-profiles/provider-connections-manager.cjs +1 -0
- package/dist/components/features/settings/llm-profiles/provider-connections-manager.d.ts +15 -0
- package/dist/components/features/settings/llm-profiles/provider-connections-manager.js +8 -0
- package/dist/components/features/settings/sdk-settings/schema-field.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/schema-field.js +6 -6
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +7 -7
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.js +7 -7
- package/dist/components/features/settings/settings-input.cjs +1 -1
- package/dist/components/features/settings/settings-input.cjs.map +1 -1
- package/dist/components/features/settings/settings-input.d.ts +6 -0
- package/dist/components/features/settings/settings-input.js +14 -13
- package/dist/components/features/settings/settings-input.js.map +1 -1
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.cjs +2 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.cjs.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.d.ts +7 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.js +102 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-icon.js.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.cjs +2 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.cjs.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.d.ts +8 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.js +66 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-item-preview.js.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.cjs +2 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.cjs.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.d.ts +3 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.js +15 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-llm-complete.js.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.cjs +2 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.cjs.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.d.ts +10 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.js +39 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist-storage.js.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.cjs +2 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.cjs.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.cjs +2 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.cjs.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.d.ts +26 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.js +78 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.constants.js.map +1 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.d.ts +5 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.js +127 -0
- package/dist/components/features/sidebar/sidebar-onboarding-checklist.js.map +1 -0
- 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.js +115 -111
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.cjs +2 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.cjs.map +1 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.d.ts +1 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.js +10 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist-dismissed.js.map +1 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +2 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs.map +1 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.d.ts +15 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +75 -0
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js.map +1 -0
- package/dist/components/features/skills/add-skill-modal.cjs +2 -0
- package/dist/components/features/skills/add-skill-modal.cjs.map +1 -0
- package/dist/components/features/skills/add-skill-modal.js +164 -0
- package/dist/components/features/skills/add-skill-modal.js.map +1 -0
- package/dist/components/features/skills/build-skill-pills.cjs +2 -0
- package/dist/components/features/skills/build-skill-pills.cjs.map +1 -0
- package/dist/components/features/skills/build-skill-pills.js +88 -0
- package/dist/components/features/skills/build-skill-pills.js.map +1 -0
- package/dist/components/features/skills/get-skill-card-description.cjs +2 -0
- package/dist/components/features/skills/get-skill-card-description.cjs.map +1 -0
- package/dist/components/features/skills/get-skill-card-description.js +34 -0
- package/dist/components/features/skills/get-skill-card-description.js.map +1 -0
- package/dist/components/features/skills/get-skill-chat-launch-message.cjs +2 -0
- package/dist/components/features/skills/get-skill-chat-launch-message.cjs.map +1 -0
- package/dist/components/features/skills/get-skill-chat-launch-message.js +9 -0
- package/dist/components/features/skills/get-skill-chat-launch-message.js.map +1 -0
- package/dist/components/features/skills/is-copyable-skill-source.cjs +2 -0
- package/dist/components/features/skills/is-copyable-skill-source.cjs.map +1 -0
- package/dist/components/features/skills/is-copyable-skill-source.js +9 -0
- package/dist/components/features/skills/is-copyable-skill-source.js.map +1 -0
- package/dist/components/features/skills/skill-card-pill-row.cjs +2 -0
- package/dist/components/features/skills/skill-card-pill-row.cjs.map +1 -0
- package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
- package/dist/components/features/skills/skill-card-pill-row.js +137 -0
- package/dist/components/features/skills/skill-card-pill-row.js.map +1 -0
- package/dist/components/features/skills/skill-card.cjs +2 -0
- package/dist/components/features/skills/skill-card.cjs.map +1 -0
- package/dist/components/features/skills/skill-card.js +93 -0
- package/dist/components/features/skills/skill-card.js.map +1 -0
- package/dist/components/features/skills/skill-detail-modal.cjs +3 -0
- package/dist/components/features/skills/skill-detail-modal.cjs.map +1 -0
- package/dist/components/features/skills/skill-detail-modal.js +150 -0
- package/dist/components/features/skills/skill-detail-modal.js.map +1 -0
- package/dist/components/features/skills/skill-facet-rail.cjs +2 -0
- package/dist/components/features/skills/skill-facet-rail.cjs.map +1 -0
- package/dist/components/features/skills/skill-facet-rail.js +42 -0
- package/dist/components/features/skills/skill-facet-rail.js.map +1 -0
- package/dist/components/features/skills/skill-facet-row.cjs +2 -0
- package/dist/components/features/skills/skill-facet-row.cjs.map +1 -0
- package/dist/components/features/skills/skill-facet-row.js +44 -0
- package/dist/components/features/skills/skill-facet-row.js.map +1 -0
- package/dist/components/features/skills/skill-filter.cjs +2 -0
- package/dist/components/features/skills/skill-filter.cjs.map +1 -0
- package/dist/components/features/skills/skill-filter.js +166 -0
- package/dist/components/features/skills/skill-filter.js.map +1 -0
- package/dist/components/features/skills/skill-filters-modal.cjs +2 -0
- package/dist/components/features/skills/skill-filters-modal.cjs.map +1 -0
- package/dist/components/features/skills/skill-filters-modal.js +53 -0
- package/dist/components/features/skills/skill-filters-modal.js.map +1 -0
- package/dist/components/features/skills/skill-icon-badge.cjs +2 -0
- package/dist/components/features/skills/skill-icon-badge.cjs.map +1 -0
- package/dist/components/features/skills/skill-icon-badge.js +17 -0
- package/dist/components/features/skills/skill-icon-badge.js.map +1 -0
- package/dist/components/features/skills/skill-type-badge.cjs +2 -0
- package/dist/components/features/skills/skill-type-badge.cjs.map +1 -0
- package/dist/components/features/skills/skill-type-badge.js +21 -0
- package/dist/components/features/skills/skill-type-badge.js.map +1 -0
- package/dist/components/features/skills/skills-toolbar.cjs +2 -0
- package/dist/components/features/skills/skills-toolbar.cjs.map +1 -0
- package/dist/components/features/skills/skills-toolbar.js +63 -0
- package/dist/components/features/skills/skills-toolbar.js.map +1 -0
- package/dist/components/shared/buttons/circle-plus-check-toggle.cjs +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.cjs.map +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.js +19 -6
- package/dist/components/shared/buttons/circle-plus-check-toggle.js.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +4 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-form.js +4 -4
- package/dist/components/ui/resize-handle.cjs +1 -1
- package/dist/components/ui/resize-handle.cjs.map +1 -1
- package/dist/components/ui/resize-handle.d.ts +2 -1
- package/dist/components/ui/resize-handle.js +6 -5
- package/dist/components/ui/resize-handle.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +2 -2
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/skills-docs.cjs +2 -0
- package/dist/constants/skills-docs.cjs.map +1 -0
- package/dist/constants/skills-docs.js +6 -0
- package/dist/constants/skills-docs.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +174 -149
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/fixtures/home-automations-demo.cjs +2 -0
- package/dist/fixtures/home-automations-demo.cjs.map +1 -0
- package/dist/fixtures/home-automations-demo.d.ts +1 -3
- package/dist/fixtures/home-automations-demo.js +384 -0
- package/dist/fixtures/home-automations-demo.js.map +1 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.d.ts +1 -2
- package/dist/hooks/chat/use-slash-command.js +1 -0
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +27 -30
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-create-provider-connection.cjs +1 -0
- package/dist/hooks/mutation/use-create-provider-connection.d.ts +2 -0
- package/dist/hooks/mutation/use-create-provider-connection.js +1 -0
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.js +3 -3
- package/dist/hooks/mutation/use-delete-provider-connection.cjs +1 -0
- package/dist/hooks/mutation/use-delete-provider-connection.d.ts +1 -0
- package/dist/hooks/mutation/use-delete-provider-connection.js +1 -0
- package/dist/hooks/mutation/use-switch-acp-model.cjs +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.d.ts +5 -3
- package/dist/hooks/mutation/use-switch-acp-model.js +9 -13
- package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +6 -6
- package/dist/hooks/mutation/use-update-provider-connection.cjs +1 -0
- package/dist/hooks/mutation/use-update-provider-connection.d.ts +7 -0
- package/dist/hooks/mutation/use-update-provider-connection.js +1 -0
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +3 -0
- package/dist/hooks/query/query-keys.js +4 -4
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-automation-detail.cjs +1 -0
- package/dist/hooks/query/use-automation-detail.js +2 -0
- package/dist/hooks/query/use-automation-health.cjs +2 -0
- package/dist/hooks/query/use-automation-health.cjs.map +1 -0
- package/dist/hooks/query/use-automation-health.js +22 -0
- package/dist/hooks/query/use-automation-health.js.map +1 -0
- package/dist/hooks/query/use-automations.cjs +2 -0
- package/dist/hooks/query/use-automations.cjs.map +1 -0
- package/dist/hooks/query/use-automations.js +28 -0
- package/dist/hooks/query/use-automations.js.map +1 -0
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.js +1 -1
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +1 -1
- package/dist/hooks/query/use-commit-changes.js +4 -4
- package/dist/hooks/query/use-conversation-history.cjs +1 -1
- package/dist/hooks/query/use-conversation-history.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-history.js +3 -1
- package/dist/hooks/query/use-conversation-history.js.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
- package/dist/hooks/query/use-conversation-metrics.js +3 -3
- package/dist/hooks/query/use-latest-automation-runs.cjs +1 -0
- package/dist/hooks/query/use-latest-automation-runs.d.ts +2 -0
- package/dist/hooks/query/use-latest-automation-runs.js +3 -0
- package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.js +1 -1
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/hooks/query/use-provider-connections.cjs +2 -0
- package/dist/hooks/query/use-provider-connections.cjs.map +1 -0
- package/dist/hooks/query/use-provider-connections.d.ts +8 -0
- package/dist/hooks/query/use-provider-connections.js +19 -0
- package/dist/hooks/query/use-provider-connections.js.map +1 -0
- package/dist/hooks/query/use-repository-git-items.cjs +2 -0
- package/dist/hooks/query/use-repository-git-items.cjs.map +1 -0
- package/dist/hooks/query/use-repository-git-items.d.ts +3 -0
- package/dist/hooks/query/use-repository-git-items.js +33 -0
- package/dist/hooks/query/use-repository-git-items.js.map +1 -0
- package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
- package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
- package/dist/hooks/query/use-unified-git-commits.js +4 -4
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.js +4 -4
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.js +6 -6
- package/dist/hooks/use-bash-command-runner.cjs +1 -1
- package/dist/hooks/use-bash-command-runner.cjs.map +1 -1
- package/dist/hooks/use-bash-command-runner.js +45 -42
- package/dist/hooks/use-bash-command-runner.js.map +1 -1
- package/dist/hooks/use-conversation-overview-column-space.cjs +2 -0
- package/dist/hooks/use-conversation-overview-column-space.cjs.map +1 -0
- package/dist/hooks/use-conversation-overview-column-space.d.ts +2 -0
- package/dist/hooks/use-conversation-overview-column-space.js +25 -0
- package/dist/hooks/use-conversation-overview-column-space.js.map +1 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.cjs +2 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.cjs.map +1 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.d.ts +7 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.js +37 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.js.map +1 -0
- package/dist/hooks/use-conversation-overview-panel-peek.cjs +2 -0
- package/dist/hooks/use-conversation-overview-panel-peek.cjs.map +1 -0
- package/dist/hooks/use-conversation-overview-panel-peek.d.ts +9 -0
- package/dist/hooks/use-conversation-overview-panel-peek.js +32 -0
- package/dist/hooks/use-conversation-overview-panel-peek.js.map +1 -0
- package/dist/hooks/use-conversation-overview-stats.cjs +2 -0
- package/dist/hooks/use-conversation-overview-stats.cjs.map +1 -0
- package/dist/hooks/use-conversation-overview-stats.d.ts +4 -0
- package/dist/hooks/use-conversation-overview-stats.js +15 -0
- package/dist/hooks/use-conversation-overview-stats.js.map +1 -0
- package/dist/hooks/use-conversation-primary-repository.cjs +2 -0
- package/dist/hooks/use-conversation-primary-repository.cjs.map +1 -0
- package/dist/hooks/use-conversation-primary-repository.d.ts +11 -0
- package/dist/hooks/use-conversation-primary-repository.js +17 -0
- package/dist/hooks/use-conversation-primary-repository.js.map +1 -0
- package/dist/hooks/use-drag-scroll.cjs +2 -0
- package/dist/hooks/use-drag-scroll.cjs.map +1 -0
- package/dist/hooks/use-drag-scroll.d.ts +12 -0
- package/dist/hooks/use-drag-scroll.js +41 -0
- package/dist/hooks/use-drag-scroll.js.map +1 -0
- package/dist/hooks/use-has-permission.cjs +2 -0
- package/dist/hooks/use-has-permission.cjs.map +1 -0
- package/dist/hooks/use-has-permission.js +8 -0
- package/dist/hooks/use-has-permission.js.map +1 -0
- package/dist/hooks/use-home-automation-actions.cjs +2 -0
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -0
- package/dist/hooks/use-home-automation-actions.js +15 -0
- package/dist/hooks/use-home-automation-actions.js.map +1 -0
- package/dist/hooks/use-launch-skill-in-chat.cjs +2 -0
- package/dist/hooks/use-launch-skill-in-chat.cjs.map +1 -0
- package/dist/hooks/use-launch-skill-in-chat.js +16 -0
- package/dist/hooks/use-launch-skill-in-chat.js.map +1 -0
- package/dist/hooks/use-mcp-server-health.cjs +1 -1
- package/dist/hooks/use-mcp-server-health.js +3 -3
- package/dist/hooks/use-resizable-drawer-width.cjs +2 -0
- package/dist/hooks/use-resizable-drawer-width.cjs.map +1 -0
- package/dist/hooks/use-resizable-drawer-width.d.ts +22 -0
- package/dist/hooks/use-resizable-drawer-width.js +46 -0
- package/dist/hooks/use-resizable-drawer-width.js.map +1 -0
- package/dist/hooks/use-responder-url-secret.cjs +2 -0
- package/dist/hooks/use-responder-url-secret.cjs.map +1 -0
- package/dist/hooks/use-responder-url-secret.js +51 -0
- package/dist/hooks/use-responder-url-secret.js.map +1 -0
- package/dist/hooks/use-select-conversation-tab.cjs +1 -1
- package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
- package/dist/hooks/use-select-conversation-tab.d.ts +2 -0
- package/dist/hooks/use-select-conversation-tab.js +15 -7
- package/dist/hooks/use-select-conversation-tab.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +17 -0
- package/dist/hooks/use-tracking.js +10 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/hooks/use-websocket.cjs +1 -1
- package/dist/hooks/use-websocket.cjs.map +1 -1
- package/dist/hooks/use-websocket.d.ts +1 -2
- package/dist/hooks/use-websocket.js +58 -51
- package/dist/hooks/use-websocket.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 +124 -43
- 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 +2091 -714
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/check-circle.cjs +2 -0
- package/dist/icons/check-circle.cjs.map +1 -0
- package/dist/icons/check-circle.js +20 -0
- package/dist/icons/check-circle.js.map +1 -0
- package/dist/icons/chevron-down.cjs +2 -0
- package/dist/icons/chevron-down.cjs.map +1 -0
- package/dist/icons/chevron-down.js +20 -0
- package/dist/icons/chevron-down.js.map +1 -0
- package/dist/icons/clock.cjs +2 -0
- package/dist/icons/clock.cjs.map +1 -0
- package/dist/icons/clock.js +20 -0
- package/dist/icons/clock.js.map +1 -0
- package/dist/icons/exclamation-circle.cjs +2 -0
- package/dist/icons/exclamation-circle.cjs.map +1 -0
- package/dist/icons/exclamation-circle.js +20 -0
- package/dist/icons/exclamation-circle.js.map +1 -0
- package/dist/icons/kebab-vertical.cjs +2 -0
- package/dist/icons/kebab-vertical.cjs.map +1 -0
- package/dist/icons/kebab-vertical.js +14 -0
- package/dist/icons/kebab-vertical.js.map +1 -0
- package/dist/icons/key.cjs +2 -0
- package/dist/icons/key.cjs.map +1 -0
- package/dist/icons/key.js +21 -0
- package/dist/icons/key.js.map +1 -0
- package/dist/icons/message-square-share.cjs +2 -0
- package/dist/icons/message-square-share.cjs.map +1 -0
- package/dist/icons/message-square-share.js +22 -0
- package/dist/icons/message-square-share.js.map +1 -0
- package/dist/icons/play.cjs +2 -0
- package/dist/icons/play.cjs.map +1 -0
- package/dist/icons/play.js +19 -0
- package/dist/icons/play.js.map +1 -0
- package/dist/icons/power.cjs +2 -0
- package/dist/icons/power.cjs.map +1 -0
- package/dist/icons/power.js +20 -0
- package/dist/icons/power.js.map +1 -0
- package/dist/icons/sparkle.cjs +2 -0
- package/dist/icons/sparkle.cjs.map +1 -0
- package/dist/icons/sparkle.js +20 -0
- package/dist/icons/sparkle.js.map +1 -0
- package/dist/icons/trash.cjs +2 -0
- package/dist/icons/trash.cjs.map +1 -0
- package/dist/icons/trash.js +20 -0
- package/dist/icons/trash.js.map +1 -0
- package/dist/icons/x-circle.cjs +2 -0
- package/dist/icons/x-circle.cjs.map +1 -0
- package/dist/icons/x-circle.js +20 -0
- package/dist/icons/x-circle.js.map +1 -0
- package/dist/locales/ar/openhands.json +124 -43
- package/dist/locales/ca/openhands.json +124 -43
- package/dist/locales/de/openhands.json +124 -43
- package/dist/locales/en/openhands.json +124 -43
- package/dist/locales/es/openhands.json +124 -43
- package/dist/locales/fr/openhands.json +124 -43
- package/dist/locales/it/openhands.json +124 -43
- package/dist/locales/ja/openhands.json +124 -43
- package/dist/locales/ko-KR/openhands.json +124 -43
- package/dist/locales/no/openhands.json +124 -43
- package/dist/locales/pt/openhands.json +124 -43
- package/dist/locales/tr/openhands.json +124 -43
- package/dist/locales/uk/openhands.json +124 -43
- package/dist/locales/zh-CN/openhands.json +124 -43
- package/dist/locales/zh-TW/openhands.json +124 -43
- package/dist/manifests/automation-insights.cjs +2 -0
- package/dist/manifests/automation-insights.cjs.map +1 -0
- package/dist/manifests/automation-insights.d.ts +2 -0
- package/dist/manifests/automation-insights.js +9 -0
- package/dist/manifests/automation-insights.js.map +1 -0
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +47 -31
- package/dist/manifests/automation-interface.js +48 -54
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/manifests/automation-setup.cjs +1 -1
- package/dist/manifests/automation-setup.cjs.map +1 -1
- package/dist/manifests/automation-setup.d.ts +37 -3
- package/dist/manifests/automation-setup.js +16 -2
- package/dist/manifests/automation-setup.js.map +1 -1
- package/dist/manifests/interface-validation.cjs +1 -1
- package/dist/manifests/interface-validation.cjs.map +1 -1
- package/dist/manifests/interface-validation.js +56 -52
- package/dist/manifests/interface-validation.js.map +1 -1
- package/dist/manifests/manifest-actions.d.ts +5 -0
- package/dist/manifests/manifest-bundle.d.ts +30 -0
- package/dist/manifests/manifest-local-validation.d.ts +10 -1
- package/dist/manifests/manifest-sources.cjs +1 -1
- package/dist/manifests/manifest-sources.cjs.map +1 -1
- package/dist/manifests/manifest-sources.js +3 -3
- package/dist/manifests/manifest-sources.js.map +1 -1
- package/dist/manifests/manifest-template.d.ts +14 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +78 -45
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +64 -3
- package/dist/manifests/types.js +7 -6
- package/dist/manifests/types.js.map +1 -1
- package/dist/node_modules/@heroui/popover/dist/chunk-NW7HJLND.cjs +1 -1
- package/dist/node_modules/@heroui/popover/dist/chunk-NW7HJLND.js +10 -10
- package/dist/node_modules/@heroui/ripple/dist/chunk-UIQI3AYJ.cjs +1 -1
- package/dist/node_modules/@heroui/ripple/dist/chunk-UIQI3AYJ.js +8 -8
- package/dist/node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.cjs +1 -1
- package/dist/node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.js +9 -9
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs +4843 -0
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js +11 -0
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs +13 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js +87 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +12 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +98 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -7
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +32 -13
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +2 -2
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +29 -34
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +3 -3
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +2 -2
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs +14 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js +72 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +16 -10
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/index.js +18 -13
- package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +6 -2
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js +36 -3
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.js +75 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sonarqube.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +68 -66
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +1002 -47
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +59 -17
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/activity.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/activity.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/activity.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/activity.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/book-open.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/book-open.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/book-open.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/book-open.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/download.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/file-text.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/git-commit-horizontal.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/laptop.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/laptop.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/laptop.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/laptop.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.js +39 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layout-dashboard.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/library.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/library.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/library.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/library.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/package.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/package.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/package.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/package.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/palette.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/palette.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/palette.js +39 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/palette.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pen-line.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shield-check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.js +25 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sparkles.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/timer.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +87 -85
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/commits-tab.cjs +1 -1
- package/dist/routes/commits-tab.cjs.map +1 -1
- package/dist/routes/commits-tab.js +27 -21
- package/dist/routes/commits-tab.js.map +1 -1
- package/dist/routes/conversation.cjs +1 -1
- package/dist/routes/conversation.cjs.map +1 -1
- package/dist/routes/conversation.js +56 -55
- package/dist/routes/conversation.js.map +1 -1
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.cjs.map +1 -1
- package/dist/routes/files-tab.d.ts +4 -0
- package/dist/routes/files-tab.js +121 -151
- package/dist/routes/files-tab.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.d.ts +9 -1
- package/dist/routes/llm-settings.js +137 -107
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js +20 -20
- package/dist/routes/secrets-settings.cjs +1 -1
- package/dist/routes/secrets-settings.js +15 -15
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +8 -1
- package/dist/stores/conversation-store.js +9 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/files-tab-store.cjs +1 -1
- package/dist/stores/files-tab-store.cjs.map +1 -1
- package/dist/stores/files-tab-store.d.ts +13 -0
- package/dist/stores/files-tab-store.js +49 -5
- package/dist/stores/files-tab-store.js.map +1 -1
- package/dist/stores/use-event-store.cjs +1 -1
- package/dist/stores/use-event-store.cjs.map +1 -1
- package/dist/stores/use-event-store.js +11 -11
- package/dist/stores/use-event-store.js.map +1 -1
- package/dist/types/agent-server/core/events/message-event.d.ts +2 -2
- package/dist/types/automation.cjs +2 -0
- package/dist/types/automation.cjs.map +1 -0
- package/dist/types/automation.js +8 -0
- package/dist/types/automation.js.map +1 -0
- package/dist/utils/automation-catalog.cjs +1 -1
- package/dist/utils/automation-catalog.cjs.map +1 -1
- package/dist/utils/automation-catalog.d.ts +12 -0
- package/dist/utils/automation-catalog.js +20 -1
- package/dist/utils/automation-catalog.js.map +1 -1
- package/dist/utils/automation-schedule.cjs +2 -0
- package/dist/utils/automation-schedule.cjs.map +1 -0
- package/dist/utils/automation-schedule.js +8 -0
- package/dist/utils/automation-schedule.js.map +1 -0
- package/dist/utils/automation-stack-section.cjs +2 -0
- package/dist/utils/automation-stack-section.cjs.map +1 -0
- package/dist/utils/automation-stack-section.d.ts +2 -0
- package/dist/utils/automation-stack-section.js +6 -0
- package/dist/utils/automation-stack-section.js.map +1 -0
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.cjs.map +1 -1
- package/dist/utils/constants.js +4 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/conversation-local-storage.cjs +1 -1
- package/dist/utils/conversation-local-storage.cjs.map +1 -1
- package/dist/utils/conversation-local-storage.d.ts +17 -4
- package/dist/utils/conversation-local-storage.js +111 -63
- package/dist/utils/conversation-local-storage.js.map +1 -1
- package/dist/utils/conversation-metrics.cjs +1 -1
- package/dist/utils/conversation-metrics.cjs.map +1 -1
- package/dist/utils/conversation-metrics.d.ts +3 -2
- package/dist/utils/conversation-metrics.js +16 -14
- package/dist/utils/conversation-metrics.js.map +1 -1
- package/dist/utils/conversation-overview-project-scope.cjs +2 -0
- package/dist/utils/conversation-overview-project-scope.cjs.map +1 -0
- package/dist/utils/conversation-overview-project-scope.d.ts +16 -0
- package/dist/utils/conversation-overview-project-scope.js +22 -0
- package/dist/utils/conversation-overview-project-scope.js.map +1 -0
- package/dist/utils/extension-module-card-classes.cjs +1 -1
- package/dist/utils/extension-module-card-classes.cjs.map +1 -1
- package/dist/utils/extension-module-card-classes.d.ts +1 -1
- package/dist/utils/extension-module-card-classes.js +2 -2
- package/dist/utils/extension-module-card-classes.js.map +1 -1
- package/dist/utils/format-relative-time.cjs +2 -0
- package/dist/utils/format-relative-time.cjs.map +1 -0
- package/dist/utils/format-relative-time.js +17 -0
- package/dist/utils/format-relative-time.js.map +1 -0
- package/dist/utils/git-diff-stats.cjs +5 -0
- package/dist/utils/git-diff-stats.cjs.map +1 -0
- package/dist/utils/git-diff-stats.d.ts +9 -0
- package/dist/utils/git-diff-stats.js +53 -0
- package/dist/utils/git-diff-stats.js.map +1 -0
- package/dist/utils/handle-event-for-ui.cjs +1 -1
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.js +13 -11
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mcp-credential-validation.cjs +1 -1
- package/dist/utils/mcp-credential-validation.js +3 -3
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.js +22 -9
- package/dist/utils/mcp-marketplace-utils.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.js +6 -7
- package/dist/utils/parse-git-remote-url.js.map +1 -1
- package/dist/utils/recommended-automation-rail.cjs +2 -0
- package/dist/utils/recommended-automation-rail.cjs.map +1 -0
- package/dist/utils/recommended-automation-rail.d.ts +22 -0
- package/dist/utils/recommended-automation-rail.js +44 -0
- package/dist/utils/recommended-automation-rail.js.map +1 -0
- package/dist/utils/responder-deployment.cjs +2 -0
- package/dist/utils/responder-deployment.cjs.map +1 -0
- package/dist/utils/responder-deployment.js +42 -0
- package/dist/utils/responder-deployment.js.map +1 -0
- package/dist/utils/scroll-fade-state.cjs +2 -0
- package/dist/utils/scroll-fade-state.cjs.map +1 -0
- package/dist/utils/scroll-fade-state.d.ts +6 -0
- package/dist/utils/scroll-fade-state.js +13 -0
- package/dist/utils/scroll-fade-state.js.map +1 -0
- package/dist/utils/skill-category.cjs +2 -0
- package/dist/utils/skill-category.cjs.map +1 -0
- package/dist/utils/skill-category.js +51 -0
- package/dist/utils/skill-category.js.map +1 -0
- package/dist/utils/skill-scope.cjs +1 -1
- package/dist/utils/skill-scope.cjs.map +1 -1
- package/dist/utils/skill-scope.js +1 -1
- package/dist/utils/skill-scope.js.map +1 -1
- package/dist/utils/streaming-delta-batcher.cjs +2 -0
- package/dist/utils/streaming-delta-batcher.cjs.map +1 -0
- package/dist/utils/streaming-delta-batcher.d.ts +21 -0
- package/dist/utils/streaming-delta-batcher.js +31 -0
- package/dist/utils/streaming-delta-batcher.js.map +1 -0
- package/dist/utils/tar-gzip.d.ts +26 -0
- package/dist/utils/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.d.ts +1 -41
- package/dist/utils/utils.js +27 -6
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/websocket-handshake.cjs +2 -0
- package/dist/utils/websocket-handshake.cjs.map +1 -0
- package/dist/utils/websocket-handshake.d.ts +11 -0
- package/dist/utils/websocket-handshake.js +12 -0
- package/dist/utils/websocket-handshake.js.map +1 -0
- package/package.json +3 -3
- package/scripts/check-translation-completeness.cjs +4 -0
- package/scripts/dev-static.mjs +49 -43
- package/scripts/dev-with-automation.mjs +13 -5
- package/scripts/seed-automation-ux-data.mjs +810 -0
- package/build/assets/acp-providers-CYy8qA2z.js +0 -1
- package/build/assets/active-backend-context-BZDG15C0.js +0 -2
- package/build/assets/agent-context-settings-DGWBBbcp.js +0 -1
- package/build/assets/agent-profiles-settings-DrkGdf4_.js +0 -1
- package/build/assets/agent-server-conversation-service.api-DK56YPTs.js +0 -86
- package/build/assets/agent-settings-DfcSgkLD.js +0 -2
- package/build/assets/agent-settings-Lrc5-twS.js +0 -1
- package/build/assets/alert-banner-BgDHhL7b.js +0 -1
- package/build/assets/api-error-message-BEIE_yD1.js +0 -1
- package/build/assets/api-key-entry-screen-DaZnOlVo.js +0 -1
- package/build/assets/app-settings-BG5NAUbC.js +0 -1
- package/build/assets/automation-detail-D4Hs831Z.js +0 -3
- package/build/assets/automation-export-n0X6FB0C.js +0 -2
- package/build/assets/automation-git-sync-CDrm8WV7.js +0 -1
- package/build/assets/automation-setup-route-CZCl4ONs.js +0 -1
- package/build/assets/automation-templates-DFF96AdL.js +0 -1
- package/build/assets/automations-list-Bl-oGOrV.js +0 -1
- package/build/assets/back-nav-button-H_ThtDA0.js +0 -1
- package/build/assets/backend-form-modal-CbCemvHt.js +0 -1
- package/build/assets/backend-not-configured-DP8KLNq_.js +0 -1
- package/build/assets/backend-synced-settings-badge-BBASWqsb.js +0 -1
- package/build/assets/badge-B-51h-SW.js +0 -1
- package/build/assets/base-modal-BbjycA8X.js +0 -1
- package/build/assets/bot-CGPCg03p.js +0 -1
- package/build/assets/brand-button-Blxv5nww.js +0 -1
- package/build/assets/browser-CuW0nWvh.js +0 -7
- package/build/assets/browser-tab-D5G0ORwt.js +0 -1
- package/build/assets/chat-send-button-BD2tii1r.js +0 -1
- package/build/assets/check-DSuS-lyr.js +0 -1
- package/build/assets/chevron-down-CgGcmtE2.js +0 -1
- package/build/assets/circle-check-CG5-NPw7.js +0 -1
- package/build/assets/circle-plus-check-toggle-ASbpB8vN.js +0 -1
- package/build/assets/cloud-funnel-analytics-GlCUG0gk.js +0 -1
- package/build/assets/cog-CZiR80uT.js +0 -1
- package/build/assets/combobox-caret-DvpEsh2O.js +0 -1
- package/build/assets/command-menu-DwUQzjYP.js +0 -1
- package/build/assets/condenser-settings-BptcoiLA.js +0 -1
- package/build/assets/confirmation-modal-CiEwxZAA.js +0 -1
- package/build/assets/context-menu-list-item-CdcamfM1.js +0 -1
- package/build/assets/conversation-DREHj4nT.js +0 -1
- package/build/assets/conversation-DotRfiDz.js +0 -90
- package/build/assets/conversation-panel-DREHj4nT.js +0 -1
- package/build/assets/conversation-state-store-DMLtlHbE.js +0 -1
- package/build/assets/conversation-store-Blc5xysY.js +0 -6
- package/build/assets/conversation-tab-empty-state-D-puECpY.js +0 -1
- package/build/assets/copy-to-clipboard-button-BGxcUbgy.js +0 -1
- package/build/assets/device-verify-CZJfWaJf.js +0 -1
- package/build/assets/dropdown-classes-tLhpwtxS.js +0 -1
- package/build/assets/entry.client-D8GnI6GZ.js +0 -2
- package/build/assets/enum-filter-dropdown-Fk8k60nk.js +0 -1
- package/build/assets/environment-switch-overlay-DeztVYuL.js +0 -1
- package/build/assets/extension-module-card-classes-Bo43vY5V.js +0 -1
- package/build/assets/extensions-hub-Cd6GCYzq.js +0 -1
- package/build/assets/extensions-navigation-C4sgZg-y.js +0 -1
- package/build/assets/external-link-C0UpBgsE.js +0 -1
- package/build/assets/file-text-C6WYtNdV.js +0 -1
- package/build/assets/files-tab-BW_qzyAm.js +0 -1
- package/build/assets/form-control-classes-CGXBLcn1.js +0 -1
- package/build/assets/format-relative-time-ZhQD4rsl.js +0 -1
- package/build/assets/git-provider-icon-CaQ1yLPi.js +0 -1
- package/build/assets/git-repo-dropdown-CgXR6M_E.js +0 -1
- package/build/assets/git-repo-dropdown-D2Uei3CO.js +0 -1
- package/build/assets/highlighted-source-view-C_YOp8Fo.js +0 -1
- package/build/assets/home-DNzzJcMP.js +0 -1
- package/build/assets/home-aCos-5vc.js +0 -1
- package/build/assets/home-store-DgzViC3f.js +0 -1
- package/build/assets/index-home-DNzzJcMP.js +0 -1
- package/build/assets/info-CLoC1LRo.js +0 -1
- package/build/assets/install-server-modal-D7zIqNKz.js +0 -1
- package/build/assets/kebab-menu-item-content-DERMdnDv.js +0 -1
- package/build/assets/launch-5PjKeLak.js +0 -1
- package/build/assets/list-todo-BF049YaY.js +0 -1
- package/build/assets/llm-not-configured-banner-BK9z5eS0.js +0 -27
- package/build/assets/llm-settings-BLAMK2tR.js +0 -1
- package/build/assets/llm-settings-BWsbarGM.js +0 -1
- package/build/assets/llm-subscription-service-SfnEV9Uc.js +0 -1
- package/build/assets/loader-circle-D7IagAyF.js +0 -1
- package/build/assets/loading-spinner-DBgXgra0.js +0 -1
- package/build/assets/manage-backends-modal-BTqNPhzc.js +0 -1
- package/build/assets/manifest-abebca3c.js +0 -1
- package/build/assets/manifest-subpage-layout-Rn-glaxV.js +0 -1
- package/build/assets/map-provider-BK4HnqYz.js +0 -1
- package/build/assets/markdown-renderer-Cp6DlHQN.js +0 -8
- package/build/assets/mcp-BC-Ixn4T.js +0 -9
- package/build/assets/mcp-marketplace-utils-BJWJgbB6.js +0 -1
- package/build/assets/messages-CzFKrzPG.js +0 -40
- package/build/assets/modal-body-BdKfD3Hl.js +0 -1
- package/build/assets/modal-classes-D5_b5vMi.js +0 -1
- package/build/assets/modal-close-button-objukxk_.js +0 -1
- package/build/assets/mouse-pointer-click-C_gXyLyD.js +0 -1
- package/build/assets/npm-CHVHV1MC.js +0 -1
- package/build/assets/onboarding-Diw0V51A.js +0 -1
- package/build/assets/onboarding-modal-Da4yHzsA.js +0 -1
- package/build/assets/organization-service.api-BztSy69u.js +0 -1
- package/build/assets/parse-git-remote-url-BkXN9jzl.js +0 -1
- package/build/assets/pencil-49avMHlD.js +0 -1
- package/build/assets/planner-tab-CJiSpNax.js +0 -1
- package/build/assets/plugins-management-service-lHdNKWNU.js +0 -1
- package/build/assets/plus-C0BagBpV.js +0 -1
- package/build/assets/profiles-service.api-BLr7FXec.js +0 -1
- package/build/assets/providers-CWXnb7S3.js +0 -1
- package/build/assets/proxy-DYDXxtje.js +0 -1
- package/build/assets/puzzle-Bt2B1rzf.js +0 -1
- package/build/assets/recommended-automations-launcher-CcFMfJRR.js +0 -1
- package/build/assets/refresh-cw-nmcesifB.js +0 -1
- package/build/assets/root-CT4t7apy.css +0 -1
- package/build/assets/root-DnRgLKpU.js +0 -2
- package/build/assets/root-layout-2L9tr-BN.js +0 -2
- package/build/assets/schema-field-C59lVZTA.js +0 -1
- package/build/assets/sdk-section-page-BbBEQQjq.js +0 -1
- package/build/assets/search-CYSDBczG.js +0 -1
- package/build/assets/secrets-service-BtsgYSlj.js +0 -1
- package/build/assets/secrets-settings-DJ0OKa4_.js +0 -1
- package/build/assets/segmented-toggle-DiVfTZuN.js +0 -1
- package/build/assets/settings-CDqL_Uqh.js +0 -1
- package/build/assets/settings-dropdown-input-Ba1UN5Du.js +0 -1
- package/build/assets/settings-index-Cz2cKt2K.js +0 -1
- package/build/assets/settings-input-CWUEHHvS.js +0 -1
- package/build/assets/settings-list-classes-DdcLXDGn.js +0 -1
- package/build/assets/settings-modal-nEEK1Kh1.js +0 -1
- package/build/assets/settings-service.api-3yAUFcaP.js +0 -1
- package/build/assets/settings-switch-Dk9hChx1.js +0 -1
- package/build/assets/settings-utils-CxjtCSB3.js +0 -1
- package/build/assets/shared-conversation-DbAcrx3s.js +0 -1
- package/build/assets/shield-check-CiOTXxV2.js +0 -1
- package/build/assets/sidebar-layout-lrfPooIB.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-KERXfNu1.js +0 -1
- package/build/assets/sidebar-nav-link-B8lFD6Cb.js +0 -1
- package/build/assets/sidebar-store-u6pUpxJ7.js +0 -1
- package/build/assets/skill-card-pill-row-dGIUzr_b.js +0 -1
- package/build/assets/skill-icon-badge-kkOWZ89w.js +0 -1
- package/build/assets/skill-scope-DWN1PBPH.js +0 -1
- package/build/assets/skills-plugins-DFjH2Nq6.js +0 -1
- package/build/assets/skills-settings-DIHpl3ol.js +0 -2
- package/build/assets/sparkles-ntyMLnbj.js +0 -1
- package/build/assets/styled-tooltip-B6JXcsmL.js +0 -1
- package/build/assets/task-list-tab-aEJzEcHD.js +0 -1
- package/build/assets/terminal-Dch7Ty5K.js +0 -3
- package/build/assets/toggle-switch-B2MLKsgt.js +0 -1
- package/build/assets/trash-2-yZnDM4Ji.js +0 -1
- package/build/assets/typography-DB5HoCk0.js +0 -1
- package/build/assets/usage-tab-DrEtBmBT.js +0 -1
- package/build/assets/use-acp-credential-form-c8KXAa8A.js +0 -1
- package/build/assets/use-activate-agent-profile-B0p34N3q.js +0 -1
- package/build/assets/use-agent-profiles-CPIc6wLH.js +0 -1
- package/build/assets/use-can-manage-org-profiles-Dz_8Eqkv.js +0 -1
- package/build/assets/use-cloud-current-user-id-DvUVqCle.js +0 -1
- package/build/assets/use-config-C3PO4TBw.js +0 -1
- package/build/assets/use-create-conversation-DVrA_uLD.js +0 -1
- package/build/assets/use-create-secret-DbBIpaCR.js +0 -1
- package/build/assets/use-get-secrets-6PBitf54.js +0 -1
- package/build/assets/use-has-permission-CQ31Cl8j.js +0 -1
- package/build/assets/use-is-authed-2UrDIziV.js +0 -1
- package/build/assets/use-is-creating-conversation-BvYpmb3v.js +0 -1
- package/build/assets/use-launch-skill-in-chat-COnDpxCQ.js +0 -1
- package/build/assets/use-llm-profiles-diZS4FiN.js +0 -1
- package/build/assets/use-manifest-capabilities-HIWCtIUm.js +0 -1
- package/build/assets/use-onboarding-completion-Bs8PcXik.js +0 -1
- package/build/assets/use-plugins-marketplace-BCuNLFsr.js +0 -1
- package/build/assets/use-save-agent-profile-BaMNSpBV.js +0 -1
- package/build/assets/use-save-settings-BahvC2Gw.js +0 -1
- package/build/assets/use-settings-C6ZxpBDX.js +0 -1
- package/build/assets/use-settings-nav-items-Bqn69Ggw.js +0 -16
- package/build/assets/use-tracking-Bhu7gk2y.js +0 -3
- package/build/assets/use-user-conversation-BkNXpXrd.js +0 -1
- package/build/assets/useInfiniteQuery-c_OmS3lK.js +0 -1
- package/build/assets/useMutation-6ZsQCqAn.js +0 -1
- package/build/assets/useQueries-xDrGlTO_.js +0 -1
- package/build/assets/useQuery-Bs5NFz2s.js +0 -1
- package/build/assets/utils-DUD5ScdA.js +0 -1
- package/build/assets/vendor~browser-B-fae1JU.js +0 -47
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js +0 -186
- package/build/assets/vendor~files-tab-B6POTS66.js +0 -11
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js +0 -13
- package/build/assets/vendor~root-layout-DeQACFVA.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js +0 -48
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js +0 -73
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js +0 -7465
- package/build/assets/verification-settings-COueVXmM.js +0 -1
- package/build/assets/wrench-C95ujnYo.js +0 -1
- package/build/assets/x-86ZCfxKY.js +0 -1
- package/build/assets/zap-DRa-r-Tf.js +0 -1
- package/dist/components/features/diff-viewer/empty-changes-message.cjs +0 -2
- package/dist/components/features/diff-viewer/empty-changes-message.cjs.map +0 -1
- package/dist/components/features/diff-viewer/empty-changes-message.js +0 -17
- package/dist/components/features/diff-viewer/empty-changes-message.js.map +0 -1
- package/dist/components/features/tips/random-tip.cjs +0 -2
- package/dist/components/features/tips/random-tip.cjs.map +0 -1
- package/dist/components/features/tips/random-tip.js +0 -41
- package/dist/components/features/tips/random-tip.js.map +0 -1
- package/dist/hooks/query/use-has-git-commits.cjs +0 -2
- package/dist/hooks/query/use-has-git-commits.cjs.map +0 -1
- package/dist/hooks/query/use-has-git-commits.d.ts +0 -25
- package/dist/hooks/query/use-has-git-commits.js +0 -31
- package/dist/hooks/query/use-has-git-commits.js.map +0 -1
- package/dist/hooks/use-has-attached-source.cjs +0 -2
- package/dist/hooks/use-has-attached-source.cjs.map +0 -1
- package/dist/hooks/use-has-attached-source.d.ts +0 -18
- package/dist/hooks/use-has-attached-source.js +0 -14
- package/dist/hooks/use-has-attached-source.js.map +0 -1
- package/dist/icons/chveron-up.cjs +0 -2
- package/dist/icons/chveron-up.cjs.map +0 -1
- package/dist/icons/chveron-up.js +0 -21
- package/dist/icons/chveron-up.js.map +0 -1
- package/dist/routes/changes-tab.cjs +0 -2
- package/dist/routes/changes-tab.cjs.map +0 -1
- package/dist/routes/changes-tab.d.ts +0 -3
- package/dist/routes/changes-tab.js +0 -64
- package/dist/routes/changes-tab.js.map +0 -1
- package/dist/utils/file-priority.cjs +0 -2
- package/dist/utils/file-priority.cjs.map +0 -1
- package/dist/utils/file-priority.d.ts +0 -27
- package/dist/utils/file-priority.js +0 -61
- package/dist/utils/file-priority.js.map +0 -1
- package/dist/utils/table-row-classes.d.ts +0 -9
- package/dist/utils/tips.cjs +0 -2
- package/dist/utils/tips.cjs.map +0 -1
- package/dist/utils/tips.js +0 -45
- package/dist/utils/tips.js.map +0 -1
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js} +0 -0
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ docker run -it --rm \
|
|
|
96
96
|
-p 8000:8000 \
|
|
97
97
|
-v "$HOME/.openhands:/home/openhands/.openhands" \
|
|
98
98
|
-v "${PROJECTS_PATH}:/projects" \
|
|
99
|
-
ghcr.io/openhands/agent-canvas:1.
|
|
99
|
+
ghcr.io/openhands/agent-canvas:1.15.0 # x-release-please-version
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
**Windows (PowerShell / Windows Terminal):** See [README.windows.md](./README.windows.md) for the equivalent commands.
|
package/README.windows.md
CHANGED
|
@@ -12,7 +12,7 @@ For the main install options and overall context, see [README.md](./README.md).
|
|
|
12
12
|
- A host directory for `PROJECTS_PATH` containing the project folders you want the agent to access (create it before starting the container)
|
|
13
13
|
|
|
14
14
|
```powershell
|
|
15
|
-
docker pull ghcr.io/openhands/agent-canvas:1.
|
|
15
|
+
docker pull ghcr.io/openhands/agent-canvas:1.15.0 # x-release-please-version
|
|
16
16
|
|
|
17
17
|
$env:PROJECTS_PATH = Join-Path $HOME "projects" # directory containing your project folders
|
|
18
18
|
New-Item -ItemType Directory -Force -Path $env:PROJECTS_PATH, (Join-Path $env:USERPROFILE ".openhands") | Out-Null
|
|
@@ -21,7 +21,7 @@ docker run -it --rm `
|
|
|
21
21
|
-p 8000:8000 `
|
|
22
22
|
-v "$($env:USERPROFILE)\.openhands:/home/openhands/.openhands" `
|
|
23
23
|
-v "$($env:PROJECTS_PATH):/projects" `
|
|
24
|
-
ghcr.io/openhands/agent-canvas:1.
|
|
24
|
+
ghcr.io/openhands/agent-canvas:1.15.0 # x-release-please-version
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Open [http://localhost:8000/canvas](http://localhost:8000/canvas) in your browser.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as e}from"./utils-DaCIEEQP.js";import{n as t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js";var n=`cli-generic`;function r(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||t===`acp-managed`?null:t}function i(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=r(t);if(e)return e}return e.providerDefault??null}var a={"claude-code":{icon:`claude-code`,description_key:e.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},o=Object.entries(a).map(([e,n])=>{let r=t(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:r?.available_models?.map(e=>({id:e.id,label:e.label})),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}}),s=`custom`,c={codex:[{name:`CODEX_AUTH_JSON`,secret:!0,multiline:!0,hint_key:e.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,hint_values:{file:`~/.codex/auth.json`}}],"claude-code":[{name:`CLAUDE_CODE_OAUTH_TOKEN`,secret:!0,hint_key:e.ONBOARDING$ACP_SECRET_OAUTH_TOKEN_HINT}],"gemini-cli":[{name:`GOOGLE_APPLICATION_CREDENTIALS_JSON`,secret:!0,multiline:!0,hint_key:e.ONBOARDING$ACP_SECRET_FILE_BLOB_HINT,hint_values:{file:`~/.config/gcloud/application_default_credentials.json`}},{name:`GOOGLE_CLOUD_PROJECT`,hint_key:e.ONBOARDING$ACP_SECRET_GCP_PROJECT_HINT},{name:`GOOGLE_CLOUD_LOCATION`,hint_key:e.ONBOARDING$ACP_SECRET_GCP_LOCATION_HINT},{name:`GOOGLE_GENAI_USE_VERTEXAI`,hint_key:e.ONBOARDING$ACP_SECRET_VERTEXAI_FLAG_HINT}]},l={"claude-code":[[`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_API_KEY`],[`CLAUDE_CODE_OAUTH_TOKEN`,`ANTHROPIC_BASE_URL`]]};function u(e,t){return e?(l[e]??[]).filter(([e,n])=>t(e)&&t(n)):[]}var d=`gemini-2.5-pro`;function f(e){return e===`gemini-cli`?d:m(e)?.default_model??null}function p(n){if(!n)return[];let r=t(n);if(!r)return[];let i=[...c[n]??[]];return r.api_key_env_var&&i.push({name:r.api_key_env_var,secret:!0,hint_key:e.ONBOARDING$ACP_SECRET_API_KEY_HINT}),r.base_url_env_var&&i.push({name:r.base_url_env_var,hint_key:e.ONBOARDING$ACP_SECRET_BASE_URL_HINT}),i}function m(e){if(e)return o.find(t=>t.key===e)}function h(e){let t=m(e);return t?t.display_name:null}function g(e){return m(e)?.icon??`cli-generic`}function _(e,t){return t?m(e)?.available_models?.find(e=>e.id===t)?.label??t:null}function v(e,t={}){if(e===`openhands`)return{agent_kind:`openhands`};let n=e===s,r=n?void 0:m(e);if(!n&&!r&&!t.allowUnknownServer)return null;let i=t.model===void 0?f(e):t.model;return{agent_kind:`acp`,acp_server:e,acp_command:t.command??[],acp_args:[],acp_model:i??null}}export{u as a,h as c,g as d,i as f,v as i,p as l,o as n,f as o,n as r,m as s,s as t,_ as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-DyG7x7JT.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{r as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{A as a,E as o,F as s,I as c,L as ee,N as l,O as te,T as ne,b as re,f as ie,k as ae}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{H as oe,W as u,t as se}from"./utils-DaCIEEQP.js";var d=e(t(),1),ce=`__AGENT_CANVAS_BASE_PATH__`;function le(e){let t=e?.trim();return!t||t===`/`?``:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function ue(){let e=le(void 0);if(e)return e;if(typeof window<`u`){let e=window[ce];if(typeof e==`string`)return le(e)}return``}function de(e){let t=ue();return t?`${t}${e.startsWith(`/`)?e:`/${e}`}`:e.startsWith(`/`)?e:`/${e}`}var f=`openhands`,fe=[{label:`English`,value:`en`},{label:`日本語`,value:`ja`},{label:`简体中文`,value:`zh-CN`},{label:`繁體中文`,value:`zh-TW`},{label:`한국어`,value:`ko-KR`},{label:`Norsk`,value:`no`},{label:`Arabic`,value:`ar`},{label:`Deutsch`,value:`de`},{label:`Français`,value:`fr`},{label:`Italiano`,value:`it`},{label:`Português`,value:`pt`},{label:`Español`,value:`es`},{label:`Català`,value:`ca`},{label:`Türkçe`,value:`tr`},{label:`Українська`,value:`uk`}],pe=new WeakMap,me=e=>{if(!pe.has(e)){let t=e.use(ae).use(te).use(i).init({fallbackLng:`en`,debug:!1,supportedLngs:fe.map(e=>e.value),nonExplicitSupportedLngs:!1,ns:[f],defaultNS:f,fallbackNS:f,backend:{loadPath:de(`/locales/{{lng}}/{{ns}}.json`)},interpolation:{escapeValue:!1}});pe.set(e,t)}return e},he=()=>me(l()),ge=null,_e=null,p=()=>(ge||=he(),ge),ve=()=>_e??p(),ye=e=>(_e=e??p(),_e),be=async(e=p())=>(await pe.get(e),e),xe=e=>e?typeof e==`object`&&!Array.isArray(e)?{ns:f,...e}:e:{ns:f},m=new Proxy({},{get:(e,t)=>{let n=ve();if(t===`t`)return(e,t)=>n.t(e,xe(t));if(t===`exists`)return(e,t)=>n.exists(e,xe(t));let r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=ve();return Reflect.set(r,t,n,r)}}),Se=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`error`in e.response.data&&typeof e.response?.data?.error==`string`,Ce=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`message`in e.response.data&&typeof e.response?.data?.message==`string`,we=`Disconnected (check URL or network). Check that the backend URL is correct and the backend server is reachable. If the backend is on another origin, check that it allows this frontend origin.`,Te=`Disconnected (request timed out). Check that the backend URL is correct and reachable.`,Ee=4;function De(e){return typeof e==`object`&&!!e}function Oe(e){let t=[],n=new Set,r=e,i=0;for(;r!=null&&i<Ee&&!n.has(r);){if(n.add(r),r instanceof Error)r.message&&t.push(r.message),r=r.cause;else if(typeof r==`string`){r&&t.push(r);break}else if(De(r)){let e=r.message;typeof e==`string`&&e&&t.push(e),r=r.cause}else break;i+=1}return t}function h(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`disconnected (check cors or network)`)||t.includes(`disconnected (check url or network)`)||t.includes(`blocked by cors`)||t.includes(`failed to fetch`)||t.includes(`network error`)||t.includes(`load failed`)||t.includes(`networkerror when attempting to fetch resource`)||t.includes(`cors`)&&t.includes(`blocked`)}function ke(e){return Oe(e).some(h)}function Ae(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`request timeout`)||t.includes(`timeout after`)||t.includes(`backend request timed out`)}function je(e){let t=Oe(e);return t.some(h)?we:t.some(Ae)?Te:t[0]??null}function Me(e){return typeof e==`object`&&!!e&&`isAxiosError`in e&&e.isAxiosError===!0}var Ne=e=>{let t=null,n=!1;return Me(e)?(n=!0,t=Se(e)&&e.response?.data.error?e.response?.data.error:Ce(e)&&e.response?.data.message?e.response?.data.message:e.message):t=e instanceof Error?e.message:typeof e==`string`?e:null,je(n?t??e:e)??t??``},g=(e,t=5e3,n=1e4)=>{if(!e)return t;let r=e.length/(1e3/60)*1e3*1.5;return Math.min(Math.max(r,t),n)},_=r(),Pe={background:`var(--oh-color-tertiary)`,border:`1px solid var(--oh-border-input)`,color:`#fff`,borderRadius:`var(--oh-radius)`,maxWidth:`400px`,wordBreak:`break-word`,overflowWrap:`anywhere`,whiteSpace:`pre-wrap`},v={position:`top-right`,style:Pe},Fe={...Pe,color:`var(--oh-muted)`};function Ie({message:e}){let t=d.useRef(null),[n,r]=d.useState(!1);return d.useLayoutEffect(()=>{let e=t.current;if(!e)return;let n=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){r(!1);return}r(e.getBoundingClientRect().height>t*1.5)};n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[e]),(0,_.jsxs)(`div`,{className:se(`flex min-w-0 gap-2`,n?`items-start`:`items-center`),children:[(0,_.jsx)(o,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:oe}}),(0,_.jsx)(`span`,{ref:t,className:`min-w-0 flex-1 text-sm leading-5 [word-break:break-word] [overflow-wrap:anywhere]`,children:e})]})}var Le={...v,icon:null,style:Fe},Re=e=>{let t=e||m.t(u.STATUS$ERROR);h(t)?t=m.t(u.ERROR$CORS_OR_NETWORK):Ae(t)&&(t=m.t(u.ERROR$BACKEND_REQUEST_TIMEOUT));let n=g(t,4e3);ne((0,_.jsx)(Ie,{message:t}),{...Le,duration:n})},ze=e=>{let t=g(e,5e3);ne.success((0,_.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...v,duration:t})},Be=(e,t,n)=>{let r=g(`${e} ${t}`,5e3);ne.success((0,_.jsxs)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:[e,` `,(0,_.jsx)(`a`,{className:`underline hover:no-underline`,href:n,children:t})]}),{...v,duration:r})},Ve=e=>{let t=g(e,6e3);ne((0,_.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...v,icon:`⚠️`,duration:t})},He=`openhands-backend-health`,Ue=500;function We(e){if(typeof e!=`object`||!e)return!1;let t=e;return Number.isInteger(t.consecutiveFailures)&&t.consecutiveFailures>=0&&t.consecutiveFailures<=5&&(t.lastError===null||typeof t.lastError==`string`)&&(t.lastFailureAt===null||typeof t.lastFailureAt==`number`)&&typeof t.disabled==`boolean`}function Ge(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(He);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof e==`string`&&e.length>0&&We(r)&&(n[e]=r);return n}catch{return{}}}function Ke(e){if(!(typeof window>`u`))try{if(Object.keys(e).length===0){window.localStorage.removeItem(He);return}window.localStorage.setItem(He,JSON.stringify(e))}catch{}}function qe(e){let t=je(e)??`Unknown error`;return t.length>Ue?`${t.slice(0,Ue)}…`:t}var y=Ge(),Je=new Set;function Ye(){Je.forEach(e=>e())}function Xe(e){y=e,Ke(e),Ye()}function Ze(){return y}function Qe(e){return y[e]??null}function $e(e){return Je.add(e),()=>{Je.delete(e)}}function et(e,t){let n=y[e],r=Math.min((n?.consecutiveFailures??0)+1,5),i=n?.disabled===!0||r>=5,a={consecutiveFailures:r,lastError:qe(t),lastFailureAt:Date.now(),disabled:i};Xe({...y,[e]:a})}function tt(e){if(!(e in y))return;let{[e]:t,...n}=y;Xe(n)}function nt(e){if(!(e in y))return;let{[e]:t,...n}=y;Xe(n)}function rt(e){if(!(e in y))return;let{[e]:t,...n}=y;Xe(n)}var it=`workspace/project`,at=`__AGENT_CANVAS_LOCK_TO_CLOUD__`,ot=`all-hands.dev`,b=`openhands.dev`,st=`app.${ot}`,ct=b,lt=`app.${b}`;function ut(e){return e?.trim()||null}function dt(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function ft(e){if(!e)return null;let t=e.trim().replace(/\/+$/,``);return t?/^https?:\/\//i.test(t)?t:`https://${t}`:null}function pt(e){let t=e.toLowerCase();return t===st||t===lt?ct:t===ot?b:t.endsWith(`.${ot}`)?`${t.slice(0,-13)}${b}`:t}function mt(e){let t=ft(e);if(!t)return null;try{let e=new URL(t),n=e.port?`:${e.port}`:``;return`${e.protocol}//${pt(e.hostname)}${n}`}catch{return t.toLowerCase()}}function ht(){let e=x();return!e||typeof window>`u`||!yt(window.location.origin,e)?null:window.location.origin}function gt(){return dt(void 0)}function _t(){let e=ut(void 0);if(e)return e;if(typeof window<`u`){let e=window.__AGENT_CANVAS_SESSION_API_KEY__;if(typeof e==`string`)return ut(e)}return null}function vt(){return{baseUrl:xt()??``,sessionApiKey:S()??``}}function x(){let e=ft(void 0);if(e)return e;if(typeof window<`u`){let e=window[at];if(typeof e==`string`)return ft(e)}return null}function yt(e,t){let n=mt(e),r=mt(t);return!n||!r?!1:n===r}function bt(){return ht()?`cookie`:`api-key`}function xt(){return gt()||(typeof window<`u`?window.location.origin:null)}function S(){return _t()}function St(){return it}function Ct(e){return`${St().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function wt(){let e=S();return e?{"X-Session-API-Key":e}:{}}function C(){return typeof window<`u`&&window.__AGENT_CANVAS_AUTH_REQUIRED__===!0}function Tt(){return C()?!S():!1}var Et=`default-local`,Dt=`Local`,Ot=`locked-cloud`,kt=`OpenHands Cloud`;function At(){if(!x())return null;let e=ht();return e?{id:Ot,name:kt,host:e,apiKey:``,kind:`cloud`,authMode:`cookie`}:null}function w(){if(x())return null;let e=xt(),t=S();return!e||!t?null:{id:Et,name:Dt,host:e,apiKey:t,kind:`local`}}var jt=`openhands-backends`,T=`openhands-active-backend`;function Mt(e){return e===`local`||e===`cloud`}function Nt(e){return e===void 0||e===`api-key`||e===`cookie`}function Pt(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.name==`string`&&typeof t.host==`string`&&typeof t.apiKey==`string`&&Mt(t.kind)&&Nt(t.authMode)&&(t.connectionRevision===void 0||typeof t.connectionRevision==`number`&&Number.isSafeInteger(t.connectionRevision)&&t.connectionRevision>=0)}function Ft(e){try{let{hostname:t}=new URL(e);return t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`[::1]`}catch{return!1}}function It(e,t){return e.id!==`default-local`||e.kind!==`local`?!1:e.host===t.host||Ft(e.host)&&Ft(t.host)}function Lt(e){let t=w();if(!t)return e;let n=!1,r=e.map(e=>!It(e,t)||e.apiKey===t.apiKey?e:(n=!0,{...e,apiKey:t.apiKey}));return n?(E(r),r):e}function E(e){if(!(typeof window>`u`))try{window.localStorage.setItem(jt,JSON.stringify(e))}catch{}}function Rt(){if(typeof window>`u`)return[];try{let e=At();if(e)return E([e]),Ut()?.backendId!==e.id&&Wt({backendId:e.id}),[e];let t=window.localStorage.getItem(jt);if(t===null){let e=w();return e?(E([e]),[e]):[]}let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=n.filter(Pt);if(r.length===0){let e=w();return e?(E([e]),[e]):[]}return Lt(r)}catch{return[]}}function zt(e){if(!e)return null;try{let t=JSON.parse(e);if(typeof t!=`object`||!t||typeof t.backendId!=`string`)return null;let n=t.orgId;return{backendId:t.backendId,orgId:typeof n==`string`&&n.length>0?n:null}}catch{return null}}function Bt(e,t){try{return e?.getItem(t)??null}catch{return null}}function Vt(e,t,n){try{e?.setItem(t,n)}catch{}}function Ht(e,t){try{e?.removeItem(t)}catch{}}function Ut(){return typeof window>`u`?null:zt(Bt(window.sessionStorage,T))||zt(Bt(window.localStorage,T))}function Wt(e){if(typeof window>`u`)return;if(!e){Ht(window.sessionStorage,T),Ht(window.localStorage,T);return}let t=JSON.stringify({backendId:e.backendId,orgId:e.orgId??null});Vt(window.sessionStorage,T,t),Vt(window.localStorage,T,t)}var Gt=`backend`;function Kt(e,t){let{backend:n,orgId:r}=t;if(!n.id)return e;let i=e.indexOf(`#`),a=i===-1?``:e.slice(i),o=i===-1?e:e.slice(0,i),s=o.indexOf(`?`),c=s===-1?o:o.slice(0,s),ee=s===-1?``:o.slice(s+1),l=new URLSearchParams(ee);return l.set(Gt,n.id),r&&l.set(`org`,r),`${c}?${l.toString()}${a}`}function qt(e,t){if(!t)return null;let n;try{n=new URLSearchParams(t)}catch{return null}let r=n.get(Gt);return!r||!e.some(e=>e.id===r)?null:{backendId:r,orgId:n.get(`org`)||null}}function Jt(){return typeof window>`u`?``:window.location.search}var Yt=`no-backend`,Xt={id:Yt,name:`No Backend Available`,host:``,apiKey:``,kind:`local`};function Zt(e){return e.id===Yt}function Qt(e){return e.find(e=>e.kind===`local`&&Qe(e.id)?.disabled!==!0)||(e.find(e=>e.kind===`local`)??e[0]??Xt)}function $t(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=Qt(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}function en(e){let t=qt(e,Jt());return t?(Wt(t),t):Ut()}var tn=Rt(),D=$t(tn,en(tn)),nn=new Set;function rn(){nn.forEach(e=>e())}function an(){return D.active}function O(){let e=D.active.backend;return e.kind===`local`&&!Zt(e)?e:null}function k(){return D.backends}function on(){return D.selection}function A(){return D}function sn(e){Wt(e),D=$t(D.backends,e),rn()}function cn(e){E(e);let t=D.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,Wt(null)),D=$t(e,t),rn()}function ln(e){return nn.add(e),()=>{nn.delete(e)}}var un=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},dn=e=>{if(!(e instanceof a)||e.response?.status!==401&&e.status!==401)return!1;let t=an().backend;if(t.kind!==`cloud`)return!1;let n=e.config?.url;return!n||n.startsWith(t.host.replace(/\/+$/,``))},fn=new Set,pn=()=>{let e=new s({queryCache:new c({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&tt(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||un(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)&&!dn(t)){let e=Ne(t);fn.has(e||``)||(Re(e||m.t(u.ERROR$GENERIC)),fn.add(e||``),setTimeout(()=>{fn.delete(e||``)},3e3))}}}),mutationCache:new ee({onError:(t,n,r,i)=>{un(t,e),!(i?.meta?.disableToast??i?.options.meta?.disableToast)&&!dn(t)&&Re(Ne(t)||m.t(u.ERROR$GENERIC))}})});return e},mn=null,hn=null,gn=()=>(mn||=pn(),mn),_n=()=>hn??gn(),vn=e=>(hn=e??gn(),hn),yn=new Proxy({},{get:(e,t)=>{let n=_n(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=_n();return Reflect.set(r,t,n,r)}});function bn(e){if(e&&!e.startsWith(`/`))try{let t=new URL(e),n=t.hostname,r=window.location.hostname??window.location.host?.split(`:`)[0];return r&&(n===`localhost`||n===`127.0.0.1`)&&r!==`localhost`&&r!==`127.0.0.1`?`${r}:${t.port}`:t.host}catch{return window.location.host}return window.location.host}function xn(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function Sn(e){let t=bn(e),n=xn(e),r=window.location.protocol===`https:`,i=Cn(e)===`https:`;return`${r||i?`https:`:`http:`}//${t}${n}`}function Cn(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function wn(e){let t=bn(e),n=xn(e),r=window.location.protocol===`https:`,i=Cn(e)===`https:`;return`${r||i?`wss:`:`ws:`}//${t}${n}/sockets/bash-events`}function Tn(e,t){if(!e)return null;let n=bn(t),r=xn(t),i=window.location.protocol===`https:`,a=Cn(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}var En=class extends Error{constructor(){super(`No backend is configured.`),this.name=`NoBackendAvailableError`}};function Dn(e){return e.replace(/\/+$/,``)}function On(e,t){return e.host?Dn(e.host):e.conversationUrl?Dn(Sn(e.conversationUrl)):Dn(t?.host??``)}function kn(e={}){let t=O();if(!t&&!e.host&&!e.conversationUrl)throw new En;let n=e.sessionApiKey??e.apiKey??t?.apiKey??void 0;return{host:On(e,t),...n?{apiKey:n}:{},workingDir:e.workingDir??St(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function An(e){let{host:t,apiKey:n,timeout:r}=kn(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}var jn={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.42.1`,agentCanvas:`1.15.0`,automation:`1.8.0`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`,canvasBasePath:`/canvas`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`},telemetry:{posthogApiKey:`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,posthogHost:`https://us.i.posthog.com`}},Mn=5e3,Nn=`unknown`,j=jn.compatibility.minimumAgentServer,Pn=`AGENT_SERVER_UNSUPPORTED_VERSION`,Fn=`AGENT_SERVER_UNKNOWN_VERSION`,M=null,In=null,Ln=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,N=class extends Error{details;noBackendConfigured;constructor(e,t){let n=t?.noBackendConfigured??!1;super(n?`No agent server backend is configured yet. Add a backend to get started.`:`Could not connect to the configured agent server. Make sure it is running and reachable, then reload the page.`),this.name=`AgentServerUnavailableError`,this.details=e??null,this.noBackendConfigured=n}},Rn=e=>e instanceof N||typeof e==`object`&&!!e&&`name`in e&&(e.name===`AgentServerUnavailableError`||e.name===`AgentServerUnsupportedVersionError`||e.name===`AgentServerUnknownVersionError`),zn=class extends N{code=Pn;actualVersion;requiredVersion=j;constructor(e){let t=`Agent Canvas requires agent-server ${j} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},Bn=class extends N{code=Fn;actualVersion;requiredVersion=j;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${j} or newer, but this backend did not return a valid version from /server_info. Restart or rebuild the agent-server backend, then try again.`;super(t),this.name=`AgentServerUnknownVersionError`,this.message=t,this.actualVersion=e}},Vn=e=>C()&&F(e,401);function P(){M=null,In=null}function Hn(e){return e?.host&&e.host!==In?null:M}function Un(e){let t=Ln(M);return Array.isArray(t)?t.includes(e):!0}function Wn(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function F(e,t){return Wn(e)&&e.status===t}function Gn(e){return typeof e==`string`&&e.trim()||null}function Kn(e){return Gn(e.sdk_version)}function qn(e){return Gn(e.version)??Kn(e)}function Jn(e){let t=qn(e);return!t||t.toLowerCase()===Nn?null:t}function Yn(e){let t=Jn(e);return!t||!Qn(t)?null:t}function Xn(e){return!M||e&&O()?.host!==e?null:Yn(M)}function Zn(e,t){let n=Qn(e),r=Qn(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function Qn(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}function $n(e){let t=Jn(e);if(!t)throw P(),new Bn(qn(e));let n=Zn(t,j);if(n===null)throw P(),new Bn(t);if(n<0)throw P(),new zn(t)}async function er(){let e=O();if(!e){if(P(),Zt(an().backend))throw new N(`No backend configured`,{noBackendConfigured:!0});return null}let t=kn({host:e.host,sessionApiKey:e.apiKey||null,timeout:Mn}),n;try{n=await new re(t).getServerInfo()}catch(e){throw P(),F(e,401)?e:new N(e instanceof Error?e.message:null)}if($n(n),C())try{await new ie(t).getSettings()}catch(e){if(F(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return M=n,In=t.host,n}var tr={WEB_CLIENT_CONFIG:[`web-client-config`],MAIN_APP_COOKIE_AUTH:[`main-app-cookie-auth`]},nr={all:[`settings`],byScope:e=>[`settings`,e],personal:()=>[`settings`,`personal`]},rr={all:[`llm-profiles`]},ir={all:[`agent-profiles`]},ar={all:[`provider-connections`]},or={retry:!1},sr={all:[`llm-subscription`],openaiStatus:[`llm-subscription`,`openai`,`status`],openaiModels:[`llm-subscription`,`openai`,`models`]},cr={all:[`local-workspaces`]},lr={marketplace:[`plugins-marketplace`],installed:[`plugins-installed`],local:[`plugins-local`]},ur={capabilities:()=>[`setup-capabilities`]},dr={latestVersion:[`agent-canvas-latest-version`]},fr={staleTime:1e3*60*5,gcTime:1e3*60*15},pr={name:`@openhands/agent-canvas`,version:`1.15.0`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/OpenHands`},homepage:`https://github.com/OpenHands/OpenHands#readme`,bugs:{url:`https://github.com/OpenHands/OpenHands/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.25`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.18.0`,"@openhands/typescript-client":`1.38.1`,"@react-router/node":`7.18.2`,"@react-router/serve":`7.18.2`,"@tailwindcss/vite":`4.3.3`,"@tanstack/react-query":`5.101.4`,"@types/shell-quote":`1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.18.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,httpxy:`0.5.3`,i18next:`26.3.6`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.1`,isbot:`5.1.39`,"lucide-react":`1.25.0`,"monaco-editor":`0.56.0`,"posthog-js":`1.380.0`,react:`19.2.8`,"react-dom":`19.2.8`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.11`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.18.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`1.9.0`,sirv:`3.0.2`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.6.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.16`,winston:`3.19.0`,"winston-daily-rotate-file":`5.0.0`,zustand:`5.0.14`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:coverage":`npm run make-i18n && vitest run --coverage`,"test:mutation":`npm run make-i18n && stryker run`,"test:mutation:diff":`npm run make-i18n && node scripts/stryker-diff.mjs`,"test:mutation:incremental":`npm run make-i18n && stryker run --incremental`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,postinstall:`node -e "if (process.env.npm_config_global === 'true') { console.log('\\n\\x1b[32m\\x1b[1m\\u2713 @openhands/agent-canvas installed!\\x1b[0m\\n\\nTo start Agent Canvas, run:\\n\\n \\x1b[36m\\x1b[1magent-canvas\\x1b[0m\\n\\nThis launches the full stack at \\x1b[36mhttp://localhost:8000\\x1b[0m.\\n\\nDocs: https://docs.openhands.dev/openhands/usage/agent-canvas/setup\\n') }"`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`,"example:acp-docker:env":`node scripts/gen-acp-docker-env.mjs`,predesktop:`node scripts/brand-dev-electron.mjs`,desktop:`npm run build:app && electron electron`,"build:desktop":`npm run build:app && node scripts/download-uv.mjs && node scripts/download-node.mjs && electron-builder --config electron-builder.config.mjs --publish never`,"build:desktop:universal":`npm run build:app && node scripts/download-uv.mjs && node scripts/download-node.mjs && cross-env ELECTRON_ARCH=universal electron-builder --config electron-builder.config.mjs --publish never`,"download-uv":`node scripts/download-uv.mjs`,"download-node":`node scripts/download-node.mjs`,"generate-icons":`node scripts/generate-icons.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`node scripts/run-staged-typecheck.mjs`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.6`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.62.1`,"@react-router/dev":`7.18.2`,"@stryker-mutator/core":`9.6.1`,"@stryker-mutator/vitest-runner":`9.6.1`,"@tailwindcss/typography":`0.5.20`,"@tanstack/eslint-plugin-query":`5.101.4`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`7.0.0`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`26.1.2`,"@types/react":`19.2.18`,"@types/react-dom":`19.2.4`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.65.0`,"@typescript-eslint/parser":`8.65.0`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.10`,"cross-env":`10.1.0`,electron:`42.3.3`,"electron-builder":`26.15.3`,eslint:`9.39.5`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.5`,"eslint-plugin-i18next":`6.1.5`,"eslint-plugin-import-x":`4.17.1`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.6`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`30.0.1`,"lint-staged":`17.3.0`,msw:`2.15.0`,png2icons:`2.0.1`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.3.3`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.10`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{"@vercel/static-config":{ajv:`8.20.0`},dompurify:`3.4.12`,"typed-rest-client":{qs:`6.15.3`}},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.8`,"react-dom":`19.2.8`,"react-router":`7.18.2`}},mr=`agent_canvas`,hr=pr.version,gr=`X-OpenHands-Client`,_r=`X-OpenHands-Client-Version`,vr=`X-OpenHands-Telemetry-Distinct-Id`,yr={[gr]:mr,[_r]:hr};function br(e){return e?.trim()||`unknown`}function xr(e){return e?.trim()||null}function I({backendKind:e,agentServerVersion:t,automationSdkVersion:n,backendVersion:r,connectionMethod:i}){let a=br(t??r),o=br(n),s=br(r??t);return{backend_kind:e??null,agent_server_version:a,automation_sdk_version:o,backend_version:s,...i?{connection_method:i}:{}}}function Sr(e=null){return{cloud_user_id:xr(e?.userId),cloud_user_email:xr(e?.email),cloud_org_id:xr(e?.orgId)}}var L=`openhands-telemetry-consent`,R=`openhands-telemetry-consent-pending-cloud-sync`,z=`openhands-telemetry-consent-pending-local-revocation`,Cr=`openhands-telemetry-consent-change`,wr=`openhands-telemetry-first-use`,Tr=`openhands-telemetry-session`,Er=`agent-canvas`,Dr=`history_change`,Or=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,kr=`https://z.openhands.dev`,Ar=`https://us.posthog.com`,B=null,V=null,jr,H={},U=!1,W,G=0,K=-1,Mr=Object.freeze({client_source:mr,client_version:hr,package_name:pr.name,package_version:pr.version}),Nr=I({}),Pr=Sr();function Fr(e){Nr=I(e)}function q(e){Pr=Sr(e)}function Ir(e){return e?{...e,properties:{...Nr,...Pr,...e.properties,...Mr}}:null}function Lr(e){U||Z()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function Rr(e,t=!1){e.reset(t),K=-1,Lr(e)}function J(e){if(W===void 0||!$())return;let t=W?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&Rr(e),W===null){K=G;return}(e.get_property(`$user_id`)!==W.distinctId||K!==G)&&(e.identify(W.distinctId,W.properties),K=G)}function zr(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function Br(e){if(e===!1){if(U)return;U=!0,B?.opt_out_capturing(),Q();return}let t=U;if(U=!1,!B&&!V){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));H={...H,...t}}t&&(B&&(Lr(B),J(B)),Q())}function Vr(){return U?null:{apiKey:H.apiKey||Or,apiHost:H.apiHost||kr,uiHost:H.uiHost||Ar}}function Y(){return typeof window<`u`&&typeof localStorage<`u`}async function Hr(){if(!Y())return null;if(B)return B;try{let{default:e}=await n(async()=>{let{default:e}=await import(`./vendor~module-DyG7x7JT.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return e}catch{return null}}function Ur(){return!!(U||typeof process<`u`&&{}.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function Wr(e){B||(jr=e)}async function X(e=!1){if(B)return B;if(V)return V;V=(async()=>{let t=Vr();if(!t)return null;let n=await Hr();if(!n)return null;let r=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,persistence:`localStorage`,persistence_name:Er,consent_persistence_name:`${Er}-consent`,person_profiles:`always`,capture_pageview:Dr,autocapture:!0,disable_session_recording:!0,bootstrap:jr,before_send:Ir},Er);return r?(B=r,jr=void 0,U?B.opt_out_capturing():Z()===`granted`?(B.opt_in_capturing(),J(B)):e||B.opt_out_capturing(),B):null})();try{return await V}finally{B||(V=null)}}function Z(){if(!Y())return`pending`;if(Ur())return`denied`;if(bt()===`cookie`)return`granted`;try{let e=localStorage.getItem(L);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function Gr(){if(!Y())return null;try{let e=localStorage.getItem(R);return e===`granted`||e===`denied`?e:null}catch{return null}}function Kr(){if(!Y())return null;try{return localStorage.getItem(z)}catch{return null}}function qr(e){if(!Y())return()=>{};let t=t=>{(t.key===L||t.key===R)&&e()};return window.addEventListener(Cr,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(Cr,e),window.removeEventListener(`storage`,t)}}function Q(){Y()&&window.dispatchEvent(new Event(Cr))}function Jr(e){if(Y())try{localStorage.setItem(R,e)}catch{}}function Yr(e){if(!(!Y()||!e))try{localStorage.setItem(z,e)}catch{}}function Xr(e){if(Y())try{if(localStorage.getItem(z)!==e)return;localStorage.removeItem(z)}catch{}}function Zr(e){if(Y())try{if(e!==void 0&&localStorage.getItem(R)!==e)return;localStorage.removeItem(R),Q()}catch{}}async function Qr(e,{syncToCloud:t=!0}={}){if(Y())try{let t=Z()===e;if(localStorage.setItem(L,e),U||t)return;let n=B??await X();if(!n)return;e===`granted`?(n.opt_in_capturing(),J(n)):(Yr(n.get_distinct_id?.()??null),n.get_property?.(`$user_id`)==null?n.opt_out_capturing():Rr(n))}catch{}finally{t&&Jr(e),Q()}}async function $r(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(W===n||W!=null&&n!==null&&W.distinctId===n.distinctId&&zr(W.properties,t)||(W=n,G+=1,K=-1,!$()))return;let r=B??await X();r&&$()&&J(r)}function $(){return Z()===`granted`}function ei(){if(!Y())return!1;try{return localStorage.getItem(wr)===`true`}catch{return!1}}function ti(){if(Y())try{localStorage.setItem(wr,`true`)}catch{}}async function ni(){if(Ur()||ei())return;let e=await X(!0);!e||Ur()||((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),ti(),Z()!==`granted`&&e.opt_out_capturing())}function ri(){if(!Y())return!1;try{return sessionStorage.getItem(Tr)===`true`}catch{return!1}}function ii(){if(Y())try{sessionStorage.setItem(Tr,`true`)}catch{}}async function ai(){if(!$()||Z()!==`granted`)return null;let e=await X();return!e||!$()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),J(e),e)}async function oi(){if(ri())return;let e=await ai();e&&(e.capture(`canvas_new_session`,{is_first_use:!ei()}),ii())}async function si(){return(await ai())?.get_distinct_id?.()??null}async function ci(){if(!Y())return null;if(Z()!==`granted`){let e=Kr();if(e)return e}return U||Ur()?null:(await X())?.get_distinct_id?.()??null}async function li(e,t={}){let n=await ai();n&&n.capture(e,t)}async function ui(){if(Y()){try{Yr(B?.get_distinct_id?.()??null),localStorage.removeItem(L),localStorage.removeItem(wr)}catch{}Zr();try{sessionStorage.removeItem(Tr)}catch{}Nr=I({}),Pr=Sr(),W=null,G+=1,K=-1;try{B&&Rr(B,!0)}catch{try{B?.opt_out_capturing()}catch{}}finally{Q()}}}var di=d.createContext(null);function fi(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function pi(e,t){let n=e.backend.kind===`cloud`,r=t.backend.kind===`cloud`;!n&&!r||(q(null),r&&(!n||e.backend.id!==t.backend.id)&&$r(null))}function mi({children:e}){let t=d.useSyncExternalStore(ln,A,A),n=d.useCallback(()=>{P(),yn.invalidateQueries({queryKey:tr.WEB_CLIENT_CONFIG})},[]),r=d.useCallback((e,t)=>{let r=A(),i=on()?.backendId??null,a=on()?.orgId??null,o=t??null;if(e===i&&o===a)return;let s=k(),c=s.find(t=>t.id===e),ee={backend:c??s[0]??Xt,orgId:c?o:null};pi(r.active,ee),sn({backendId:e,orgId:o}),n()},[n]),i=d.useCallback(e=>{let t=A().active,r={...e,id:fi()},i=[...k(),r];return pi(t,{backend:r,orgId:null}),cn(i),sn({backendId:r.id}),n(),r},[n]),a=d.useCallback((e,t)=>{let r=k().find(t=>t.id===e),i=A().active.backend.id,a=t.host!==void 0&&r!==void 0&&t.host!==r.host,o=t.apiKey!==void 0&&r!==void 0&&t.apiKey!==r.apiKey;cn(k().map(n=>n.id===e?{...n,...t,connectionRevision:a||o?(n.connectionRevision??0)+1:n.connectionRevision}:n)),(a||o)&&(nt(e),i===e&&(r?.kind===`cloud`&&(q(null),$r(null)),n()))},[n]),o=d.useCallback(e=>{let t=k().find(t=>t.id===e),r=t?.kind===`cloud`&&A().active.backend.id===t.id;cn(k().filter(t=>t.id!==e)),r&&(q(null),$r(null)),rt(e),n()},[n]),s=d.useMemo(()=>({backends:t.backends,active:t.active,setActive:r,addBackend:i,updateBackend:a,removeBackend:o}),[t,r,i,a,o]);return(0,_.jsx)(di.Provider,{value:s,children:e})}function hi(){let e=d.useContext(di);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function gi(){let e=d.useContext(di);return e?e.active:{backend:w()??Xt,orgId:null}}export{kn as $,dr as A,$e as At,$n as B,h as Bt,I as C,x as Ct,vr as D,Ze as Dt,hr as E,yt as Et,lr as F,Ve as Ft,Yn as G,m as Gt,Zn as H,f as Ht,ar as I,Ne as It,Rn as J,de as Jt,Vn as K,ye as Kt,tr as L,je as Lt,rr as M,Re as Mt,sr as N,ze as Nt,ir as O,et as Ot,cr as P,Be as Pt,En as Q,nr as R,Ae as Rt,oi as S,bt as St,mr as T,Tt,Hn as U,p as Ut,P as V,fe as Vt,Xn as W,ve as Wt,F as X,Wn as Y,er as Z,Qr as _,Ct as _t,Xr as a,_n as at,li as b,wt as bt,Br as c,an as ct,Z as d,A as dt,An as et,si as f,Zt as ft,q as g,it as gt,Fr as h,Dt as ht,Zr as i,gn as it,fr as j,v as jt,or as k,tt as kt,Gr as l,O as lt,X as m,Kt as mt,gi as n,Sn as nt,ui as o,yn as ot,ci as p,ln as pt,Un as q,be as qt,hi as r,Tn as rt,Wr as s,vn as st,mi as t,wn as tt,Kr as u,k as ut,$r as v,xt as vt,yr as w,C as wt,ni as x,St as xt,qr as y,vt as yt,ur as z,ke as zt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as n}from"./sdk-section-page-HTffvm7Q.js";var r=e();function i(){return(0,r.jsx)(n,{settingsSources:[{settingsSource:`agent_settings`,sectionKeys:[`agent_context`]}],testId:`agent-context-settings-screen`})}var a=t(i);export{a as default};
|
|
@@ -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{U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{t as s}from"./useMutation-DFnzkf6f.js";import{It as c,Mt as l,Nt as u,O as d}from"./active-backend-context-DKFSMbn3.js";import{W as f,t as p}from"./utils-DaCIEEQP.js";import{t as m}from"./back-nav-button-Dm9tIjVf.js";import{t as h}from"./loading-spinner-0L3ZTToZ.js";import{t as g}from"./brand-button-Dxv6PDeN.js";import{i as _}from"./dropdown-classes-DJe-E6MC.js";import{t as v}from"./settings-dropdown-input-tM0A0ipy.js";import{t as y}from"./use-llm-profiles-djGAhTWL.js";import{n as b,t as x}from"./use-agent-profiles-DWBPC0Si.js";import{i as S,n as C,t as w}from"./use-can-manage-org-profiles-BWMahtUh.js";import{t as T}from"./u-edit-DAkcF52u.js";import{r as E}from"./typography-SgFy466J.js";import{o as D}from"./extension-module-card-classes-DpeaYhYo.js";import{i as O,n as k,o as A,r as j,t as M}from"./badge-D4SqUCsR.js";import{t as N}from"./u-check-circle-BKn1spCL.js";import{i as P,n as F,r as I,t as L}from"./settings-list-classes-BJ0g8rWj.js";import{n as R}from"./settings-section-header-context-BOJ_Fbak.js";import{t as z}from"./use-save-agent-profile-DdBSTdpN.js";import{n as B}from"./use-activate-agent-profile-B2NS8nA5.js";import{t as V}from"./merge-agent-profile-save-input-WcFmQVKK.js";import{i as H,t as U}from"./agent-settings-351vXWc9.js";var W=e(t(),1),G=e(n(),1),K=r();function q({onEdit:e,onSetActive:t,onDelete:n,isActive:r,isActivating:i,onClose:a,anchorRef:s}){let{t:c}=o(`openhands`),l=(0,W.useRef)(null),u=(0,W.useRef)([]),d=s?.current??null,[m,h]=(0,W.useState)();(0,W.useLayoutEffect)(()=>{if(!d)return;let e=()=>{let e=d.getBoundingClientRect();e&&h({position:`fixed`,zIndex:9999,top:e.bottom+8,right:window.innerWidth-e.right,width:`max-content`})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[d]),(0,W.useEffect)(()=>{u.current[0]?.focus()},[]),(0,W.useEffect)(()=>{let e=e=>{let t=e.target;l.current?.contains(t)||d?.contains(t)||a()},t=e=>{e.key===`Escape`&&a()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[d,a]);let g=e=>{e(),a()},v=(0,W.useCallback)((e,t)=>{if(e.key===`Tab`){a();return}let n=u.current.filter(Boolean).length;if(e.key===`ArrowDown`){e.preventDefault();let r=(t+1)%n;u.current[r]?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let r=(t-1+n)%n;u.current[r]?.focus()}},[a]),y=r||i,b=!!d,x=(0,K.jsxs)(`div`,{ref:l,className:p(`absolute right-0 top-full z-10 mt-2 w-[160px] rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`,_,b&&`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`),role:`menu`,"aria-orientation":`vertical`,"data-testid":`agent-profile-actions-menu`,children:[(0,K.jsx)(k,{index:0,icon:(0,K.jsx)(T,{width:16,height:16}),label:c(f.SETTINGS$PROFILE_EDIT),onClick:()=>g(e),onKeyDown:v,menuItemsRef:u,testId:`agent-profile-edit`}),(0,K.jsx)(k,{index:1,icon:(0,K.jsx)(N,{width:16,height:16}),label:c(f.SETTINGS$PROFILE_SET_ACTIVE),onClick:()=>g(t),onKeyDown:v,menuItemsRef:u,disabled:y,testId:`agent-profile-set-active`}),(0,K.jsx)(k,{index:2,icon:(0,K.jsx)(S,{width:16,height:16}),label:c(f.BUTTON$DELETE),onClick:()=>g(n),onKeyDown:v,menuItemsRef:u,testId:`agent-profile-delete`})]});return b?typeof document>`u`||!m?null:G.createPortal((0,K.jsx)(`div`,{style:m,children:x}),document.body):x}function J({profile:e,isActive:t,canManage:n,onActivate:r,onEdit:i,onDelete:a,isActivating:s}){let{t:c}=o(`openhands`),[l,u]=(0,W.useState)(!1),d=(0,W.useRef)(null),m=e.agent_kind===`openhands`?e.llm_profile_ref:c(f.SETTINGS$AGENT_TYPE_ACP);return(0,K.jsxs)(`div`,{"data-testid":`agent-profile-row`,className:p(P,`justify-between gap-3`),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm font-medium text-white`,title:e.name,children:e.name}),m?(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm text-[var(--oh-muted)]`,title:m,children:m}):null,t&&(0,K.jsx)(M,{className:`shrink-0 whitespace-nowrap px-2.5 py-1 text-xs`,"data-testid":`agent-profile-active-badge`,children:c(f.SETTINGS$PROFILE_DEFAULT)})]}),n&&(0,K.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,K.jsx)(C,{ref:d,onClick:()=>u(e=>!e),ariaLabel:c(f.SETTINGS$PROFILE_MENU),testId:`agent-profile-menu-trigger`,className:I}),l&&(0,K.jsx)(q,{anchorRef:d,onEdit:()=>i(e),onSetActive:()=>r(e),onDelete:()=>a(e),isActive:t,isActivating:s,onClose:()=>u(!1)})]})]})}function Y({isLoading:e,loadError:t,profiles:n,activeId:r,canManage:i,onActivate:a,onEdit:s,onDelete:c,isActivating:l}){let{t:u}=o(`openhands`);return e?(0,K.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,K.jsx)(h,{size:`large`})}):t?(0,K.jsx)(`div`,{"data-testid":`agent-profiles-load-error`,className:D,children:(0,K.jsx)(`p`,{className:`text-sm text-red-400`,children:u(f.SETTINGS$PROFILES_LOAD_ERROR)})}):n.length===0?(0,K.jsx)(`div`,{"data-testid":`agent-profiles-empty`,className:D,children:(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:u(f.SETTINGS$PROFILES_EMPTY)})}):(0,K.jsx)(`div`,{className:p(L,F),children:n.map(e=>(0,K.jsx)(J,{profile:e,isActive:!!e.id&&e.id===r,canManage:i,onActivate:a,onEdit:s,onDelete:c,isActivating:l},e.name))})}function X(){let e=a();return s({mutationFn:e=>b.deleteProfile(e),onSuccess:async()=>{await e.invalidateQueries({queryKey:d.all})},meta:{disableToast:!0}})}function Z({profile:e,onClose:t}){let{t:n}=o(`openhands`),r=X(),i=(0,W.useRef)(null);if(!e)return null;let a=async()=>{try{await r.mutateAsync(e.name),u(n(f.SETTINGS$PROFILE_DELETED,{name:e.name})),t()}catch(e){l(e instanceof Error?e.message:n(f.ERROR$GENERIC))}},s=()=>{r.isPending||t()},c=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(g,{ref:i,type:`button`,variant:`tertiary`,onClick:s,isDisabled:r.isPending,children:n(f.BUTTON$CANCEL)}),(0,K.jsx)(g,{testId:`delete-agent-profile-confirm`,type:`button`,variant:`danger`,onClick:a,isDisabled:r.isPending,"aria-busy":r.isPending,children:r.isPending?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(h,{size:`small`}),(0,K.jsx)(`span`,{className:`sr-only`,children:n(f.BUTTON$DELETE)})]}):n(f.BUTTON$DELETE)})]});return(0,K.jsx)(j,{isOpen:!0,title:n(f.SETTINGS$PROFILE_DELETE_TITLE),footer:c,onClose:s,initialFocusRef:i,children:(0,K.jsx)(`p`,{className:`text-sm break-all`,children:n(f.SETTINGS$PROFILE_DELETE_CONFIRMATION,{name:e.name})})})}function Q({onAddProfile:e,onEditProfile:t}){let{t:n}=o(`openhands`),{data:r,isLoading:i,error:a}=x(),s=B(),c=w(),[l,d]=(0,W.useState)(null),p=r?.profiles??[],m=r?.active_agent_profile_id??null;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsx)(`h2`,{className:`text-base font-medium text-white`,children:n(f.SETTINGS$AVAILABLE_PROFILES)}),e&&c?(0,K.jsx)(g,{testId:`add-agent-profile`,type:`button`,variant:`secondary`,className:`ml-auto`,onClick:e,children:n(f.SETTINGS$ADD_AGENT_PROFILE)}):null]}),(0,K.jsx)(Y,{isLoading:i,loadError:a??null,profiles:p,activeId:m,canManage:c,onActivate:async e=>{if(e.id)try{await s.mutateAsync(e.id),u(n(f.SETTINGS$PROFILE_ACTIVATED,{name:e.name}))}catch(e){console.error(`Failed to activate agent profile:`,e)}},onEdit:e=>t?.(e),onDelete:d,isActivating:s.isPending})]}),(0,K.jsx)(Z,{profile:l,onClose:()=>d(null)})]})}function $(){let e=a();return s({mutationFn:({name:e,newName:t})=>b.renameProfile(e,t),onSuccess:async()=>{await e.invalidateQueries({queryKey:d.all})},meta:{disableToast:!0}})}function ee(e){return e.agent_kind===`acp`?{agent_kind:`acp`,acp_server:e.acp_server,acp_command:e.acp_command?H(e.acp_command):[],acp_args:e.acp_args??[],acp_model:e.acp_model??``}:{agent_kind:`openhands`,enable_sub_agents:e.enable_sub_agents,tool_concurrency_limit:e.tool_concurrency_limit}}function te(){let{t:e}=o(`openhands`),{setHideSectionHeader:t}=R(),n=z(),r=$(),{data:i}=x(),{data:a,isLoading:s}=y(),[d,p]=(0,W.useState)(`list`),[h,_]=(0,W.useState)(``),[S,C]=(0,W.useState)(null),[w,T]=(0,W.useState)(null),[D,k]=(0,W.useState)(``),[j,M]=(0,W.useState)(null),[N,P]=(0,W.useState)(!1);(0,W.useEffect)(()=>(t(d!==`list`),()=>t(!1)),[d,t]);let F=a?.profiles??[],I=a?.active_profile??F[0]?.name??``,L=(0,W.useMemo)(()=>new Set(i?.profiles?.map(e=>e.name)??[]),[i]),B=(0,W.useMemo)(()=>!(!A(h,{isRequired:!0})||d===`create`&&L.has(h)||d===`edit`&&h!==S?.name&&L.has(h)),[h,d,L,S?.name]),H=(0,W.useCallback)(()=>{_(``),C(null),T({agent_kind:`openhands`}),k(I),M(null),p(`create`)},[I]),G=(0,W.useCallback)(async t=>{try{let e=(await b.getProfile(t.name,`encrypted`)).profile;C(e),T(ee(e)),e.agent_kind===`openhands`?k(s||F.some(t=>t.name===e.llm_profile_ref)?e.llm_profile_ref:I):k(``),_(e.name),M(null),p(`edit`)}catch(t){console.error(`Failed to fetch agent profile:`,t),l(e(f.ERROR$GENERIC))}},[e,F,s,I]),q=(0,W.useCallback)(()=>{p(`list`),C(null),_(``),T(null),M(null)},[]),J=(0,W.useCallback)(async()=>{if(!j||!B)return;let t;try{let n=j.buildAgentProfileFields();if(n.agent_kind===`openhands`){if(!D){l(e(f.SETTINGS$AGENT_PROFILE_LLM_REQUIRED));return}t={...n,llm_profile_ref:D}}else t=n}catch(t){l(t instanceof Error?t.message:e(f.ERROR$GENERIC));return}let i=h.trim(),a=S?.name,o=d===`edit`&&a&&a!==i;P(!0);try{if(j.credentials.isDirty){if(!await j.credentials.save({silent:!0}))return;j.credentials.reset()}o&&await r.mutateAsync({name:a,newName:i});let s=V(d===`edit`?S:null,t);await n.mutateAsync({name:i,profile:s}),u(e(d===`create`?f.SETTINGS$PROFILE_CREATED:f.SETTINGS$PROFILE_UPDATED,{name:i})),q()}catch(t){l(c(t)||e(f.ERROR$GENERIC))}finally{P(!1)}},[j,B,D,h,d,S,n,r,e,q]);if(d===`list`)return(0,K.jsx)(Q,{onAddProfile:H,onEditProfile:G});let Y=e(d===`edit`?f.SETTINGS$EDIT_AGENT_PROFILE:f.SETTINGS$ADD_AGENT_PROFILE),X=d===`edit`&&S?e(f.SETTINGS$PROFILE_LOADED,{name:S.name}):e(f.SETTINGS$PROFILE_SAVE_HINT),Z=j?.agentType!==`acp`;return(0,K.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(m,{testId:`back-to-agent-profiles`,onClick:q,children:e(f.BUTTON$BACK)}),(0,K.jsx)(E.H2,{testId:`agent-profile-editor-title`,children:Y}),(0,K.jsx)(`p`,{"data-testid":`agent-profile-editor-description`,className:`text-sm leading-5 text-tertiary-light`,children:X})]}),(0,K.jsx)(O,{testId:`agent-profile-name-input`,value:h,onChange:_,isRequired:!0}),(0,K.jsx)(U,{embedded:!0,agentSettingsOverride:w,onSaveControlChange:M},d===`edit`?`edit-${S?.id}`:`new-profile`),Z&&(F.length>0?(0,K.jsx)(v,{testId:`agent-profile-llm-selector`,name:`agent-profile-llm`,label:e(f.SETTINGS$AGENT_PROFILE_LLM_LABEL),items:F.map(e=>({key:e.name,label:e.model?`${e.name} (${e.model})`:e.name})),selectedKey:D,onSelectionChange:e=>e&&k(String(e))}):(0,K.jsx)(`p`,{"data-testid":`agent-profile-no-llm`,className:`text-sm text-red-400`,children:e(f.SETTINGS$AGENT_PROFILE_NO_LLM)})),(0,K.jsxs)(`div`,{className:`flex justify-start gap-3 pt-4`,children:[(0,K.jsx)(g,{testId:`cancel-agent-profile-btn`,type:`button`,variant:`secondary`,onClick:q,children:e(f.BUTTON$CANCEL)}),(0,K.jsx)(g,{testId:`save-agent-profile-btn`,type:`button`,variant:`primary`,onClick:J,isDisabled:!B||N||!j?.isValid,"aria-busy":N,children:e(N?f.SETTINGS$SAVING:f.BUTTON$SAVE)})]})]})}var ne={hideTitle:!1},re=i(function(){return(0,K.jsx)(te,{})});export{re as default,ne as handle};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/secrets-service-BTor9uAU.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/active-backend-context-DKFSMbn3.js","assets/vendor-styling-Ck5D_A2Q.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js","assets/utils-DaCIEEQP.js","assets/proxy-tcFL2yTQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{xt as e}from"./vendor-styling-Ck5D_A2Q.js";import{_ as t,b as n,l as r,p as i,v as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{$ as o,Q as s,U as c,_t as l,ct as u,lt as ee,nt as d,q as f,ut as p,w as te,xt as m}from"./active-backend-context-DKFSMbn3.js";import{D as ne}from"./utils-DaCIEEQP.js";import{r as h,t as g}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js";import{t as _}from"./proxy-tcFL2yTQ.js";import{t as v}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js";import{t as y}from"./settings-DcNPxz0v.js";import{t as re}from"./settings-service.api-B2agVfjL.js";import{t as ie}from"./profiles-service.api-QB-T_u-g.js";import{f as b,o as x,s as S}from"./acp-providers-BKvmTf82.js";import{d as C,f as w,r as ae}from"./llm-subscription-DTqtBCWz.js";import{t as oe}from"./llm-subscription-service-BpPfzW4x.js";var T=[];for(let e=0;e<256;++e)T.push((e+256).toString(16).slice(1));function se(e,t=0){return(T[e[t+0]]+T[e[t+1]]+T[e[t+2]]+T[e[t+3]]+`-`+T[e[t+4]]+T[e[t+5]]+`-`+T[e[t+6]]+T[e[t+7]]+`-`+T[e[t+8]]+T[e[t+9]]+`-`+T[e[t+10]]+T[e[t+11]]+T[e[t+12]]+T[e[t+13]]+T[e[t+14]]+T[e[t+15]]).toLowerCase()}var ce=new Uint8Array(16);function le(){return crypto.getRandomValues(ce)}function E(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():ue(e,t,n)}function ue(e,t,n){e||={};let r=e.random??e.rng?.()??le();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return se(r)}var D=new Map;function de(e){return/^([/\\]|[a-zA-Z]:[/\\])/.test(e)}function fe(e,t){return`${e.replace(/[/\\]+$/,``)}/${t.replace(/^[/\\]+/,``)}`}async function pe(e={}){let n=o(e),r=n.host,i=D.get(r);if(i)return i;let a=(async()=>{let{home:e}=await new t(n).getHome();if(!e||typeof e!=`string`)throw Error(`Agent server returned an empty home directory`);return e.replace(/[/\\]+$/,``)})();D.set(r,a);try{return await a}catch(e){throw D.delete(r),e}}async function me(e,t={}){let n=e.replace(/[/\\]+$/,``);return n?de(n)?n:fe(await pe(t),n):pe(t)}var O=`openhands-agent-server-conversation-metadata`,he=e=>({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}),k=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(O);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:t}catch{return{}}},ge=e=>{if(!(typeof window>`u`)){if(Object.keys(e).length===0){window.localStorage.removeItem(O);return}window.localStorage.setItem(O,JSON.stringify(e))}},A=e=>k()[e]??null,j=(e,t)=>{let n=k();n[e]=t,ge(n)},M=e=>{let t=k();e in t&&(delete t[e],ge(t))};function N(e){if(!e?.id)return e;let t=A(e.id);return t?{...e,selected_repository:e.selected_repository??t.selected_repository??null,selected_branch:e.selected_branch??t.selected_branch??null,git_provider:e.git_provider??t.git_provider??null,selected_workspace:e.selected_workspace??t.selected_workspace??null}:e}function P(){let e=u().backend;if(e.kind!==`cloud`)throw Error(`Cloud conversations call requires a cloud backend.`);return e}function _e(){let e=u().backend;return e.kind===`cloud`?e:p().find(e=>e.kind===`cloud`&&!!e.apiKey)??null}async function ve(e=20,t){let n=P(),r=new URLSearchParams;r.set(`limit`,String(e)),t&&r.set(`page_id`,t),r.set(`sort_order`,`UPDATED_AT_DESC`);let i=await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/search?${r.toString()}`});return{items:(i?.items??[]).map(e=>N(e)),next_page_id:i?.next_page_id??null}}async function F(e){if(e.length===0)return[];let t=P(),n=new URLSearchParams;for(let t of e)n.append(`ids`,t);return(await _({backend:t,method:`GET`,path:`/api/v1/app-conversations?${n.toString()}`})??[]).map(N)}async function I(e,t){return await _({backend:t??P(),method:`POST`,path:`/api/v1/app-conversations`,body:e,headers:te})}async function ye(e){return _({backend:P(),method:`GET`,path:`/api/v1/app-conversations/${e}/download`,responseType:`blob`})}async function be(e){await _({backend:P(),method:`DELETE`,path:`/api/v1/app-conversations/${e}`})}async function xe(e,t){return await _({backend:P(),method:`PATCH`,path:`/api/v1/app-conversations/${e}`,body:{public:t}})}async function Se(e){await _({backend:P(),method:`POST`,path:`/api/v1/sandboxes/${e}/pause`})}async function Ce(e){await _({backend:P(),method:`POST`,path:`/api/v1/sandboxes/${e}/resume`})}async function L(e,t){let n=P(),r=new URLSearchParams;return r.append(`file_path`,t),await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/file?${r.toString()}`})??``}async function we(e,t){let n=P(),r=new URLSearchParams;r.append(`path`,t);let i=await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/files?${r.toString()}`});return Array.isArray(i)?i:[]}async function R(e,t){let n=t??P(),r=new URLSearchParams;return r.set(`ids`,e),(await _({backend:n,method:`GET`,path:`/api/v1/app-conversations/start-tasks?${r.toString()}`}))?.[0]??null}function Te(e){return e.kind===`cloud`&&e.authMode===`cookie`||!e.apiKey?{}:e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}}function z(e){if(!e?.usage_to_metrics)return{accumulated_cost:0,max_budget_per_task:null,accumulated_token_usage:null};let t=0,n=null,r=null;for(let i of Object.values(e.usage_to_metrics))t+=i.accumulated_cost,n===null&&i.max_budget_per_task!==null&&(n=i.max_budget_per_task),i.accumulated_token_usage&&(r=r===null?{...i.accumulated_token_usage}:{prompt_tokens:r.prompt_tokens+i.accumulated_token_usage.prompt_tokens,completion_tokens:r.completion_tokens+i.accumulated_token_usage.completion_tokens,cache_read_tokens:r.cache_read_tokens+i.accumulated_token_usage.cache_read_tokens,cache_write_tokens:r.cache_write_tokens+i.accumulated_token_usage.cache_write_tokens,context_window:Math.max(r.context_window,i.accumulated_token_usage.context_window),per_turn_token:Math.max(r.per_turn_token,i.accumulated_token_usage.per_turn_token)});return{accumulated_cost:t,max_budget_per_task:n,accumulated_token_usage:r}}function Ee(e){return z(e.stats)}var B=`canvas_ui`,V=`canvas_ui_control`,De=`ClientAction_${V}`,Oe={name:V,description:`The user is interacting with you inside Agent Canvas — a web UI with a chat panel on the left and a tabbed right-side panel (files, terminal, browser, vscode, planner, tasklist). This tool lets you drive that right-side panel so the user sees what you just produced.
|
|
3
|
+
|
|
4
|
+
They will NOT see the files you wrote, the terminal output, or the browser
|
|
5
|
+
unless you call this tool to switch the right-side panel to the relevant
|
|
6
|
+
tab. Call this every time you finish work that produces something the user
|
|
7
|
+
should look at — don't rely on them noticing on their own.
|
|
8
|
+
|
|
9
|
+
When to call (pick the most specific option that matches your last action):
|
|
10
|
+
|
|
11
|
+
* You wrote or modified a single file (ANY language, ANY size — including
|
|
12
|
+
small scripts like a hello-world bash file) →
|
|
13
|
+
command="navigate_to_file", path=<workspace-relative path of that file>
|
|
14
|
+
|
|
15
|
+
* You generated an HTML page, image, SVG, PDF, markdown report, or other
|
|
16
|
+
previewable artifact →
|
|
17
|
+
command="show_preview", path=<that file>
|
|
18
|
+
|
|
19
|
+
* You finished editing multiple files in one logical step →
|
|
20
|
+
command="open_tab", tab="files"
|
|
21
|
+
(The Files tab automatically renders a diff view when the workspace has
|
|
22
|
+
uncommitted git changes, which covers the "highlight changes" case.)
|
|
23
|
+
|
|
24
|
+
* You ran a long-running terminal command, or one whose output the user
|
|
25
|
+
should inspect →
|
|
26
|
+
command="open_tab", tab="terminal"
|
|
27
|
+
|
|
28
|
+
* You browsed to a URL the user should see →
|
|
29
|
+
First call browser_get_state(include_screenshot=true) after your final
|
|
30
|
+
browser interaction so Agent Canvas has a screenshot to display, then call
|
|
31
|
+
command="open_tab", tab="browser"
|
|
32
|
+
(browser_navigate alone only updates the URL; without browser_get_state,
|
|
33
|
+
the Browser tab will open without a screenshot.)
|
|
34
|
+
|
|
35
|
+
Call this BEFORE writing your chat-message summary of the change, so the
|
|
36
|
+
artifact is visible while the user reads what you did. One canvas_ui_control
|
|
37
|
+
call per logical step is enough — don't repeat it for the same file or tab in
|
|
38
|
+
the same turn.`,parameters:{type:`object`,additionalProperties:!1,properties:{command:{type:`string`,enum:[`navigate_to_file`,`open_tab`,`show_preview`],description:`UI command to dispatch.`},path:{type:`string`,description:`Workspace-relative file path. Required for navigate_to_file and show_preview; ignored otherwise.`},tab:{type:`string`,enum:[`files`,`browser`,`vscode`,`terminal`,`planner`,`tasklist`],description:`Tab to open. Required for open_tab; ignored otherwise.`}},required:[`command`]},annotations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},H=`launch_child_conversation`,ke=`ClientAction_${H}`,Ae=`[child-conversation] `,je=[`local`,`cloud`],Me=[`worktree`,`shared`],Ne=`1.37.1`,Pe={name:H,description:`Start a NEW, independent conversation to work on a well-scoped task in parallel with this one, without the user having to run any CLI command. The new conversation is recorded as a child of this one.
|
|
39
|
+
|
|
40
|
+
The child runs on its own. It does not block you, you do not see its output,
|
|
41
|
+
and it cannot see this conversation's history — everything it needs must be in
|
|
42
|
+
the task brief.
|
|
43
|
+
|
|
44
|
+
Choosing target:
|
|
45
|
+
|
|
46
|
+
* target="local" — runs on the same machine, in this conversation's workspace.
|
|
47
|
+
Fast, no repository clone, no sandbox provisioning. Use this by default when
|
|
48
|
+
the work is on code that is already checked out here.
|
|
49
|
+
|
|
50
|
+
* target="cloud" — runs on OpenHands Cloud in its own isolated sandbox, from a
|
|
51
|
+
git repository. Use this when the work should not touch the user's machine or
|
|
52
|
+
when it needs a repository that is not checked out locally. Requires the user
|
|
53
|
+
to have an OpenHands Cloud backend connected in Agent Canvas; if none is
|
|
54
|
+
connected you will be told so and should fall back to target="local".
|
|
55
|
+
|
|
56
|
+
Writing the task brief:
|
|
57
|
+
|
|
58
|
+
* Put everything the child needs in "task": the goal, the relevant file paths,
|
|
59
|
+
the constraints, the expected deliverable, and how it should report back.
|
|
60
|
+
* Keep each child's scope independent of its siblings so parallel children do
|
|
61
|
+
not fight over the same files.
|
|
62
|
+
* One call per delegated task. Do NOT call this tool twice for the same task.
|
|
63
|
+
|
|
64
|
+
Parameter rules (a call that breaks one of these launches nothing and comes
|
|
65
|
+
back with corrective guidance):
|
|
66
|
+
|
|
67
|
+
* "repository" and "branch" apply to target="cloud" only. A local child always
|
|
68
|
+
inherits this conversation's workspace, so do not pass them with
|
|
69
|
+
target="local".
|
|
70
|
+
* "isolation" applies to target="local" only. Cloud sandboxes are always
|
|
71
|
+
isolated, so do not pass it with target="cloud".
|
|
72
|
+
* isolation="worktree" (the default) gives the child its own git worktree and
|
|
73
|
+
branch, cut from the repository's default branch — it will NOT see this
|
|
74
|
+
conversation's uncommitted or committed work. isolation="shared" puts the
|
|
75
|
+
child in this conversation's exact directory; only choose it when the child
|
|
76
|
+
genuinely must see work in progress, and expect the two agents to conflict.
|
|
77
|
+
|
|
78
|
+
What comes back: this tool is acknowledged immediately, before the conversation
|
|
79
|
+
exists. The real outcome arrives moments later as a follow-up message starting
|
|
80
|
+
with "${Ae.trim()}" that carries the child's
|
|
81
|
+
conversation id, URL, target and initial status — or an error with guidance.
|
|
82
|
+
Wait for it, then tell the user what you launched and give them the URL. If it
|
|
83
|
+
reports an error, fix the parameters and call this tool again.`,parameters:{type:`object`,additionalProperties:!1,properties:{target:{type:`string`,enum:[...je],description:`Where the child runs. 'local' reuses this machine and this conversation's workspace; 'cloud' runs in an isolated OpenHands Cloud sandbox.`},task:{type:`string`,description:`Self-contained task brief, sent as the child's first message. The child cannot see this conversation, so state the goal, constraints, expected output and handoff criteria.`},title:{type:`string`,description:`Optional short title for the child conversation. Omit to let it title itself from the task.`},repository:{type:`string`,description:`target='cloud' only. Repository to clone into the sandbox, as 'owner/repo'. Defaults to this conversation's repository when it has one.`},branch:{type:`string`,description:`target='cloud' only, and only together with 'repository'. Defaults to the repository's default branch.`},isolation:{type:`string`,enum:[...Me],description:`target='local' only. 'worktree' (default) gives the child its own git worktree and branch; 'shared' runs it in this conversation's exact directory.`}},required:[`target`,`task`]},annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},Fe=[`terminal`,`file_editor`,`task_tracker`],Ie=`browser_tool_set`,Le=`task_tool_set`;function Re(){return!0}function U(e){if(typeof e==`string`){let t=e.trim();if(!t)return null;try{return U(JSON.parse(t))}catch{return null}}if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;return!t.services||typeof t.services!=`object`?null:t}async function ze(){let e;try{e=o({timeout:3e3})}catch{return null}let t=U(c({host:e.host})?.runtime_services);if(t)return t;try{return U((await new n(e).getServerInfo()).runtime_services)}catch{return null}}function Be(e){let t=U(e);if(!t?.services)return;let n=[];n.push(`<RUNTIME_SERVICES>`),t.mode?n.push(`You are running inside an agent-canvas dev stack started in '${t.mode}' mode.`):n.push(`You are running inside an agent-canvas dev stack.`),n.push(`The following services are reachable from your sandbox. URLs are written`,`from your point of view (i.e., as you should curl/fetch them).`,``);let{agent_server:r,ingress:i,automation:a}=t.services,{frontend:o}=t.services;r?.url_from_agent&&n.push(`* Agent Server (you): ${r.url_from_agent}`,` ${r.description??`The agent-server hosting your tool calls.`}`),i?.url_from_agent&&n.push(`* Ingress: ${i.url_from_agent}`,` ${i.description??`Unified entry point for browser-facing traffic.`}`),o?.url_from_agent&&n.push(`* Frontend: ${o.url_from_agent}`,` ${o.description??`Frontend dev server.`}`),a?.url_from_agent?(n.push(`* Automation backend: ${a.url_from_agent}`,` ${a.description??`OpenHands Automations service.`}`),a.docs_url&&n.push(` Docs: ${a.docs_url}`),a.openapi_url&&n.push(` OpenAPI: ${a.openapi_url}`),a.auth_env_var&&n.push(` Auth: header 'X-Session-API-Key: $${a.auth_env_var}'`)):n.push(`* Automation backend: not running in this dev mode (skip /api/automation calls).`);let s=r?.url_from_agent;return n.push(``,`Trust this block over guessing: do not assume any other URLs are running.`),s&&n.push(`In particular, ${s} inside your sandbox is the Agent Server`,`you are running inside of — NOT the automation backend.`),n.push(`</RUNTIME_SERVICES>`),n.join(`
|
|
84
|
+
`)}function Ve(e){let{host:t}=o();return`${t}/api/conversations/${e}`}function He(e){return`Conversation ${e.slice(0,5)}`}function Ue(e){let t=A(e.id),n=e.agent?.kind===`ACPAgent`,r=n?e.tags?.acpserver??e.agent?.acp_server??null:null;return{id:e.id,created_by_user_id:null,selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,active_profile:t?.active_profile??null,title:e.title?.trim()?e.title:He(e.id),trigger:null,pr_number:[],agent_kind:n?`acp`:`openhands`,acp_server:r,tags:e.tags??null,launched_agent_profile:e.launched_agent_profile??null,llm_model:n?b({runtimeName:e.current_model_name,runtimeId:e.current_model_id,configured:e.agent?.acp_model,sdkLlm:e.agent?.llm?.model}):e.agent?.llm?.model??y.llm_model,metrics:e.metrics?{accumulated_cost:e.metrics.accumulated_cost??null,max_budget_per_task:e.metrics.max_budget_per_task??null,accumulated_token_usage:e.metrics.accumulated_token_usage?{prompt_tokens:e.metrics.accumulated_token_usage.prompt_tokens??0,completion_tokens:e.metrics.accumulated_token_usage.completion_tokens??0,cache_read_tokens:e.metrics.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:e.metrics.accumulated_token_usage.cache_write_tokens??0,context_window:e.metrics.accumulated_token_usage.context_window??0,per_turn_token:e.metrics.accumulated_token_usage.per_turn_token??0}:null}:z(e.stats),created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??ne.IDLE,sandbox_status:e.sandbox_status??null,conversation_url:Ve(e.id),session_api_key:o().apiKey??null,sandbox_id:null,workspace:{working_dir:e.workspace?.working_dir??m()},public:!1,sub_conversation_ids:[]}}function We(e){return{items:e.items.map(Ue),next_page_id:e.next_page_id??null}}var Ge=`acpserver`,W=`clientsource`,Ke=`agentcanvas`,qe=`automationtrigger`,Je=`automationid`,Ye=`automationname`,Xe=`automationrunid`,Ze=[qe,Je,Ye,Xe],Qe=new Set([Ge,W,Je,Xe,`title`,`git_provider`,`repo_name`,`repo`,`repository`,`selected_branch`,`branch`,`archiveworkspacepath`,`workspace`,`working_dir`]),$e=[`origin`];function et(e){if(!e)return[];let t=e=>{let t=$e.indexOf(e.trim().toLowerCase());return t===-1?1/0:t};return Object.entries(e).filter(([e,t])=>!Qe.has(e.trim().toLowerCase())&&typeof t==`string`&&t.trim().length>0).sort(([e],[n])=>{let r=t(e),i=t(n);return r===i?e.localeCompare(n):r-i})}var tt=`gAAAAA`,nt=new Set([`schema_version`,`agent_settings`,`workspace`,`conversation_id`,`initial_message`,`plugins`]);function G(e){return!e||typeof e!=`object`||Array.isArray(e)?{}:structuredClone(e)}function rt(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function it(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function K(e){return typeof e==`string`?e.startsWith(tt):Array.isArray(e)?e.some(K):it(e)?Object.values(e).some(K):!1}function at(e){return it(e)?Object.values(e).some(K):!1}function ot(e){return e.confirmation_mode===!0?e.security_analyzer===`llm`?{kind:`ConfirmRisky`,threshold:`HIGH`,confirm_unknown:!0}:{kind:`AlwaysConfirm`}:{kind:`NeverConfirm`}}function st(e){switch(e.security_analyzer){case`llm`:return{kind:`LLMSecurityAnalyzer`};case`pattern`:return{kind:`PatternSecurityAnalyzer`};case`policy_rail`:return{kind:`PolicyRailSecurityAnalyzer`};default:return}}function ct(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`}function q(e,t){return e===Ie?Re()&&f(e):e===Le?t.enable_sub_agents===!0&&f(e):!0}function lt(e){let t=new Map;for(let n of Fe)q(n,e)&&t.set(n,{name:n,params:{}});for(let n of[Ie,Le])q(n,e)&&t.set(n,{name:n,params:{}});let n=e.tools;if(Array.isArray(n)&&n.every(e=>ct(e)))for(let r of n)q(r.name,e)&&t.set(r.name,{name:r.name,params:G(r.params)});return Array.from(t.values())}function ut(e,t){let n=[e?.trim(),t?.trim()].filter(Boolean);return n.length===0?null:{role:`user`,content:[{type:`text`,text:n.join(`
|
|
85
|
+
|
|
86
|
+
`)}],run:!0}}function dt(){return v.map(e=>{let t=e.triggers?.length>0?{type:`keyword`,keywords:e.triggers}:null,n=`/home/runner/work/OpenHands/OpenHands/node_modules/@openhands/extensions/skills/${e.name}/SKILL.md`;return{name:e.name,content:e.content,trigger:t,source:n,description:e.description??null,is_agentskills_format:!0,...e.license?{license:e.license}:{},...e.compatibility?{compatibility:e.compatibility}:{}}})}function ft(e,t,n=[]){let r=Be(t),i=G(e.agent_context),a=Array.isArray(i.skills)?i.skills:[],o=new Set(n),s=[...a,...dt()].filter(e=>typeof e.name!=`string`||!o.has(e.name));return{...i,skills:s,load_public_skills:!1,load_user_skills:!0,load_project_skills:!0,...r?{system_message_suffix:r}:{}}}function pt(e){return G(e.agent_settings).agent_kind===`acp`}function mt(e){let t=G(e.agent_settings).acp_server;return typeof t==`string`&&t.length>0?t:void 0}function ht(e){let t=e.acp_command;if(!(Array.isArray(t)&&t.length===0)&&t!==void 0)return t;let n=S(typeof e.acp_server==`string`?e.acp_server:void 0);return n?[...n.default_command]:t}function gt(e,t){let n=G(e.agent_settings),r={agent_kind:`acp`,agent_context:ft(n,t,e.disabled_skills)};for(let e of g){if(e===`acp_model`||e===`acp_env`)continue;let t=e===`acp_command`?ht(n):n[e];t!=null&&(r[e]=t)}let i=G(n.mcp_config);Object.keys(i).length>0&&(r.mcp_config=i);let a=typeof n.acp_server==`string`?n.acp_server:void 0,o=b({configured:n.acp_model,providerDefault:x(a)});return o&&(r.acp_model=o),r}function _t(e,t){let n=G(e.agent_settings),r=G(n.llm);r.model=typeof r.model==`string`&&r.model.trim().length>0?r.model:y.llm_model,r.stream=!0;let i=rt(r.api_key);i?r.api_key=i:delete r.api_key;let a=rt(r.base_url);a?r.base_url=a:delete r.base_url,w(r)?(r.auth_type=ae,r.subscription_vendor=C,delete r.api_key,delete r.base_url):(delete r.auth_type,delete r.subscription_vendor);let o=G(n.mcp_config);Object.keys(o).length===0&&delete n.mcp_config,delete n.acp_server;for(let e of g)delete n[e];return delete n.acp_env,{...n,llm:r,agent_context:ft(n,t,e.disabled_skills),tools:lt(n)}}function vt(e,t){return pt(e)?gt(e,t):_t(e,t)}function yt(e){let{settings:t,query:n,conversationInstructions:r,plugins:i,workingDir:a}=e,o=G(t.conversation_settings),s=ut(n,r);return nt.forEach(e=>delete o[e]),{...o,workspace:{kind:`LocalWorkspace`,working_dir:a??m()},...s?{initial_message:s}:{},...i?.length?{plugins:i.map(e=>({source:e.source,...e.ref?{ref:e.ref}:{},...e.repo_path?{repo_path:e.repo_path}:{}}))}:{}}}function bt(e){let t=e.encryptedAgentSettings?{...e.settings,agent_settings:e.encryptedAgentSettings}:e.settings,n=pt(t),r=e.agentProfileId?e.agentProfileKind:n?`acp`:`openhands`,i=vt(t,e.runtimeServicesInfo),a=n?mt(t):void 0,o=yt(e.encryptedConversationSettings?{...e,settings:{...e.settings,conversation_settings:e.encryptedConversationSettings}}:e),s={...e.agentProfileId?{agent_profile_id:e.agentProfileId}:{agent_settings:i},workspace:o.workspace,client_tools:r===`openhands`?[Oe,Pe]:[],confirmation_policy:ot(o),max_iterations:typeof o.max_iterations==`number`?o.max_iterations:500,stuck_detection:!0,autotitle:!0,...e.titleLlmProfile?{title_llm_profile:e.titleLlmProfile}:{},worktree:e.worktree??!0};!e.agentProfileId&&a?s.tags={[Ge]:a,[W]:Ke}:s.tags={[W]:Ke},!e.agentProfileId&&e.secretsEncrypted&&(!n||at(i.mcp_config))&&(s.secrets_encrypted=!0),e.conversationId&&(s.conversation_id=e.conversationId),e.parentConversationId&&(s.parent_conversation_id=e.parentConversationId);let c=st(o);c&&(s.security_analyzer=c),o.initial_message&&(s.initial_message=o.initial_message),o.plugins&&(s.plugins=o.plugins),o.hook_config&&(s.hook_config=o.hook_config);let l={...o.tool_module_qualnames??{}};if(delete l[B],delete l[V],delete l[H],Object.keys(l).length>0&&(s.tool_module_qualnames=l),o.agent_definitions&&(s.agent_definitions=o.agent_definitions),e.customSecrets&&e.customSecrets.length>0){let t=ee(),n=t?Te(t):{},r={};for(let t of e.customSecrets){let e={kind:`LookupSecret`,url:`/api/settings/secrets/${encodeURIComponent(t.name)}`,description:t.description};Object.keys(n).length>0&&(e.headers=n),r[t.name]=e}s.secrets=r}return s}var xt=`Connect your ChatGPT subscription before starting a conversation with this LLM profile.`;async function St(e){if(w(G(e.llm))&&!(await oe.getOpenAIStatus()).connected)throw Error(xt)}async function Ct(t){let{SecretsService:n}=await e(async()=>{let{SecretsService:e}=await import(`./secrets-service-BTor9uAU.js`).then(e=>e.n);return{SecretsService:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8])),[r,i,a]=await Promise.all([re.getSettingsForConversation(),n.getSecrets(),ze()]),{agentSettings:o,conversationSettings:s,secretsEncrypted:c}=r;return t.agentProfileId||await St(o),bt({...t,encryptedAgentSettings:o,encryptedConversationSettings:s,secretsEncrypted:c,customSecrets:i,runtimeServicesInfo:a})}function wt(){return{hooks:[]}}function Tt(e,t){if(!t)return;let n=new Set(t.profiles.map(e=>e.name));if(e&&n.has(e))return e;if(t.active_profile&&n.has(t.active_profile))return t.active_profile}var Et=`1970-01-01T00:00:00.000Z`,Dt=300*1e3,Ot=`Unable to load conversations because the selected agent server returned data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`;function J(){return Error(Ot)}function Y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function X(e){return typeof e==`number`?e:null}function Z(e){return typeof e==`number`?e:0}function Q(e){return typeof e==`string`?e:null}function kt(e,t,n){let r=e[t]??e[n];return typeof r==`string`&&r.trim()?r:Et}function At(e){return Y(e)?{prompt_tokens:Z(e.prompt_tokens),completion_tokens:Z(e.completion_tokens),cache_read_tokens:Z(e.cache_read_tokens),cache_write_tokens:Z(e.cache_write_tokens),context_window:Z(e.context_window),per_turn_token:Z(e.per_turn_token)}:null}function jt(e){return Y(e)?{accumulated_cost:X(e.accumulated_cost),max_budget_per_task:X(e.max_budget_per_task),accumulated_token_usage:At(e.accumulated_token_usage)}:null}function Mt(e){return Y(e)?e:null}function Nt(e){if(!Y(e))return null;let t=Y(e.llm)?{model:Q(e.llm.model)}:null;return{kind:Q(e.kind),acp_server:Q(e.acp_server),acp_model:Q(e.acp_model),llm:t}}function Pt(e){return Y(e)?{working_dir:Q(e.working_dir)}:null}function Ft(e){if(!Y(e))return null;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function It(e){if(!Y(e))return null;let{agent_profile_id:t,revision:n}=e;return typeof t!=`string`||typeof n!=`number`?null:{agent_profile_id:t,revision:n}}function Lt(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(n&&n!==`.`)if(n===`..`){if(!t.length)return null;t.pop()}else t.push(n);return`/${t.join(`/`)}`}function Rt(e,t){let n=Lt(e),r=Lt(t);if(!n||!r||n!==r&&!n.startsWith(`${r}/`))throw Error(`Conversation file path must stay inside the workspace`);return n}function zt(e){if(!Y(e)||typeof e.id!=`string`||!e.id.trim())throw J();return{id:e.id.trim(),title:Q(e.title),created_at:kt(e,`created_at`,`createdAt`),updated_at:kt(e,`updated_at`,`updatedAt`),execution_status:Q(e.execution_status),sandbox_status:Q(e.sandbox_status),metrics:jt(e.metrics),stats:Mt(e.stats),agent:Nt(e.agent),workspace:Pt(e.workspace),tags:Ft(e.tags),launched_agent_profile:It(e.launched_agent_profile),current_model_id:Q(e.current_model_id),current_model_name:Q(e.current_model_name)}}function $(e){if(!Array.isArray(e))throw J();return e.map(zt)}function Bt(e){if(Array.isArray(e))return{items:$(e),next_page_id:null};if(!Y(e))throw J();return{items:$(e.items),next_page_id:typeof e.next_page_id==`string`?e.next_page_id:null}}var Vt=new Set([`idle`,`running`,`paused`,`waiting_for_confirmation`,`finished`,`error`,`stuck`]);function Ht(e){let t=e??`idle`;return Vt.has(t)?t:`idle`}function Ut(e,t){if(!e)throw Error(`Conversation ${t} was not found`);return e}var Wt=class{static async sendMessage(e,t,n){let r=u().backend,i=n?.conversationUrl??null,s=n?.sessionApiKey??null;if(r.kind===`cloud`){if(!i||!s){let[t]=await F([e]);i=t?.conversation_url?.trim()??null,s=t?.session_api_key?.trim()??null}if(!i||!s)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return await _({backend:r,method:`POST`,hostOverride:d(i),path:`/api/conversations/${e}/events`,body:{...t,run:!0},authMode:`session-api-key`,sessionApiKey:s}),t}return await new a(o({conversationUrl:i,sessionApiKey:s})).sendEvent(e,t,{run:!0}),t}static async createConversation(e={}){let{initialUserMsg:t,conversationInstructions:n,plugins:r,metadata:i,workingDirOverride:c,workspaceMode:d,parentConversationId:f,agentType:p,sandboxId:te,agentProfileId:m,agentProfileKind:ne}=e;if(u().backend.kind===`cloud`)return I({initial_message:t?{role:`user`,content:[{type:`text`,text:t}]}:null,title:n??null,selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,plugins:r??null,parent_conversation_id:f??null,agent_type:p,sandbox_id:te??null,agent_profile_id:m??null,trigger:`gui`});let[h,g]=await Promise.all([re.getSettings(),ie.listProfiles().catch(()=>void 0)]),_=Tt(h.title_llm_profile,g),v=E(),y=await me(c??l(v)),b=d??(c?`local_repo`:`new_worktree`),x=await Ct({settings:h,query:t,conversationInstructions:n,plugins:r,conversationId:v,parentConversationId:f,workingDir:y,worktree:b===`new_worktree`,agentProfileId:m,agentProfileKind:ne,titleLlmProfile:_}),S=await new a(o({timeout:Dt})).createConversation(x),C=ee();if(!C)throw new s;return(i?.selected_repository||c)&&j(S.id,{selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,selected_workspace:c??null,workspace_mode:b}),{id:S.id,created_by_user_id:null,status:`READY`,detail:null,app_conversation_id:S.id,agent_server_url:C.host,request:{initial_message:x.initial_message,plugins:r??null},created_at:S.created_at,updated_at:S.updated_at}}static async getStartTask(e){return u().backend.kind===`cloud`?R(e):null}static async getVSCodeUrl(e,t,n){let i=await this.resolveConversationWorkingDir(e);return{vscode_url:await new r(o({conversationUrl:t,sessionApiKey:n})).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:i})}}static async resolveConversationWorkingDir(e){let[t]=await this.batchGetAppConversations([e]);return t?.workspace?.working_dir??m()}static async batchGetAppConversations(e){return e.length===0?[]:u().backend.kind===`cloud`?F(e):$(await new a(o()).getConversations(e)).map(e=>Ue(e))}static async updateConversationPublicFlag(e,t){if(u().backend.kind!==`cloud`)throw Error(`Public sharing requires a cloud backend.`);return xe(e,t)}static async updateConversationRepository(e,t,n,r){t?j(e,{...A(e)??{},selected_repository:t,selected_branch:n??null,git_provider:r??null}):M(e);let[i]=await this.batchGetAppConversations([e]);return Ut(i,e)}static async readConversationFile(e,n){if(u().backend.kind===`cloud`)return L(e,Rt(n??`/workspace/project/.agents_tmp/PLAN.md`,`/workspace/project`));let r=await this.resolveConversationWorkingDir(e),i=Rt(n??`${r}/.agents_tmp/PLAN.md`,r);return new t(o()).downloadTextFile(i)}static async downloadConversation(e){return u().backend.kind===`cloud`?ye(e):new t(o()).downloadTrajectory(e)}static async getHooks(e){return wt()}static async getRuntimeConversation(e,t,n){let r=zt(await new a(o({conversationUrl:t,sessionApiKey:n})).getConversation(e));return{id:r.id,title:r.title?.trim()?r.title:He(r.id),metrics:jt(r.metrics),created_at:r.created_at,updated_at:r.updated_at,status:Ht(r.execution_status),stats:r.stats??{usage_to_metrics:{}}}}static async condenseConversation(e,t,n){let r=u().backend;if(r.kind===`cloud`&&t){await _({backend:r,method:`POST`,hostOverride:d(t),path:`/api/conversations/${e}/condense`,authMode:`session-api-key`,sessionApiKey:n});return}await new a(o({conversationUrl:t,sessionApiKey:n})).condenseConversation(e)}static async searchConversations(e=20,t){return u().backend.kind===`cloud`?ve(e,t):We(Bt(await new a(o()).searchConversations({limit:e,page_id:t,sort_order:h.UPDATED_AT_DESC})))}static async deleteConversation(e){u().backend.kind===`cloud`?await be(e):await new a(o()).deleteConversation(e),M(e)}static async updateConversationTitle(e,t){await new a(o()).updateConversation(e,{title:t});let[n]=await this.batchGetAppConversations([e]);return Ut(n,e)}static async forkConversation(e,t,n){if(u().backend.kind===`cloud`)throw Error(`Branching a conversation isn't supported on the cloud backend yet.`);let r=await new a(o()).forkConversation(e,{from_event_id:t,...n?{title:n}:{}}),i=A(e);return i&&j(r.id,i),r}static async getEventParentId(e,t){return(await new a(o()).getEvent(e,t)).parent_id??void 0}static async switchProfile(e,t){let{backend:n}=u();if(n.kind===`cloud`){if(!e){await ie.activateProfile(t);return}await _({backend:n,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_profile`,body:{profile_name:t}});return}if(!e){await new i(o()).activateProfile(t);return}let r=o(),s=new a(r),c=await new i(r).getProfile(t,{exposeSecrets:`encrypted`}),l=typeof c.config.model==`string`?c.config.model:``;if(!l)throw Error(`Profile '${t}' has no model.`);await St({llm:c.config}),await s.switchLLM(e,{...c.config,model:l,stream:!0,usage_id:`profile:${t}:${E()}`})}static async switchAcpModel(e,t){let{backend:n}=u();if(n.kind===`cloud`){await _({backend:n,method:`POST`,path:`/api/v1/app-conversations/${e}/switch_acp_model`,body:{model:t}});return}await new a(o()).switchAcpModel(e,t)}};export{A as C,E as D,me as E,Ce as S,he as T,R as _,Me as a,_e as b,ke as c,De as d,V as f,I as g,F as h,et as i,H as l,Ee as m,Ye as n,Ae as o,B as p,Ze as r,je as s,Wt as t,Ne as u,we as v,j as w,L as x,Se as y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i,f as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{It as s,Mt as c,Nt as l}from"./active-backend-context-DKFSMbn3.js";import{W as u,t as d}from"./utils-DaCIEEQP.js";import{n as f}from"./use-settings-C5VhGpqd.js";import{t as p}from"./use-save-settings-CUZW6yXP.js";import"./form-control-classes-CGw40z5h.js";import{t as m}from"./brand-button-Dxv6PDeN.js";import{t as h}from"./settings-dropdown-input-tM0A0ipy.js";import{t as ee}from"./settings-input-C03KUoSC.js";import{c as g,i as _,n as v,o as y,s as b,t as te}from"./acp-providers-BKvmTf82.js";import{_ as ne,g as re,h as ie,m as ae,n as oe,o as se}from"./schema-field-Csw5fhtN.js";import{r as x}from"./typography-SgFy466J.js";import{t as ce}from"./settings-switch-CQE0EGC-.js";import{a as S,i as le,n as C,r as w,t as ue}from"./use-acp-credential-form-BsSW5NHG.js";var T=e(n(),1),E=r();function de({form:e,providerKey:t}){let{t:n}=o(`openhands`),{fields:r,values:i,setValue:a,secretExists:s,conflicts:c}=e,{status:l,isChecking:d}=C(t),f=g(t)??t;return r.length===0?null:(0,E.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,E.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,E.jsx)(x.Text,{className:`text-sm font-medium text-white`,children:n(u.SETTINGS$ACP_CREDENTIALS_TITLE)}),(0,E.jsx)(x.Text,{className:`text-xs text-[#717888]`,children:n(u.SETTINGS$ACP_CREDENTIALS_DESCRIPTION)})]}),(0,E.jsx)(le,{status:l,isChecking:d,providerName:f,testIdPrefix:`settings-acp-auth`}),(0,E.jsx)(`div`,{className:`flex flex-col gap-5`,children:r.map(e=>(0,E.jsx)(w,{field:e,value:i[e.name]??``,onChange:t=>a(e.name,t),alreadySet:s(e.name),testId:`settings-acp-secret-${e.name}`,showOptionalTag:!0},e.name))}),(0,E.jsx)(S,{conflicts:c})]})}var D=t(((e,t)=>{var n=[`||`,`&&`,`;;`,`|&`,`<(`,`<<<`,`>>`,`>&`,`<&`,`&`,`;`,`(`,`)`,`|`,`<`,`>`],r=/[\n\r\u2028\u2029]/,i=/[\s#!"$&'():;<=>@\\^`|]/g;t.exports=function(e){return e.map(function(e){if(e===``)return`''`;if(e&&typeof e==`object`){if(`op`in e&&e.op===`glob`){if(typeof e.pattern!=`string`)throw TypeError("glob token requires a string `pattern`");if(r.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(i,`\\$&`)}if(`op`in e&&typeof e.op==`string`){if(n.indexOf(e.op)<0)throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,`\\$&`)}if(`comment`in e&&typeof e.comment==`string`){if(r.test(e.comment))throw TypeError("`comment` must not contain line terminators");return`#`+e.comment}throw TypeError(`unrecognized object token shape`)}return/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,`$1\\$2`)}).join(` `)}})),O=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r[r.length]=i,t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function ee(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function g(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var g=!1;return m.map(function(n){var i=n[0];if(!i||g)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return ee(t,``,n)}for(m=0;m<i.length;m++){var _=i.charAt(m);if(p||=!a&&(_===`*`||_===`?`),o)d+=_,o=!1;else if(a)_===a?a=!1:a==c?d+=_:_===f?(m+=1,_=i.charAt(m),_===l||_===f||_===u?d+=_:d+=f+_):_===u?d+=h():d+=_;else if(_===l||_===c)a=_;else if(r.test(_))return{op:i};else if(s.test(_)){g=!0;var v={comment:e.slice(n.index+m+1)};return d.length?[d,v]:[v]}else _===f?o=!0:_===u?d+=h():d+=_}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}t.exports=function(e,t,n){var r=g(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e[e.length]=t,e;var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?(e[e.length]=n[0],e):(n.filter(Boolean).forEach(function(t){e[e.length]=m.test(t)?JSON.parse(t.split(d)[1]):t}),e)},[]):r}})),{quote:k}=e(t((e=>{e.quote=D(),e.parse=O()}))(),1);function A(e){let t=[],n=0,r=``,i=!1;for(;n<e.length;){let a=e[n];if(a===` `||a===` `||a===`
|
|
2
|
+
`||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var j=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function M(e){return e.map(e=>j.test(e)||e===``?k([e]):e).join(` `)}var N={hideTitle:!0},fe=`enable_sub_agents`,pe=`tool_concurrency_limit`,me=`npx -y <package-name>`,P=`__custom_model__`;function he(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function F(e,t){let n=A(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return te}function ge(e){return e?.find(e=>e.key===fe)}function _e(e,t){return typeof e==`boolean`?e:t?.default===!0}function ve(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function ye(e){let{isAcp:t,selectedPreset:n,isDefaultProviderCommand:r,commandTokens:i,acpModel:a,subAgentsEnabled:o,toolConcurrencyField:s,toolConcurrency:c}=e;if(t){let e=r&&n!==`custom`;return{agent_kind:`acp`,acp_server:n,acp_model:a.trim()||null,acp_command:e?null:M(i)||null,acp_args:null}}let l={agent_kind:`openhands`,enable_sub_agents:o};if(s){let e=se(s,c),t=typeof s.default==`number`?s.default:1;l.tool_concurrency_limit=e==null?t:Number(e)}return l}function I({embedded:e=!1,agentSettingsOverride:t=null,onSaveControlChange:n}={}){let{t:r}=o(`openhands`),{data:i,isLoading:a}=f(),g=t??i?.agent_settings??null,{mutate:S,isPending:le}=p(),{data:C}=ne(i?.agent_settings_schema),w=T.useMemo(()=>C?.sections.flatMap(e=>e.fields),[C]),D=ge(w),O=T.useMemo(()=>_e(g?.[fe],D),[D,g]),[k,j]=(0,T.useState)(O),N=w?.find(e=>e.key===pe),I=T.useMemo(()=>{if(!N)return``;let e=g?.[pe];return ae(N,e)},[N,g]),[L,be]=(0,T.useState)(I),[R,z]=(0,T.useState)(`openhands`),[B,V]=(0,T.useState)(``),[H,U]=(0,T.useState)(``),[xe,W]=(0,T.useState)(!1),[Se,G]=(0,T.useState)(!1),K=R===`acp`?F(B,v):null,q=ue(K&&K!==`custom`?K:null),Ce=(0,T.useRef)(null),J=(0,T.useRef)(null),Y=(0,T.useRef)(``);(0,T.useEffect)(()=>{let e=t??i?.agent_settings??null;if(!e&&!i)return;let n=t??i;if(Ce.current!==n){if(Ce.current=n,e?.agent_kind===`acp`){z(`acp`);let t=e?.acp_server,n=typeof t==`string`?t:void 0,r=b(n),i=he(e?.acp_command),a=[...i.length>0?i:r?.default_command??[],...he(e?.acp_args)],o=a.length>0?M(a):``;V(o),J.current=n??null,Y.current=o;let s=e?.acp_model,c=typeof s==`string`?s.trim():``;U(c||y(n)||``),W(!!c&&(!r||!ve(r,c)))}else z(`openhands`),V(``),U(``),J.current=null,Y.current=``,W(!1);G(!1)}},[i,t]),(0,T.useEffect)(()=>{j(O)},[O]),(0,T.useEffect)(()=>{be(I)},[I]);let we=(0,T.useRef)(()=>({agent_kind:`openhands`,enable_sub_agents:!1})),Te=(0,T.useCallback)(()=>we.current(),[]),Ee=(0,T.useRef)(q);Ee.current=q;let De=(0,T.useCallback)(e=>Ee.current.save(e),[]),Oe=(0,T.useCallback)(()=>Ee.current.reset(),[]),ke=R===`acp`&&A(B).length===0,Ae=q.isDirty;if((0,T.useEffect)(()=>{!e||!n||n({agentType:R,isValid:!ke,buildAgentProfileFields:Te,credentials:{isDirty:Ae,save:De,reset:Oe}})},[e,n,R,ke,Ae,Te,De,Oe]),a)return null;let X=R===`acp`,Z=A(B),je=X&&Z.length===0,Q=F(B,v),$=b(Q),Me=$?.available_models??[],Ne=Me.length>0,Pe=ve($,H),Fe=xe||!Pe?P:H,Ie=!!$&&Z.join(` `)===$.default_command.join(` `),Le=M(v[0]?.default_command??[])||me;we.current=()=>ye({isAcp:X,selectedPreset:Q,isDefaultProviderCommand:Ie,commandTokens:Z,acpModel:H,subAgentsEnabled:k,toolConcurrencyField:N,toolConcurrency:L});let Re=Se||!X&&(k!==O||L!==I),ze=q.isDirty,Be=Re||ze,Ve=le||q.isSaving,He=async()=>{if(q.isDirty){if(!await q.save({silent:Re}))return;q.reset()}if(Re)if(X){let e=!!($&&Ie),t=J.current,n=B===Y.current,i=!!t&&t!==`custom`&&!v.some(e=>e.key===t),a=X&&n&&i,o=_(a?t:$&&Ie?$.key:te,{command:e?[]:Z,model:H.trim()||void 0,allowUnknownServer:a});if(!o)return;S({agent_settings_diff:o},{onError:e=>{c(s(e)||r(u.ERROR$GENERIC))},onSuccess:()=>{l(r(u.SETTINGS$SAVED)),G(!1)}})}else{let e={agent_kind:`openhands`,enable_sub_agents:k};if(N){let t;try{t=se(N,L)}catch(e){c(e instanceof Error?e.message:r(u.ERROR$GENERIC));return}t!=null&&(e[pe]=t)}S({agent_settings_diff:e},{onError:e=>{c(s(e)||r(u.ERROR$GENERIC))},onSuccess:()=>{l(r(u.SETTINGS$SAVED)),G(!1)}})}},Ue=D?re(r,D.key,D.label):r(u.SCHEMA$ENABLE_SUB_AGENTS$LABEL),We=D?ie(r,D.key,D.description):r(u.SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION);return(0,E.jsxs)(`div`,{"data-testid":`agent-settings-screen`,className:`flex flex-col gap-6 pb-8 max-w-2xl`,children:[!e&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(x.H2,{className:`mb-2`,children:r(u.SETTINGS$NAV_AGENT)}),(0,E.jsx)(x.Paragraph,{className:`text-sm text-[#A3A3A3]`,children:r(u.SETTINGS$AGENT_PAGE_DESCRIPTION)})]}),(0,E.jsx)(h,{testId:`agent-type-selector`,name:`agent-type`,label:r(u.SETTINGS$NAV_AGENT),items:[{key:`openhands`,label:r(u.SETTINGS$AGENT_TYPE_OPENHANDS)},{key:`acp`,label:r(u.SETTINGS$AGENT_TYPE_ACP)}],selectedKey:R,onSelectionChange:e=>{if(!e)return;let t=e;if(z(t),t===`acp`&&!B){let e=v[0];e&&(V(M(e.default_command)),U(y(e.key)??``),W(!1))}else t===`openhands`&&W(!1);G(!0)}}),!X&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,E.jsx)(ce,{testId:`agent-settings-enable-sub-agents`,isToggled:k,onToggle:e=>{j(e)},children:Ue}),We?(0,E.jsx)(x.Paragraph,{className:d(`pl-12`,`text-tertiary-alt text-xs leading-5`),children:We}):null]}),!X&&N?(0,E.jsx)(oe,{field:N,value:L,isDisabled:Ve,onChange:be}):null,X&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(h,{testId:`agent-preset-selector`,name:`agent-preset`,label:r(u.SETTINGS$AGENT_PRESET),items:[...v.map(e=>({key:e.key,label:e.display_name})),{key:`custom`,label:r(u.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Q,onSelectionChange:e=>{if(!e)return;let t=String(e),n=b(t);n?(V(M(n.default_command)),U(y(t)??``),W(!1)):t===`custom`&&(V(``),U(``),W(!0)),G(!0)}}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,E.jsx)(x.Text,{className:`text-sm`,children:r(u.SETTINGS$AGENT_COMMAND)}),(0,E.jsx)(`textarea`,{"data-testid":`agent-command-input`,className:`bg-tertiary border border-[#717888] rounded-sm p-2 text-sm font-mono text-white placeholder:text-[#717888] min-h-[60px] resize-y focus:outline-none focus:border-white`,value:B,placeholder:Le,onChange:e=>{let t=e.target.value,n=F(B,v),r=F(t,v);r!==n&&(U(y(r)??``),W(!1)),V(t),G(!0)}}),(0,E.jsx)(x.Text,{className:`text-xs text-[#717888]`,children:r(u.SETTINGS$AGENT_COMMAND_HINT)})]}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[Ne&&(0,E.jsx)(h,{testId:`agent-model-selector`,name:`agent-model`,label:r(u.SETTINGS$AGENT_MODEL),items:[...Me.map(e=>({key:e.id,label:e.label})),{key:P,label:r(u.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Fe,onSelectionChange:e=>{if(!e)return;let t=String(e);t===P?(W(!0),U(``)):(W(!1),U(t)),G(!0)}}),Fe===P&&(0,E.jsx)(ee,{testId:`agent-model-input`,label:r(Ne?u.SETTINGS$AGENT_CUSTOM_MODEL:u.SETTINGS$AGENT_MODEL),type:`text`,className:`w-full`,value:H,showOptionalTag:!0,onChange:e=>{U(e),G(!0)}}),(0,E.jsx)(x.Text,{className:`text-xs text-[#717888]`,children:r(u.SETTINGS$AGENT_MODEL_HINT)})]})]}),X&&Q!==`custom`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`hr`,{className:`border-[#3D4046]`}),(0,E.jsx)(de,{form:q,providerKey:Q})]}),!e&&(0,E.jsx)(`div`,{children:(0,E.jsx)(m,{testId:`agent-save-button`,type:`button`,variant:`primary`,isDisabled:Ve||!Be||je,onClick:He,children:r(Ve?u.SETTINGS$SAVING:u.SETTINGS$SAVE_CHANGES)})})]})}var L=i(function(){return(0,E.jsx)(a,{to:`/settings/agents`,replace:!0})});export{A as i,L as n,N as r,I as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./agent-settings-351vXWc9.js";export{e as default,t as handle};
|
|
@@ -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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{W as i,t as a}from"./utils-DaCIEEQP.js";import{n as o}from"./navigation-context-CQZwH_tC.js";import{c as s}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js";import{t as c}from"./close-ScPlnwyq.js";import{r as l}from"./typography-SgFy466J.js";import{t as u}from"./vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js";var d=e(t(),1),f=n();function p({maintenanceStartTime:e,faultyModels:t,errorMessage:n,updatedAt:p}){let{t:m}=r(`openhands`),[h,g]=u(`alert_banner_dismissed_at`,null),{currentPath:_}=o(),v=e?(e=>new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,timeZoneName:`short`}))(e):null,y=!!e,b=t&&t.length>0,x=n&&n.trim().length>0,S=y||b||x,C=(0,d.useMemo)(()=>S?h!==p:!1,[h,p,S]),w=(0,d.useMemo)(()=>{if(!n)return null;let e=m(n);return e===n?n:e},[n,m]);return C?(0,f.jsxs)(`div`,{"data-testid":`alert-banner`,className:a(`bg-base border border-primary text-white p-4 rounded`,`flex flex-row items-center justify-between m-1`,_===`/`&&`mt-3 mr-3`),children:[(0,f.jsxs)(`div`,{className:`flex items-center`,children:[(0,f.jsx)(`div`,{className:`flex-shrink-0`,children:(0,f.jsx)(s,{className:`text-primary align-middle`})}),(0,f.jsx)(`div`,{className:`ml-3 flex flex-col gap-1`,children:(()=>{let e=[];return y&&v&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:m(i.MAINTENANCE$SCHEDULED_MESSAGE,{time:v})},`maintenance`)),b&&e.push((0,f.jsxs)(l.Paragraph,{className:`text-sm font-medium`,children:[m(i.ALERT$FAULTY_MODELS_MESSAGE),` `,t.join(`, `)]},`faulty-models`)),x&&w&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:w},`error-message`)),e})()})]}),(0,f.jsx)(`button`,{type:`button`,"data-testid":`dismiss-button`,onClick:()=>g(p),className:a(`bg-base rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`),children:(0,f.jsx)(c,{})})]}):null}export{p as AlertBanner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";function t(t){if(e.isAxiosError(t))return t.response?.data;if(t instanceof Error&&`response`in t)return t.response}function n(e,n){let r=t(e);if(r&&typeof r==`object`){let{message:e,detail:t}=r;if(typeof e==`string`&&e)return e;if(typeof t==`string`&&t)return t}return e instanceof Error&&e.message?e.message:n}export{n,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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{$ as a,X as o,ft as s,r as c}from"./active-backend-context-DKFSMbn3.js";import{W as l,t as u}from"./utils-DaCIEEQP.js";import{n as d,o as f}from"./backend-form-modal-DK78-jn1.js";import{r as p,t as m}from"./modal-body-CMOc2tLl.js";import{t as h}from"./brand-button-Dxv6PDeN.js";var g=e(t(),1),_=n();function v(){let{t:e}=r(`openhands`),{active:t,addBackend:n,updateBackend:v}=c(),y=window.location.origin,[b,x]=g.useState(!1),[S,C]=g.useState(`idle`),[w,T]=g.useState(null),E=g.useCallback(async r=>{x(!0),C(`idle`),T(null);try{await new i(a({host:r.host,sessionApiKey:r.apiKey,timeout:5e3})).getSettings(),C(`success`),s(t.backend)?n(r):v(t.backend.id,r),window.location.reload()}catch(t){if(C(`error`),o(t,401))T(e(l.AUTH$INVALID_KEY));else{let n=t instanceof Error?t.message:String(t);T(`${e(l.AUTH$CONNECTION_FAILED)}${n?`: ${n}`:``}`)}x(!1)}},[t.backend,n,v,e]);return(0,_.jsx)(`div`,{"data-testid":`api-key-entry-screen`,className:`flex min-h-screen items-center justify-center bg-base px-6`,children:(0,_.jsxs)(`div`,{className:u(`relative rounded-xl border border-[var(--oh-border)] bg-base-secondary`,p(`md`),m),children:[(0,_.jsx)(`div`,{className:`px-6 pt-6 pb-2 pr-12`,children:(0,_.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(l.BACKEND$ADD_TITLE)})}),(0,_.jsx)(`div`,{className:`px-6 pb-6 pt-2`,children:(0,_.jsx)(d,{mode:`add`,backend:{...t.backend,host:y,apiKey:``,name:``},onSubmitted:()=>{},testIdRoot:`api-key-entry`,hostReadOnly:!0,requireApiKey:!0,onSubmitOverride:E,renderActions:({canSubmit:t,testIdRoot:n})=>(0,_.jsxs)(_.Fragment,{children:[S!==`idle`&&(0,_.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,_.jsx)(f,{isConnected:S===`success`}),(0,_.jsx)(`span`,{"data-testid":`${n}-status`,className:S===`error`?`text-red-400`:`text-green-400`,children:S===`error`?w:e(l.ONBOARDING$BACKEND_STATUS_CONNECTED)})]}),(0,_.jsx)(h,{type:`submit`,variant:`secondary`,isDisabled:!t||b,testId:`${n}-submit`,className:`w-full text-center`,children:e(b?l.ONBOARDING$BACKEND_STATUS_CHECKING:l.BACKEND$CONNECT)})]})})})]})})}export{v 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{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{It as a,Mt as o,Nt as s,Vt as c,_ as l,n as u}from"./active-backend-context-DKFSMbn3.js";import{W as d}from"./utils-DaCIEEQP.js";import{t as f}from"./settings-DcNPxz0v.js";import{n as p}from"./use-settings-C5VhGpqd.js";import{t as m}from"./use-save-settings-CUZW6yXP.js";import{t as h}from"./brand-button-Dxv6PDeN.js";import{i as g,n as _,r as v,t as y}from"./color-themes-DTj5Ylbr.js";import{t as b}from"./navigation-link-Bxo3-4vo.js";import{t as x}from"./settings-dropdown-input-tM0A0ipy.js";import{t as S}from"./settings-input-C03KUoSC.js";import{t as C}from"./use-llm-profiles-djGAhTWL.js";import{r as w}from"./format-model-name-BNPKVsIq.js";import{c as T,o as E,t as D}from"./sidebar-onboarding-checklist-storage-3qYflszY.js";import{n as O,t as k}from"./switch-skeleton-DwOoCqaL.js";import{t as A}from"./settings-switch-CQE0EGC-.js";var j=e(t(),1),M=n();function N({defaultKey:e,onChange:t,name:n}){let{t:r}=i(`openhands`);return(0,M.jsx)(x,{testId:n,name:n,onInputChange:t,label:r(d.SETTINGS$LANGUAGE),items:c.map(e=>({key:e.value,label:e.label})),defaultSelectedKey:e,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function P(){let{t:e}=i(`openhands`),t=j.useCallback(e=>{if(!e)return;let t=e;_(t),v(t)},[]);return(0,M.jsx)(x,{testId:`color-theme-input`,name:`color-theme-input`,label:e(d.SETTINGS$COLOR_THEME),items:y.map(e=>({key:e.key,label:e.label})),defaultSelectedKey:g(),onSelectionChange:t,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function F(){return(0,j.useSyncExternalStore)(E,D,()=>!1)}function ee(){let{t:e}=i(`openhands`),t=F();return(0,M.jsx)(A,{testId:`show-getting-started-checklist-switch`,isToggled:!t,onToggle:e=>{T(!e)},children:e(d.SETTINGS$SHOW_GETTING_STARTED_CHECKLIST)})}function I(){return(0,M.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,M.jsx)(O,{}),(0,M.jsx)(k,{}),(0,M.jsx)(k,{})]})}var L=`__automatic__`;function R(){let{t:e}=i(`openhands`),{mutate:t,isPending:n}=m(),{data:r,isLoading:g}=p(),_=u().backend.kind===`cloud`,{data:v,isLoading:y}=C(),[T,E]=j.useState(!1),[D,O]=j.useState(!1),[k,F]=j.useState(!1),[R,z]=j.useState(!1),[B,V]=j.useState(!1),[H,U]=j.useState(void 0),W=j.useMemo(()=>{let e=r?.title_llm_profile??null;return!e||!v||v.profiles.some(t=>t.name===e)?e:null},[v,r?.title_llm_profile]),G=H===void 0?W:H,K=j.useMemo(()=>[{key:L,label:e(d.SETTINGS$TITLE_GENERATION_AUTOMATIC)},...v?.profiles.map(t=>({key:t.name,label:t.model?e(d.SETTINGS$TITLE_GENERATION_PROFILE_OPTION,{name:t.name,model:w(t.model)??t.model}):t.name}))??[]],[v?.profiles,e]),q=n=>{let r=n.get(`language-input`)?.toString(),i=c.find(({label:e})=>e===r)?.value||f.language,u=_?!0:n.get(`enable-analytics-switch`)?.toString()===`on`,p=n.get(`enable-sound-notifications-switch`)?.toString()===`on`,m=n.get(`git-user-name-input`)?.toString()||f.git_user_name,h=n.get(`git-user-email-input`)?.toString()||f.git_user_email;t({language:i,...!_&&{user_consents_to_analytics:u},enable_sound_notifications:p,git_user_name:m,git_user_email:h,title_llm_profile:G},{onSuccess:()=>{l(u?`granted`:`denied`),s(e(d.SETTINGS$SAVED))},onError:t=>{o(a(t)||e(d.ERROR$GENERIC))},onSettled:()=>{E(!1),O(!1),F(!1),z(!1),V(!1),U(void 0)}})},J=e=>{let t=c.find(({label:t})=>t===e)?.label,n=c.find(({value:e})=>e===r?.language)?.label;E(t!==n)},Y=e=>{O(e!==(r?.user_consents_to_analytics??!0))},X=e=>{F(e!==!!r?.enable_sound_notifications)},Z=e=>{let t=r?.git_user_name;z(e!==t)},Q=e=>{let t=r?.git_user_email;V(e!==t)},te=!T&&!D&&!k&&G===W&&!R&&!B,$=!r||g||y||n;return(0,M.jsxs)(`form`,{"data-testid":`app-settings-screen`,action:q,className:`flex flex-col gap-6`,children:[$&&(0,M.jsx)(I,{}),!$&&(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,M.jsx)(N,{name:`language-input`,defaultKey:r.language,onChange:J}),(0,M.jsx)(P,{}),(0,M.jsx)(A,{testId:`enable-analytics-switch`,name:_?void 0:`enable-analytics-switch`,defaultIsToggled:_?!0:r.user_consents_to_analytics??!0,isToggled:_?!0:void 0,isDisabled:_,onToggle:_?void 0:Y,children:e(d.ANALYTICS$SEND_ANONYMOUS_DATA)}),(0,M.jsx)(A,{testId:`enable-sound-notifications-switch`,name:`enable-sound-notifications-switch`,defaultIsToggled:!!r.enable_sound_notifications,onToggle:X,children:e(d.SETTINGS$SOUND_NOTIFICATIONS)}),(0,M.jsx)(ee,{}),(0,M.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,M.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:e(d.SETTINGS$CONVERSATION_TITLES)}),(0,M.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(d.SETTINGS$TITLE_GENERATION_DESCRIPTION)}),(0,M.jsx)(x,{testId:`title-llm-profile-input`,name:`title-llm-profile-input`,label:e(d.SETTINGS$TITLE_GENERATION_MODEL),items:K,selectedKey:G??L,onSelectionChange:e=>{let t=e?.toString();U(!t||t===L?null:t)}}),(0,M.jsx)(b,{to:`/settings/llm`,className:`mt-3 inline-block text-sm text-primary hover:underline`,children:e(d.SETTINGS$MANAGE_LLM_PROFILES)})]}),(0,M.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,M.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:e(d.SETTINGS$GIT_SETTINGS)}),(0,M.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:e(d.SETTINGS$GIT_SETTINGS_DESCRIPTION)}),(0,M.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,M.jsx)(S,{testId:`git-user-name-input`,name:`git-user-name-input`,type:`text`,label:e(d.SETTINGS$GIT_USERNAME),defaultValue:r.git_user_name||``,onChange:Z,placeholder:e(d.SETTINGS$GIT_USERNAME_PLACEHOLDER),className:`w-full min-w-0`}),(0,M.jsx)(S,{testId:`git-user-email-input`,name:`git-user-email-input`,type:`email`,label:e(d.SETTINGS$GIT_EMAIL),defaultValue:r.git_user_email||``,onChange:Q,placeholder:e(d.SETTINGS$GIT_EMAIL_PLACEHOLDER),className:`w-full min-w-0`})]}),(0,M.jsx)(`div`,{className:`flex justify-start pt-4`,children:(0,M.jsxs)(h,{testId:`submit-button`,variant:`primary`,type:`submit`,isDisabled:n||te,children:[!n&&e(d.SETTINGS$SAVE_CHANGES),n&&e(d.SETTINGS$SAVING)]})})]})]})]})}var z=r(R);export{z as default};
|
|
@@ -0,0 +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{B as r,H as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{M as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{t as l}from"./useQuery-BXWbZBZl.js";import{$ as u,Mt as d,Nt as f,Y as p,ct as m,n as h,nt as g}from"./active-backend-context-DKFSMbn3.js";import{W as _,a as v,t as y}from"./utils-DaCIEEQP.js";import{r as b}from"./context-menu-list-item-lVYETtY5.js";import{t as x}from"./proxy-tcFL2yTQ.js";import{A as S,n as C,t as w,y as T}from"./use-tracking-D5t9otIF.js";import{t as ee}from"./use-settings-C5VhGpqd.js";import{r as E}from"./modal-classes-BAb4Y_BG.js";import{t as te}from"./brand-button-Dxv6PDeN.js";import{n as D}from"./navigation-context-CQZwH_tC.js";import{n as O}from"./use-create-conversation-DwN5vv2f.js";import{t as k}from"./u-edit-DAkcF52u.js";import{t as A}from"./terminal-BUpID2wS.js";import{n as ne,t as re}from"./use-automation-health-BxXdzZMP.js";import{t as j}from"./automation-C_eCrGyP.js";import{i as ie,l as ae,o as oe,r as se,u as M}from"./use-automations-zYb0dUny.js";import{t as N}from"./use-user-conversation-DT0_QCnL.js";import{t as P}from"./toggle-switch-Fd_QGz0r.js";import{n as F}from"./api-error-message-BJyfWp6p.js";import{t as I}from"./x-mark-BopmFoBq.js";import{n as L,t as R}from"./link-external-BNZzCM1I.js";import{a as z,i as B,l as V,n as ce,o as le,p as ue,r as de,s as fe}from"./kebab-menu-item-content-BYokkRHi.js";import{t as pe}from"./edit-automation-modal-D-urtv8n.js";import{t as me}from"./use-has-permission-B3C8rQmR.js";import{n as he,t as ge}from"./trash-_RMt7Ayc.js";import{n as _e,r as ve,t as ye}from"./error-state-BALXiBNy.js";import{i as be,r as xe,t as Se}from"./automation-export-BRopEHMu.js";import{a as H,i as Ce,n as U,r as W,t as we}from"./cog-C4rrw-ZK.js";var G=e(t()),K=n(),q=e=>(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3`})});function Te({active:e}){let{t}=o(`openhands`);return(0,K.jsx)(`span`,{"data-testid":e?`active-status-badge-active`:`active-status-badge-inactive`,className:y(`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium`,e?`bg-[var(--oh-success)]/15 text-[var(--oh-success)]`:`bg-surface-raised text-muted`),children:t(e?_.AUTOMATIONS$DETAIL$ACTIVE:_.AUTOMATIONS$DETAIL$INACTIVE)})}function Ee({automation:e,onToggle:t,onEdit:n,onDelete:r,onExport:i,onDownloadTarball:a,onRunNow:s,isRunningNow:c=!1}){let{t:l}=o(`openhands`),u=me(`manage_automations`),d=[...n?[{label:l(_.AUTOMATIONS$EDIT),icon:(0,K.jsx)(k,{className:`size-4`}),onClick:n}]:[],{label:e.enabled?l(_.AUTOMATIONS$TURN_OFF):l(_.AUTOMATIONS$TURN_ON),icon:(0,K.jsx)(ce,{className:`size-4`}),onClick:t},{label:l(_.AUTOMATIONS$EXPORT),icon:(0,K.jsx)(q,{className:`size-4`}),onClick:i},{label:l(_.AUTOMATIONS$DOWNLOAD_TARBALL),icon:(0,K.jsx)(q,{className:`size-4`}),onClick:a},{label:l(_.AUTOMATIONS$DELETE),icon:(0,K.jsx)(ge,{className:`size-4`}),onClick:r}];return(0,K.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,K.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:e.name}),(0,K.jsx)(Te,{active:e.enabled})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&s&&(0,K.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 rounded-md border border-[var(--oh-border)] px-3 py-1.5 text-sm font-medium text-content transition-colors hover:bg-surface-raised disabled:cursor-not-allowed disabled:opacity-60`,disabled:c||!e.enabled,onClick:s,children:[(0,K.jsx)(de,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),l(c?_.AUTOMATIONS$STARTING:_.AUTOMATIONS$RUN_NOW)]}),u&&(0,K.jsx)(P,{enabled:e.enabled,label:e.enabled?l(_.AUTOMATIONS$TURN_OFF):l(_.AUTOMATIONS$TURN_ON),onToggle:t}),u&&(0,K.jsx)(he,{items:d})]})]})})}var De=240,Oe=`max-h-60`;function ke({prompt:e}){let{t}=o(`openhands`),[n,r]=G.useState(!1),[i,a]=G.useState(!1),s=G.useRef(null),c=i&&!n;return G.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=()=>{a(e.scrollHeight>De)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e]),(0,K.jsx)(W,{icon:(0,K.jsx)(A,{className:`size-4`}),title:t(_.AUTOMATIONS$DETAIL$PROMPT),children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(`p`,{ref:s,className:y(`whitespace-pre-wrap text-sm leading-6 text-content`,c&&y(Oe,`overflow-hidden`)),"data-testid":`automation-prompt-content`,children:e}),c?(0,K.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-[var(--oh-surface)] to-transparent`,"aria-hidden":!0,"data-testid":`automation-prompt-fade`}):null]}),i?(0,K.jsx)(`button`,{type:`button`,className:`self-start cursor-pointer text-sm font-normal text-[var(--oh-muted)] hover:text-white`,onClick:()=>r(e=>!e),"data-testid":`automation-prompt-toggle`,children:t(n?_.COMMON$VIEW_LESS:_.COMMON$VIEW_MORE)}):null]})})}var J=e=>(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5`})}),Ae=e=>(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0`})});function je({branch:e}){return(0,K.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-surface-raised px-2.5 py-0.5 text-xs text-muted`,children:e})}var Y=60;function Me({filter:e}){let{t}=o(`openhands`),[n,r]=(0,G.useState)(!1),i=e.length>Y;return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,K.jsx)(`span`,{className:`font-mono break-all`,children:i&&!n?`${e.slice(0,Y)}…`:e}),i&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>r(!n),"aria-expanded":n,className:`text-xs text-muted hover:text-content self-start`,children:t(n?_.SETTINGS$SKILLS_SHOW_LESS:_.SETTINGS$SKILLS_SHOW_MORE)})]})}function Ne({automation:e}){let{t}=o(`openhands`),n=e.trigger.type===`event`,r=e.trigger.schedule??``;e.trigger.schedule_human&&(r=e.timezone?`${e.trigger.schedule_human} (${e.timezone})`:e.trigger.schedule_human);let i=t(n?_.AUTOMATIONS$DETAIL$TRIGGER_EVENT:_.AUTOMATIONS$DETAIL$TRIGGER_SCHEDULE);return(0,K.jsx)(W,{icon:(0,K.jsx)(we,{className:`size-4`}),title:t(_.AUTOMATIONS$DETAIL$CONFIGURATION),children:(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-5`,children:[e.repository&&(0,K.jsx)(U,{icon:(0,K.jsx)(Ce,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$REPOSITORIES),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1`,children:[e.repository,e.branch&&(0,K.jsx)(je,{branch:e.branch})]})}),(0,K.jsx)(U,{icon:(0,K.jsx)(fe,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$TRIGGER),children:i}),!n&&(0,K.jsx)(U,{icon:(0,K.jsx)(J,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$SCHEDULE),children:r}),n&&e.trigger.source&&(0,K.jsx)(U,{icon:(0,K.jsx)(b,{className:`size-3.5`,"aria-hidden":`true`}),label:t(_.AUTOMATIONS$DETAIL$EVENT_SOURCE),children:e.trigger.source}),n&&e.trigger.on&&(0,K.jsx)(U,{icon:(0,K.jsx)(R,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$EVENT_TYPE),children:V(e.trigger.on)}),n&&e.trigger.filter&&(0,K.jsx)(U,{icon:(0,K.jsx)(L,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$EVENT_FILTER),children:(0,K.jsx)(Me,{filter:e.trigger.filter})}),(0,K.jsx)(U,{icon:(0,K.jsx)(ue,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$MODEL),children:e.model??t(_.COMMON$ACTIVE_PROFILE)}),e.notification&&(0,K.jsx)(U,{icon:(0,K.jsx)(Ae,{className:`size-3.5`}),label:t(_.AUTOMATIONS$DETAIL$NOTIFICATION),children:e.notification})]})})}var Pe=e=>(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z`})});function Fe({name:e}){return(0,K.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-3.5 py-1.5 text-sm text-content`,children:e})}function Ie({plugins:e}){let{t}=o(`openhands`);return(0,K.jsx)(W,{icon:(0,K.jsx)(Pe,{className:`size-4`}),title:t(_.AUTOMATIONS$DETAIL$PLUGINS),children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,K.jsx)(Fe,{name:e},e))})})}var X=e=>(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182`})});function Le({createdAt:e,lastRunAt:t}){let{t:n,i18n:r}=o(`openhands`),i=r.language;return(0,K.jsx)(W,{icon:(0,K.jsx)(X,{className:`size-4`}),title:n(_.AUTOMATIONS$DETAIL$ACTIVITY),children:(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4`,children:[(0,K.jsx)(U,{icon:(0,K.jsx)(J,{className:`size-3.5`}),label:n(_.AUTOMATIONS$DETAIL$CREATED),children:B(e,i)}),(0,K.jsx)(U,{icon:(0,K.jsx)(ne,{className:`size-3.5`}),label:n(_.AUTOMATIONS$DETAIL$LAST_RUN),children:t?z(t,i,n):n(_.AUTOMATIONS$DETAIL$TIME_NEVER)})]})})}var Re=100,Z=[`run_id`,`automation_id`,`automation_name`,`trigger`,`start_time`,`end_time`,`duration_seconds`,`status`,`conversation_id`,`conversation_url`,`error`,`cost`];function ze(e,t){return`${e.name.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||e.id}.activity-log.${t}`}function Be(e){return/[",\n\r]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e}function Ve(e){let t=[Z.join(`,`)];for(let n of e){let e=Z.map(e=>{let t=n[e];return t==null?``:Be(e===`trigger`?JSON.stringify(t):String(t))});t.push(e.join(`,`))}return`${t.join(`
|
|
2
|
+
`)}\n`}function He(e,t){if(!e)return null;let n=`/conversations/${e}`;return t?`${t.replace(/\/$/,``)}${n}`:n}function Ue(e,t,n){let r=e.started_at||null,i=e.completed_at,a=null;return r&&i&&(a=(new Date(i).getTime()-new Date(r).getTime())/1e3),{run_id:e.id,automation_id:t.id,automation_name:t.name,trigger:t.trigger,start_time:r,end_time:i,duration_seconds:a,status:e.status,conversation_id:e.conversation_id,conversation_url:He(e.conversation_id,n),error:e.error_detail,cost:e.cost??null}}async function We(e,t){let n=[],r=0,i=1/0;for(;r<i;){let a=await C.listAutomationRuns(e.id,{limit:Re,offset:r});for(let r of a.runs)n.push(Ue(r,e,t));if(i=a.total,r+=a.runs.length,a.runs.length===0)break}return n}async function Ge(e){let{automation:t,format:n,conversationBaseUrl:r}=e,i=await We(t,r);if(n===`json`){v(new Blob([`${JSON.stringify({runs:i,total:i.length},null,2)}\n`],{type:`application/json`}),ze(t,`json`));return}v(new Blob([Ve(i)],{type:`text/csv;charset=utf-8`}),ze(t,`csv`))}var Ke=20;function qe(e){return e.kind===`BashOutput`}var Je=class e{static async listOutputs(t,n,r){let i=[],a;for(let o=0;o<Ke;o+=1){let o=await e.searchEvents(t,n,{kind__eq:`BashOutput`,command_id__eq:r,sort_order:`TIMESTAMP`,...a?{page_id:a}:{}});if(o.items.forEach(e=>{qe(e)&&i.push(e)}),!o.next_page_id)break;a=o.next_page_id}return i}static async searchEvents(e,t,n){let r=m().backend;if(r.kind===`cloud`){if(!e)throw Error(`BashService.listOutputs requires a conversation URL on cloud backends`);let i=new URLSearchParams;return Object.entries(n).forEach(([e,t])=>{t!=null&&i.set(e,String(t))}),x({backend:r,method:`GET`,hostOverride:g(e),path:`/api/bash/bash_events/search?${i.toString()}`,authMode:`session-api-key`,sessionApiKey:t})}return new c(u({...e?{conversationUrl:e}:{},sessionApiKey:t})).searchEvents(n)}},Ye=[`bash-command-logs`];function Xe(e){switch(e){case`MISSING`:return`missing`;case`PAUSED`:return`paused`;case`STARTING`:return`starting`;case`ERROR`:return`errored`;case`RUNNING`:case null:case void 0:default:return null}}function Ze(e){let t=s.isAxiosError(e)?e.response?.status:p(e)?e.status:void 0;if(t!==void 0)return t===404||t>=500?`unreachable`:null;if(s.isAxiosError(e)||e instanceof TypeError)return`unreachable`;if(e instanceof Error){let t=e.cause instanceof Error?e.cause.name:null;if(e.name===`AbortError`||e.name===`TimeoutError`||t===`AbortError`||t===`TimeoutError`)return`unreachable`}return null}function Qe(e){let{conversationId:t,bashCommandId:n,enabled:r=!0}=e,i=h(),a=N(r?t??null:null),o=a.data,s=o?.conversation_url??null,c=o?.session_api_key??null,u=i.backend.kind===`cloud`,d=a.isFetched,f=null,p=!1;u&&d&&(o?f=Xe(o.sandbox_status)??(o.conversation_url?null:`missing`):p=!0);let m=r&&!!n&&(u?!!s:!0)&&!f&&!p,g=l({queryKey:[...Ye,n,s,c,i.backend.id,i.orgId],queryFn:()=>Je.listOutputs(s,c,n),enabled:m,staleTime:60*1e3,gcTime:300*1e3,retry:!1}),_=u?Ze(g.error):null,v=f??_;return{data:g.data,error:_?null:g.error,isFetching:g.isFetching,isPending:g.isPending,isResolvingConversation:u&&a.isPending,conversationMissing:p,sandboxIssue:v}}var $e=4e3;function et(e,t){return e.length<=t?e:`…(truncated)…\n${e.slice(e.length-t)}`}function tt({automationName:e,automationPrompt:t,errorDetail:n,stderr:r,runId:i}){let a=r?.trim()||n?.trim()||``,o=a?et(a,$e):`No error output was captured for this run.`,s=e?.trim(),c=[`${s?`The scheduled automation "${s}" failed during a run.`:`A scheduled automation failed during a run.`} Please investigate the error and fix the root cause.`],l=t?.trim();return l&&c.push(``,`What the automation was set up to do:`,l),c.push(``,`Error output from the failed run (run ${i}):`,o,``,`Please diagnose why it failed and propose or implement a fix.`),c.join(`
|
|
3
|
+
`)}function nt({run:e,automation:t,stderr:n}){let{t:r}=o(`openhands`),{navigate:i}=D(),a=O();return(0,K.jsx)(te,{testId:`debug-automation-button`,type:`button`,variant:`primary`,onClick:()=>{if(a.isPending)return;let r=tt({automationName:t?.name,automationPrompt:t?.prompt,errorDetail:e.error_detail,stderr:n,runId:e.id});a.mutate({query:r},{onSuccess:e=>{i(`/conversations/${e.conversation_id}`)}})},isDisabled:a.isPending,"aria-busy":a.isPending,children:r(_.AUTOMATIONS$DETAIL$DEBUG_WITH_OPENHANDS)})}var rt={missing:_.AUTOMATIONS$DETAIL$LOGS_SANDBOX_MISSING,paused:_.AUTOMATIONS$DETAIL$LOGS_SANDBOX_PAUSED,starting:_.AUTOMATIONS$DETAIL$LOGS_SANDBOX_STARTING,errored:_.AUTOMATIONS$DETAIL$LOGS_SANDBOX_ERROR,unreachable:_.AUTOMATIONS$DETAIL$LOGS_SANDBOX_UNREACHABLE};function it(e,t){return[...e].sort((e,t)=>{let n=e.timestamp.localeCompare(t.timestamp);return n===0?(e.order??0)-(t.order??0):n}).map(e=>e[t]??``).join(``)}function at({conversationId:e,bashCommandId:t,isOpen:n,onClose:r,run:i,automation:a}){let{t:s}=o(`openhands`),[c,l]=(0,G.useState)(`stdout`),{data:u,isFetching:d,isResolvingConversation:f,sandboxIssue:p,conversationMissing:m,error:h}=Qe({conversationId:e,bashCommandId:t,enabled:n});(0,G.useEffect)(()=>{n&&l(`stdout`)},[n,t]),(0,G.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,r]);let{stdout:g,stderr:v}=(0,G.useMemo)(()=>u?{stdout:it(u,`stdout`),stderr:it(u,`stderr`)}:{stdout:``,stderr:``},[u]);if(!n)return null;let b=f||d&&!u,x=!t,S=c===`stdout`?g:v,C=`border-b-2 px-3 py-2 text-sm font-normal transition-colors focus:outline-none`,w=`border-[var(--oh-primary)] text-white`,T=`border-transparent text-muted hover:text-content`;return(0,K.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,role:`dialog`,"aria-modal":`true`,"aria-label":s(_.AUTOMATIONS$DETAIL$LOGS_TITLE),children:[(0,K.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,K.jsxs)(`div`,{className:`relative flex max-h-[80vh] w-full max-w-3xl flex-col rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":s(_.AUTOMATIONS$CANCEL),children:(0,K.jsx)(I,{className:`size-5`})}),(0,K.jsx)(`h2`,{className:y(`pr-8`,E),children:s(_.AUTOMATIONS$DETAIL$LOGS_TITLE)}),(0,K.jsxs)(`div`,{role:`tablist`,"aria-label":s(_.AUTOMATIONS$DETAIL$LOGS_TITLE),className:`mt-4 flex gap-1 border-b border-[var(--oh-border)]`,children:[(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`stdout`,"aria-controls":`run-logs-panel-stdout`,id:`run-logs-tab-stdout`,tabIndex:c===`stdout`?0:-1,onClick:()=>l(`stdout`),className:`${C} ${c===`stdout`?w:T}`,children:s(_.AUTOMATIONS$DETAIL$LOGS_TAB_OUTPUT)}),(0,K.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`stderr`,"aria-controls":`run-logs-panel-stderr`,id:`run-logs-tab-stderr`,tabIndex:c===`stderr`?0:-1,onClick:()=>l(`stderr`),className:`${C} ${c===`stderr`?w:T}`,children:s(_.AUTOMATIONS$DETAIL$LOGS_TAB_ERROR)})]}),(0,K.jsxs)(`div`,{role:`tabpanel`,id:`run-logs-panel-${c}`,"aria-labelledby":`run-logs-tab-${c}`,className:`mt-3 min-h-[12rem] flex-1 overflow-auto rounded-lg border border-[var(--oh-border)] bg-black/40 p-4 font-mono text-xs`,children:[x&&(0,K.jsx)(`p`,{className:`text-muted italic`,children:s(_.AUTOMATIONS$DETAIL$LOGS_NO_COMMAND)}),!x&&m&&(0,K.jsx)(`p`,{className:`text-muted italic`,children:s(_.AUTOMATIONS$DETAIL$LOGS_CONVERSATION_MISSING)}),!x&&!m&&p&&(0,K.jsx)(`p`,{"data-testid":`run-logs-sandbox-issue-${p}`,className:`text-muted italic`,children:s(rt[p])}),!x&&!m&&!p&&b&&(0,K.jsx)(`p`,{className:`text-muted italic`,children:s(_.AUTOMATIONS$DETAIL$LOGS_LOADING)}),!x&&!m&&!p&&!b&&h&&!u&&(0,K.jsxs)(`p`,{className:`text-danger`,children:[s(_.AUTOMATIONS$DETAIL$LOGS_ERROR),`: `,String(h)]}),!b&&!p&&u&&(0,K.jsx)(`pre`,{"data-testid":`run-logs-output-${c}`,className:`whitespace-pre-wrap break-words ${c===`stderr`?`text-danger`:`text-content`}`,children:S.length>0?S:(0,K.jsx)(`span`,{className:`text-muted italic`,children:s(_.AUTOMATIONS$DETAIL$LOGS_EMPTY)})})]}),i?.status===j.FAILED&&(0,K.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,K.jsx)(nt,{run:i,automation:a,stderr:v})})]})]})}function ot(e,t){return new Date(e).toLocaleDateString(t,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function st(e){if(!e)return!0;let t=new Date(e).getTime();return Number.isNaN(t)||t===0}function ct(e){return`/conversations/${e}`}function lt(e){return typeof e!=`number`||!Number.isFinite(e)?null:`$${e.toFixed(4)}`}function ut({run:e,automation:t}){let{t:n,i18n:r}=o(`openhands`),i=!!e.conversation_id,a=!!e.bash_command_id,s=e.status===j.COMPLETED||e.status===j.FAILED,c=!i&&s,[l,u]=(0,G.useState)(!1),[d]=(0,G.useState)(()=>new Date().toISOString()),f=ot(st(e.started_at)?d:e.started_at,r.language),p=lt(e.cost),m=a?(0,K.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),e.preventDefault(),u(!0)},className:`rounded-md p-1 text-muted hover:bg-surface-raised hover:text-foreground focus:bg-surface-raised focus:outline-none`,"aria-label":n(_.AUTOMATIONS$DETAIL$LOGS_VIEW,{timestamp:f}),title:n(_.AUTOMATIONS$DETAIL$LOGS_VIEW_SHORT),children:(0,K.jsx)(A,{className:`size-4`})}):null,h=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`text-sm text-content`,children:f}),c&&(0,K.jsx)(`span`,{className:`text-xs text-muted`,children:n(_.AUTOMATIONS$DETAIL$NO_CONVERSATION)})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p&&(0,K.jsx)(`span`,{"data-testid":`run-cost`,title:n(_.AUTOMATIONS$DETAIL$RUN_COST),className:`text-xs tabular-nums text-muted`,children:p}),m,(0,K.jsx)(le,{status:e.status})]})]});return(0,K.jsxs)(K.Fragment,{children:[i&&e.conversation_id?(0,K.jsx)(`a`,{href:ct(e.conversation_id),className:`flex items-center justify-between px-5 py-3 transition-colors cursor-pointer hover:bg-surface-raised focus:bg-surface-raised focus:outline-none`,"aria-label":`View conversation for run at ${f}`,children:h}):(0,K.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 cursor-default`,children:h}),a&&(0,K.jsx)(at,{conversationId:e.conversation_id,bashCommandId:e.bash_command_id,isOpen:l,onClose:()=>u(!1),run:e,automation:t})]})}var Q=20,dt=100;function ft({automation:e,highlightedRunId:t=null}){let{t:n}=o(`openhands`),r=h(),{trackAutomationActivityLogExported:i}=w(),[a,s]=(0,G.useState)(Q),c=(0,G.useRef)(null),[l,u]=(0,G.useState)(!1),{data:f,isLoading:p}=M({id:e.id,limit:a,offset:0}),m=f?f.total>f.runs.length:!1,g=!p&&(f?.total??0)>0&&!l,v=async t=>{if(g){u(!0);try{await Ge({automation:e,format:t,conversationBaseUrl:window.location.origin}),i({backendKind:r.backend.kind,format:t})}catch(e){d(F(e,n(_.AUTOMATIONS$DETAIL$EXPORT_ACTIVITY_LOG_ERROR)))}finally{u(!1)}}};return(0,G.useEffect)(()=>{if(!(!t||!f?.runs.length)){if(f.runs.findIndex(e=>e.id===t)<0){m&&a<dt&&s(e=>e+Q);return}c.current?.scrollIntoView({behavior:`smooth`,block:`center`})}},[f?.runs,m,t,a]),(0,K.jsxs)(`div`,{"data-testid":`automation-activity-log`,className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,K.jsx)(`span`,{className:`size-4 text-muted`,children:(0,K.jsx)(X,{className:`size-4`})}),(0,K.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:n(_.AUTOMATIONS$DETAIL$ACTIVITY_LOG)}),(0,K.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,"data-testid":`activity-log-export-json`,disabled:!g,onClick:()=>void v(`json`),className:`text-sm text-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,children:n(_.AUTOMATIONS$DETAIL$EXPORT_JSON)}),(0,K.jsx)(`button`,{type:`button`,"data-testid":`activity-log-export-csv`,disabled:!g,onClick:()=>void v(`csv`),className:`text-sm text-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,children:n(_.AUTOMATIONS$DETAIL$EXPORT_CSV)})]})]}),p&&(0,K.jsx)(`div`,{className:`space-y-1 p-5`,children:Array.from({length:3}).map((e,t)=>(0,K.jsxs)(`div`,{className:`flex items-center justify-between py-3`,children:[(0,K.jsx)(`div`,{className:`h-5 w-64 animate-pulse rounded bg-surface-raised`}),(0,K.jsx)(`div`,{className:`h-6 w-24 animate-pulse rounded-full bg-surface-raised`})]},`skeleton-${t}`))}),!p&&f?.runs.length===0&&(0,K.jsx)(`p`,{className:`px-5 py-8 text-center text-sm text-muted`,children:n(_.AUTOMATIONS$DETAIL$NO_RUNS)}),!p&&f&&f.runs.length>0&&(0,K.jsxs)(`div`,{children:[f.runs.map((n,r)=>{let i=n.id===t;return(0,K.jsx)(`div`,{ref:i?c:void 0,"data-testid":i?`automation-run-highlight-${n.id}`:void 0,className:y(r>0?`border-t border-[var(--oh-border)]`:``,i&&`bg-[var(--oh-focus)]/10`),children:(0,K.jsx)(ut,{run:n,automation:e})},n.id)}),m&&(0,K.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-5 py-3`,children:(0,K.jsx)(`button`,{type:`button`,onClick:()=>s(e=>e+Q),className:`text-sm text-muted hover:text-foreground`,children:n(_.AUTOMATIONS$DETAIL$LOAD_MORE_RUNS)})})]})]})}function $({className:e}){return(0,K.jsx)(`div`,{className:y(`animate-pulse rounded bg-surface-raised`,e)})}function pt(){return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`detail-skeleton`,children:[(0,K.jsx)($,{className:`h-5 w-40`}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)($,{className:`h-6 w-48`}),(0,K.jsx)($,{className:`h-6 w-16 rounded-full`})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)($,{className:`h-6 w-11 rounded-full`}),(0,K.jsx)($,{className:`h-8 w-8`})]})]}),(0,K.jsx)($,{className:`h-5 w-96`}),(0,K.jsx)($,{className:`h-36 w-full rounded-2xl`}),(0,K.jsx)($,{className:`h-72 w-full rounded-2xl`}),(0,K.jsx)($,{className:`h-32 w-full rounded-2xl`}),(0,K.jsx)($,{className:`h-40 w-full rounded-2xl`})]})}function mt(){let{t:e}=o(`openhands`);return(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,K.jsx)(ve,{className:`size-12 text-muted`}),(0,K.jsx)(`p`,{className:`mt-4 text-sm font-medium text-content`,children:e(_.AUTOMATIONS$DETAIL$NOT_FOUND_TITLE)}),(0,K.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:e(_.AUTOMATIONS$DETAIL$NOT_FOUND_MESSAGE)}),(0,K.jsx)(`div`,{className:`mt-6`,children:(0,K.jsx)(H,{})})]})}var ht=()=>{if(!S())throw new Response(null,{status:404,statusText:`Not Found`});return null},gt=a(function(){let{t:e}=o(`openhands`),{automationId:t}=r(),[n]=i(),a=n.get(`run`),{navigate:s}=D(),[c,l]=(0,G.useState)(!1),[u,p]=(0,G.useState)(!1),{data:m,isLoading:g,refetch:y}=re(),b=m?.status===`ok`,x=h(),S=(0,G.useRef)(x.backend.id).current!==x.backend.id,{data:E,isLoading:te,isError:O,error:k,refetch:A}=ae({id:t??``,enabled:b&&!S}),{trackPrebuiltAutomationEnabled:ne,trackAutomationExported:j}=w(),M=oe(),N=se(),P=ie(),I=O&&ee(k)===404;if(g)return(0,K.jsx)(`div`,{className:`min-h-full`,children:(0,K.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,K.jsx)(pt,{})})});if(!b)return(0,K.jsx)(`div`,{className:`min-h-full`,children:(0,K.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,K.jsx)(_e,{onRetry:y})})});if(te)return(0,K.jsx)(`div`,{className:`min-h-full`,children:(0,K.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,K.jsx)(pt,{})})});if(I)return(0,K.jsx)(`div`,{className:`min-h-full`,children:(0,K.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,K.jsx)(mt,{})})});if(O||!E)return(0,K.jsx)(`div`,{className:`min-h-full`,children:(0,K.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,K.jsx)(ye,{onRetry:()=>A()})})});let L=()=>{let e=!E.enabled;M.mutate({id:E.id,enabled:e}),e&&ne({automationId:E.id,automationName:E.name})},R=()=>{N.mutate(E.id,{onSuccess:()=>{s?.(T())}})},z=()=>{P.mutate(E.id,{onSuccess:()=>{f(e(_.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:t=>{d(F(t,e(_.AUTOMATIONS$RUN_NOW_ERROR)))}})},B=()=>{let e=`${JSON.stringify(xe(E),null,2)}\n`;v(new Blob([e],{type:`application/json`}),Se(E)),j({backendKind:x.backend.kind})},V=x.backend.kind===`local`;return(0,K.jsx)(`div`,{className:`min-h-full`,children:(0,K.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,K.jsx)(H,{}),(0,K.jsx)(Ee,{automation:E,onToggle:L,onEdit:V?()=>p(!0):void 0,onDelete:()=>l(!0),onExport:B,onDownloadTarball:()=>C.downloadTarball(E.id,E.name),onRunNow:z,isRunningNow:P.isPending}),E.prompt&&(0,K.jsx)(ke,{prompt:E.prompt}),(0,K.jsx)(Ne,{automation:E}),E.plugins&&E.plugins.length>0&&(0,K.jsx)(Ie,{plugins:E.plugins}),(0,K.jsx)(Le,{createdAt:E.created_at,lastRunAt:E.last_triggered_at}),(0,K.jsx)(ft,{automation:E,highlightedRunId:a}),(0,K.jsx)(be,{automationName:E.name,isOpen:c,onConfirm:R,onCancel:()=>l(!1)}),V&&(0,K.jsx)(pe,{automation:E,isOpen:u,onClose:()=>p(!1)})]})})})});export{ht as clientLoader,gt as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{W as n}from"./utils-DaCIEEQP.js";import{T as r}from"./use-tracking-D5t9otIF.js";import{r as i}from"./modal-classes-BAb4Y_BG.js";import{t as a}from"./x-mark-BopmFoBq.js";var o=e();function s({automationName:e,isOpen:r,onConfirm:s,onCancel:c}){let{t:l}=t(`openhands`);return r?(0,o.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,o.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:c,onKeyDown:e=>{e.key===`Escape`&&c()},role:`presentation`}),(0,o.jsxs)(`div`,{className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,o.jsx)(`button`,{type:`button`,onClick:c,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":l(n.BUTTON$CLOSE),children:(0,o.jsx)(a,{className:`size-5`})}),(0,o.jsx)(`h2`,{className:i,children:l(n.AUTOMATIONS$DELETE_CONFIRM_TITLE)}),(0,o.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:l(n.AUTOMATIONS$DELETE_CONFIRM_MESSAGE,{name:e})}),(0,o.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,o.jsx)(`button`,{type:`button`,onClick:c,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:l(n.AUTOMATIONS$CANCEL)}),(0,o.jsx)(`button`,{type:`button`,onClick:s,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:l(n.AUTOMATIONS$DELETE)})]})]})]}):null}var c=new Set([`cron`,`schedule`,`event`]),l=class extends Error{issues;constructor(e){super(e.join(`
|
|
2
|
+
`)),this.name=`AutomationFileValidationError`,this.issues=e}};function u(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function d(e,t,n,r){let i=e[t];if(typeof i!=`string`||i.trim().length===0){r.push(`${n}: expected a non-empty string`);return}return i}function f(e,t,n,r){let i=e[t];if(i!==void 0){if(typeof i!=`string`){r.push(`${n}: expected a string`);return}return i}}function p(e,t){if(!u(e)){t.push(`spec.trigger: expected an object`);return}let n=d(e,`type`,`spec.trigger.type`,t);n&&!c.has(n)&&t.push(`spec.trigger.type: expected one of "cron", "schedule", or "event"`);let r=f(e,`schedule`,`spec.trigger.schedule`,t),i=f(e,`schedule_human`,`spec.trigger.schedule_human`,t),a=f(e,`timezone`,`spec.trigger.timezone`,t),o=f(e,`source`,`spec.trigger.source`,t),s=f(e,`filter`,`spec.trigger.filter`,t),l;if(e.on!==void 0&&(typeof e.on==`string`||Array.isArray(e.on)&&e.on.length>0&&e.on.every(e=>typeof e==`string`&&e.trim().length>0)?l=e.on:t.push(`spec.trigger.on: expected a string or a non-empty array of strings`)),(n===`cron`||n===`schedule`)&&!r?.trim()&&t.push(`spec.trigger.schedule: required for a scheduled trigger`),n===`event`&&(o?.trim()||t.push(`spec.trigger.source: required for an event trigger`),(l===void 0||typeof l==`string`&&l.trim().length===0)&&t.push(`spec.trigger.on: required for an event trigger`)),!(!n||!c.has(n)))return{type:n,...r!==void 0&&{schedule:r},...i!==void 0&&{schedule_human:i},...a!==void 0&&{timezone:a},...o!==void 0&&{source:o},...l!==void 0&&{on:l},...s!==void 0&&{filter:s}}}function m(e){let t=e.timezone??e.trigger.timezone,n={name:e.name,trigger:{...e.trigger},enabled:e.enabled,prompt:e.prompt,...e.repository!==void 0&&{repository:e.repository},...e.model!==void 0&&{model:e.model},...e.timeout!=null&&{timeout:e.timeout},...e.branch!==void 0&&{branch:e.branch},...e.plugins!==void 0&&{plugins:[...e.plugins]},...e.notification!==void 0&&{notification:e.notification},...t!==void 0&&{timezone:t}},i=r();return{version:i.fileVersion,kind:i.fileKind,spec:n}}function h(e){return`${e.name.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||e.id}${r().filenameSuffix}`}function g(e){let t=[];if(!u(e))throw new l([`file: expected a JSON object`]);let n=r();if(e.version!==n.fileVersion&&t.push(`version: expected ${n.fileVersion}`),e.kind!==n.fileKind&&t.push(`kind: expected "${n.fileKind}"`),!u(e.spec))throw t.push(`spec: expected an object`),new l(t);let i=d(e.spec,`name`,`spec.name`,t),a=d(e.spec,`prompt`,`spec.prompt`,t),o=p(e.spec.trigger,t),s=e.spec.enabled;typeof s!=`boolean`&&t.push(`spec.enabled: expected a boolean`);let c=f(e.spec,`repository`,`spec.repository`,t),m=f(e.spec,`branch`,`spec.branch`,t),h=f(e.spec,`notification`,`spec.notification`,t),g=f(e.spec,`timezone`,`spec.timezone`,t),_;e.spec.model===null||e.spec.model===void 0||typeof e.spec.model==`string`&&e.spec.model.trim().length>0?_=e.spec.model:t.push(`spec.model: expected a non-empty string or null`);let v;e.spec.timeout===null||e.spec.timeout===void 0||typeof e.spec.timeout==`number`&&Number.isInteger(e.spec.timeout)&&e.spec.timeout>0?v=e.spec.timeout:t.push(`spec.timeout: expected a positive integer`);let y;if(e.spec.plugins!==void 0&&(Array.isArray(e.spec.plugins)&&e.spec.plugins.every(e=>typeof e==`string`&&e.trim().length>0)?y=[...e.spec.plugins]:t.push(`spec.plugins: expected an array of non-empty strings`)),t.length>0||!i||!a||!o)throw new l(t);return{name:i,prompt:a,trigger:o,enabled:s,...c!==void 0&&{repository:c},..._!==void 0&&{model:_},...v!==void 0&&{timeout:v},...m!==void 0&&{branch:m},...y!==void 0&&{plugins:y},...h!==void 0&&{notification:h},...g!==void 0&&{timezone:g}}}export{s as i,g as n,m as r,h 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{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{t as o}from"./useMutation-DFnzkf6f.js";import{t as s}from"./useQuery-BXWbZBZl.js";import{Mt as c,Nt as l,n as u}from"./active-backend-context-DKFSMbn3.js";import{W as d,t as f}from"./utils-DaCIEEQP.js";import{t as p}from"./check-Cf2YoT90.js";import{t as m}from"./refresh-cw-Bh69DyYO.js";import{t as h}from"./triangle-alert-SM-q4NU_.js";import{n as g,t as _}from"./use-tracking-D5t9otIF.js";import{t as v}from"./use-settings-C5VhGpqd.js";import{t as y}from"./brand-button-Dxv6PDeN.js";import{t as b}from"./settings-input-C03KUoSC.js";import{t as x}from"./format-time-delta-BIR5Os7T.js";import{t as S}from"./folder-C1ou4_DT.js";import{n as C,t as w}from"./use-automation-health-BxXdzZMP.js";import{t as T}from"./settings-switch-CQE0EGC-.js";import{n as E}from"./api-error-message-BJyfWp6p.js";import{t as D}from"./use-has-permission-B3C8rQmR.js";import{t as O}from"./parse-git-remote-url-DpDM9bK6.js";import{n as k,r as A,t as j}from"./error-state-BALXiBNy.js";import{a as M,i as N,n as P,r as F,t as ee}from"./cog-C4rrw-ZK.js";var I=e(t()),L=[`git-sync-status`];function R(e={}){let{enabled:t=!0,refetchInterval:n=!1}=e,r=u();return s({queryKey:[...L,r.backend.id,r.orgId],queryFn:()=>g.getGitSyncStatus(),staleTime:10*1e3,enabled:t,refetchInterval:n,retry:(e,t)=>v(t)===void 0&&e<2,meta:{disableToast:!0}})}function te(){let e=i(),t=u(),{trackGitSyncConfigUpdated:n}=_();return o({mutationFn:e=>g.updateGitSyncConfig(e),onSuccess:async r=>{let i=[...L,t.backend.id,t.orgId];await e.cancelQueries({queryKey:i}),e.setQueryData(i,r),n({backendKind:t.backend.kind})},meta:{disableToast:!0}})}function ne(){return o({mutationFn:e=>g.checkGitSyncConfig(e),retry:!1,meta:{disableToast:!0}})}function z(){let e=i(),t=u(),{trackGitSyncTriggered:n}=_();return o({mutationFn:()=>g.triggerGitSync(),onSuccess:()=>{e.invalidateQueries({queryKey:L}),n({backendKind:t.backend.kind})},meta:{disableToast:!0}})}var B=n();function V({className:e}){return(0,B.jsx)(`div`,{className:f(`animate-pulse rounded bg-surface-raised`,e)})}function H(){return(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`git-sync-skeleton`,children:[(0,B.jsx)(V,{className:`h-5 w-40`}),(0,B.jsx)(V,{className:`h-6 w-48`}),(0,B.jsx)(V,{className:`h-5 w-96`}),(0,B.jsx)(V,{className:`h-48 w-full rounded-2xl`}),(0,B.jsx)(V,{className:`h-96 w-full rounded-2xl`})]})}function U(){let{t:e}=a(`openhands`);return(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,B.jsx)(A,{className:`size-12 text-muted`}),(0,B.jsx)(`p`,{className:`mt-4 text-sm font-medium text-content`,children:e(d.AUTOMATIONS$GIT_SYNC$NOT_LOCAL_TITLE)}),(0,B.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:e(d.AUTOMATIONS$GIT_SYNC$NOT_LOCAL_MESSAGE)}),(0,B.jsx)(`div`,{className:`mt-6`,children:(0,B.jsx)(M,{})})]})}function W(){let{t:e}=a(`openhands`);return(0,B.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,B.jsx)(A,{className:`size-12 text-muted`}),(0,B.jsx)(`p`,{className:`mt-4 text-sm font-medium text-content`,children:e(d.AUTOMATIONS$GIT_SYNC$UNSUPPORTED_TITLE)}),(0,B.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:e(d.AUTOMATIONS$GIT_SYNC$UNSUPPORTED_MESSAGE)}),(0,B.jsx)(`div`,{className:`mt-6`,children:(0,B.jsx)(M,{})})]})}function G({error:e,errorAt:t}){let{t:n}=a(`openhands`);return(0,B.jsxs)(`div`,{role:`alert`,"data-testid":`git-sync-error-banner`,className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words`,children:[(0,B.jsx)(`p`,{className:`font-medium`,children:n(d.AUTOMATIONS$GIT_SYNC$LAST_ERROR_TITLE)}),(0,B.jsx)(`p`,{className:`mt-1`,children:e}),t&&(0,B.jsx)(`p`,{className:`mt-1 text-xs text-red-300/70`,children:`${x(t)} ${n(d.CONVERSATION$AGO)}`})]})}var K=e=>(0,B.jsx)(`svg`,{viewBox:`0 0 18 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.4375 9C2.4375 5.37563 5.37563 2.4375 9 2.4375C12.6244 2.4375 15.5625 5.37563 15.5625 9C15.5625 12.6244 12.6244 15.5625 9 15.5625C5.37563 15.5625 2.4375 12.6244 2.4375 9ZM4.13812 6.5625C4.81317 5.21867 6.02897 4.19333 7.49996 3.77204C7.15155 4.17641 6.85182 4.65395 6.60713 5.17892C6.40828 5.60556 6.24263 6.06975 6.11494 6.5625H4.13812ZM3.72196 7.6875C3.61778 8.10783 3.5625 8.54746 3.5625 9C3.5625 9.45254 3.61778 9.89217 3.72196 10.3125H5.89738C5.84161 9.88758 5.8125 9.44852 5.8125 8.99998C5.8125 8.55142 5.84161 8.11239 5.89737 7.6875H3.72196ZM7.0333 7.6875C6.97087 8.10689 6.9375 8.54634 6.9375 8.99998C6.9375 9.45367 6.97087 9.89313 7.0333 10.3125H10.9667C11.0291 9.89311 11.0625 9.45367 11.0625 9.00002C11.0625 8.54637 11.0291 8.1069 10.9667 7.6875H7.0333ZM12.1026 7.6875C12.1584 8.1124 12.1875 8.55145 12.1875 9.00002C12.1875 9.44858 12.1584 9.88762 12.1026 10.3125H14.278C14.3822 9.89217 14.4375 9.45254 14.4375 9C14.4375 8.54746 14.3822 8.10783 14.278 7.6875H12.1026ZM13.8619 6.5625H11.885C11.7574 6.06976 11.5917 5.6056 11.3929 5.17897C11.1482 4.65397 10.8484 4.1764 10.5 3.77203C11.971 4.19331 13.1868 5.21866 13.8619 6.5625ZM10.7171 6.5625H7.28293C7.38007 6.23971 7.49559 5.93571 7.62681 5.65419C7.99835 4.85708 8.48101 4.26914 8.99997 3.92442C9.51895 4.26913 10.0016 4.8571 10.3732 5.65424C10.5044 5.93575 10.6199 6.23973 10.7171 6.5625ZM4.13812 11.4375H6.11496C6.24963 11.9572 6.42655 12.4452 6.64015 12.8909C6.87835 13.3879 7.16685 13.8413 7.50006 14.228C6.02902 13.8067 4.81318 12.7814 4.13812 11.4375ZM10.7171 11.4375H7.28295C7.3869 11.7829 7.51191 12.1068 7.65465 12.4047C8.02305 13.1733 8.49456 13.7398 9.00007 14.0756C9.51902 13.7308 10.0017 13.1429 10.3732 12.3458C10.5044 12.0643 10.6199 11.7603 10.7171 11.4375ZM11.3929 12.8211C11.5917 12.3944 11.7574 11.9303 11.8851 11.4375H13.8619C13.1868 12.7813 11.971 13.8067 10.5 14.228C10.8485 13.8236 11.1482 13.346 11.3929 12.8211Z`,fill:`currentColor`})});function q({tone:e,label:t,testId:n}){return(0,B.jsx)(`span`,{"data-testid":n,className:f(`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium`,e===`success`&&`bg-[var(--oh-success)]/15 text-[var(--oh-success)]`,e===`warning`&&`bg-[var(--oh-warning)]/15 text-[var(--oh-warning)]`,e===`neutral`&&`bg-surface-raised text-muted`),children:t})}function J(e){let[,t]=(0,I.useState)(0);(0,I.useEffect)(()=>{if(!e)return;let n=setInterval(()=>t(e=>e+1),1e3);return()=>clearInterval(n)},[e])}function Y({state:e,startedAt:t,pendingCount:n}){let{t:r}=a(`openhands`),i=e===`running`;if(J(i&&t!==null),e===`idle`)return null;let o=e===`failed`;return(0,B.jsxs)(`div`,{"data-testid":`git-sync-activity-row`,"data-state":e,className:f(`mt-4 flex flex-wrap items-center gap-x-2 gap-y-1 rounded-md px-3 py-2 text-sm`,i&&`bg-tertiary text-content`,e===`succeeded`&&`bg-green-500/10 text-green-300`,o&&`bg-red-500/10 text-red-300`),children:[i&&(0,B.jsx)(m,{className:`size-4 animate-spin`,"aria-hidden":!0}),e===`succeeded`&&(0,B.jsx)(p,{className:`size-4`,"aria-hidden":!0}),o&&(0,B.jsx)(h,{className:`size-4`,"aria-hidden":!0}),(0,B.jsxs)(`span`,{className:`font-medium`,children:[i&&r(d.AUTOMATIONS$GIT_SYNC$SYNCING),e===`succeeded`&&r(d.AUTOMATIONS$GIT_SYNC$SYNC_COMPLETED),o&&r(d.AUTOMATIONS$GIT_SYNC$SYNC_FAILED)]}),i&&t&&(0,B.jsx)(`span`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$SYNC_STARTED_AGO,{time:x(t)})}),i&&n>0&&(0,B.jsx)(`span`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$SYNC_PENDING_COUNT,{count:n})})]})}function X(e){let t=O(e);if(!t?.host||!t.repository)return null;if(/^https?:\/\//i.test(t.url)){let e=new URL(t.url);return e.username=``,e.password=``,e.pathname=e.pathname.replace(/\.git$/,``),e.toString()}return`https://${t.host}/${t.repository}`}function Z({status:e,onSyncNow:t,isSyncing:n,syncActivity:r,syncStartedAt:i,canManage:o}){let{t:s}=a(`openhands`),c=X(e.repo_url);return(0,B.jsxs)(F,{icon:(0,B.jsx)(N,{className:`size-4`}),title:s(d.AUTOMATIONS$GIT_SYNC$STATUS_TITLE),children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(q,{testId:`git-sync-enabled-pill`,tone:e.enabled?`success`:`neutral`,label:s(e.enabled?d.AUTOMATIONS$GIT_SYNC$ENABLED:d.AUTOMATIONS$GIT_SYNC$DISABLED)}),(0,B.jsx)(q,{testId:`git-sync-encryption-pill`,tone:e.encryption_enabled?`success`:`neutral`,label:s(e.encryption_enabled?d.AUTOMATIONS$GIT_SYNC$ENCRYPTED:d.AUTOMATIONS$GIT_SYNC$NOT_ENCRYPTED)})]}),(0,B.jsx)(y,{testId:`git-sync-now-button`,type:`button`,variant:`secondary`,isDisabled:!o||!e.enabled||n,onClick:t,startContent:(0,B.jsx)(m,{className:f(`size-4`,n&&`animate-spin`),"aria-hidden":!0}),children:s(n?d.AUTOMATIONS$GIT_SYNC$SYNCING:d.AUTOMATIONS$GIT_SYNC$SYNC_NOW)})]}),(0,B.jsx)(Y,{state:r,startedAt:i,pendingCount:e.dirty_count}),(0,B.jsxs)(`div`,{className:`mt-5 grid grid-cols-2 gap-x-4 gap-y-5`,children:[(0,B.jsx)(P,{icon:(0,B.jsx)(K,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$REPOSITORY),children:c?(0,B.jsx)(`a`,{"data-testid":`git-sync-repo-link`,href:c,target:`_blank`,rel:`noopener noreferrer`,className:`break-all underline transition-colors hover:text-foreground`,children:e.repo_url}):(0,B.jsx)(`span`,{className:`break-all`,children:e.repo_url||s(d.AUTOMATIONS$GIT_SYNC$NOT_CONFIGURED)})}),(0,B.jsx)(P,{icon:(0,B.jsx)(N,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$FIELD_BRANCH),children:e.branch}),(0,B.jsx)(P,{icon:(0,B.jsx)(S,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$FIELD_PATH),children:e.path}),(0,B.jsx)(P,{icon:(0,B.jsx)(N,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$LAST_SYNCED_COMMIT),children:e.last_synced_commit?(0,B.jsx)(`span`,{className:`font-mono`,children:e.last_synced_commit.slice(0,7)}):s(d.AUTOMATIONS$GIT_SYNC$NEVER_SYNCED)}),(0,B.jsx)(P,{icon:(0,B.jsx)(C,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$LAST_SYNCED_AT),children:e.last_synced_at?`${x(e.last_synced_at)} ${s(d.CONVERSATION$AGO)}`:s(d.AUTOMATIONS$GIT_SYNC$NEVER_SYNCED)}),(0,B.jsx)(P,{icon:(0,B.jsx)(C,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$FIELD_INTERVAL),children:e.interval_seconds>0?s(d.AUTOMATIONS$GIT_SYNC$EVERY_N_SECONDS,{count:e.interval_seconds}):s(d.AUTOMATIONS$GIT_SYNC$MANUAL_ONLY)}),(0,B.jsx)(P,{icon:(0,B.jsx)(C,{className:`size-3.5`}),label:s(d.AUTOMATIONS$GIT_SYNC$PENDING_CHANGES),children:(0,B.jsx)(`span`,{className:f(e.dirty_count>0&&`text-[var(--oh-warning)]`),children:e.dirty_count})})]})]})}var Q=`git-sync-save-and-sync`;function $({status:e,canManage:t,onSyncNow:n}){let{t:r}=a(`openhands`),{mutate:i,isPending:o}=te(),{mutateAsync:s,isPending:u}=ne(),[f,p]=(0,I.useState)(null),[m,h]=(0,I.useState)(!1),[g,_]=(0,I.useState)(!1),[x,S]=(0,I.useState)(!1),[C,w]=(0,I.useState)(!1),[D,O]=(0,I.useState)(!1),[k,A]=(0,I.useState)(!1),[j,M]=(0,I.useState)(null),N=j??e.enabled,P=j!==null&&N!==e.enabled,[L,R]=(0,I.useState)(``),[z,V]=(0,I.useState)(!1),[H,U]=(0,I.useState)(``),[W,G]=(0,I.useState)(!1),K=L.trim().length>0||z,q=H.trim().length>0||W,J=!P&&!m&&!g&&!x&&!C&&!D&&!k&&!K&&!q,Y=()=>{M(null),h(!1),_(!1),S(!1),w(!1),O(!1),A(!1),R(``),V(!1),U(``),G(!1),p(null)},X=e=>{V(e),R(``)},Z=e=>{G(e),U(``)},$=(e,t)=>e.get(t)?.toString().trim()||null,re=(e,t)=>{i(e,{onSuccess:()=>{l(r(d.AUTOMATIONS$GIT_SYNC$CONFIG_SAVED)),Y(),t&&n()},onError:e=>{c(v(e)===409?r(d.AUTOMATIONS$GIT_SYNC$ENABLE_BLOCKED_ERROR):E(e,r(d.ERROR$GENERIC)))}})},ie=e=>[`repo_url`,`branch`,`token`].filter(t=>t in e).map(t=>`${t}=${e[t]}`).join(`&`),ae=async e=>{try{let t=await s(e);return t.ok?null:t.detail??r(d.AUTOMATIONS$GIT_SYNC$CHECK_FAILED_TITLE)}catch{return null}};return(0,B.jsx)(F,{icon:(0,B.jsx)(ee,{className:`size-4`}),title:r(d.AUTOMATIONS$GIT_SYNC$CONFIG_TITLE),children:(0,B.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault();let t=e.nativeEvent.submitter?.getAttribute(`name`)===Q,n=new FormData(e.currentTarget),r={};if(P&&(r.enabled=N),m){let e=n.get(`git-sync-interval-input`)?.toString().trim(),t=Number(e);r.interval_seconds=e&&Number.isFinite(t)?Math.max(0,Math.trunc(t)):0}g&&(r.repo_url=$(n,`git-sync-repo-url-input`)),x&&(r.branch=$(n,`git-sync-branch-input`)),C&&(r.path=$(n,`git-sync-path-input`)),D&&(r.author_name=$(n,`git-sync-author-name-input`)),k&&(r.author_email=$(n,`git-sync-author-email-input`));let i=L.trim(),a=H.trim();z?r.token=null:i&&(r.token=i),W?r.encryption_key=null:a&&(r.encryption_key=a);let o=ie(r);if(o&&f?.key!==o){let e=await ae(r);if(e){p({key:o,detail:e});return}}p(null),re(r,t)},className:`flex flex-col gap-6`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(T,{testId:`git-sync-enabled-switch`,isToggled:N,isDisabled:!t,onToggle:M,children:r(d.AUTOMATIONS$GIT_SYNC$FIELD_ENABLED)}),(0,B.jsx)(`p`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$ENABLED_HELP)})]}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(b,{testId:`git-sync-interval-input`,name:`git-sync-interval-input`,type:`number`,min:0,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_INTERVAL),defaultValue:String(e.interval_seconds),isDisabled:!t,onChange:t=>h(t.trim()!==String(e.interval_seconds))}),(0,B.jsx)(`p`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$INTERVAL_HELP)})]}),(0,B.jsx)(b,{testId:`git-sync-repo-url-input`,name:`git-sync-repo-url-input`,type:`text`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_REPO_URL),defaultValue:e.repo_url,placeholder:r(d.AUTOMATIONS$GIT_SYNC$REPO_URL_PLACEHOLDER),isDisabled:!t,onChange:t=>_(t.trim()!==e.repo_url)}),(0,B.jsx)(b,{testId:`git-sync-branch-input`,name:`git-sync-branch-input`,type:`text`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_BRANCH),defaultValue:e.branch,placeholder:r(d.AUTOMATIONS$GIT_SYNC$BRANCH_PLACEHOLDER),isDisabled:!t,onChange:t=>S(t.trim()!==e.branch)}),(0,B.jsx)(b,{testId:`git-sync-path-input`,name:`git-sync-path-input`,type:`text`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_PATH),defaultValue:e.path,placeholder:r(d.AUTOMATIONS$GIT_SYNC$PATH_PLACEHOLDER),isDisabled:!t,onChange:t=>w(t.trim()!==e.path)}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(b,{testId:`git-sync-author-name-input`,name:`git-sync-author-name-input`,type:`text`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_AUTHOR_NAME),showOptionalTag:!0,defaultValue:``,isDisabled:!t,onChange:()=>O(!0)}),(0,B.jsx)(b,{testId:`git-sync-author-email-input`,name:`git-sync-author-email-input`,type:`email`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_AUTHOR_EMAIL),showOptionalTag:!0,defaultValue:``,isDisabled:!t,onChange:()=>A(!0)}),(0,B.jsx)(`p`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$AUTHOR_HELP)})]}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(b,{testId:`git-sync-token-input`,name:`git-sync-token-input`,type:`password`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_TOKEN),placeholder:r(d.AUTOMATIONS$GIT_SYNC$TOKEN_PLACEHOLDER),isDisabled:!t||z,onChange:R},z?`token-cleared`:`token-editable`),(0,B.jsx)(`p`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$TOKEN_HELP)}),(0,B.jsx)(T,{testId:`git-sync-clear-token-switch`,isToggled:z,isDisabled:!t,onToggle:X,children:r(d.AUTOMATIONS$GIT_SYNC$CLEAR_TOKEN)})]}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(b,{testId:`git-sync-encryption-key-input`,name:`git-sync-encryption-key-input`,type:`password`,label:r(d.AUTOMATIONS$GIT_SYNC$FIELD_ENCRYPTION_KEY),placeholder:r(e.encryption_enabled?d.AUTOMATIONS$GIT_SYNC$KEY_SET_PLACEHOLDER:d.AUTOMATIONS$GIT_SYNC$KEY_UNSET_PLACEHOLDER),isDisabled:!t||W,onChange:U},W?`key-cleared`:`key-editable`),(0,B.jsx)(`p`,{className:`text-xs text-muted`,children:r(d.AUTOMATIONS$GIT_SYNC$ENCRYPTION_KEY_HELP)}),(0,B.jsx)(T,{testId:`git-sync-clear-encryption-key-switch`,isToggled:W,isDisabled:!t,onToggle:Z,children:r(d.AUTOMATIONS$GIT_SYNC$CLEAR_ENCRYPTION_KEY)})]}),f&&(0,B.jsxs)(`div`,{role:`alert`,"data-testid":`git-sync-check-failure`,className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words`,children:[(0,B.jsx)(`p`,{className:`font-medium`,children:r(d.AUTOMATIONS$GIT_SYNC$CHECK_FAILED_TITLE)}),(0,B.jsx)(`p`,{className:`mt-1`,children:f.detail}),(0,B.jsx)(`p`,{className:`mt-1 text-xs text-red-300/70`,children:r(d.AUTOMATIONS$GIT_SYNC$CHECK_FAILED_HINT)})]}),(0,B.jsxs)(`div`,{className:`flex justify-start gap-3`,children:[(0,B.jsxs)(y,{testId:`git-sync-save-button`,variant:`primary`,type:`submit`,isDisabled:!t||o||u||J,children:[!o&&!u&&r(d.SETTINGS$SAVE_CHANGES),u&&r(d.AUTOMATIONS$GIT_SYNC$CHECKING),o&&r(d.SETTINGS$SAVING)]}),(0,B.jsx)(y,{testId:`git-sync-save-and-sync-button`,name:Q,variant:`secondary`,type:`submit`,isDisabled:!t||o||u||J||!N,children:r(d.AUTOMATIONS$GIT_SYNC$SAVE_AND_SYNC)})]})]})})}var re=3e3,ie=15e3,ae=3e4,oe=e=>({state:`running`,startedAt:e.sync_started_at??new Date().toISOString(),lastSyncedAt:e.last_synced_at,lastErrorAt:e.last_error_at}),se=r(function(){let{t:e}=a(`openhands`),t=u(),n=D(`manage_automations`),[r,i]=(0,I.useState)({state:`idle`}),o=r.state===`running`,{data:s,isLoading:l,refetch:f}=w(),p=s?.status===`ok`,m=t.backend.kind===`local`,{data:h,isLoading:g,error:_,refetch:y}=R({enabled:p&&m,refetchInterval:o?re:ie});(0,I.useEffect)(()=>{h?.sync_in_progress&&i(e=>e.state===`running`?e:oe(h))},[h]),(0,I.useEffect)(()=>{r.state!==`running`||!h||(h.last_error_at&&h.last_error_at!==r.lastErrorAt?i({state:`failed`}):h.last_synced_at&&h.last_synced_at!==r.lastSyncedAt&&i({state:`succeeded`}))},[h,r]),(0,I.useEffect)(()=>{if(!o)return;let e=setTimeout(()=>i({state:`idle`}),ae);return()=>clearTimeout(e)},[o,r]);let b=z();if(!m)return(0,B.jsx)(`div`,{className:`min-h-full`,children:(0,B.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,B.jsx)(U,{})})});if(l)return(0,B.jsx)(`div`,{className:`min-h-full`,children:(0,B.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,B.jsx)(H,{})})});if(!p)return(0,B.jsx)(`div`,{className:`min-h-full`,children:(0,B.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,B.jsx)(k,{onRetry:f})})});if(g)return(0,B.jsx)(`div`,{className:`min-h-full`,children:(0,B.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,B.jsx)(H,{})})});if(!h)return(0,B.jsx)(`div`,{className:`min-h-full`,children:(0,B.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:v(_)===404?(0,B.jsx)(W,{}):(0,B.jsx)(j,{onRetry:()=>y()})})});let x=()=>{b.mutate(void 0,{onSuccess:()=>i(oe(h)),onError:t=>{c(v(t)===503?e(d.AUTOMATIONS$GIT_SYNC$SYNC_DISABLED_ERROR):E(t,e(d.ERROR$GENERIC)))}})};return(0,B.jsx)(`div`,{className:`min-h-full`,children:(0,B.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,B.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,B.jsx)(M,{}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h1`,{className:`text-xl font-semibold text-content`,children:e(d.AUTOMATIONS$GIT_SYNC$TITLE)}),(0,B.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:e(d.AUTOMATIONS$GIT_SYNC$SUBTITLE)})]}),h.last_error&&(0,B.jsx)(G,{error:h.last_error,errorAt:h.last_error_at}),(0,B.jsx)(Z,{status:h,onSyncNow:x,isSyncing:b.isPending||o,syncActivity:r.state,syncStartedAt:o?r.startedAt:null,canManage:n}),(0,B.jsx)($,{status:h,canManage:n,onSyncNow:x})]})})})});export{se 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,P as i,R as a,U as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as s}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{M as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{X as l,n as u}from"./active-backend-context-DKFSMbn3.js";import{W as d,t as f}from"./utils-DaCIEEQP.js";import{r as p}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js";import{t as m}from"./loading-spinner-0L3ZTToZ.js";import{A as h,M as g,N as _,a as v,c as y,d as b,f as x,g as ee,h as te,i as S,j as C,m as ne,n as w,o as re,p as ie,r as ae,s as oe,t as se,u as T,v as E,y as D}from"./use-tracking-D5t9otIF.js";import{l as O}from"./settings-service.api-B2agVfjL.js";import{n as k}from"./use-settings-C5VhGpqd.js";import{t as ce}from"./modal-backdrop-BSzNhM4r.js";import{n as le}from"./modal-classes-BAb4Y_BG.js";import{l as A}from"./form-control-classes-CGw40z5h.js";import{t as j}from"./brand-button-Dxv6PDeN.js";import{t as M}from"./navigation-link-Bxo3-4vo.js";import{t as N}from"./settings-dropdown-input-tM0A0ipy.js";import{o as P,s as F,t as ue}from"./conversation-store-Ca3ghXap.js";import{t as de}from"./modal-close-button-CkJ0Ktjj.js";import{t as I}from"./settings-input-C03KUoSC.js";import{n as L}from"./use-create-conversation-DwN5vv2f.js";import{t as fe}from"./api-error-message-BJyfWp6p.js";import{f as R,n as z,o as B,s as pe}from"./mcp-marketplace-utils-C13fFccR.js";import{t as V}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-B2OLKL7N.js";import{n as me}from"./use-manifest-capabilities-3z0-1G59.js";import{t as H}from"./git-repo-dropdown-ai8qaNkD.js";import"./git-repo-dropdown-DGMEhz7d.js";var U=e(t(),1);function he(e){let t=e.requires.integrations,{data:n,isLoading:r}=k(),i=(0,U.useMemo)(()=>R(O(n?.agent_settings?.mcp_config)),[n?.agent_settings?.mcp_config]),a=(0,U.useMemo)(()=>{let e=pe(V);return Object.entries(t).map(([t,n])=>({id:t,requirement:n,entry:B(t,e)??null})).filter(({entry:e})=>!e||!z(e,i))},[t,i]),o=a.filter(({requirement:e})=>e.required!==!1);return{blockingIntegrations:o,warningIntegrations:a.filter(({requirement:e})=>e.required===!1),isBlocked:o.length>0,isLoading:r}}var ge={fieldErrors:{},formErrors:[]};function W(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function G(e,t){let n=e[0]===`body`?e.slice(1):e,r=[],i=t;return n.forEach(e=>{if(typeof e==`number`){Array.isArray(i)&&r.length>0&&(r[r.length-1]+=`[${e}]`,i=i[e]);return}W(i)&&e in i&&(r.push(e),i=i[e])}),r.join(`.`)}function K(e,t){if(!W(e))return[];if(Array.isArray(e.errors))return e.errors.flatMap(e=>!W(e)||typeof e.message!=`string`?[]:[{path:typeof e.field==`string`?e.field:``,message:e.message}]);let{detail:n}=e;return typeof n==`string`?[{path:``,message:n}]:Array.isArray(n)?n.flatMap(e=>!W(e)||typeof e.msg!=`string`?[]:[{path:G(Array.isArray(e.loc)?e.loc:[],t),message:e.msg}]):[]}function q(e,t){return t[e]??t[e.replace(/\[\d+\]/g,`[0]`)]}function _e(e,t){if(e.length===0)return ge;let n={},r=[];return e.forEach(({path:e,message:i})=>{let a=e?q(e,t):void 0;if(!a?.length){r.push(i);return}a.forEach(e=>{e in n||(n[e]=i)})}),{fieldErrors:n,formErrors:r}}var ve={fieldErrors:{},formErrors:[]},ye=[404,501];function be(e){return ye.some(t=>l(e,t)||c.isAxiosError(e)&&e.response?.status===t)}function xe(e){let t=(0,U.useRef)(0),n=(0,U.useMemo)(()=>re(e),[e]);return(0,U.useCallback)(async r=>{try{let i=v(e,r);if(!i)return null;t.current+=1;let a=t.current,o=await w.validateDraft(i);return a===t.current?o?.valid?ve:_e(K(o,i.draft),n):null}catch(e){return be(e)||console.warn(`Automation setup preflight failed:`,e),null}},[e,n])}var J=new TextEncoder,Y=512,Se=100,X=148;function Ce(e,t,n){let r=new Uint8Array(Y),i=(e,t)=>{for(let n=0;n<t.length;n+=1)r[e+n]=t.charCodeAt(n)&127},a=(e,t,n)=>i(e,n.toString(8).padStart(t-1,`0`));return r.set(t,0),a(100,8,e.mode??420),a(108,8,0),a(116,8,0),a(124,12,n),a(136,12,0),r[156]=48,i(257,`ustar`),i(263,`00`),r.fill(32,X,156),i(X,r.reduce((e,t)=>e+t,0).toString(8).padStart(6,`0`)),r[154]=0,r[155]=32,r}function we(e){let t=[];for(let n of e){let e=J.encode(n.name);if(e.length>Se)throw Error(`tar: name too long for a ustar header: ${n.name}`);let r=J.encode(n.content);t.push(Ce(n,e,r.length));let i=new Uint8Array(Math.ceil(r.length/Y)*Y);i.set(r),t.push(i)}t.push(new Uint8Array(Y*2));let n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(new ArrayBuffer(n)),i=0;for(let e of t)r.set(e,i),i+=e.length;return r}async function Te(e){let t=we(e),n=new ReadableStream({start(e){e.enqueue(t),e.close()}}),r=new Response(n.pipeThrough(new CompressionStream(`gzip`)));return new Uint8Array(await r.arrayBuffer())}function Ee(e){let t=p?.(e);if(!t||Object.keys(t).length===0)throw Error(`The published extensions package ships no bundle files for '${e}'.`);return t}function De(e){let t=(e.entrypoint.trim().split(` `)[0]??``).replace(/^\.\//,``);return new Set([e.setupScript,t in e.files?t:void 0].filter(e=>e!==void 0))}async function Oe(e,t){let n=e.setup.bundle;if(!n)throw Error(`'${e.id}' declares no bundle.`);let r=Ee(e.id),i=Object.keys(n.files).filter(e=>typeof r[e]!=`string`);if(i.length>0)throw Error(`The published extensions package is missing bundle files for '${e.id}': ${i.join(`, `)}.`);let a=S(e,t)?.template,o=De(n),s=Object.keys(n.files).sort().map(e=>({name:e,content:r[e],mode:o.has(e)?493:420}));return s.push({name:g,content:`${JSON.stringify(a?.config??{},null,2)}\n`}),Te(s)}function ke(){let e=L(),t=ue(e=>e.setMessageToSend),n=(0,U.useRef)(null),r=(0,U.useCallback)(async n=>{let r=await e.mutateAsync({});return r.conversation_id.startsWith(`task-`)&&r.task_id?F(r.task_id,n):P(r.conversation_id,{draftMessage:n}),window.setTimeout(()=>t(n),0),{response:{...r}}},[e,t]);return(0,U.useCallback)(async(e,t,i)=>{if(!i)return r(ae(e,t));if(oe(e)){let r=`${e.id}\n${JSON.stringify(t)}`,i=n.current?.path??null;if(n.current?.key!==r||i===null){let a=await Oe(e,t);i=await w.uploadAutomationTarball(e.id,a),n.current={key:r,path:i}}let a=S(e,t,i);if(!a)throw Error(`'${e.id}' produced no create request.`);return{response:await w.createAutomationDraft(a,e)}}return{response:await w.createAutomationDraft(i,e)}},[r])}var Z=n();function Ae({name:e,field:t,values:n,canListRepositories:r,placeholder:i,disabled:a,onChange:o,onBlur:c}){let{t:l}=s(`openhands`),[u,f]=(0,U.useState)(``),p=e=>{let t=e.trim();!t||n.includes(t)||(o([...n,t]),f(``),c())},m=e=>{o(n.filter(t=>t!==e)),c()};return(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,"data-testid":`setup-list-${e}`,children:[n.length>0&&(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:n.map(t=>(0,Z.jsxs)(`li`,{className:`flex items-center justify-between gap-2 rounded-md border border-[var(--oh-border)] px-3 py-1.5`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm`,children:t}),(0,Z.jsx)(j,{testId:`setup-list-${e}-remove-${t}`,type:`button`,variant:`ghost-danger`,isDisabled:a,ariaLabel:l(d.COMMON$REMOVE),onClick:()=>m(t),children:l(d.COMMON$REMOVE)})]},t))}),r?(0,Z.jsx)(H,{provider:t.provider??`github`,value:null,repositoryName:null,placeholder:i,disabled:a,onChange:e=>{e?.full_name&&p(e.full_name)}}):(0,Z.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Z.jsx)(`div`,{className:`grow`,children:(0,Z.jsx)(I,{testId:`setup-field-${e}`,name:e,label:``,ariaLabel:t.label,type:`text`,value:u,placeholder:i,isDisabled:a,onChange:f,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),p(u))},onBlur:()=>p(u)})}),(0,Z.jsx)(j,{testId:`setup-list-${e}-add`,type:`button`,variant:`secondary`,isDisabled:a||u.trim()===``,onClick:()=>p(u),children:l(d.BUTTON$ADD)})]})]})}function je({name:e,field:t,value:n,error:r,options:i,repository:a,disabled:o,onChange:c,onRepositoryChange:l,onBlur:p}){let{t:m}=s(`openhands`),{backend:h}=u(),g=`setup-field-${e}`,_=(0,Z.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:t.help}),v=h.kind===`cloud`,y=t.placeholder??m(d.SETUP$REPOSITORY_PLACEHOLDER);if(t.type===`repo-picker`&&t.multiple)return(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,Z.jsx)(Me,{field:t}),(0,Z.jsx)(Ae,{name:e,field:t,values:x(n),canListRepositories:v,placeholder:y,disabled:o,onChange:c,onBlur:p}),(0,Z.jsx)($,{testId:g,error:r}),_]});if(t.type===`repo-picker`&&v)return(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,Z.jsx)(Me,{field:t}),(0,Z.jsx)(H,{provider:t.provider??`github`,value:a?.id??null,repositoryName:a?.full_name??b(n)??null,placeholder:t.placeholder,disabled:o,onChange:e=>{l(e??null),c(e?.full_name??``),p()}}),(0,Z.jsx)($,{testId:g,error:r}),_]});if(t.type===`select`||t.type===`timezone`&&i.length>0)return(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,Z.jsx)(N,{testId:g,name:e,label:(0,Z.jsx)(Q,{field:t}),items:i.map(e=>({key:e.value,label:e.label})),selectedKey:b(n)||void 0,placeholder:t.placeholder,isDisabled:o,required:t.required,onSelectionChange:e=>{c(e===null?``:String(e)),p()}}),(0,Z.jsx)($,{testId:g,error:r}),_]});if(t.type===`textarea`)return(0,Z.jsxs)(`label`,{className:`flex w-full flex-col gap-2.5`,children:[(0,Z.jsx)(Q,{field:t}),(0,Z.jsx)(`textarea`,{"data-testid":g,name:e,rows:4,value:b(n),placeholder:t.placeholder,disabled:o,"aria-invalid":!!r,onChange:e=>c(e.target.value),onBlur:p,className:f(A,r&&`border-red-500`)}),(0,Z.jsx)($,{testId:g,error:r}),_]});let ee=t.type===`repo-picker`?y:t.placeholder;return(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,Z.jsx)(I,{testId:g,name:e,type:`text`,label:t.label,value:b(n),placeholder:ee,isDisabled:o,showRequiredTag:t.required,error:r,onChange:c,onBlur:p}),_]})}function Q({field:e}){return(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[e.label,e.required&&(0,Z.jsx)(`span`,{className:`text-sm leading-none text-red-400`,"aria-hidden":!0,children:`*`})]})}function Me({field:e}){return(0,Z.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Z.jsx)(Q,{field:e})})}function $({testId:e,error:t}){return t?(0,Z.jsx)(`p`,{role:`alert`,"data-testid":`${e}-error`,className:`-mt-1 text-xs text-red-400`,children:t}):null}var Ne=`/mcp`;function Pe({prerequisites:e}){let{t}=s(`openhands`),{blockingIntegrations:n,warningIntegrations:r}=e;return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`setup-prerequisites`,children:[[...n,...r].map(({id:e,requirement:t,entry:n})=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`text-sm`,children:n?.name??e}),(0,Z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:t.message})]},e)),(0,Z.jsx)(M,{to:Ne,className:`text-sm underline`,children:t(d.SETUP$MANAGE_INTEGRATIONS)})]})}function Fe({setup:e,values:t}){let{t:n}=s(`openhands`);return(0,Z.jsx)(`div`,{className:`flex flex-col gap-4`,"data-testid":`setup-review`,children:(0,Z.jsx)(`dl`,{className:`flex flex-col gap-3`,children:Object.entries(T(e)).map(([e,r])=>(0,Z.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,Z.jsx)(`dt`,{className:`text-xs text-[var(--oh-muted)]`,children:r.label}),(0,Z.jsx)(`dd`,{className:`text-sm break-words`,children:x(t[e]).join(`, `)||n(d.SETUP$EMPTY_VALUE)})]},e))})})}var Ie=400,Le={fieldErrors:{},formErrors:[]};function Re(e){return e.formErrors.length>0||Object.keys(e.fieldErrors).length>0}function ze(e){return typeof e.conversation_id==`string`?`/conversations/${e.conversation_id}`:typeof e.id==`string`?E(e.id):null}function Be({entry:e,onClose:t}){let{t:n}=s(`openhands`),r=a(),i=me(e),o=he(e),c=xe(e),l=ke(),{trackAutomationSetupOpened:u,trackAutomationSetupValidated:p,trackAutomationSetupCreated:h,trackAutomationSetupFailed:g}=se(),[v,b]=(0,U.useState)(`prerequisites`),[x,C]=(0,U.useState)(()=>ne(e.setup)),[w,ae]=(0,U.useState)({}),[oe,E]=(0,U.useState)({}),[D,O]=(0,U.useState)(Le),[k,A]=(0,U.useState)(!1),M=(0,U.useRef)(x),N=(0,U.useRef)(null);(0,U.useEffect)(()=>()=>{N.current&&window.clearTimeout(N.current)},[]);let P=(0,U.useMemo)(()=>T(e.setup),[e]),F=(0,U.useMemo)(()=>te(e.setup,i.capabilities),[e,i.capabilities]),ue=(0,U.useMemo)(()=>S(e,x),[e,x]),I=(0,U.useMemo)(()=>re(e),[e]),L=(0,U.useRef)(!1);(0,U.useEffect)(()=>{L.current||(L.current=!0,u({automationId:e.id}))},[e.id,u]);let R=(0,U.useMemo)(()=>y(e),[e]),z=i.supported===!1||R.length>0,B=[...i.unmet,...R],pe=o.blockingIntegrations.length>0||o.warningIntegrations.length>0,V=v===`prerequisites`&&!pe?`form`:v,H=(e,t)=>{M.current={...M.current,[e]:t},C(M.current),E(({[e]:t,...n})=>n),O(t=>{if(!(e in t.fieldErrors))return t;let{[e]:n,...r}=t.fieldErrors;return{...t,fieldErrors:r}})},ge=()=>{N.current&&window.clearTimeout(N.current),N.current=window.setTimeout(()=>{c(M.current).then(e=>{e&&O(e)})},Ie)},W=async()=>{if(V===`prerequisites`){b(`form`);return}let t=ee(e.setup,x,F);if(Object.keys(t).length>0){E(t);return}E({});let n=await c(x);if(n&&Re(n)){O(n);return}O(Le),p({automationId:e.id}),b(`review`)},G=async(i,a)=>{A(!0);try{let{response:n}=await l(e,x,i);h({automationId:e.id,setupMode:a});let o=ze(n);o?r(o,{replace:!0}):t()}catch(t){g({automationId:e.id,setupMode:a});let r=_e(K(fe(t),i),I);O(Re(r)?r:{fieldErrors:{},formErrors:[n(d.SETUP$SUBMIT_FAILED)]}),b(`form`)}finally{A(!1)}},q=()=>G(ue,e.setup.mode),ve=()=>G(null,`assisted`),ye=e.setup.mode===`direct`&&(_(e)!==null||e.setup.message!==void 0),be=e=>{let t=oe[e];return t?Ve(t,n):D.fieldErrors[e]},J=i.isLoading||o.isLoading,Y=z?n(d.SETUP$UNAVAILABLE_TITLE):V===`prerequisites`?n(d.SETUP$PREREQUISITES_TITLE):V===`review`?n(d.SETUP$REVIEW_TITLE):e.name;return(0,Z.jsx)(ce,{onClose:t,"aria-label":e.name,children:(0,Z.jsxs)(`div`,{"data-testid":`setup-dialog`,className:`relative flex max-h-[85vh] w-[92vw] max-w-lg flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,Z.jsx)(de,{onClose:t,testId:`setup-dialog-close`,disabled:k}),(0,Z.jsx)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:(0,Z.jsx)(`h2`,{className:f(`pr-6`,le),children:Y})}),(0,Z.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6`,children:[J&&(0,Z.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,Z.jsx)(m,{size:`small`})}),!J&&z&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(d.SETUP$UNSUPPORTED_MESSAGE)}),B.length>0&&(0,Z.jsx)(`p`,{"data-testid":`setup-unmet-requirements`,className:`text-sm text-[var(--oh-muted)]`,children:B.join(`, `)})]}),!J&&!z&&V===`prerequisites`&&(0,Z.jsx)(Pe,{prerequisites:o}),!J&&!z&&V===`form`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e.description}),e.setup.form.note&&(0,Z.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e.setup.form.note}),Object.entries(P).map(([e,t])=>(0,Z.jsx)(je,{name:e,field:t,value:x[e]??``,error:be(e),options:ie(e,t,F),repository:w[e]??null,disabled:k,onChange:t=>H(e,t),onRepositoryChange:t=>ae(n=>({...n,[e]:t})),onBlur:ge},e))]}),!J&&!z&&V===`review`&&(0,Z.jsx)(Fe,{setup:e.setup,values:x}),D.formErrors.map(e=>(0,Z.jsx)(`p`,{role:`alert`,"data-testid":`setup-form-error`,className:`pt-4 text-sm text-red-400`,children:e},e))]}),(0,Z.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[V===`review`&&(0,Z.jsx)(j,{testId:`setup-back-button`,type:`button`,variant:`secondary`,isDisabled:k,onClick:()=>b(`form`),children:n(d.BUTTON$BACK)}),z?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(j,{type:`button`,variant:`secondary`,isDisabled:k,onClick:t,children:n(d.BUTTON$CLOSE)}),ye&&(0,Z.jsx)(j,{testId:`setup-fallback-conversation`,type:`button`,variant:`primary`,isDisabled:k,onClick:ve,children:n(d.SETUP$FALLBACK_CONVERSATION)})]}):(0,Z.jsx)(j,{testId:`setup-continue-button`,type:`button`,variant:`primary`,isDisabled:J||k||V===`prerequisites`&&o.isBlocked,onClick:V===`review`?q:W,children:n(V===`review`?d.SETUP$CONFIRM:d.BUTTON$CONTINUE)})]})]})})}function Ve(e,t){switch(e.code){case`required`:return t(d.SETUP$VALIDATION_REQUIRED);case`minLength`:return t(d.SETUP$VALIDATION_MIN_LENGTH,{length:e.length});case`maxLength`:return t(d.SETUP$VALIDATION_MAX_LENGTH,{length:e.length});case`invalidOption`:return t(d.SETUP$VALIDATION_INVALID_OPTION);case`unsafeExpressionLiteral`:return t(d.SETUP$VALIDATION_UNSAFE_VALUE);default:return e}}var He=({params:e})=>{let t=C.findById(e.automationId??``);if(!t||!h())throw new Response(null,{status:404,statusText:`Not Found`});return{automationId:t.id}},Ue=o(function(){let{automationId:e}=i(),t=r(),n=a(),o=C.findById(e);return o?(0,Z.jsx)(Be,{entry:o,onClose:()=>{t.key==="default"?n(D(),{replace:!0}):n(-1)}}):null});export{He as clientLoader,Ue as default};
|