@openhands/agent-canvas 1.15.0 → 1.16.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 +15 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-BKvmTf82.js → acp-providers-CX3Lh9gj.js} +1 -1
- package/build/assets/active-backend-context-CrHTlgvN.js +2 -0
- package/build/assets/{agent-context-settings-D3PjSTU1.js → agent-context-settings-DSZlXrLj.js} +1 -1
- package/build/assets/{agent-profiles-settings-D4cY5U2T.js → agent-profiles-settings-Dzgb7G9z.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +86 -0
- package/build/assets/agent-settings-DLtsqaOs.js +2 -0
- package/build/assets/agent-settings-fFvR-XC2.js +1 -0
- package/build/assets/alert-banner-HP6mX-Vr.js +1 -0
- package/build/assets/{api-error-message-BJyfWp6p.js → api-error-message-B-XdSk3b.js} +1 -1
- package/build/assets/api-key-entry-screen-qTzrmJcr.js +1 -0
- package/build/assets/{app-settings-CbHqzQus.js → app-settings-dbnneVaV.js} +1 -1
- package/build/assets/automation-detail-BmwlCUAB.js +3 -0
- package/build/assets/{automation-export-BRopEHMu.js → automation-export-D3a3of4G.js} +1 -1
- package/build/assets/{automation-git-sync-CzyS4cn1.js → automation-git-sync-CprN5DcU.js} +1 -1
- package/build/assets/automation-setup-route-C40kXjMY.js +1 -0
- package/build/assets/{automation-templates-C_0FZgLG.js → automation-templates-BRppNh99.js} +1 -1
- package/build/assets/automations-list-DuNcRawl.js +1 -0
- package/build/assets/{back-nav-button-Dm9tIjVf.js → back-nav-button-Cjl_hoxq.js} +1 -1
- package/build/assets/backend-form-modal-lhGwzXFI.js +1 -0
- package/build/assets/{backend-synced-settings-badge-3fOwg6Bd.js → backend-synced-settings-badge-DPkz30BE.js} +1 -1
- package/build/assets/{badge-D4SqUCsR.js → badge-BU3S0VtE.js} +1 -1
- package/build/assets/{base-modal-C7_BDl_U.js → base-modal-D_L0oEbG.js} +1 -1
- package/build/assets/{bot-C-0Wu7vQ.js → bot-dMYHVfYM.js} +1 -1
- package/build/assets/{brand-button-Dxv6PDeN.js → brand-button-BAfk4wGP.js} +1 -1
- package/build/assets/browser-DSAo0tz1.js +46 -0
- package/build/assets/{browser-tab-BAl4ckJE.js → browser-tab-C9vy56R5.js} +1 -1
- package/build/assets/canvas-extension-page-dx1gFrfW.js +1 -0
- package/build/assets/canvas-extensions-8A-XhpgP.js +1 -0
- package/build/assets/canvas-extensions-runtime-2_x5Ezmi.js +1 -0
- package/build/assets/{chat-send-button-DWwR2cgI.js → chat-send-button-MUQqCZCS.js} +1 -1
- package/build/assets/check-CS0vmpQQ.js +1 -0
- package/build/assets/chevron-down-e1QBpjVy.js +1 -0
- package/build/assets/chevron-right-ZG4R5G4Q.js +1 -0
- package/build/assets/circle-check-DzWLNsbE.js +1 -0
- package/build/assets/{circle-plus-check-toggle-CBh_qomE.js → circle-plus-check-toggle-BO_kFZt3.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-287iIERo.js → cloud-funnel-analytics-CztBCCPp.js} +1 -1
- package/build/assets/{cog-C4rrw-ZK.js → cog-D-MPQW6G.js} +1 -1
- package/build/assets/command-menu--UIlGL72.js +1 -0
- package/build/assets/{commits-tab-DZtJgaDM.js → commits-tab-AnZwLvh-.js} +1 -1
- package/build/assets/{condenser-settings-BcNmYR4s.js → condenser-settings-DmEOje-7.js} +1 -1
- package/build/assets/{confirmation-modal-Bk4JRcCM.js → confirmation-modal-Dv1ktp8K.js} +1 -1
- package/build/assets/{context-menu-list-item-lVYETtY5.js → context-menu-list-item-I86vKcmM.js} +1 -1
- package/build/assets/conversation-BbGrAO4Z.js +93 -0
- package/build/assets/conversation-mYT6NAoj.js +1 -0
- package/build/assets/conversation-panel-mYT6NAoj.js +1 -0
- package/build/assets/conversation-state-store-B0ImPLHO.js +1 -0
- package/build/assets/{conversation-tab-empty-state-HJtkmHZj.js → conversation-tab-empty-state-FIbh_lc8.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Cjkswvnj.js → copy-to-clipboard-button-Ca8iSkkA.js} +1 -1
- package/build/assets/{device-verify-EZhHhBT7.js → device-verify-Bhn2e_Ye.js} +1 -1
- package/build/assets/{dropdown-classes-DJe-E6MC.js → dropdown-classes-Bc1djN0-.js} +1 -1
- package/build/assets/{edit-automation-modal-D-urtv8n.js → edit-automation-modal-DadGbJ2u.js} +1 -1
- package/build/assets/empty-state-BoGVDecT.js +1 -0
- package/build/assets/{entry.client-C7Bi2tkU.js → entry.client-CqyPPjOq.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DliX_Lo0.js → enum-filter-dropdown-Bgca129f.js} +1 -1
- package/build/assets/{environment-switch-overlay-CEKrFiMw.js → environment-switch-overlay-BmBRT7gv.js} +1 -1
- package/build/assets/{error-state-BALXiBNy.js → error-state-Body8Ngd.js} +1 -1
- package/build/assets/extensions-hub-CcDqq_vR.js +1 -0
- package/build/assets/extensions-navigation-Cr4yzYk4.js +1 -0
- package/build/assets/{external-link-DFpYunfj.js → external-link-DKUlnCQV.js} +1 -1
- package/build/assets/files-tab-D4o2VyE_.js +1 -0
- package/build/assets/{form-control-classes-CGw40z5h.js → form-control-classes-Bkh5FGrD.js} +1 -1
- package/build/assets/format-model-name-CasAP3nd.js +1 -0
- package/build/assets/get-git-path-ChKDVHZp.js +1 -0
- package/build/assets/{git-repo-dropdown-ai8qaNkD.js → git-repo-dropdown-4ROKl2cB.js} +1 -1
- package/build/assets/git-repo-dropdown-BkqzkMmM.js +1 -0
- package/build/assets/{highlighted-source-view-C3sxykQi.js → highlighted-source-view-BFRxGT_Q.js} +1 -1
- package/build/assets/home-ChpSuepX.js +1 -0
- package/build/assets/home-DIsB440S.js +1 -0
- package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +1 -0
- package/build/assets/home-store-CY9Ej0ux.js +1 -0
- package/build/assets/index-home-BdlrFIif.js +1 -0
- package/build/assets/info-B6RQawoW.js +1 -0
- package/build/assets/install-server-modal-Dpy89p4g.js +1 -0
- package/build/assets/kebab-menu-item-content-D8hSNGmm.js +1 -0
- package/build/assets/{key-Cn5za3rg.js → key-BmVyxs-2.js} +1 -1
- package/build/assets/{launch-C1ieiOGe.js → launch-IrTDEFCs.js} +1 -1
- package/build/assets/list-filter-DsEK7NFC.js +1 -0
- package/build/assets/{list-todo-Cuu-STFc.js → list-todo-apgLVjMw.js} +1 -1
- package/build/assets/llm-not-configured-banner-CIFABh3K.js +27 -0
- package/build/assets/llm-settings-B9juXhIa.js +1 -0
- package/build/assets/llm-settings-De1d5dfr.js +1 -0
- package/build/assets/llm-subscription-service-BpJ0ouQo.js +1 -0
- package/build/assets/loader-circle-CC1au6hc.js +1 -0
- package/build/assets/{loading-spinner-0L3ZTToZ.js → loading-spinner-BY9N3pOe.js} +1 -1
- package/build/assets/manage-backends-modal-BrPV3oB-.js +1 -0
- package/build/assets/manifest-80fb1c29.js +1 -0
- package/build/assets/{manifest-subpage-layout-BGhiUQbA.js → manifest-subpage-layout-CAOYzrYp.js} +1 -1
- package/build/assets/{map-provider-B9LTm23I.js → map-provider-Cu3Zgumb.js} +1 -1
- package/build/assets/markdown-renderer-BzTlxI8x.js +8 -0
- package/build/assets/{mcp-CKbR4Vft.js → mcp-BTs_SXfZ.js} +1 -1
- package/build/assets/{mcp-marketplace-utils-C13fFccR.js → mcp-marketplace-utils-AIBzzHTO.js} +1 -1
- package/build/assets/{mcp-page-Bm4K2NQq.js → mcp-page-BEBYqH_K.js} +2 -2
- package/build/assets/messages-DKV9cRc2.js +41 -0
- package/build/assets/{modal-body-CMOc2tLl.js → modal-body-BxZjsju9.js} +1 -1
- package/build/assets/{modal-classes-BAb4Y_BG.js → modal-classes-C8eycCwG.js} +1 -1
- package/build/assets/{modal-close-button-CkJ0Ktjj.js → modal-close-button-DDzdRvCs.js} +1 -1
- package/build/assets/{mouse-pointer-click-CsgRs_-r.js → mouse-pointer-click-Co2uyaPA.js} +1 -1
- package/build/assets/onboarding-DV_OXoeP.js +1 -0
- package/build/assets/onboarding-modal-rkyBYkeQ.js +1 -0
- package/build/assets/{organization-service.api-C8XpQ0pM.js → organization-service.api-DrYNkEN_.js} +1 -1
- package/build/assets/{pencil-Clh1Wjvh.js → pencil-47jAZH_V.js} +1 -1
- package/build/assets/pin-By41Vl5J.js +1 -0
- package/build/assets/{planner-tab-DQvDU3ap.js → planner-tab-C9uZmhme.js} +1 -1
- package/build/assets/{plug-BuQhHSSG.js → plug-CG5HFcNG.js} +1 -1
- package/build/assets/plugins-management-service-BMJgC3Ga.js +1 -0
- package/build/assets/plus-C7Slq-0I.js +1 -0
- package/build/assets/profiles-service.api-ChoKrL0l.js +1 -0
- package/build/assets/providers-BhMcY5nv.js +1 -0
- package/build/assets/proxy-9Fe1v5na.js +1 -0
- package/build/assets/{puzzle-A9pGxxai.js → puzzle-JM_QaRm0.js} +1 -1
- package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +1 -0
- package/build/assets/{refresh-cw-Bh69DyYO.js → refresh-cw-3q3Frrii.js} +1 -1
- package/build/assets/root-Dc8YmC9F.js +2 -0
- package/build/assets/root-VDaypvK4.css +1 -0
- package/build/assets/root-layout-CXkhSPYh.js +2 -0
- package/build/assets/schema-field-D-y9-LDb.js +1 -0
- package/build/assets/{sdk-section-page-HTffvm7Q.js → sdk-section-page-BlFiizlG.js} +1 -1
- package/build/assets/{secret-form-HTUbYw5o.js → secret-form-BB7the8W.js} +1 -1
- package/build/assets/secrets-service-ByZVENbp.js +1 -0
- package/build/assets/{secrets-settings-BizaTEr1.js → secrets-settings-B_GpxKW2.js} +1 -1
- package/build/assets/{settings-BlmrkwRi.js → settings-C0EWuBtA.js} +1 -1
- package/build/assets/settings-CKqk8ZnH.js +1 -0
- package/build/assets/{settings-dropdown-input-tM0A0ipy.js → settings-dropdown-input-BcwylHs2.js} +1 -1
- package/build/assets/{settings-index-CKq0b0Vg.js → settings-index-5w5UW2K3.js} +1 -1
- package/build/assets/{settings-input-C03KUoSC.js → settings-input-Db-1g8Ql.js} +1 -1
- package/build/assets/{settings-list-classes-BJ0g8rWj.js → settings-list-classes-BzeSZbF2.js} +1 -1
- package/build/assets/{settings-modal-AzEF1QPP.js → settings-modal-DfJ3tcJQ.js} +1 -1
- package/build/assets/settings-service.api-DJ1r62Zr.js +1 -0
- package/build/assets/{settings-switch-CQE0EGC-.js → settings-switch-CS-dJDmA.js} +1 -1
- package/build/assets/{settings-utils-ClYOkbbI.js → settings-utils-UYpEdPuD.js} +1 -1
- package/build/assets/shared-conversation-CA5ISEDy.js +1 -0
- package/build/assets/{shield-check-CFDViW82.js → shield-check-D2aCRd16.js} +1 -1
- package/build/assets/{sidebar-layout-D3hE08wK.js → sidebar-layout-D6fS8-Gl.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-BOtyJHwE.js → sidebar-mobile-menu-toggle-C_fb0Jki.js} +1 -1
- package/build/assets/sidebar-nav-link-DQQcMf1A.js +1 -0
- package/build/assets/{sidebar-onboarding-checklist-storage-3qYflszY.js → sidebar-onboarding-checklist-storage-BBkeI6Bp.js} +1 -1
- package/build/assets/sidebar-store-DGqHkVLw.js +1 -0
- package/build/assets/{skill-card-pill-row-CFxjoqxn.js → skill-card-pill-row-B27-xyig.js} +1 -1
- package/build/assets/skill-enablement-DXeaImBz.js +1 -0
- package/build/assets/skill-filter-w__3UCEE.js +2 -0
- package/build/assets/{skill-icon-badge-CPQJ6A-I.js → skill-icon-badge-RQkq8wvl.js} +1 -1
- package/build/assets/skill-scope-B42H-XOc.js +1 -0
- package/build/assets/skills-plugins-tgF8EiXC.js +1 -0
- package/build/assets/skills-settings-BgJ9PaOe.js +1 -0
- package/build/assets/{styled-tooltip-Dl06rkpY.js → styled-tooltip-C4jf5Fv9.js} +1 -1
- package/build/assets/{task-list-tab-04GNQuii.js → task-list-tab-C5zcaktH.js} +1 -1
- package/build/assets/{terminal-Cj0iHIW7.js → terminal-CNElN42a.js} +2 -2
- package/build/assets/{toggle-switch-Fd_QGz0r.js → toggle-switch-ChOLXv2n.js} +1 -1
- package/build/assets/{trash-2-Dl8_RGz0.js → trash-2-D7K26eDO.js} +1 -1
- package/build/assets/{trash-_RMt7Ayc.js → trash-D-HYiVYM.js} +1 -1
- package/build/assets/{triangle-alert-SM-q4NU_.js → triangle-alert-CtdXWHUI.js} +1 -1
- package/build/assets/{typography-SgFy466J.js → typography-v1KN0tzi.js} +1 -1
- package/build/assets/usage-tab-CVDffLPt.js +1 -0
- package/build/assets/use-acp-credential-form-XIQmpX6M.js +1 -0
- package/build/assets/{use-activate-agent-profile-B2NS8nA5.js → use-activate-agent-profile-BLfmvDiG.js} +1 -1
- package/build/assets/use-agent-profiles-Bd9Bvvp1.js +1 -0
- package/build/assets/{use-automation-health-BxXdzZMP.js → use-automation-health-E6NZi9rb.js} +1 -1
- package/build/assets/{use-automations-zYb0dUny.js → use-automations-xijQKIl9.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BWMahtUh.js → use-can-manage-org-profiles-CrJP5262.js} +1 -1
- package/build/assets/use-canvas-extensions-Bi693ujJ.js +1 -0
- package/build/assets/{use-cloud-current-user-id-CPHMDG-C.js → use-cloud-current-user-id-CDfAHpPX.js} +1 -1
- package/build/assets/use-config-A9QovgXO.js +1 -0
- package/build/assets/{use-create-conversation-DwN5vv2f.js → use-create-conversation-Dx3l7mFZ.js} +1 -1
- package/build/assets/use-create-secret-B9cUFWRG.js +1 -0
- package/build/assets/{use-get-secrets-BT4ihRwj.js → use-get-secrets-K3jmk-LH.js} +1 -1
- package/build/assets/use-is-authed-nTBcM7dE.js +1 -0
- package/build/assets/use-llm-configured-BV9nZ1_j.js +1 -0
- package/build/assets/use-llm-profiles-BO-P4Oyo.js +1 -0
- package/build/assets/use-manifest-capabilities-Cw_flwEz.js +1 -0
- package/build/assets/use-onboarding-completion-D8U7k4Qb.js +1 -0
- package/build/assets/use-pinned-home-route-CckOZrmb.js +1 -0
- package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +1 -0
- package/build/assets/use-save-agent-profile-BUjSsDXK.js +1 -0
- package/build/assets/{use-save-settings-CUZW6yXP.js → use-save-settings-DYqkKv7T.js} +1 -1
- package/build/assets/{use-settings-C5VhGpqd.js → use-settings-DSXLbvBl.js} +1 -1
- package/build/assets/{use-settings-nav-items-DHaUu1Dg.js → use-settings-nav-items-CwRw-CmX.js} +1 -1
- package/build/assets/use-tracking-D53y3TH9.js +3 -0
- package/build/assets/{use-user-conversation-DT0_QCnL.js → use-user-conversation-B9Gebw_g.js} +1 -1
- package/build/assets/{useInfiniteQuery-CgeUQPfs.js → useInfiniteQuery-C926xzY4.js} +1 -1
- package/build/assets/{useMutation-DFnzkf6f.js → useMutation-B-qc391N.js} +1 -1
- package/build/assets/{useQueries-BhbrGEf1.js → useQueries-DlbhlH9I.js} +1 -1
- package/build/assets/{useQuery-BXWbZBZl.js → useQuery-BSTgq1rl.js} +1 -1
- package/build/assets/utils-CN5ZfZy1.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-CTvDDiXg.js → vendor~conversation-panel~conversation-C8Fn4XOf.js} +1 -1
- package/build/assets/{vendor~entry.client-BFE7Llz9.js → vendor~entry.client-CoCfUXUF.js} +1 -1
- package/build/assets/{vendor~entry.client-BaKt_PIp.js → vendor~entry.client-DA2izTjq.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-BTyukeM-.js → vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js} +1 -1
- package/build/assets/{vendor~root-layout-BlUaZ18v.js → vendor~root-layout-C9Ju9DQg.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BYAWJwQX.js → vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-CHaLEBVR.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js} +2 -2
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js} +117 -13
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js} +42 -3
- package/build/assets/{verification-settings-Bj6bo097.js → verification-settings-gw_q6vkL.js} +1 -1
- package/build/assets/{wrench-hi7Q13dF.js → wrench-CUEI1krB.js} +1 -1
- package/build/assets/{x-DkgltWa0.js → x-DJdhbdmt.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +32 -16
- package/build/locales/ca/openhands.json +32 -16
- package/build/locales/de/openhands.json +32 -16
- package/build/locales/en/openhands.json +32 -16
- package/build/locales/es/openhands.json +32 -16
- package/build/locales/fr/openhands.json +32 -16
- package/build/locales/it/openhands.json +32 -16
- package/build/locales/ja/openhands.json +32 -16
- package/build/locales/ko-KR/openhands.json +32 -16
- package/build/locales/no/openhands.json +32 -16
- package/build/locales/pt/openhands.json +32 -16
- package/build/locales/tr/openhands.json +32 -16
- package/build/locales/uk/openhands.json +32 -16
- package/build/locales/zh-CN/openhands.json +32 -16
- package/build/locales/zh-TW/openhands.json +32 -16
- package/config/defaults.json +9 -5
- package/dist/api/agent-profiles-service/profile-field-support.d.ts +26 -0
- 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.js +118 -116
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.d.ts +21 -0
- package/dist/api/agent-server-compatibility.js +52 -38
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +26 -0
- package/dist/api/agent-server-config.js +18 -5
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/canvas-extensions-service.cjs +1 -0
- package/dist/api/canvas-extensions-service.d.ts +22 -0
- package/dist/api/canvas-extensions-service.js +4 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +6 -0
- package/dist/api/cloud/conversation-service.api.js +14 -6
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/conversation-file-upload.api.cjs +1 -1
- package/dist/api/conversation-file-upload.api.js +10 -10
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +11 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +129 -118
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.js +12 -12
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.js +8 -8
- package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.js +8 -8
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +3 -2
- package/dist/api/settings-service/settings-service.api.js +2 -1
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.js +40 -36
- package/dist/components/conversation-events/chat/event-message-components/event-group.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +114 -104
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/detail/run-phase.cjs +2 -0
- package/dist/components/features/automations/detail/run-phase.cjs.map +1 -0
- package/dist/components/features/automations/detail/run-phase.d.ts +89 -0
- package/dist/components/features/automations/detail/run-phase.js +72 -0
- package/dist/components/features/automations/detail/run-phase.js.map +1 -0
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.js +5 -11
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/canvas-extensions/add-canvas-extension-modal.d.ts +6 -0
- package/dist/components/features/canvas-extensions/canvas-extension-card.d.ts +9 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs +2 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs.map +1 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.d.ts +23 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js +19 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js.map +1 -0
- 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 +171 -168
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/chat-markdown-path-code.cjs +3 -0
- package/dist/components/features/chat/chat-markdown-path-code.cjs.map +1 -0
- package/dist/components/features/chat/chat-markdown-path-code.d.ts +27 -0
- package/dist/components/features/chat/chat-markdown-path-code.js +72 -0
- package/dist/components/features/chat/chat-markdown-path-code.js.map +1 -0
- package/dist/components/features/chat/path-component.cjs +1 -1
- package/dist/components/features/chat/path-component.cjs.map +1 -1
- package/dist/components/features/chat/path-component.d.ts +8 -2
- package/dist/components/features/chat/path-component.js +33 -21
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +38 -43
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +8 -5
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +22 -16
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
- package/dist/components/features/chat/user-message-body.cjs +1 -1
- package/dist/components/features/chat/user-message-body.cjs.map +1 -1
- package/dist/components/features/chat/user-message-body.d.ts +4 -0
- package/dist/components/features/chat/user-message-body.js +30 -24
- package/dist/components/features/chat/user-message-body.js.map +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.js +63 -81
- package/dist/components/features/conversation/conversation-overview-skills-panel.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 +50 -50
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js +3 -3
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.js +29 -28
- package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +5 -5
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +51 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +3 -4
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +5 -9
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +23 -6
- 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/provider-connection-modal.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/provider-connection-modal.js +3 -0
- package/dist/components/features/settings/sdk-settings/field-help.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.cjs.map +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.js +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.js.map +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +6 -6
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +10 -1
- package/dist/components/features/sidebar/sidebar-nav-link.js +54 -36
- package/dist/components/features/sidebar/sidebar-nav-link.js.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +143 -120
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +1 -1
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/skills/build-skill-pills.cjs +1 -1
- package/dist/components/features/skills/build-skill-pills.cjs.map +1 -1
- package/dist/components/features/skills/build-skill-pills.js +60 -52
- package/dist/components/features/skills/build-skill-pills.js.map +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +54 -43
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/features/skills/skill-filter.cjs +1 -1
- package/dist/components/features/skills/skill-filter.cjs.map +1 -1
- package/dist/components/features/skills/skill-filter.d.ts +8 -3
- package/dist/components/features/skills/skill-filter.js +69 -52
- package/dist/components/features/skills/skill-filter.js.map +1 -1
- package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-form.js +8 -8
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +9 -5
- package/dist/config/defaults.js.map +1 -1
- 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 +5 -5
- package/dist/extensions/canvas-extension-module-loader.d.ts +11 -0
- package/dist/hooks/mutation/use-manage-canvas-extensions.d.ts +12 -0
- package/dist/hooks/query/concurrency-limiter.cjs +2 -0
- package/dist/hooks/query/concurrency-limiter.cjs.map +1 -0
- package/dist/hooks/query/concurrency-limiter.d.ts +22 -0
- package/dist/hooks/query/concurrency-limiter.js +29 -0
- package/dist/hooks/query/concurrency-limiter.js.map +1 -0
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +4 -0
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.cjs +1 -1
- package/dist/hooks/query/use-active-conversation.js +4 -4
- package/dist/hooks/query/use-automations.cjs.map +1 -1
- package/dist/hooks/query/use-automations.js.map +1 -1
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.d.ts +1 -1
- package/dist/hooks/query/use-backends-health.js +50 -64
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-canvas-extensions.cjs +1 -0
- package/dist/hooks/query/use-canvas-extensions.d.ts +5 -0
- package/dist/hooks/query/use-canvas-extensions.js +3 -0
- 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-latest-automation-runs.cjs +1 -1
- package/dist/hooks/query/use-latest-automation-runs.js +1 -0
- 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 +19 -16
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +17 -10
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- 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-unified-vscode-url.cjs +1 -1
- package/dist/hooks/query/use-unified-vscode-url.cjs.map +1 -1
- package/dist/hooks/query/use-unified-vscode-url.d.ts +1 -0
- package/dist/hooks/query/use-unified-vscode-url.js +40 -26
- package/dist/hooks/query/use-unified-vscode-url.js.map +1 -1
- package/dist/hooks/query/use-workspace-file-content.cjs +1 -1
- package/dist/hooks/query/use-workspace-file-content.js +5 -5
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.js +6 -6
- package/dist/hooks/use-acp-credential-form.d.ts +6 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.cjs +1 -1
- package/dist/hooks/use-conversation-overview-git-diff-stats.js +4 -4
- package/dist/hooks/use-pinned-home-route.cjs +2 -0
- package/dist/hooks/use-pinned-home-route.cjs.map +1 -0
- package/dist/hooks/use-pinned-home-route.d.ts +33 -0
- package/dist/hooks/use-pinned-home-route.js +34 -0
- package/dist/hooks/use-pinned-home-route.js.map +1 -0
- package/dist/hooks/use-skill-enablement.cjs +2 -0
- package/dist/hooks/use-skill-enablement.cjs.map +1 -0
- package/dist/hooks/use-skill-enablement.d.ts +14 -0
- package/dist/hooks/use-skill-enablement.js +80 -0
- package/dist/hooks/use-skill-enablement.js.map +1 -0
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +29 -13
- 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 +538 -266
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -14
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/locales/ar/openhands.json +32 -16
- package/dist/locales/ca/openhands.json +32 -16
- package/dist/locales/de/openhands.json +32 -16
- package/dist/locales/en/openhands.json +32 -16
- package/dist/locales/es/openhands.json +32 -16
- package/dist/locales/fr/openhands.json +32 -16
- package/dist/locales/it/openhands.json +32 -16
- package/dist/locales/ja/openhands.json +32 -16
- package/dist/locales/ko-KR/openhands.json +32 -16
- package/dist/locales/no/openhands.json +32 -16
- package/dist/locales/pt/openhands.json +32 -16
- package/dist/locales/tr/openhands.json +32 -16
- package/dist/locales/uk/openhands.json +32 -16
- package/dist/locales/zh-CN/openhands.json +32 -16
- package/dist/locales/zh-TW/openhands.json +32 -16
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +6 -0
- package/dist/manifests/automation-interface.js +11 -8
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs +45 -4
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
- 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 +5 -0
- 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 +1 -1
- 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 +5 -0
- 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-bitbucket-pr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +30 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +65 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/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 +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +2 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +40 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
- 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 +74 -72
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +42 -3
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +22 -3
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +8 -7
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +2 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.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/agent-settings.d.ts +10 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +7 -7
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.cjs.map +1 -1
- package/dist/routes/files-tab.js +14 -14
- 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.js +122 -114
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/services/canvas-ui.cjs +1 -1
- package/dist/services/canvas-ui.cjs.map +1 -1
- package/dist/services/canvas-ui.d.ts +5 -0
- package/dist/services/canvas-ui.js +24 -10
- package/dist/services/canvas-ui.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +20 -0
- package/dist/types/automation.js.map +1 -1
- package/dist/types/canvas-extension.cjs +2 -0
- package/dist/types/canvas-extension.cjs.map +1 -0
- package/dist/types/canvas-extension.d.ts +77 -0
- package/dist/types/canvas-extension.js +6 -0
- package/dist/types/canvas-extension.js.map +1 -0
- package/dist/types/settings.d.ts +7 -0
- package/dist/ui/help-link.cjs +1 -1
- package/dist/ui/help-link.cjs.map +1 -1
- package/dist/ui/help-link.d.ts +6 -1
- package/dist/ui/help-link.js +32 -18
- package/dist/ui/help-link.js.map +1 -1
- package/dist/utils/acp-auth-display.d.ts +35 -0
- package/dist/utils/cache-utils.cjs +1 -1
- package/dist/utils/cache-utils.js +5 -5
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +7 -3
- package/dist/utils/format-model-name.js +6 -11
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/format-relative-time.cjs +1 -1
- package/dist/utils/format-relative-time.cjs.map +1 -1
- package/dist/utils/format-relative-time.d.ts +7 -0
- package/dist/utils/format-relative-time.js +7 -2
- package/dist/utils/format-relative-time.js.map +1 -1
- package/dist/utils/path-utils.cjs +1 -1
- package/dist/utils/path-utils.cjs.map +1 -1
- package/dist/utils/path-utils.d.ts +15 -3
- package/dist/utils/path-utils.js +29 -3
- package/dist/utils/path-utils.js.map +1 -1
- package/dist/utils/skill-enablement.cjs +2 -0
- package/dist/utils/skill-enablement.cjs.map +1 -0
- package/dist/utils/skill-enablement.d.ts +51 -0
- package/dist/utils/skill-enablement.js +31 -0
- package/dist/utils/skill-enablement.js.map +1 -0
- package/dist/utils/vscode-origin.cjs +2 -0
- package/dist/utils/vscode-origin.cjs.map +1 -0
- package/dist/utils/vscode-origin.d.ts +55 -0
- package/dist/utils/vscode-origin.js +27 -0
- package/dist/utils/vscode-origin.js.map +1 -0
- package/dist/utils/workspace-mode.d.ts +4 -0
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +1 -0
- package/scripts/dev-extra-backend.mjs +28 -9
- package/scripts/dev-safe.mjs +81 -8
- package/scripts/dev-static.mjs +35 -37
- package/scripts/dev-with-automation.mjs +82 -1
- package/scripts/ingress.mjs +27 -1
- package/scripts/static-server.mjs +74 -1
- package/tools/canvas_ui_tool.py +19 -0
- package/build/assets/active-backend-context-DKFSMbn3.js +0 -2
- package/build/assets/agent-server-conversation-service.api-DozDKIW_.js +0 -86
- package/build/assets/agent-settings-351vXWc9.js +0 -2
- package/build/assets/agent-settings-Ce7BDZ6I.js +0 -1
- package/build/assets/alert-banner-Kyy1YWZU.js +0 -1
- package/build/assets/api-key-entry-screen-INIxqAMs.js +0 -1
- package/build/assets/automation-detail-DXDhUwPq.js +0 -3
- package/build/assets/automation-setup-route-FRr05f_g.js +0 -1
- package/build/assets/automations-list-CERuQWE6.js +0 -1
- package/build/assets/backend-form-modal-DK78-jn1.js +0 -1
- package/build/assets/browser-11etCQ04.js +0 -7
- package/build/assets/check-Cf2YoT90.js +0 -1
- package/build/assets/chevron-down-C3OQ-ehx.js +0 -1
- package/build/assets/chevron-right-CN1uUiJ1.js +0 -1
- package/build/assets/circle-check-g5yeGMd-.js +0 -1
- package/build/assets/command-menu-BZQ8S3Ke.js +0 -1
- package/build/assets/conversation-CchMzpGl.js +0 -1
- package/build/assets/conversation-Dpzftz57.js +0 -93
- package/build/assets/conversation-panel-CchMzpGl.js +0 -1
- package/build/assets/conversation-state-store-a9d2fxRc.js +0 -1
- package/build/assets/empty-state-CvaVahVr.js +0 -1
- package/build/assets/extensions-hub-CFduxBnk.js +0 -1
- package/build/assets/extensions-navigation-BeC224yX.js +0 -1
- package/build/assets/files-tab-CL3J9b3p.js +0 -1
- package/build/assets/format-model-name-BNPKVsIq.js +0 -1
- package/build/assets/get-git-path-DlAJa_i6.js +0 -1
- package/build/assets/git-repo-dropdown-DGMEhz7d.js +0 -1
- package/build/assets/home-BCGlNJCA.js +0 -1
- package/build/assets/home-DB1pRqTC.js +0 -1
- package/build/assets/home-automation-run-tooltip-CooFQRIG.js +0 -1
- package/build/assets/home-store-Dl1dPE58.js +0 -1
- package/build/assets/index-home-DB1pRqTC.js +0 -1
- package/build/assets/info-uYSVzX86.js +0 -1
- package/build/assets/install-server-modal-BbJdhzet.js +0 -1
- package/build/assets/kebab-menu-item-content-BYokkRHi.js +0 -1
- package/build/assets/list-filter-OFkpRrmi.js +0 -1
- package/build/assets/llm-not-configured-banner-BqqYnJ1t.js +0 -27
- package/build/assets/llm-settings-CnDbbmVW.js +0 -1
- package/build/assets/llm-settings-S8Yjg__1.js +0 -1
- package/build/assets/llm-subscription-service-BpPfzW4x.js +0 -1
- package/build/assets/loader-circle-nvrwthvj.js +0 -1
- package/build/assets/manage-backends-modal-BCUPswyl.js +0 -1
- package/build/assets/manifest-58597dde.js +0 -1
- package/build/assets/markdown-renderer-Cb2sBWtV.js +0 -8
- package/build/assets/messages-BTN5thLe.js +0 -40
- package/build/assets/onboarding-Cx_kaiD1.js +0 -1
- package/build/assets/onboarding-modal-vMwn7ihv.js +0 -1
- package/build/assets/plugins-management-service-BjYeF0b0.js +0 -1
- package/build/assets/plus-CEKne-Yp.js +0 -1
- package/build/assets/profiles-service.api-QB-T_u-g.js +0 -1
- package/build/assets/providers-FfSZ5TXP.js +0 -1
- package/build/assets/proxy-tcFL2yTQ.js +0 -1
- package/build/assets/recommended-automations-launcher-Bw8uC4V6.js +0 -1
- package/build/assets/root-BLeQfBEq.css +0 -1
- package/build/assets/root-ZKKYPR1Z.js +0 -2
- package/build/assets/root-layout-luJoE9IG.js +0 -2
- package/build/assets/schema-field-Csw5fhtN.js +0 -1
- package/build/assets/secrets-service-BTor9uAU.js +0 -1
- package/build/assets/settings-DcNPxz0v.js +0 -1
- package/build/assets/settings-service.api-B2agVfjL.js +0 -1
- package/build/assets/shared-conversation-B55pCyBG.js +0 -1
- package/build/assets/sidebar-nav-link-CPzhyHQg.js +0 -1
- package/build/assets/sidebar-store-DtpU7zaI.js +0 -1
- package/build/assets/skill-filter-CWZ5kjcg.js +0 -2
- package/build/assets/skill-scope-CV1dkAbW.js +0 -1
- package/build/assets/skills-plugins-DGHULTq6.js +0 -1
- package/build/assets/skills-settings-CM1lFv3e.js +0 -1
- package/build/assets/usage-tab-BcfWV6db.js +0 -1
- package/build/assets/use-acp-credential-form-BsSW5NHG.js +0 -1
- package/build/assets/use-agent-profiles-DWBPC0Si.js +0 -1
- package/build/assets/use-config-Bft35DOK.js +0 -1
- package/build/assets/use-create-secret-BSxJMxHp.js +0 -1
- package/build/assets/use-is-authed-CFGkY3-Z.js +0 -1
- package/build/assets/use-llm-configured-BI6obxsc.js +0 -1
- package/build/assets/use-llm-profiles-djGAhTWL.js +0 -1
- package/build/assets/use-manifest-capabilities-3z0-1G59.js +0 -1
- package/build/assets/use-onboarding-completion-BXpyUSsJ.js +0 -1
- package/build/assets/use-plugins-marketplace-DI4_pK56.js +0 -1
- package/build/assets/use-save-agent-profile-DdBSTdpN.js +0 -1
- package/build/assets/use-tracking-D5t9otIF.js +0 -3
- package/build/assets/utils-DaCIEEQP.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-B2OLKL7N.js +0 -1
- package/dist/components/features/tips/random-tip.d.ts +0 -2
- package/dist/utils/tips.d.ts +0 -7
- package/dist/utils/workspace-relative-path.cjs +0 -2
- package/dist/utils/workspace-relative-path.cjs.map +0 -1
- package/dist/utils/workspace-relative-path.d.ts +0 -10
- package/dist/utils/workspace-relative-path.js +0 -22
- package/dist/utils/workspace-relative-path.js.map +0 -1
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js} +0 -0
package/dist/ui/help-link.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn as e } from "../utils/utils.js";
|
|
2
2
|
import { cva as t } from "../node_modules/class-variance-authority/dist/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/ui/help-link.tsx
|
|
5
|
-
var
|
|
5
|
+
var a = t("", {
|
|
6
6
|
variants: {
|
|
7
7
|
size: {
|
|
8
8
|
default: "text-xs",
|
|
@@ -18,31 +18,45 @@ var i = t("", {
|
|
|
18
18
|
linkColor: "default"
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
21
|
+
function o({ testId: t, text: o, linkText: s, href: c, suffix: l, suffixLinkText: u, suffixLinkHref: d, trailing: f, size: p, linkColor: m, className: h, linkTextClassName: g, suffixClassName: _ }) {
|
|
22
|
+
return /* @__PURE__ */ i("p", {
|
|
23
23
|
"data-testid": t,
|
|
24
|
-
className: e(
|
|
24
|
+
className: e(a({ size: p }), h),
|
|
25
25
|
children: [
|
|
26
|
-
|
|
26
|
+
o,
|
|
27
27
|
" ",
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
href:
|
|
28
|
+
/* @__PURE__ */ r("a", {
|
|
29
|
+
href: c,
|
|
30
30
|
rel: "noreferrer noopener",
|
|
31
31
|
target: "_blank",
|
|
32
|
-
className: e("underline underline-offset-2",
|
|
33
|
-
size:
|
|
34
|
-
linkColor:
|
|
35
|
-
}),
|
|
36
|
-
children:
|
|
32
|
+
className: e("underline underline-offset-2", a({
|
|
33
|
+
size: p,
|
|
34
|
+
linkColor: m
|
|
35
|
+
}), g),
|
|
36
|
+
children: s
|
|
37
37
|
}),
|
|
38
|
-
|
|
39
|
-
className:
|
|
40
|
-
children:
|
|
41
|
-
})
|
|
38
|
+
l && /* @__PURE__ */ r("span", {
|
|
39
|
+
className: _,
|
|
40
|
+
children: l
|
|
41
|
+
}),
|
|
42
|
+
u && d ? /* @__PURE__ */ i(n, { children: [
|
|
43
|
+
" ",
|
|
44
|
+
/* @__PURE__ */ r("a", {
|
|
45
|
+
href: d,
|
|
46
|
+
rel: "noreferrer noopener",
|
|
47
|
+
target: "_blank",
|
|
48
|
+
className: e("underline underline-offset-2", a({
|
|
49
|
+
size: p,
|
|
50
|
+
linkColor: m
|
|
51
|
+
}), g),
|
|
52
|
+
children: u
|
|
53
|
+
}),
|
|
54
|
+
f
|
|
55
|
+
] }) : null
|
|
42
56
|
]
|
|
43
57
|
});
|
|
44
58
|
}
|
|
45
59
|
//#endregion
|
|
46
|
-
export {
|
|
60
|
+
export { o as HelpLink };
|
|
47
61
|
|
|
48
62
|
//# sourceMappingURL=help-link.js.map
|
package/dist/ui/help-link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-link.js","names":[],"sources":["../../src/ui/help-link.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"#/utils/utils\";\n\nconst helpLinkVariants = cva(\"\", {\n variants: {\n size: {\n default: \"text-xs\",\n settings: \"text-sm text-[var(--oh-muted)] font-normal leading-5.5\",\n },\n linkColor: {\n default: \"\",\n white: \"text-white\",\n },\n },\n defaultVariants: {\n size: \"default\",\n linkColor: \"default\",\n },\n});\n\ninterface HelpLinkProps extends VariantProps<typeof helpLinkVariants> {\n testId: string;\n text: string;\n linkText: string;\n href: string;\n suffix?: string;\n className?: string;\n linkTextClassName?: string;\n suffixClassName?: string;\n}\n\nexport function HelpLink({\n testId,\n text,\n linkText,\n href,\n suffix,\n size,\n linkColor,\n className,\n linkTextClassName,\n suffixClassName,\n}: HelpLinkProps) {\n return (\n <p\n data-testid={testId}\n className={cn(helpLinkVariants({ size }), className)}\n >\n {text}{\" \"}\n <a\n href={href}\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n className={cn(\n \"underline underline-offset-2\",\n helpLinkVariants({ size, linkColor }),\n linkTextClassName,\n )}\n >\n {linkText}\n </a>\n {suffix && <span className={suffixClassName}>{suffix}</span>}\n </p>\n );\n}\n"],"mappings":";;;;AAGA,IAAM,IAAmB,EAAI,IAAI;CAC/B,UAAU;EACR,MAAM;GACJ,SAAS;GACT,UAAU;EACZ;EACA,WAAW;GACT,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,WAAW;CACb;AACF,CAAC;
|
|
1
|
+
{"version":3,"file":"help-link.js","names":[],"sources":["../../src/ui/help-link.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"#/utils/utils\";\n\nconst helpLinkVariants = cva(\"\", {\n variants: {\n size: {\n default: \"text-xs\",\n settings: \"text-sm text-[var(--oh-muted)] font-normal leading-5.5\",\n },\n linkColor: {\n default: \"\",\n white: \"text-white\",\n },\n },\n defaultVariants: {\n size: \"default\",\n linkColor: \"default\",\n },\n});\n\ninterface HelpLinkProps extends VariantProps<typeof helpLinkVariants> {\n testId: string;\n text: string;\n linkText: string;\n href: string;\n suffix?: string;\n /** Optional second link rendered after the suffix. */\n suffixLinkText?: string;\n suffixLinkHref?: string;\n /** Trailing text rendered after the second link (e.g. a period). */\n trailing?: string;\n className?: string;\n linkTextClassName?: string;\n suffixClassName?: string;\n}\n\nexport function HelpLink({\n testId,\n text,\n linkText,\n href,\n suffix,\n suffixLinkText,\n suffixLinkHref,\n trailing,\n size,\n linkColor,\n className,\n linkTextClassName,\n suffixClassName,\n}: HelpLinkProps) {\n return (\n <p\n data-testid={testId}\n className={cn(helpLinkVariants({ size }), className)}\n >\n {text}{\" \"}\n <a\n href={href}\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n className={cn(\n \"underline underline-offset-2\",\n helpLinkVariants({ size, linkColor }),\n linkTextClassName,\n )}\n >\n {linkText}\n </a>\n {suffix && <span className={suffixClassName}>{suffix}</span>}\n {suffixLinkText && suffixLinkHref ? (\n <>\n {\" \"}\n <a\n href={suffixLinkHref}\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n className={cn(\n \"underline underline-offset-2\",\n helpLinkVariants({ size, linkColor }),\n linkTextClassName,\n )}\n >\n {suffixLinkText}\n </a>\n {trailing}\n </>\n ) : null}\n </p>\n );\n}\n"],"mappings":";;;;AAGA,IAAM,IAAmB,EAAI,IAAI;CAC/B,UAAU;EACR,MAAM;GACJ,SAAS;GACT,UAAU;EACZ;EACA,WAAW;GACT,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,WAAW;CACb;AACF,CAAC;AAkBD,SAAgB,EAAS,EACvB,WACA,SACA,aACA,SACA,WACA,mBACA,mBACA,aACA,SACA,cACA,cACA,sBACA,sBACgB;CAChB,OACE,kBAAC,KAAD;EACE,eAAa;EACb,WAAW,EAAG,EAAiB,EAAE,QAAK,CAAC,GAAG,CAAS;YAFrD;GAIG;GAAM;GACP,kBAAC,KAAD;IACQ;IACN,KAAI;IACJ,QAAO;IACP,WAAW,EACT,gCACA,EAAiB;KAAE;KAAM;IAAU,CAAC,GACpC,CACF;cAEC;GACA,CAAA;GACF,KAAU,kBAAC,QAAD;IAAM,WAAW;cAAkB;GAAa,CAAA;GAC1D,KAAkB,IACjB,kBAAA,GAAA,EAAA,UAAA;IACG;IACD,kBAAC,KAAD;KACE,MAAM;KACN,KAAI;KACJ,QAAO;KACP,WAAW,EACT,gCACA,EAAiB;MAAE;MAAM;KAAU,CAAC,GACpC,CACF;eAEC;IACA,CAAA;IACF;GACD,EAAA,CAAA,IACA;EACH;;AAEP"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AcpAuthStatus } from "#/hooks/query/use-acp-auth-status";
|
|
2
|
+
/**
|
|
3
|
+
* Resolved display state for the ACP auth banner.
|
|
4
|
+
*
|
|
5
|
+
* - ``"signed-in"`` — the host-login probe confirmed a session (native backend).
|
|
6
|
+
* - ``"checking"`` — the first probe is still in flight.
|
|
7
|
+
* - ``"configured"`` — the probe can't confirm a login (e.g. a container with no
|
|
8
|
+
* interactive CLI, or a cloud backend where the probe doesn't run), but a
|
|
9
|
+
* credential for the provider exists in the active backend's secret store.
|
|
10
|
+
* - ``"none"`` — no confirmed login and no stored credential; show nothing.
|
|
11
|
+
*/
|
|
12
|
+
export type AcpAuthDisplay = "signed-in" | "checking" | "configured" | "none";
|
|
13
|
+
interface AcpAuthDisplayInput {
|
|
14
|
+
/** Result of the host-login probe (only meaningful on a native backend). */
|
|
15
|
+
status: AcpAuthStatus;
|
|
16
|
+
/** True while the first probe for this provider is in flight. */
|
|
17
|
+
isChecking: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a credential for the provider exists in the active backend's secret
|
|
20
|
+
* store. Unlike {@link status}, this signal is available on Docker and cloud
|
|
21
|
+
* backends, so it can convey an accurate state where the probe goes silent.
|
|
22
|
+
*/
|
|
23
|
+
credentialsConfigured: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Decide what the ACP auth banner should show, given the (host-only) login
|
|
27
|
+
* probe and the backend-truthful "a credential is stored" signal.
|
|
28
|
+
*
|
|
29
|
+
* Precedence preserves the existing banner behavior — a probe-confirmed login
|
|
30
|
+
* wins, then the in-flight spinner — and only adds ``"configured"`` in the gap
|
|
31
|
+
* that previously rendered nothing. A stored credential never reports as
|
|
32
|
+
* ``"signed-in"``: only the probe can confirm an actual host login. See #1244.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveAcpAuthDisplay({ status, isChecking, credentialsConfigured, }: AcpAuthDisplayInput): AcpAuthDisplay;
|
|
35
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("./path-utils.cjs"),t=require("../stores/model-store.cjs");var n=(n,r,i)=>{let{action:a}=n;if((a.kind===`StrReplaceEditorAction`||a.kind===`FileEditorAction`||a.kind===`ExecuteBashAction`)&&i.invalidateQueries({queryKey:[`file_changes`,r]},{cancelRefetch:!1}),(a.kind===`StrReplaceEditorAction`||a.kind===`FileEditorAction`)&&a.path){let t=e.stripWorkspacePrefix(a.path);i.invalidateQueries({queryKey:[`file_diff`,r,t]})}n.tool_name===`SwitchLLMTool`&&(i.invalidateQueries({queryKey:[`user`,`conversation`,r]}),t.useModelStore.getState().clearActiveProfile(r))};exports.handleActionEventCacheInvalidation=n;
|
|
2
2
|
//# sourceMappingURL=cache-utils.cjs.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { stripWorkspacePrefix as e } from "./path-utils.js";
|
|
2
|
+
import { useModelStore as t } from "../stores/model-store.js";
|
|
3
3
|
//#region src/utils/cache-utils.ts
|
|
4
4
|
var n = (n, r, i) => {
|
|
5
5
|
let { action: a } = n;
|
|
6
6
|
if ((a.kind === "StrReplaceEditorAction" || a.kind === "FileEditorAction" || a.kind === "ExecuteBashAction") && i.invalidateQueries({ queryKey: ["file_changes", r] }, { cancelRefetch: !1 }), (a.kind === "StrReplaceEditorAction" || a.kind === "FileEditorAction") && a.path) {
|
|
7
|
-
let
|
|
7
|
+
let t = e(a.path);
|
|
8
8
|
i.invalidateQueries({ queryKey: [
|
|
9
9
|
"file_diff",
|
|
10
10
|
r,
|
|
11
|
-
|
|
11
|
+
t
|
|
12
12
|
] });
|
|
13
13
|
}
|
|
14
14
|
n.tool_name === "SwitchLLMTool" && (i.invalidateQueries({ queryKey: [
|
|
15
15
|
"user",
|
|
16
16
|
"conversation",
|
|
17
17
|
r
|
|
18
|
-
] }),
|
|
18
|
+
] }), t.getState().clearActiveProfile(r));
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
21
|
export { n as handleActionEventCacheInvalidation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");var e=`Free`,t={"openhands/
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");var e=`Free`,t={"openhands/deepseek-v4-flash":`OpenHands DeepSeek V4 Flash (free)`},n=Object.keys(t),r=e=>!!e?.startsWith(`openhands/`),i=`Free OpenHands models: ${n.join(`, `)}. Other provider endpoints with similar model names may require separate billing.`,a=e=>!!(e&&e in t);function o(e){return e?a(e)?t[e]:e:null}function s(e){return e?a(e)?t[e]:e.split(`/`).pop()||e:null}exports.FREE_MODEL_BADGE_LABEL=e,exports.FREE_OPENHANDS_MODEL_NOTE=i,exports.formatModelNameForDisplay=o,exports.formatNativeModelName=s,exports.isFreeOpenHandsModel=a,exports.isOpenHandsProviderModel=r;
|
|
2
2
|
//# sourceMappingURL=format-model-name.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-model-name.cjs","names":[],"sources":["../../src/utils/format-model-name.ts"],"sourcesContent":["export const FREE_MODEL_BADGE_LABEL = \"Free\";\n\nexport const FREE_OPENHANDS_MODELS = {\n \"openhands/
|
|
1
|
+
{"version":3,"file":"format-model-name.cjs","names":[],"sources":["../../src/utils/format-model-name.ts"],"sourcesContent":["export const FREE_MODEL_BADGE_LABEL = \"Free\";\n\nexport const FREE_OPENHANDS_MODELS = {\n \"openhands/deepseek-v4-flash\": \"OpenHands DeepSeek V4 Flash (free)\",\n} as const;\n\nexport const FREE_OPENHANDS_MODEL_IDS = Object.keys(FREE_OPENHANDS_MODELS);\n\n/**\n * Whether a model id routes through the OpenHands provider (the `openhands/`\n * prefix). On cloud the OpenHands provider is backed by a server-minted LLM\n * key rather than a user-supplied one, so callers use this to hide the inline\n * API key / base URL inputs and strip those fields from the save payload.\n */\nexport const isOpenHandsProviderModel = (\n model: string | null | undefined,\n): boolean => Boolean(model?.startsWith(\"openhands/\"));\n\nexport const FREE_OPENHANDS_MODEL_NOTE = `Free OpenHands models: ${FREE_OPENHANDS_MODEL_IDS.join(\n \", \",\n)}. Other provider endpoints with similar model names may require separate billing.`;\n\nexport const isFreeOpenHandsModel = (\n model: string | null | undefined,\n): model is keyof typeof FREE_OPENHANDS_MODELS =>\n Boolean(model && model in FREE_OPENHANDS_MODELS);\n\nexport function formatModelNameForDisplay(\n model: string | null | undefined,\n): string | null {\n if (!model) return null;\n return isFreeOpenHandsModel(model) ? FREE_OPENHANDS_MODELS[model] : model;\n}\n\nexport function formatProviderModelNameForDisplay(\n provider: string | null | undefined,\n model: string | null | undefined,\n): string | null {\n if (!model) return null;\n const fullModel = provider ? `${provider}/${model}` : model;\n return isFreeOpenHandsModel(fullModel)\n ? FREE_OPENHANDS_MODELS[fullModel]\n : model;\n}\n\n/**\n * Format a native (OpenHands-kind) routing model string for display, stripping\n * the provider route prefix (e.g. ``\"anthropic/claude-sonnet-4-5-20250929\"`` →\n * ``\"claude-sonnet-4-5-20250929\"``, ``\"litellm_proxy/openai/gpt-4o\"`` →\n * ``\"gpt-4o\"``) so a conversation chip shows a meaningful model name rather than\n * the full routing path.\n *\n * Returns ``null`` for an empty/nullish input, and falls back to the original\n * string when stripping the prefix would leave nothing (e.g. a trailing slash)\n * — never an empty string, which would collapse the chip text.\n *\n * Display-only: unlike {@link deriveProfileNameFromModel} this does not sanitize\n * to an identifier, so it keeps the real model id intact for the chip.\n */\nexport function formatNativeModelName(\n model: string | null | undefined,\n): string | null {\n if (!model) return null;\n if (isFreeOpenHandsModel(model)) return FREE_OPENHANDS_MODELS[model];\n const lastSegment = model.split(\"/\").pop();\n return lastSegment || model;\n}\n"],"mappings":"6CAAA,IAAa,EAAyB,OAEzB,EAAwB,CACnC,8BAA+B,oCACjC,EAEa,EAA2B,OAAO,KAAK,CAAqB,EAQ5D,EACX,GACY,EAAQ,GAAO,WAAW,YAAY,EAEvC,EAA4B,0BAA0B,EAAyB,KAC1F,IACF,EAAE,mFAEW,EACX,GAEA,GAAQ,GAAS,KAAS,GAE5B,SAAgB,EACd,EACe,CAEf,OADK,EACE,EAAqB,CAAK,EAAI,EAAsB,GAAS,EADjD,IAErB,CA2BA,SAAgB,EACd,EACe,CAIf,OAHK,EACD,EAAqB,CAAK,EAAU,EAAsB,GAC1C,EAAM,MAAM,GAAG,EAAE,IAC9B,GAAe,EAHH,IAIrB"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export declare const FREE_MODEL_BADGE_LABEL = "Free";
|
|
2
2
|
export declare const FREE_OPENHANDS_MODELS: {
|
|
3
|
-
readonly "openhands/kimi-k3": "OpenHands Kimi K3 (free)";
|
|
4
|
-
readonly "openhands/glm-5.2": "OpenHands GLM-5.2 (free)";
|
|
5
3
|
readonly "openhands/deepseek-v4-flash": "OpenHands DeepSeek V4 Flash (free)";
|
|
6
|
-
readonly "openhands/minimax-m2.7": "OpenHands MiniMax M2.7 (free)";
|
|
7
4
|
};
|
|
8
5
|
export declare const FREE_OPENHANDS_MODEL_IDS: string[];
|
|
6
|
+
/**
|
|
7
|
+
* Whether a model id routes through the OpenHands provider (the `openhands/`
|
|
8
|
+
* prefix). On cloud the OpenHands provider is backed by a server-minted LLM
|
|
9
|
+
* key rather than a user-supplied one, so callers use this to hide the inline
|
|
10
|
+
* API key / base URL inputs and strip those fields from the save payload.
|
|
11
|
+
*/
|
|
12
|
+
export declare const isOpenHandsProviderModel: (model: string | null | undefined) => boolean;
|
|
9
13
|
export declare const FREE_OPENHANDS_MODEL_NOTE: string;
|
|
10
14
|
export declare const isFreeOpenHandsModel: (model: string | null | undefined) => model is keyof typeof FREE_OPENHANDS_MODELS;
|
|
11
15
|
export declare function formatModelNameForDisplay(model: string | null | undefined): string | null;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
//#region src/utils/format-model-name.ts
|
|
2
|
-
var e = "Free", t = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"openhands/deepseek-v4-flash": "OpenHands DeepSeek V4 Flash (free)",
|
|
6
|
-
"openhands/minimax-m2.7": "OpenHands MiniMax M2.7 (free)"
|
|
7
|
-
}, n = `Free OpenHands models: ${Object.keys(t).join(", ")}. Other provider endpoints with similar model names may require separate billing.`, r = (e) => !!(e && e in t);
|
|
8
|
-
function i(e) {
|
|
9
|
-
return e ? r(e) ? t[e] : e : null;
|
|
2
|
+
var e = "Free", t = { "openhands/deepseek-v4-flash": "OpenHands DeepSeek V4 Flash (free)" }, n = Object.keys(t), r = (e) => !!e?.startsWith("openhands/"), i = `Free OpenHands models: ${n.join(", ")}. Other provider endpoints with similar model names may require separate billing.`, a = (e) => !!(e && e in t);
|
|
3
|
+
function o(e) {
|
|
4
|
+
return e ? a(e) ? t[e] : e : null;
|
|
10
5
|
}
|
|
11
|
-
function
|
|
12
|
-
return e ?
|
|
6
|
+
function s(e) {
|
|
7
|
+
return e ? a(e) ? t[e] : e.split("/").pop() || e : null;
|
|
13
8
|
}
|
|
14
9
|
//#endregion
|
|
15
|
-
export { e as FREE_MODEL_BADGE_LABEL,
|
|
10
|
+
export { e as FREE_MODEL_BADGE_LABEL, i as FREE_OPENHANDS_MODEL_NOTE, o as formatModelNameForDisplay, s as formatNativeModelName, a as isFreeOpenHandsModel, r as isOpenHandsProviderModel };
|
|
16
11
|
|
|
17
12
|
//# sourceMappingURL=format-model-name.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-model-name.js","names":[],"sources":["../../src/utils/format-model-name.ts"],"sourcesContent":["export const FREE_MODEL_BADGE_LABEL = \"Free\";\n\nexport const FREE_OPENHANDS_MODELS = {\n \"openhands/
|
|
1
|
+
{"version":3,"file":"format-model-name.js","names":[],"sources":["../../src/utils/format-model-name.ts"],"sourcesContent":["export const FREE_MODEL_BADGE_LABEL = \"Free\";\n\nexport const FREE_OPENHANDS_MODELS = {\n \"openhands/deepseek-v4-flash\": \"OpenHands DeepSeek V4 Flash (free)\",\n} as const;\n\nexport const FREE_OPENHANDS_MODEL_IDS = Object.keys(FREE_OPENHANDS_MODELS);\n\n/**\n * Whether a model id routes through the OpenHands provider (the `openhands/`\n * prefix). On cloud the OpenHands provider is backed by a server-minted LLM\n * key rather than a user-supplied one, so callers use this to hide the inline\n * API key / base URL inputs and strip those fields from the save payload.\n */\nexport const isOpenHandsProviderModel = (\n model: string | null | undefined,\n): boolean => Boolean(model?.startsWith(\"openhands/\"));\n\nexport const FREE_OPENHANDS_MODEL_NOTE = `Free OpenHands models: ${FREE_OPENHANDS_MODEL_IDS.join(\n \", \",\n)}. Other provider endpoints with similar model names may require separate billing.`;\n\nexport const isFreeOpenHandsModel = (\n model: string | null | undefined,\n): model is keyof typeof FREE_OPENHANDS_MODELS =>\n Boolean(model && model in FREE_OPENHANDS_MODELS);\n\nexport function formatModelNameForDisplay(\n model: string | null | undefined,\n): string | null {\n if (!model) return null;\n return isFreeOpenHandsModel(model) ? FREE_OPENHANDS_MODELS[model] : model;\n}\n\nexport function formatProviderModelNameForDisplay(\n provider: string | null | undefined,\n model: string | null | undefined,\n): string | null {\n if (!model) return null;\n const fullModel = provider ? `${provider}/${model}` : model;\n return isFreeOpenHandsModel(fullModel)\n ? FREE_OPENHANDS_MODELS[fullModel]\n : model;\n}\n\n/**\n * Format a native (OpenHands-kind) routing model string for display, stripping\n * the provider route prefix (e.g. ``\"anthropic/claude-sonnet-4-5-20250929\"`` →\n * ``\"claude-sonnet-4-5-20250929\"``, ``\"litellm_proxy/openai/gpt-4o\"`` →\n * ``\"gpt-4o\"``) so a conversation chip shows a meaningful model name rather than\n * the full routing path.\n *\n * Returns ``null`` for an empty/nullish input, and falls back to the original\n * string when stripping the prefix would leave nothing (e.g. a trailing slash)\n * — never an empty string, which would collapse the chip text.\n *\n * Display-only: unlike {@link deriveProfileNameFromModel} this does not sanitize\n * to an identifier, so it keeps the real model id intact for the chip.\n */\nexport function formatNativeModelName(\n model: string | null | undefined,\n): string | null {\n if (!model) return null;\n if (isFreeOpenHandsModel(model)) return FREE_OPENHANDS_MODELS[model];\n const lastSegment = model.split(\"/\").pop();\n return lastSegment || model;\n}\n"],"mappings":";AAAA,IAAa,IAAyB,QAEzB,IAAwB,EACnC,+BAA+B,qCACjC,GAEa,IAA2B,OAAO,KAAK,CAAqB,GAQ5D,KACX,MACY,EAAQ,GAAO,WAAW,YAAY,GAEvC,IAA4B,0BAA0B,EAAyB,KAC1F,IACF,EAAE,oFAEW,KACX,MAEA,GAAQ,KAAS,KAAS;AAE5B,SAAgB,EACd,GACe;CAEf,OADK,IACE,EAAqB,CAAK,IAAI,EAAsB,KAAS,IADjD;AAErB;AA2BA,SAAgB,EACd,GACe;CAIf,OAHK,IACD,EAAqB,CAAK,IAAU,EAAsB,KAC1C,EAAM,MAAM,GAAG,EAAE,IAC9B,KAAe,IAHH;AAIrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../i18n/declaration.cjs");function t(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function n(n,r,i){let a=Date.now()-new Date(n).getTime(),o=Math.floor(a/6e4),s=Math.floor(a/36e5),c=Math.floor(a/864e5);return o<1?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_JUST_NOW):o<60?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:o}):s<24?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:s}):c===1?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_YESTERDAY):c<7?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:c}):t(n,r)}exports.formatRelativeTime=n;
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../i18n/declaration.cjs");function t(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function n(e){if(!e)return!0;let t=new Date(e).getTime();return Number.isNaN(t)||t===0}function r(n,r,i){let a=Date.now()-new Date(n).getTime(),o=Math.floor(a/6e4),s=Math.floor(a/36e5),c=Math.floor(a/864e5);return o<1?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_JUST_NOW):o<60?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:o}):s<24?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:s}):c===1?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_YESTERDAY):c<7?i(e.I18nKey.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:c}):t(n,r)}exports.formatRelativeTime=r,exports.isInvalidTimestamp=n;
|
|
2
2
|
//# sourceMappingURL=format-relative-time.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-relative-time.cjs","names":[],"sources":["../../src/utils/format-relative-time.ts"],"sourcesContent":["import { I18nKey } from \"#/i18n/declaration\";\n\nexport function formatDate(dateStr: string, locale: string): string {\n const date = new Date(dateStr);\n return date.toLocaleDateString(locale, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n}\n\nexport function formatRelativeTime(\n dateStr: string,\n locale: string,\n t: (key: I18nKey, options?: Record<string, unknown>) => string,\n): string {\n const now = Date.now();\n const then = new Date(dateStr).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n const diffHours = Math.floor(diffMs / 3_600_000);\n const diffDays = Math.floor(diffMs / 86_400_000);\n\n if (diffMins < 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_JUST_NOW);\n if (diffMins < 60)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO, { count: diffMins });\n if (diffHours < 24)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_HOURS_AGO, { count: diffHours });\n if (diffDays === 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_YESTERDAY);\n if (diffDays < 7)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_DAYS_AGO, { count: diffDays });\n return formatDate(dateStr, locale);\n}\n"],"mappings":"wFAEA,SAAgB,EAAW,EAAiB,EAAwB,CAElE,OAAO,IADU,KAAK,CACf,EAAK,mBAAmB,EAAQ,CACrC,KAAM,UACN,MAAO,QACP,IAAK,SACP,CAAC,CACH,CAEA,SAAgB,EACd,EACA,EACA,EACQ,CAGR,IAAM,EAFM,KAAK,IAEF,EADF,IAAI,KAAK,CAAO,EAAE,QACV,EACf,EAAW,KAAK,MAAM,EAAS,GAAM,EACrC,EAAY,KAAK,MAAM,EAAS,IAAS,EACzC,EAAW,KAAK,MAAM,EAAS,KAAU,EAU/C,OARI,EAAW,EAAU,EAAE,EAAA,QAAQ,gCAAgC,EAC/D,EAAW,GACN,EAAE,EAAA,QAAQ,oCAAqC,CAAE,MAAO,CAAS,CAAC,EACvE,EAAY,GACP,EAAE,EAAA,QAAQ,kCAAmC,CAAE,MAAO,CAAU,CAAC,EACtE,IAAa,EAAU,EAAE,EAAA,QAAQ,iCAAiC,EAClE,EAAW,EACN,EAAE,EAAA,QAAQ,iCAAkC,CAAE,MAAO,CAAS,CAAC,EACjE,EAAW,EAAS,CAAM,CACnC"}
|
|
1
|
+
{"version":3,"file":"format-relative-time.cjs","names":[],"sources":["../../src/utils/format-relative-time.ts"],"sourcesContent":["import { I18nKey } from \"#/i18n/declaration\";\n\nexport function formatDate(dateStr: string, locale: string): string {\n const date = new Date(dateStr);\n return date.toLocaleDateString(locale, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n}\n\n/**\n * Whether a timestamp is one nothing can be computed from. Besides an\n * unparseable string, that includes the epoch: the backend leaves unset\n * datetimes at zero, and formatting one produces \"Jan 1, 1970\" rather than\n * an honest \"unknown\".\n */\nexport function isInvalidTimestamp(\n dateStr: string | null | undefined,\n): boolean {\n if (!dateStr) return true;\n const parsed = new Date(dateStr).getTime();\n return Number.isNaN(parsed) || parsed === 0;\n}\n\nexport function formatRelativeTime(\n dateStr: string,\n locale: string,\n t: (key: I18nKey, options?: Record<string, unknown>) => string,\n): string {\n const now = Date.now();\n const then = new Date(dateStr).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n const diffHours = Math.floor(diffMs / 3_600_000);\n const diffDays = Math.floor(diffMs / 86_400_000);\n\n if (diffMins < 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_JUST_NOW);\n if (diffMins < 60)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO, { count: diffMins });\n if (diffHours < 24)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_HOURS_AGO, { count: diffHours });\n if (diffDays === 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_YESTERDAY);\n if (diffDays < 7)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_DAYS_AGO, { count: diffDays });\n return formatDate(dateStr, locale);\n}\n"],"mappings":"wFAEA,SAAgB,EAAW,EAAiB,EAAwB,CAElE,OAAO,IADU,KAAK,CACf,EAAK,mBAAmB,EAAQ,CACrC,KAAM,UACN,MAAO,QACP,IAAK,SACP,CAAC,CACH,CAQA,SAAgB,EACd,EACS,CACT,GAAI,CAAC,EAAS,MAAO,GACrB,IAAM,EAAS,IAAI,KAAK,CAAO,EAAE,QAAQ,EACzC,OAAO,OAAO,MAAM,CAAM,GAAK,IAAW,CAC5C,CAEA,SAAgB,EACd,EACA,EACA,EACQ,CAGR,IAAM,EAFM,KAAK,IAEF,EADF,IAAI,KAAK,CAAO,EAAE,QACV,EACf,EAAW,KAAK,MAAM,EAAS,GAAM,EACrC,EAAY,KAAK,MAAM,EAAS,IAAS,EACzC,EAAW,KAAK,MAAM,EAAS,KAAU,EAU/C,OARI,EAAW,EAAU,EAAE,EAAA,QAAQ,gCAAgC,EAC/D,EAAW,GACN,EAAE,EAAA,QAAQ,oCAAqC,CAAE,MAAO,CAAS,CAAC,EACvE,EAAY,GACP,EAAE,EAAA,QAAQ,kCAAmC,CAAE,MAAO,CAAU,CAAC,EACtE,IAAa,EAAU,EAAE,EAAA,QAAQ,iCAAiC,EAClE,EAAW,EACN,EAAE,EAAA,QAAQ,iCAAkC,CAAE,MAAO,CAAS,CAAC,EACjE,EAAW,EAAS,CAAM,CACnC"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { I18nKey } from "#/i18n/declaration";
|
|
2
2
|
export declare function formatDate(dateStr: string, locale: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Whether a timestamp is one nothing can be computed from. Besides an
|
|
5
|
+
* unparseable string, that includes the epoch: the backend leaves unset
|
|
6
|
+
* datetimes at zero, and formatting one produces "Jan 1, 1970" rather than
|
|
7
|
+
* an honest "unknown".
|
|
8
|
+
*/
|
|
9
|
+
export declare function isInvalidTimestamp(dateStr: string | null | undefined): boolean;
|
|
3
10
|
export declare function formatRelativeTime(dateStr: string, locale: string, t: (key: I18nKey, options?: Record<string, unknown>) => string): string;
|
|
@@ -7,11 +7,16 @@ function t(e, t) {
|
|
|
7
7
|
day: "numeric"
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
function n(
|
|
10
|
+
function n(e) {
|
|
11
|
+
if (!e) return !0;
|
|
12
|
+
let t = new Date(e).getTime();
|
|
13
|
+
return Number.isNaN(t) || t === 0;
|
|
14
|
+
}
|
|
15
|
+
function r(n, r, i) {
|
|
11
16
|
let a = Date.now() - new Date(n).getTime(), o = Math.floor(a / 6e4), s = Math.floor(a / 36e5), c = Math.floor(a / 864e5);
|
|
12
17
|
return o < 1 ? i(e.AUTOMATIONS$DETAIL$TIME_JUST_NOW) : o < 60 ? i(e.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO, { count: o }) : s < 24 ? i(e.AUTOMATIONS$DETAIL$TIME_HOURS_AGO, { count: s }) : c === 1 ? i(e.AUTOMATIONS$DETAIL$TIME_YESTERDAY) : c < 7 ? i(e.AUTOMATIONS$DETAIL$TIME_DAYS_AGO, { count: c }) : t(n, r);
|
|
13
18
|
}
|
|
14
19
|
//#endregion
|
|
15
|
-
export {
|
|
20
|
+
export { r as formatRelativeTime, n as isInvalidTimestamp };
|
|
16
21
|
|
|
17
22
|
//# sourceMappingURL=format-relative-time.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-relative-time.js","names":[],"sources":["../../src/utils/format-relative-time.ts"],"sourcesContent":["import { I18nKey } from \"#/i18n/declaration\";\n\nexport function formatDate(dateStr: string, locale: string): string {\n const date = new Date(dateStr);\n return date.toLocaleDateString(locale, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n}\n\nexport function formatRelativeTime(\n dateStr: string,\n locale: string,\n t: (key: I18nKey, options?: Record<string, unknown>) => string,\n): string {\n const now = Date.now();\n const then = new Date(dateStr).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n const diffHours = Math.floor(diffMs / 3_600_000);\n const diffDays = Math.floor(diffMs / 86_400_000);\n\n if (diffMins < 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_JUST_NOW);\n if (diffMins < 60)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO, { count: diffMins });\n if (diffHours < 24)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_HOURS_AGO, { count: diffHours });\n if (diffDays === 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_YESTERDAY);\n if (diffDays < 7)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_DAYS_AGO, { count: diffDays });\n return formatDate(dateStr, locale);\n}\n"],"mappings":";;AAEA,SAAgB,EAAW,GAAiB,GAAwB;CAElE,OAAO,IADU,KAAK,CACf,EAAK,mBAAmB,GAAQ;EACrC,MAAM;EACN,OAAO;EACP,KAAK;CACP,CAAC;AACH;AAEA,SAAgB,EACd,GACA,GACA,GACQ;CAGR,IAAM,IAFM,KAAK,IAEF,IADF,IAAI,KAAK,CAAO,EAAE,QACV,GACf,IAAW,KAAK,MAAM,IAAS,GAAM,GACrC,IAAY,KAAK,MAAM,IAAS,IAAS,GACzC,IAAW,KAAK,MAAM,IAAS,KAAU;CAU/C,OARI,IAAW,IAAU,EAAE,EAAQ,gCAAgC,IAC/D,IAAW,KACN,EAAE,EAAQ,qCAAqC,EAAE,OAAO,EAAS,CAAC,IACvE,IAAY,KACP,EAAE,EAAQ,mCAAmC,EAAE,OAAO,EAAU,CAAC,IACtE,MAAa,IAAU,EAAE,EAAQ,iCAAiC,IAClE,IAAW,IACN,EAAE,EAAQ,kCAAkC,EAAE,OAAO,EAAS,CAAC,IACjE,EAAW,GAAS,CAAM;AACnC"}
|
|
1
|
+
{"version":3,"file":"format-relative-time.js","names":[],"sources":["../../src/utils/format-relative-time.ts"],"sourcesContent":["import { I18nKey } from \"#/i18n/declaration\";\n\nexport function formatDate(dateStr: string, locale: string): string {\n const date = new Date(dateStr);\n return date.toLocaleDateString(locale, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n });\n}\n\n/**\n * Whether a timestamp is one nothing can be computed from. Besides an\n * unparseable string, that includes the epoch: the backend leaves unset\n * datetimes at zero, and formatting one produces \"Jan 1, 1970\" rather than\n * an honest \"unknown\".\n */\nexport function isInvalidTimestamp(\n dateStr: string | null | undefined,\n): boolean {\n if (!dateStr) return true;\n const parsed = new Date(dateStr).getTime();\n return Number.isNaN(parsed) || parsed === 0;\n}\n\nexport function formatRelativeTime(\n dateStr: string,\n locale: string,\n t: (key: I18nKey, options?: Record<string, unknown>) => string,\n): string {\n const now = Date.now();\n const then = new Date(dateStr).getTime();\n const diffMs = now - then;\n const diffMins = Math.floor(diffMs / 60_000);\n const diffHours = Math.floor(diffMs / 3_600_000);\n const diffDays = Math.floor(diffMs / 86_400_000);\n\n if (diffMins < 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_JUST_NOW);\n if (diffMins < 60)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO, { count: diffMins });\n if (diffHours < 24)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_HOURS_AGO, { count: diffHours });\n if (diffDays === 1) return t(I18nKey.AUTOMATIONS$DETAIL$TIME_YESTERDAY);\n if (diffDays < 7)\n return t(I18nKey.AUTOMATIONS$DETAIL$TIME_DAYS_AGO, { count: diffDays });\n return formatDate(dateStr, locale);\n}\n"],"mappings":";;AAEA,SAAgB,EAAW,GAAiB,GAAwB;CAElE,OAAO,IADU,KAAK,CACf,EAAK,mBAAmB,GAAQ;EACrC,MAAM;EACN,OAAO;EACP,KAAK;CACP,CAAC;AACH;AAQA,SAAgB,EACd,GACS;CACT,IAAI,CAAC,GAAS,OAAO;CACrB,IAAM,IAAS,IAAI,KAAK,CAAO,EAAE,QAAQ;CACzC,OAAO,OAAO,MAAM,CAAM,KAAK,MAAW;AAC5C;AAEA,SAAgB,EACd,GACA,GACA,GACQ;CAGR,IAAM,IAFM,KAAK,IAEF,IADF,IAAI,KAAK,CAAO,EAAE,QACV,GACf,IAAW,KAAK,MAAM,IAAS,GAAM,GACrC,IAAY,KAAK,MAAM,IAAS,IAAS,GACzC,IAAW,KAAK,MAAM,IAAS,KAAU;CAU/C,OARI,IAAW,IAAU,EAAE,EAAQ,gCAAgC,IAC/D,IAAW,KACN,EAAE,EAAQ,qCAAqC,EAAE,OAAO,EAAS,CAAC,IACvE,IAAY,KACP,EAAE,EAAQ,mCAAmC,EAAE,OAAO,EAAU,CAAC,IACtE,MAAa,IAAU,EAAE,EAAQ,iCAAiC,IAClE,IAAW,IACN,EAAE,EAAQ,kCAAkC,EAAE,OAAO,EAAS,CAAC,IACjE,EAAW,GAAS,CAAM;AACnC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../api/agent-server-config.cjs");var t=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e};function n(e){let t=e.trim().replace(/\\/g,`/`).replace(/\/+$/,``);return t?t.startsWith(`/`)||/^[A-Za-z]:(\/|$)/.test(t)?t:`/${t}`:``}var r=(r,i)=>{let a=r.trim().replace(/\\/g,`/`);if(!a)return``;a=a.replace(/:(\d+)(-\d+)?$/,``);let o=[i,e.DEFAULT_WORKING_DIR].filter(e=>!!e?.trim());for(let e of o){let t=n(e);if(t){if(a===t)return``;if(a.startsWith(`${t}/`))return a.slice(t.length+1)}}return a.startsWith(`/`)?t(a).replace(/^\.\//,``):a.replace(/^\.\//,``)},i=/\.(md|txt|ts|tsx|js|jsx|mjs|cjs|py|json|html?|css|scss|ya?ml|toml|rs|go|java|kt|swift|c|cc|cpp|h|hpp|sh|bash|zsh|sql|xml|svg|pdf|env|rb|php|vue|svelte|lock|ini|cfg|docx?|xlsx?|pptx?|odt|rtf)$/i,a=e=>{let t=e.trim();if(!t||/\s/.test(t)||/^https?:\/\//i.test(t))return!1;let n=t.replace(/\\/g,`/`).replace(/^\.\//,``);if(n=n.replace(/:(\d+)(-\d+)?$/,``),/^(application|audio|image|text|video|font|multipart|message|model)\/[\w.+-]+$/i.test(n)||/^v?\d+(\.\d+){1,3}([-+][\w.]+)?$/i.test(n))return!1;let r=n.includes(`/`)?n.split(`/`).pop()??``:n;return i.test(r)},o=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n};exports.getPathBasename=o,exports.looksLikeWorkspaceFilePath=a,exports.stripWorkspacePrefix=t,exports.toFilesTabPath=r;
|
|
2
2
|
//# sourceMappingURL=path-utils.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.cjs","names":[],"sources":["../../src/utils/path-utils.ts"],"sourcesContent":["/**\n * Path manipulation utilities\n */\n\n/**\n * Strip workspace prefix from file paths\n * Removes /workspace/ and the next directory level from paths\n *\n * @param path - The file path to process\n * @returns The path with workspace prefix removed\n *\n * @example\n * stripWorkspacePrefix(\"/workspace/repo/src/file.py\") // returns \"src/file.py\"\n * stripWorkspacePrefix(\"/workspace/my-project/components/Button.tsx\") // returns \"components/Button.tsx\"\n */\nexport const stripWorkspacePrefix = (path: string): string => {\n // Strip /workspace/ and the next directory level\n const workspaceMatch = path.match(/^\\/workspace\\/[^/]+\\/(.*)$/);\n return workspaceMatch ? workspaceMatch[1] : path;\n};\n\n/**\n * Returns the basename (top-level folder/file name) from a path string,\n * tolerating POSIX and Windows separators and trailing slashes.\n */\nexport const getPathBasename = (path: string): string => {\n const trimmed = path.trim();\n if (!trimmed) return \"\";\n\n const normalized = trimmed.replace(/[\\\\/]+$/, \"\");\n if (!normalized || /^[A-Za-z]:$/.test(normalized)) return \"\";\n\n const idx = Math.max(\n normalized.lastIndexOf(\"/\"),\n normalized.lastIndexOf(\"\\\\\"),\n );\n return idx >= 0 ? normalized.slice(idx + 1) : normalized;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"path-utils.cjs","names":[],"sources":["../../src/utils/path-utils.ts"],"sourcesContent":["/**\n * Path manipulation utilities\n */\nimport { DEFAULT_WORKING_DIR } from \"#/api/agent-server-config\";\n\n/**\n * Strip workspace prefix from file paths\n * Removes /workspace/ and the next directory level from paths\n *\n * @param path - The file path to process\n * @returns The path with workspace prefix removed\n *\n * @example\n * stripWorkspacePrefix(\"/workspace/repo/src/file.py\") // returns \"src/file.py\"\n * stripWorkspacePrefix(\"/workspace/my-project/components/Button.tsx\") // returns \"components/Button.tsx\"\n */\nexport const stripWorkspacePrefix = (path: string): string => {\n // Strip /workspace/ and the next directory level\n const workspaceMatch = path.match(/^\\/workspace\\/[^/]+\\/(.*)$/);\n return workspaceMatch ? workspaceMatch[1] : path;\n};\n\nfunction normalizeWorkspaceRoot(root: string): string {\n const trimmed = root.trim().replace(/\\\\/g, \"/\").replace(/\\/+$/, \"\");\n if (!trimmed) return \"\";\n // Keep Windows drive roots (`C:` / `C:/repo`) and POSIX absolutes as-is.\n if (trimmed.startsWith(\"/\") || /^[A-Za-z]:(\\/|$)/.test(trimmed)) {\n return trimmed;\n }\n return `/${trimmed}`;\n}\n\n/**\n * Convert an agent/chat file path into a workspace-relative path for the Files\n * drawer / workspace file APIs.\n *\n * Strips editor `:line` / `:start-end` suffixes, then removes the conversation\n * working directory (or `DEFAULT_WORKING_DIR`) when present as a prefix.\n * Nested roots must match `workingDir` first — the generic `/workspace/<name>/`\n * heuristic is only a fallback when no root matches.\n */\nexport const toFilesTabPath = (\n path: string,\n workingDir?: string | null,\n): string => {\n let result = path.trim().replace(/\\\\/g, \"/\");\n if (!result) return \"\";\n\n // Strip editor `:12` / `:12-40` suffixes. Safe on Windows paths too —\n // the drive colon is at the start (`C:`), never at the end.\n result = result.replace(/:(\\d+)(-\\d+)?$/, \"\");\n\n const roots = [workingDir, DEFAULT_WORKING_DIR].filter(\n (value): value is string => Boolean(value?.trim()),\n );\n\n for (const root of roots) {\n const normalizedRoot = normalizeWorkspaceRoot(root);\n if (!normalizedRoot) continue;\n if (result === normalizedRoot) {\n return \"\";\n }\n if (result.startsWith(`${normalizedRoot}/`)) {\n return result.slice(normalizedRoot.length + 1);\n }\n }\n\n if (!result.startsWith(\"/\")) {\n return result.replace(/^\\.\\//, \"\");\n }\n\n return stripWorkspacePrefix(result).replace(/^\\.\\//, \"\");\n};\n\nconst WORKSPACE_FILE_EXTENSION =\n /\\.(md|txt|ts|tsx|js|jsx|mjs|cjs|py|json|html?|css|scss|ya?ml|toml|rs|go|java|kt|swift|c|cc|cpp|h|hpp|sh|bash|zsh|sql|xml|svg|pdf|env|rb|php|vue|svelte|lock|ini|cfg|docx?|xlsx?|pptx?|odt|rtf)$/i;\n\n/**\n * Conservative check for inline chat tokens that should open in Files.\n * Rejects URLs, MIME types, versions, and dotted identifiers like `console.log`.\n */\nexport const looksLikeWorkspaceFilePath = (text: string): boolean => {\n const trimmed = text.trim();\n if (!trimmed || /\\s/.test(trimmed) || /^https?:\\/\\//i.test(trimmed)) {\n return false;\n }\n\n let path = trimmed.replace(/\\\\/g, \"/\").replace(/^\\.\\//, \"\");\n path = path.replace(/:(\\d+)(-\\d+)?$/, \"\");\n\n if (\n /^(application|audio|image|text|video|font|multipart|message|model)\\/[\\w.+-]+$/i.test(\n path,\n )\n ) {\n return false;\n }\n if (/^v?\\d+(\\.\\d+){1,3}([-+][\\w.]+)?$/i.test(path)) {\n return false;\n }\n\n const lastSegment = path.includes(\"/\") ? (path.split(\"/\").pop() ?? \"\") : path;\n return WORKSPACE_FILE_EXTENSION.test(lastSegment);\n};\n\n/**\n * Returns the basename (top-level folder/file name) from a path string,\n * tolerating POSIX and Windows separators and trailing slashes.\n */\nexport const getPathBasename = (path: string): string => {\n const trimmed = path.trim();\n if (!trimmed) return \"\";\n\n const normalized = trimmed.replace(/[\\\\/]+$/, \"\");\n if (!normalized || /^[A-Za-z]:$/.test(normalized)) return \"\";\n\n const idx = Math.max(\n normalized.lastIndexOf(\"/\"),\n normalized.lastIndexOf(\"\\\\\"),\n );\n return idx >= 0 ? normalized.slice(idx + 1) : normalized;\n};\n"],"mappings":"+FAgBA,IAAa,EAAwB,GAAyB,CAE5D,IAAM,EAAiB,EAAK,MAAM,4BAA4B,EAC9D,OAAO,EAAiB,EAAe,GAAK,CAC9C,EAEA,SAAS,EAAuB,EAAsB,CACpD,IAAM,EAAU,EAAK,KAAK,EAAE,QAAQ,MAAO,GAAG,EAAE,QAAQ,OAAQ,EAAE,EAMlE,OALK,EAED,EAAQ,WAAW,GAAG,GAAK,mBAAmB,KAAK,CAAO,EACrD,EAEF,IAAI,IALU,EAMvB,CAWA,IAAa,GACX,EACA,IACW,CACX,IAAI,EAAS,EAAK,KAAK,EAAE,QAAQ,MAAO,GAAG,EAC3C,GAAI,CAAC,EAAQ,MAAO,GAIpB,EAAS,EAAO,QAAQ,iBAAkB,EAAE,EAE5C,IAAM,EAAQ,CAAC,EAAY,EAAA,mBAAmB,EAAE,OAC7C,GAA2B,EAAQ,GAAO,KAAK,CAClD,EAEA,IAAK,IAAM,KAAQ,EAAO,CACxB,IAAM,EAAiB,EAAuB,CAAI,EAC7C,KACL,IAAI,IAAW,EACb,MAAO,GAET,GAAI,EAAO,WAAW,GAAG,EAAe,EAAE,EACxC,OAAO,EAAO,MAAM,EAAe,OAAS,CAAC,CAHtC,CAKX,CAMA,OAJK,EAAO,WAAW,GAAG,EAInB,EAAqB,CAAM,EAAE,QAAQ,QAAS,EAAE,EAH9C,EAAO,QAAQ,QAAS,EAAE,CAIrC,EAEM,EACJ,mMAMW,EAA8B,GAA0B,CACnE,IAAM,EAAU,EAAK,KAAK,EAC1B,GAAI,CAAC,GAAW,KAAK,KAAK,CAAO,GAAK,gBAAgB,KAAK,CAAO,EAChE,MAAO,GAGT,IAAI,EAAO,EAAQ,QAAQ,MAAO,GAAG,EAAE,QAAQ,QAAS,EAAE,EAU1D,GATA,EAAO,EAAK,QAAQ,iBAAkB,EAAE,EAGtC,iFAAiF,KAC/E,CACF,GAIE,oCAAoC,KAAK,CAAI,EAC/C,MAAO,GAGT,IAAM,EAAc,EAAK,SAAS,GAAG,EAAK,EAAK,MAAM,GAAG,EAAE,IAAI,GAAK,GAAM,EACzE,OAAO,EAAyB,KAAK,CAAW,CAClD,EAMa,EAAmB,GAAyB,CACvD,IAAM,EAAU,EAAK,KAAK,EAC1B,GAAI,CAAC,EAAS,MAAO,GAErB,IAAM,EAAa,EAAQ,QAAQ,UAAW,EAAE,EAChD,GAAI,CAAC,GAAc,cAAc,KAAK,CAAU,EAAG,MAAO,GAE1D,IAAM,EAAM,KAAK,IACf,EAAW,YAAY,GAAG,EAC1B,EAAW,YAAY,IAAI,CAC7B,EACA,OAAO,GAAO,EAAI,EAAW,MAAM,EAAM,CAAC,EAAI,CAChD"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path manipulation utilities
|
|
3
|
-
*/
|
|
4
1
|
/**
|
|
5
2
|
* Strip workspace prefix from file paths
|
|
6
3
|
* Removes /workspace/ and the next directory level from paths
|
|
@@ -13,6 +10,21 @@
|
|
|
13
10
|
* stripWorkspacePrefix("/workspace/my-project/components/Button.tsx") // returns "components/Button.tsx"
|
|
14
11
|
*/
|
|
15
12
|
export declare const stripWorkspacePrefix: (path: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Convert an agent/chat file path into a workspace-relative path for the Files
|
|
15
|
+
* drawer / workspace file APIs.
|
|
16
|
+
*
|
|
17
|
+
* Strips editor `:line` / `:start-end` suffixes, then removes the conversation
|
|
18
|
+
* working directory (or `DEFAULT_WORKING_DIR`) when present as a prefix.
|
|
19
|
+
* Nested roots must match `workingDir` first — the generic `/workspace/<name>/`
|
|
20
|
+
* heuristic is only a fallback when no root matches.
|
|
21
|
+
*/
|
|
22
|
+
export declare const toFilesTabPath: (path: string, workingDir?: string | null) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Conservative check for inline chat tokens that should open in Files.
|
|
25
|
+
* Rejects URLs, MIME types, versions, and dotted identifiers like `console.log`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const looksLikeWorkspaceFilePath: (text: string) => boolean;
|
|
16
28
|
/**
|
|
17
29
|
* Returns the basename (top-level folder/file name) from a path string,
|
|
18
30
|
* tolerating POSIX and Windows separators and trailing slashes.
|
package/dist/utils/path-utils.js
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
|
+
import { DEFAULT_WORKING_DIR as e } from "../api/agent-server-config.js";
|
|
1
2
|
//#region src/utils/path-utils.ts
|
|
2
|
-
var
|
|
3
|
+
var t = (e) => {
|
|
3
4
|
let t = e.match(/^\/workspace\/[^/]+\/(.*)$/);
|
|
4
5
|
return t ? t[1] : e;
|
|
5
|
-
}
|
|
6
|
+
};
|
|
7
|
+
function n(e) {
|
|
8
|
+
let t = e.trim().replace(/\\/g, "/").replace(/\/+$/, "");
|
|
9
|
+
return t ? t.startsWith("/") || /^[A-Za-z]:(\/|$)/.test(t) ? t : `/${t}` : "";
|
|
10
|
+
}
|
|
11
|
+
var r = (r, i) => {
|
|
12
|
+
let a = r.trim().replace(/\\/g, "/");
|
|
13
|
+
if (!a) return "";
|
|
14
|
+
a = a.replace(/:(\d+)(-\d+)?$/, "");
|
|
15
|
+
let o = [i, e].filter((e) => !!e?.trim());
|
|
16
|
+
for (let e of o) {
|
|
17
|
+
let t = n(e);
|
|
18
|
+
if (t) {
|
|
19
|
+
if (a === t) return "";
|
|
20
|
+
if (a.startsWith(`${t}/`)) return a.slice(t.length + 1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return a.startsWith("/") ? t(a).replace(/^\.\//, "") : a.replace(/^\.\//, "");
|
|
24
|
+
}, i = /\.(md|txt|ts|tsx|js|jsx|mjs|cjs|py|json|html?|css|scss|ya?ml|toml|rs|go|java|kt|swift|c|cc|cpp|h|hpp|sh|bash|zsh|sql|xml|svg|pdf|env|rb|php|vue|svelte|lock|ini|cfg|docx?|xlsx?|pptx?|odt|rtf)$/i, a = (e) => {
|
|
25
|
+
let t = e.trim();
|
|
26
|
+
if (!t || /\s/.test(t) || /^https?:\/\//i.test(t)) return !1;
|
|
27
|
+
let n = t.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
28
|
+
if (n = n.replace(/:(\d+)(-\d+)?$/, ""), /^(application|audio|image|text|video|font|multipart|message|model)\/[\w.+-]+$/i.test(n) || /^v?\d+(\.\d+){1,3}([-+][\w.]+)?$/i.test(n)) return !1;
|
|
29
|
+
let r = n.includes("/") ? n.split("/").pop() ?? "" : n;
|
|
30
|
+
return i.test(r);
|
|
31
|
+
}, o = (e) => {
|
|
6
32
|
let t = e.trim();
|
|
7
33
|
if (!t) return "";
|
|
8
34
|
let n = t.replace(/[\\/]+$/, "");
|
|
@@ -11,6 +37,6 @@ var e = (e) => {
|
|
|
11
37
|
return r >= 0 ? n.slice(r + 1) : n;
|
|
12
38
|
};
|
|
13
39
|
//#endregion
|
|
14
|
-
export {
|
|
40
|
+
export { o as getPathBasename, a as looksLikeWorkspaceFilePath, t as stripWorkspacePrefix, r as toFilesTabPath };
|
|
15
41
|
|
|
16
42
|
//# sourceMappingURL=path-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.js","names":[],"sources":["../../src/utils/path-utils.ts"],"sourcesContent":["/**\n * Path manipulation utilities\n */\n\n/**\n * Strip workspace prefix from file paths\n * Removes /workspace/ and the next directory level from paths\n *\n * @param path - The file path to process\n * @returns The path with workspace prefix removed\n *\n * @example\n * stripWorkspacePrefix(\"/workspace/repo/src/file.py\") // returns \"src/file.py\"\n * stripWorkspacePrefix(\"/workspace/my-project/components/Button.tsx\") // returns \"components/Button.tsx\"\n */\nexport const stripWorkspacePrefix = (path: string): string => {\n // Strip /workspace/ and the next directory level\n const workspaceMatch = path.match(/^\\/workspace\\/[^/]+\\/(.*)$/);\n return workspaceMatch ? workspaceMatch[1] : path;\n};\n\n/**\n * Returns the basename (top-level folder/file name) from a path string,\n * tolerating POSIX and Windows separators and trailing slashes.\n */\nexport const getPathBasename = (path: string): string => {\n const trimmed = path.trim();\n if (!trimmed) return \"\";\n\n const normalized = trimmed.replace(/[\\\\/]+$/, \"\");\n if (!normalized || /^[A-Za-z]:$/.test(normalized)) return \"\";\n\n const idx = Math.max(\n normalized.lastIndexOf(\"/\"),\n normalized.lastIndexOf(\"\\\\\"),\n );\n return idx >= 0 ? normalized.slice(idx + 1) : normalized;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"path-utils.js","names":[],"sources":["../../src/utils/path-utils.ts"],"sourcesContent":["/**\n * Path manipulation utilities\n */\nimport { DEFAULT_WORKING_DIR } from \"#/api/agent-server-config\";\n\n/**\n * Strip workspace prefix from file paths\n * Removes /workspace/ and the next directory level from paths\n *\n * @param path - The file path to process\n * @returns The path with workspace prefix removed\n *\n * @example\n * stripWorkspacePrefix(\"/workspace/repo/src/file.py\") // returns \"src/file.py\"\n * stripWorkspacePrefix(\"/workspace/my-project/components/Button.tsx\") // returns \"components/Button.tsx\"\n */\nexport const stripWorkspacePrefix = (path: string): string => {\n // Strip /workspace/ and the next directory level\n const workspaceMatch = path.match(/^\\/workspace\\/[^/]+\\/(.*)$/);\n return workspaceMatch ? workspaceMatch[1] : path;\n};\n\nfunction normalizeWorkspaceRoot(root: string): string {\n const trimmed = root.trim().replace(/\\\\/g, \"/\").replace(/\\/+$/, \"\");\n if (!trimmed) return \"\";\n // Keep Windows drive roots (`C:` / `C:/repo`) and POSIX absolutes as-is.\n if (trimmed.startsWith(\"/\") || /^[A-Za-z]:(\\/|$)/.test(trimmed)) {\n return trimmed;\n }\n return `/${trimmed}`;\n}\n\n/**\n * Convert an agent/chat file path into a workspace-relative path for the Files\n * drawer / workspace file APIs.\n *\n * Strips editor `:line` / `:start-end` suffixes, then removes the conversation\n * working directory (or `DEFAULT_WORKING_DIR`) when present as a prefix.\n * Nested roots must match `workingDir` first — the generic `/workspace/<name>/`\n * heuristic is only a fallback when no root matches.\n */\nexport const toFilesTabPath = (\n path: string,\n workingDir?: string | null,\n): string => {\n let result = path.trim().replace(/\\\\/g, \"/\");\n if (!result) return \"\";\n\n // Strip editor `:12` / `:12-40` suffixes. Safe on Windows paths too —\n // the drive colon is at the start (`C:`), never at the end.\n result = result.replace(/:(\\d+)(-\\d+)?$/, \"\");\n\n const roots = [workingDir, DEFAULT_WORKING_DIR].filter(\n (value): value is string => Boolean(value?.trim()),\n );\n\n for (const root of roots) {\n const normalizedRoot = normalizeWorkspaceRoot(root);\n if (!normalizedRoot) continue;\n if (result === normalizedRoot) {\n return \"\";\n }\n if (result.startsWith(`${normalizedRoot}/`)) {\n return result.slice(normalizedRoot.length + 1);\n }\n }\n\n if (!result.startsWith(\"/\")) {\n return result.replace(/^\\.\\//, \"\");\n }\n\n return stripWorkspacePrefix(result).replace(/^\\.\\//, \"\");\n};\n\nconst WORKSPACE_FILE_EXTENSION =\n /\\.(md|txt|ts|tsx|js|jsx|mjs|cjs|py|json|html?|css|scss|ya?ml|toml|rs|go|java|kt|swift|c|cc|cpp|h|hpp|sh|bash|zsh|sql|xml|svg|pdf|env|rb|php|vue|svelte|lock|ini|cfg|docx?|xlsx?|pptx?|odt|rtf)$/i;\n\n/**\n * Conservative check for inline chat tokens that should open in Files.\n * Rejects URLs, MIME types, versions, and dotted identifiers like `console.log`.\n */\nexport const looksLikeWorkspaceFilePath = (text: string): boolean => {\n const trimmed = text.trim();\n if (!trimmed || /\\s/.test(trimmed) || /^https?:\\/\\//i.test(trimmed)) {\n return false;\n }\n\n let path = trimmed.replace(/\\\\/g, \"/\").replace(/^\\.\\//, \"\");\n path = path.replace(/:(\\d+)(-\\d+)?$/, \"\");\n\n if (\n /^(application|audio|image|text|video|font|multipart|message|model)\\/[\\w.+-]+$/i.test(\n path,\n )\n ) {\n return false;\n }\n if (/^v?\\d+(\\.\\d+){1,3}([-+][\\w.]+)?$/i.test(path)) {\n return false;\n }\n\n const lastSegment = path.includes(\"/\") ? (path.split(\"/\").pop() ?? \"\") : path;\n return WORKSPACE_FILE_EXTENSION.test(lastSegment);\n};\n\n/**\n * Returns the basename (top-level folder/file name) from a path string,\n * tolerating POSIX and Windows separators and trailing slashes.\n */\nexport const getPathBasename = (path: string): string => {\n const trimmed = path.trim();\n if (!trimmed) return \"\";\n\n const normalized = trimmed.replace(/[\\\\/]+$/, \"\");\n if (!normalized || /^[A-Za-z]:$/.test(normalized)) return \"\";\n\n const idx = Math.max(\n normalized.lastIndexOf(\"/\"),\n normalized.lastIndexOf(\"\\\\\"),\n );\n return idx >= 0 ? normalized.slice(idx + 1) : normalized;\n};\n"],"mappings":";;AAgBA,IAAa,KAAwB,MAAyB;CAE5D,IAAM,IAAiB,EAAK,MAAM,4BAA4B;CAC9D,OAAO,IAAiB,EAAe,KAAK;AAC9C;AAEA,SAAS,EAAuB,GAAsB;CACpD,IAAM,IAAU,EAAK,KAAK,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,EAAE;CAMlE,OALK,IAED,EAAQ,WAAW,GAAG,KAAK,mBAAmB,KAAK,CAAO,IACrD,IAEF,IAAI,MALU;AAMvB;AAWA,IAAa,KACX,GACA,MACW;CACX,IAAI,IAAS,EAAK,KAAK,EAAE,QAAQ,OAAO,GAAG;CAC3C,IAAI,CAAC,GAAQ,OAAO;CAIpB,IAAS,EAAO,QAAQ,kBAAkB,EAAE;CAE5C,IAAM,IAAQ,CAAC,GAAY,CAAmB,EAAE,QAC7C,MAA2B,EAAQ,GAAO,KAAK,CAClD;CAEA,KAAK,IAAM,KAAQ,GAAO;EACxB,IAAM,IAAiB,EAAuB,CAAI;EAC7C,OACL;OAAI,MAAW,GACb,OAAO;GAET,IAAI,EAAO,WAAW,GAAG,EAAe,EAAE,GACxC,OAAO,EAAO,MAAM,EAAe,SAAS,CAAC;EAHtC;CAKX;CAMA,OAJK,EAAO,WAAW,GAAG,IAInB,EAAqB,CAAM,EAAE,QAAQ,SAAS,EAAE,IAH9C,EAAO,QAAQ,SAAS,EAAE;AAIrC,GAEM,IACJ,oMAMW,KAA8B,MAA0B;CACnE,IAAM,IAAU,EAAK,KAAK;CAC1B,IAAI,CAAC,KAAW,KAAK,KAAK,CAAO,KAAK,gBAAgB,KAAK,CAAO,GAChE,OAAO;CAGT,IAAI,IAAO,EAAQ,QAAQ,OAAO,GAAG,EAAE,QAAQ,SAAS,EAAE;CAU1D,IATA,IAAO,EAAK,QAAQ,kBAAkB,EAAE,GAGtC,iFAAiF,KAC/E,CACF,KAIE,oCAAoC,KAAK,CAAI,GAC/C,OAAO;CAGT,IAAM,IAAc,EAAK,SAAS,GAAG,IAAK,EAAK,MAAM,GAAG,EAAE,IAAI,KAAK,KAAM;CACzE,OAAO,EAAyB,KAAK,CAAW;AAClD,GAMa,KAAmB,MAAyB;CACvD,IAAM,IAAU,EAAK,KAAK;CAC1B,IAAI,CAAC,GAAS,OAAO;CAErB,IAAM,IAAa,EAAQ,QAAQ,WAAW,EAAE;CAChD,IAAI,CAAC,KAAc,cAAc,KAAK,CAAU,GAAG,OAAO;CAE1D,IAAM,IAAM,KAAK,IACf,EAAW,YAAY,GAAG,GAC1B,EAAW,YAAY,IAAI,CAC7B;CACA,OAAO,KAAO,IAAI,EAAW,MAAM,IAAM,CAAC,IAAI;AAChD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/extensions/skills/index.cjs");var t=e.default.map(e=>e.name),n=new Set(t),r=new Set(e.DEFAULT_ENABLED_SKILL_NAMES);function i(e){return n.has(e)}function a(e){return r.has(e)}function o(t){return t.enabledSkills??[...e.DEFAULT_ENABLED_SKILL_NAMES]}function s(e){let t=new Set(o(e)),n=new Set(e.disabledSkills??[]);return e=>n.has(e)?!1:!i(e)||t.has(e)}function c(e){return{enabledSkills:e.enabled_skills,disabledSkills:e.disabled_skills}}var l=new Map(e.default.flatMap(e=>[`/${e.name}`,...(e.triggers??[]).filter(e=>e.startsWith(`/`))].map(t=>[t.toLowerCase(),e.name])));function u(e){let t=e?.trim().split(/\s+/,1)[0];if(t?.startsWith(`/`))return l.get(t.toLowerCase())}exports.CATALOG_SKILL_NAMES=t,exports.buildSkillEnablementFilter=s,exports.findInvokedCatalogSkill=u,exports.isCatalogSkill=i,exports.isRecommendedSkill=a,exports.resolveEnabledCatalogSkills=o,exports.toSkillEnablement=c;
|
|
2
|
+
//# sourceMappingURL=skill-enablement.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-enablement.cjs","names":[],"sources":["../../src/utils/skill-enablement.ts"],"sourcesContent":["import {\n DEFAULT_ENABLED_SKILL_NAMES,\n SKILLS_CATALOG,\n} from \"@openhands/extensions/skills\";\n\n/** Every skill bundled from `@openhands/extensions`, in catalog order. */\nexport const CATALOG_SKILL_NAMES: readonly string[] = SKILLS_CATALOG.map(\n (entry) => entry.name,\n);\n\nconst CATALOG_SKILL_NAME_SET = new Set(CATALOG_SKILL_NAMES);\nconst RECOMMENDED_SKILL_NAME_SET = new Set(DEFAULT_ENABLED_SKILL_NAMES);\n\nexport function isCatalogSkill(name: string): boolean {\n return CATALOG_SKILL_NAME_SET.has(name);\n}\n\nexport function isRecommendedSkill(name: string): boolean {\n return RECOMMENDED_SKILL_NAME_SET.has(name);\n}\n\n/**\n * The two persisted lists. They cover different populations: `enabledSkills`\n * allow-lists the bundled catalog, whose every future addition would otherwise\n * be on for everyone (#16302), while `disabledSkills` keeps denying user- and\n * project-authored skills, which should be on the moment they appear.\n *\n * `undefined` means \"never migrated\" and must survive settings hydration.\n */\nexport interface SkillEnablement {\n enabledSkills?: string[];\n disabledSkills?: string[];\n}\n\nexport function resolveEnabledCatalogSkills(\n enablement: SkillEnablement,\n): string[] {\n return enablement.enabledSkills ?? [...DEFAULT_ENABLED_SKILL_NAMES];\n}\n\n/**\n * The one rule for \"will this skill be loaded\", resolved once per caller so\n * per-skill checks stay cheap.\n *\n * The deny-list still wins over the allow-list, which only matters before the\n * migration runs: until then a pre-existing \"I turned this off\" lives in the\n * deny-list alone.\n */\nexport function buildSkillEnablementFilter(\n enablement: SkillEnablement,\n): (skillName: string) => boolean {\n const enabled = new Set(resolveEnabledCatalogSkills(enablement));\n const disabled = new Set(enablement.disabledSkills ?? []);\n\n return (skillName) => {\n if (disabled.has(skillName)) return false;\n return !isCatalogSkill(skillName) || enabled.has(skillName);\n };\n}\n\n/**\n * One-shot conversion from \"all catalog skills on, minus a deny-list\" to an\n * explicit allow-list; `undefined` once already migrated.\n *\n * A fresh workspace is migrated too, even though the resolver's fallback would\n * give it the same set: persisting an explicit list is what stops a later\n * `defaultEnabled` catalog addition from switching itself on.\n */\nexport function migrateSkillEnablement(\n enablement: SkillEnablement,\n): { enabled_skills: string[]; disabled_skills: string[] } | undefined {\n if (enablement.enabledSkills !== undefined) return undefined;\n\n const disabled = new Set(enablement.disabledSkills ?? []);\n // A deny-list naming a catalog skill is the only evidence that this\n // workspace predates the allow-list; one holding local names alone says\n // nothing about the catalog.\n const isExistingWorkspace = [...disabled].some(isCatalogSkill);\n\n return {\n enabled_skills: isExistingWorkspace\n ? CATALOG_SKILL_NAMES.filter((name) => !disabled.has(name))\n : [...DEFAULT_ENABLED_SKILL_NAMES],\n // Catalog names move to the allow-list; a leftover deny entry would veto\n // a skill the user later switches back on.\n disabled_skills: [...disabled].filter((name) => !isCatalogSkill(name)),\n };\n}\n\nexport function toSkillEnablement(settings: {\n enabled_skills?: string[];\n disabled_skills?: string[];\n}): SkillEnablement {\n return {\n enabledSkills: settings.enabled_skills,\n disabledSkills: settings.disabled_skills,\n };\n}\n\n// Both forms a user can send: the commands a skill declares in its own\n// `triggers` (what an automation card fills in — see `findAutomationCommand`),\n// and `/<skill-name>`, which the detail modal's \"Use skill\" button inserts.\nconst CATALOG_SKILL_BY_SLASH_COMMAND = new Map(\n SKILLS_CATALOG.flatMap((entry) =>\n [\n `/${entry.name}`,\n ...(entry.triggers ?? []).filter((trigger) => trigger.startsWith(\"/\")),\n ].map((command) => [command.toLowerCase(), entry.name] as const),\n ),\n);\n\n/**\n * The catalog skill a message invokes by name, if any.\n *\n * 18 of the catalog's 24 slash commands belong to skills that are off by\n * default, so without this an automation card would send its command with none\n * of the instructions behind it. Only the leading token counts: matching a\n * `/word` anywhere in prose would re-admit most of the catalog.\n */\nexport function findInvokedCatalogSkill(query?: string): string | undefined {\n const firstToken = query?.trim().split(/\\s+/, 1)[0];\n if (!firstToken?.startsWith(\"/\")) return undefined;\n return CATALOG_SKILL_BY_SLASH_COMMAND.get(firstToken.toLowerCase());\n}\n"],"mappings":"uHAMA,IAAa,EAAyC,EAAA,QAAe,IAClE,GAAU,EAAM,IACnB,EAEM,EAAyB,IAAI,IAAI,CAAmB,EACpD,EAA6B,IAAI,IAAI,EAAA,2BAA2B,EAEtE,SAAgB,EAAe,EAAuB,CACpD,OAAO,EAAuB,IAAI,CAAI,CACxC,CAEA,SAAgB,EAAmB,EAAuB,CACxD,OAAO,EAA2B,IAAI,CAAI,CAC5C,CAeA,SAAgB,EACd,EACU,CACV,OAAO,EAAW,eAAiB,CAAC,GAAG,EAAA,2BAA2B,CACpE,CAUA,SAAgB,EACd,EACgC,CAChC,IAAM,EAAU,IAAI,IAAI,EAA4B,CAAU,CAAC,EACzD,EAAW,IAAI,IAAI,EAAW,gBAAkB,CAAC,CAAC,EAExD,MAAQ,IACF,EAAS,IAAI,CAAS,EAAU,GAC7B,CAAC,EAAe,CAAS,GAAK,EAAQ,IAAI,CAAS,CAE9D,CA+BA,SAAgB,EAAkB,EAGd,CAClB,MAAO,CACL,cAAe,EAAS,eACxB,eAAgB,EAAS,eAC3B,CACF,CAKA,IAAM,EAAiC,IAAI,IACzC,EAAA,QAAe,QAAS,GACtB,CACE,IAAI,EAAM,OACV,IAAI,EAAM,UAAY,CAAC,GAAG,OAAQ,GAAY,EAAQ,WAAW,GAAG,CAAC,CACvE,EAAE,IAAK,GAAY,CAAC,EAAQ,YAAY,EAAG,EAAM,IAAI,CAAU,CACjE,CACF,EAUA,SAAgB,EAAwB,EAAoC,CAC1E,IAAM,EAAa,GAAO,KAAK,EAAE,MAAM,MAAO,CAAC,EAAE,GAC5C,MAAY,WAAW,GAAG,EAC/B,OAAO,EAA+B,IAAI,EAAW,YAAY,CAAC,CACpE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Every skill bundled from `@openhands/extensions`, in catalog order. */
|
|
2
|
+
export declare const CATALOG_SKILL_NAMES: readonly string[];
|
|
3
|
+
export declare function isCatalogSkill(name: string): boolean;
|
|
4
|
+
export declare function isRecommendedSkill(name: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The two persisted lists. They cover different populations: `enabledSkills`
|
|
7
|
+
* allow-lists the bundled catalog, whose every future addition would otherwise
|
|
8
|
+
* be on for everyone (#16302), while `disabledSkills` keeps denying user- and
|
|
9
|
+
* project-authored skills, which should be on the moment they appear.
|
|
10
|
+
*
|
|
11
|
+
* `undefined` means "never migrated" and must survive settings hydration.
|
|
12
|
+
*/
|
|
13
|
+
export interface SkillEnablement {
|
|
14
|
+
enabledSkills?: string[];
|
|
15
|
+
disabledSkills?: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function resolveEnabledCatalogSkills(enablement: SkillEnablement): string[];
|
|
18
|
+
/**
|
|
19
|
+
* The one rule for "will this skill be loaded", resolved once per caller so
|
|
20
|
+
* per-skill checks stay cheap.
|
|
21
|
+
*
|
|
22
|
+
* The deny-list still wins over the allow-list, which only matters before the
|
|
23
|
+
* migration runs: until then a pre-existing "I turned this off" lives in the
|
|
24
|
+
* deny-list alone.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildSkillEnablementFilter(enablement: SkillEnablement): (skillName: string) => boolean;
|
|
27
|
+
/**
|
|
28
|
+
* One-shot conversion from "all catalog skills on, minus a deny-list" to an
|
|
29
|
+
* explicit allow-list; `undefined` once already migrated.
|
|
30
|
+
*
|
|
31
|
+
* A fresh workspace is migrated too, even though the resolver's fallback would
|
|
32
|
+
* give it the same set: persisting an explicit list is what stops a later
|
|
33
|
+
* `defaultEnabled` catalog addition from switching itself on.
|
|
34
|
+
*/
|
|
35
|
+
export declare function migrateSkillEnablement(enablement: SkillEnablement): {
|
|
36
|
+
enabled_skills: string[];
|
|
37
|
+
disabled_skills: string[];
|
|
38
|
+
} | undefined;
|
|
39
|
+
export declare function toSkillEnablement(settings: {
|
|
40
|
+
enabled_skills?: string[];
|
|
41
|
+
disabled_skills?: string[];
|
|
42
|
+
}): SkillEnablement;
|
|
43
|
+
/**
|
|
44
|
+
* The catalog skill a message invokes by name, if any.
|
|
45
|
+
*
|
|
46
|
+
* 18 of the catalog's 24 slash commands belong to skills that are off by
|
|
47
|
+
* default, so without this an automation card would send its command with none
|
|
48
|
+
* of the instructions behind it. Only the leading token counts: matching a
|
|
49
|
+
* `/word` anywhere in prose would re-admit most of the catalog.
|
|
50
|
+
*/
|
|
51
|
+
export declare function findInvokedCatalogSkill(query?: string): string | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import e, { DEFAULT_ENABLED_SKILL_NAMES as t } from "../node_modules/@openhands/extensions/skills/index.js";
|
|
2
|
+
//#region src/utils/skill-enablement.ts
|
|
3
|
+
var n = e.map((e) => e.name), r = new Set(n), i = new Set(t);
|
|
4
|
+
function a(e) {
|
|
5
|
+
return r.has(e);
|
|
6
|
+
}
|
|
7
|
+
function o(e) {
|
|
8
|
+
return i.has(e);
|
|
9
|
+
}
|
|
10
|
+
function s(e) {
|
|
11
|
+
return e.enabledSkills ?? [...t];
|
|
12
|
+
}
|
|
13
|
+
function c(e) {
|
|
14
|
+
let t = new Set(s(e)), n = new Set(e.disabledSkills ?? []);
|
|
15
|
+
return (e) => n.has(e) ? !1 : !a(e) || t.has(e);
|
|
16
|
+
}
|
|
17
|
+
function l(e) {
|
|
18
|
+
return {
|
|
19
|
+
enabledSkills: e.enabled_skills,
|
|
20
|
+
disabledSkills: e.disabled_skills
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
var u = new Map(e.flatMap((e) => [`/${e.name}`, ...(e.triggers ?? []).filter((e) => e.startsWith("/"))].map((t) => [t.toLowerCase(), e.name])));
|
|
24
|
+
function d(e) {
|
|
25
|
+
let t = e?.trim().split(/\s+/, 1)[0];
|
|
26
|
+
if (t?.startsWith("/")) return u.get(t.toLowerCase());
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { n as CATALOG_SKILL_NAMES, c as buildSkillEnablementFilter, d as findInvokedCatalogSkill, a as isCatalogSkill, o as isRecommendedSkill, s as resolveEnabledCatalogSkills, l as toSkillEnablement };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=skill-enablement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-enablement.js","names":[],"sources":["../../src/utils/skill-enablement.ts"],"sourcesContent":["import {\n DEFAULT_ENABLED_SKILL_NAMES,\n SKILLS_CATALOG,\n} from \"@openhands/extensions/skills\";\n\n/** Every skill bundled from `@openhands/extensions`, in catalog order. */\nexport const CATALOG_SKILL_NAMES: readonly string[] = SKILLS_CATALOG.map(\n (entry) => entry.name,\n);\n\nconst CATALOG_SKILL_NAME_SET = new Set(CATALOG_SKILL_NAMES);\nconst RECOMMENDED_SKILL_NAME_SET = new Set(DEFAULT_ENABLED_SKILL_NAMES);\n\nexport function isCatalogSkill(name: string): boolean {\n return CATALOG_SKILL_NAME_SET.has(name);\n}\n\nexport function isRecommendedSkill(name: string): boolean {\n return RECOMMENDED_SKILL_NAME_SET.has(name);\n}\n\n/**\n * The two persisted lists. They cover different populations: `enabledSkills`\n * allow-lists the bundled catalog, whose every future addition would otherwise\n * be on for everyone (#16302), while `disabledSkills` keeps denying user- and\n * project-authored skills, which should be on the moment they appear.\n *\n * `undefined` means \"never migrated\" and must survive settings hydration.\n */\nexport interface SkillEnablement {\n enabledSkills?: string[];\n disabledSkills?: string[];\n}\n\nexport function resolveEnabledCatalogSkills(\n enablement: SkillEnablement,\n): string[] {\n return enablement.enabledSkills ?? [...DEFAULT_ENABLED_SKILL_NAMES];\n}\n\n/**\n * The one rule for \"will this skill be loaded\", resolved once per caller so\n * per-skill checks stay cheap.\n *\n * The deny-list still wins over the allow-list, which only matters before the\n * migration runs: until then a pre-existing \"I turned this off\" lives in the\n * deny-list alone.\n */\nexport function buildSkillEnablementFilter(\n enablement: SkillEnablement,\n): (skillName: string) => boolean {\n const enabled = new Set(resolveEnabledCatalogSkills(enablement));\n const disabled = new Set(enablement.disabledSkills ?? []);\n\n return (skillName) => {\n if (disabled.has(skillName)) return false;\n return !isCatalogSkill(skillName) || enabled.has(skillName);\n };\n}\n\n/**\n * One-shot conversion from \"all catalog skills on, minus a deny-list\" to an\n * explicit allow-list; `undefined` once already migrated.\n *\n * A fresh workspace is migrated too, even though the resolver's fallback would\n * give it the same set: persisting an explicit list is what stops a later\n * `defaultEnabled` catalog addition from switching itself on.\n */\nexport function migrateSkillEnablement(\n enablement: SkillEnablement,\n): { enabled_skills: string[]; disabled_skills: string[] } | undefined {\n if (enablement.enabledSkills !== undefined) return undefined;\n\n const disabled = new Set(enablement.disabledSkills ?? []);\n // A deny-list naming a catalog skill is the only evidence that this\n // workspace predates the allow-list; one holding local names alone says\n // nothing about the catalog.\n const isExistingWorkspace = [...disabled].some(isCatalogSkill);\n\n return {\n enabled_skills: isExistingWorkspace\n ? CATALOG_SKILL_NAMES.filter((name) => !disabled.has(name))\n : [...DEFAULT_ENABLED_SKILL_NAMES],\n // Catalog names move to the allow-list; a leftover deny entry would veto\n // a skill the user later switches back on.\n disabled_skills: [...disabled].filter((name) => !isCatalogSkill(name)),\n };\n}\n\nexport function toSkillEnablement(settings: {\n enabled_skills?: string[];\n disabled_skills?: string[];\n}): SkillEnablement {\n return {\n enabledSkills: settings.enabled_skills,\n disabledSkills: settings.disabled_skills,\n };\n}\n\n// Both forms a user can send: the commands a skill declares in its own\n// `triggers` (what an automation card fills in — see `findAutomationCommand`),\n// and `/<skill-name>`, which the detail modal's \"Use skill\" button inserts.\nconst CATALOG_SKILL_BY_SLASH_COMMAND = new Map(\n SKILLS_CATALOG.flatMap((entry) =>\n [\n `/${entry.name}`,\n ...(entry.triggers ?? []).filter((trigger) => trigger.startsWith(\"/\")),\n ].map((command) => [command.toLowerCase(), entry.name] as const),\n ),\n);\n\n/**\n * The catalog skill a message invokes by name, if any.\n *\n * 18 of the catalog's 24 slash commands belong to skills that are off by\n * default, so without this an automation card would send its command with none\n * of the instructions behind it. Only the leading token counts: matching a\n * `/word` anywhere in prose would re-admit most of the catalog.\n */\nexport function findInvokedCatalogSkill(query?: string): string | undefined {\n const firstToken = query?.trim().split(/\\s+/, 1)[0];\n if (!firstToken?.startsWith(\"/\")) return undefined;\n return CATALOG_SKILL_BY_SLASH_COMMAND.get(firstToken.toLowerCase());\n}\n"],"mappings":";;AAMA,IAAa,IAAyC,EAAe,KAClE,MAAU,EAAM,IACnB,GAEM,IAAyB,IAAI,IAAI,CAAmB,GACpD,IAA6B,IAAI,IAAI,CAA2B;AAEtE,SAAgB,EAAe,GAAuB;CACpD,OAAO,EAAuB,IAAI,CAAI;AACxC;AAEA,SAAgB,EAAmB,GAAuB;CACxD,OAAO,EAA2B,IAAI,CAAI;AAC5C;AAeA,SAAgB,EACd,GACU;CACV,OAAO,EAAW,iBAAiB,CAAC,GAAG,CAA2B;AACpE;AAUA,SAAgB,EACd,GACgC;CAChC,IAAM,IAAU,IAAI,IAAI,EAA4B,CAAU,CAAC,GACzD,IAAW,IAAI,IAAI,EAAW,kBAAkB,CAAC,CAAC;CAExD,QAAQ,MACF,EAAS,IAAI,CAAS,IAAU,KAC7B,CAAC,EAAe,CAAS,KAAK,EAAQ,IAAI,CAAS;AAE9D;AA+BA,SAAgB,EAAkB,GAGd;CAClB,OAAO;EACL,eAAe,EAAS;EACxB,gBAAgB,EAAS;CAC3B;AACF;AAKA,IAAM,IAAiC,IAAI,IACzC,EAAe,SAAS,MACtB,CACE,IAAI,EAAM,QACV,IAAI,EAAM,YAAY,CAAC,GAAG,QAAQ,MAAY,EAAQ,WAAW,GAAG,CAAC,CACvE,EAAE,KAAK,MAAY,CAAC,EAAQ,YAAY,GAAG,EAAM,IAAI,CAAU,CACjE,CACF;AAUA,SAAgB,EAAwB,GAAoC;CAC1E,IAAM,IAAa,GAAO,KAAK,EAAE,MAAM,OAAO,CAAC,EAAE;CAC5C,OAAY,WAAW,GAAG,GAC/B,OAAO,EAA+B,IAAI,EAAW,YAAY,CAAC;AACpE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");var e=`__AGENT_CANVAS_VSCODE_BASE_PATH__`;function t(){if(typeof window<`u`){let t=window[e];if(typeof t==`string`&&t.trim())return n(t.trim())}return null}function n(e){let t=e.startsWith(`/`)?e:`/${e}`;return t.length>1?t.replace(/\/+$/,``):t}function r(e,t){if(!e||!t)return!1;let n;try{n=new URL(e,typeof window<`u`?window.location.href:void 0)}catch{return!1}return typeof window<`u`&&n.origin!==window.location.origin?!1:n.pathname===t||n.pathname.startsWith(`${t}/`)}exports.getOriginVSCodeBasePath=t,exports.isVSCodeUrlServedByOrigin=r;
|
|
2
|
+
//# sourceMappingURL=vscode-origin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vscode-origin.cjs","names":[],"sources":["../../src/utils/vscode-origin.ts"],"sourcesContent":["/**\n * Whether *this browser origin* can serve the editor, and whether a given\n * editor URL is one it will actually route.\n *\n * Editor availability is not a property of the agent-server process alone. The\n * agent-server answers `/api/vscode/status` for whatever conversation you ask\n * about, and builds `/api/vscode/url` from the `base_url` the caller sends —\n * which is always `window.location.origin`. So a server can truthfully report\n * an editor that the page's own origin has no route to. Two supported layouts\n * hit that:\n *\n * - **Public mode** (`docker/entrypoint.sh`, `--auth-required`): a second\n * static server on its own port, sharing the same agent-server but\n * deliberately without the editor route, because the editor's connection\n * token is the session API key (OpenHands/software-agent-sdk#4317) and that\n * origin exists to test the *unauthenticated* case.\n * - **Extra backends** (`scripts/dev-extra-backend.mjs`): a second\n * agent-server registered from a browser whose origin belongs to another\n * stack. That origin's editor route, if any, points at the *bundled*\n * stack's editor — a different container's workspace.\n *\n * In both cases a control gated only on the server probe renders and then\n * resolves to the canvas SPA or, worse, someone else's workspace. So the\n * frontend has to intersect the server's capability with the origin's route\n * table, and this module is the origin half of that.\n */\n\nconst VSCODE_BASE_PATH_WINDOW_KEY = \"__AGENT_CANVAS_VSCODE_BASE_PATH__\";\n\n/**\n * The path prefix this origin serves the editor under, or `null` if it serves\n * no editor at all.\n *\n * Two sources, in order — mirroring `getRawRuntimeServicesInfo` in\n * `agent-server-adapter.ts`:\n * 1. `VITE_VSCODE_BASE_PATH` — baked in at build time by the dev launchers\n * that proxy the editor (`npm run dev`, dev:static).\n * 2. `window.__AGENT_CANVAS_VSCODE_BASE_PATH__` — injected into index.html at\n * serve time by `scripts/static-server.mjs --vscode-base-path <path>`,\n * which refuses to start unless a matching `--route` exists. That is the\n * path used by static builds (the Docker image, the published binary),\n * where the env var is empty in the prebuilt bundle.\n *\n * Absent from both means \"this origin does not serve the editor\" and the\n * control is hidden. That is the pre-existing behavior for every local backend,\n * so a deployment this cannot detect is no worse off than before.\n */\nexport function getOriginVSCodeBasePath(): string | null {\n const envRaw = import.meta.env.VITE_VSCODE_BASE_PATH?.trim();\n if (envRaw) return normalizePrefix(envRaw);\n\n if (typeof window !== \"undefined\") {\n const injected = (window as unknown as Record<string, unknown>)[\n VSCODE_BASE_PATH_WINDOW_KEY\n ];\n if (typeof injected === \"string\" && injected.trim()) {\n return normalizePrefix(injected.trim());\n }\n }\n\n return null;\n}\n\nfunction normalizePrefix(value: string): string {\n const withLeadingSlash = value.startsWith(\"/\") ? value : `/${value}`;\n return withLeadingSlash.length > 1\n ? withLeadingSlash.replace(/\\/+$/, \"\")\n : withLeadingSlash;\n}\n\n/**\n * Whether `url` is an editor URL this origin will actually route.\n *\n * The agent-server appends its own `vscode_base_path` to the origin we send it,\n * so the returned URL carries the prefix of the server that answered — not\n * necessarily the prefix this origin routes. An extra backend that configures\n * no prefix yields `<origin>/?tkn=…`, which is the canvas root: same origin,\n * wrong destination. Comparing paths is what separates the two.\n */\nexport function isVSCodeUrlServedByOrigin(\n url: string | null | undefined,\n basePath: string | null,\n): boolean {\n if (!url || !basePath) return false;\n\n let parsed: URL;\n try {\n parsed = new URL(\n url,\n typeof window !== \"undefined\" ? window.location.href : undefined,\n );\n } catch {\n return false;\n }\n\n // A cross-origin URL is somebody else's problem to route, not ours to vouch\n // for. The local path always builds on `window.location.origin`, so this only\n // fires on a value we did not construct.\n if (\n typeof window !== \"undefined\" &&\n parsed.origin !== window.location.origin\n ) {\n return false;\n }\n\n return (\n parsed.pathname === basePath || parsed.pathname.startsWith(`${basePath}/`)\n );\n}\n"],"mappings":"6CA2BA,IAAM,EAA8B,oCAoBpC,SAAgB,GAAyC,CAIvD,GAAI,OAAO,OAAW,IAAa,CACjC,IAAM,EAAY,OAChB,GAEF,GAAI,OAAO,GAAa,UAAY,EAAS,KAAK,EAChD,OAAO,EAAgB,EAAS,KAAK,CAAC,CAE1C,CAEA,OAAO,IACT,CAEA,SAAS,EAAgB,EAAuB,CAC9C,IAAM,EAAmB,EAAM,WAAW,GAAG,EAAI,EAAQ,IAAI,IAC7D,OAAO,EAAiB,OAAS,EAC7B,EAAiB,QAAQ,OAAQ,EAAE,EACnC,CACN,CAWA,SAAgB,EACd,EACA,EACS,CACT,GAAI,CAAC,GAAO,CAAC,EAAU,MAAO,GAE9B,IAAI,EACJ,GAAI,CACF,EAAS,IAAI,IACX,EACA,OAAO,OAAW,IAAc,OAAO,SAAS,KAAO,IAAA,EACzD,CACF,MAAQ,CACN,MAAO,EACT,CAYA,OANE,OAAO,OAAW,KAClB,EAAO,SAAW,OAAO,SAAS,OAE3B,GAIP,EAAO,WAAa,GAAY,EAAO,SAAS,WAAW,GAAG,EAAS,EAAE,CAE7E"}
|