@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
|
@@ -2,20 +2,27 @@ import { useQuery as e } from "../../node_modules/@tanstack/react-query/build/mo
|
|
|
2
2
|
import t from "../../api/config-service/config-service.api.js";
|
|
3
3
|
import { VERIFIED_MODELS_GC_TIME as n, VERIFIED_MODELS_QUERY_KEY as r, VERIFIED_MODELS_STALE_TIME as i, fetchVerifiedModelsByProvider as a } from "./use-verified-models.js";
|
|
4
4
|
//#region src/hooks/query/use-search-providers.ts
|
|
5
|
-
var o =
|
|
5
|
+
var o = 10;
|
|
6
|
+
async function s(e, n, r, i) {
|
|
7
|
+
if (i >= o) throw Error(`Too many pagination requests while fetching providers (depth=${i})`);
|
|
8
|
+
let a = await t.searchProviders(n ? { page_id: n } : {}, e);
|
|
9
|
+
if (!a.next_page_id) return a.items;
|
|
10
|
+
if (r.has(a.next_page_id)) throw Error(`Repeated page id while fetching providers: ${a.next_page_id}`);
|
|
11
|
+
r.add(a.next_page_id);
|
|
12
|
+
let c = await s(e, a.next_page_id, r, i + 1);
|
|
13
|
+
return [...a.items, ...c];
|
|
14
|
+
}
|
|
15
|
+
var c = () => e({
|
|
6
16
|
queryKey: ["config", "providers"],
|
|
7
|
-
queryFn: async ({ client: e }) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
return (await t.searchProviders({}, n)).items;
|
|
14
|
-
},
|
|
17
|
+
queryFn: async ({ client: e }) => s(await e.fetchQuery({
|
|
18
|
+
queryKey: r,
|
|
19
|
+
queryFn: a,
|
|
20
|
+
staleTime: i
|
|
21
|
+
}), null, /* @__PURE__ */ new Set(), 0),
|
|
15
22
|
staleTime: i,
|
|
16
23
|
gcTime: n
|
|
17
24
|
});
|
|
18
25
|
//#endregion
|
|
19
|
-
export {
|
|
26
|
+
export { c as useSearchProviders };
|
|
20
27
|
|
|
21
28
|
//# sourceMappingURL=use-search-providers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-search-providers.js","names":[],"sources":["../../../src/hooks/query/use-search-providers.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMProvider } from \"#/api/config-service/config-service.types\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\nexport const useSearchProviders = () =>\n useQuery({\n queryKey: [\"config\", \"providers\"],\n queryFn: async ({ client }): Promise<LLMProvider[]> => {\n const verifiedByProvider = await client.fetchQuery({\n queryKey: VERIFIED_MODELS_QUERY_KEY,\n queryFn: fetchVerifiedModelsByProvider,\n staleTime: VERIFIED_MODELS_STALE_TIME,\n });\n //
|
|
1
|
+
{"version":3,"file":"use-search-providers.js","names":[],"sources":["../../../src/hooks/query/use-search-providers.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMProvider } from \"#/api/config-service/config-service.types\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\n// Cloud backends paginate `/api/v1/config/providers/search` with a default\n// page size smaller than the provider list (~150 entries from litellm), so a\n// single-page fetch silently drops everything past the cut. Cap the walk\n// in case the cursor ever drifts (e.g. the cloud service returns an unstable\n// `next_page_id` that loops back).\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchAllProviders(\n verifiedByProvider: Record<string, string[]>,\n pageId: string | null | undefined,\n seenPageIds: Set<string>,\n depth: number,\n): Promise<LLMProvider[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(\n `Too many pagination requests while fetching providers (depth=${depth})`,\n );\n }\n\n const page = await ConfigService.searchProviders(\n pageId ? { page_id: pageId } : {},\n verifiedByProvider,\n );\n\n if (!page.next_page_id) {\n return page.items;\n }\n\n // Cycle guard: the cloud backend is out of our control — if `next_page_id`\n // repeats, refuse to hang the settings page. Mirrors `use-search-subdirs`.\n if (seenPageIds.has(page.next_page_id)) {\n throw new Error(\n `Repeated page id while fetching providers: ${page.next_page_id}`,\n );\n }\n seenPageIds.add(page.next_page_id);\n\n const rest = await fetchAllProviders(\n verifiedByProvider,\n page.next_page_id,\n seenPageIds,\n depth + 1,\n );\n return [...page.items, ...rest];\n}\n\nexport const useSearchProviders = () =>\n useQuery({\n queryKey: [\"config\", \"providers\"],\n queryFn: async ({ client }): Promise<LLMProvider[]> => {\n const verifiedByProvider = await client.fetchQuery({\n queryKey: VERIFIED_MODELS_QUERY_KEY,\n queryFn: fetchVerifiedModelsByProvider,\n staleTime: VERIFIED_MODELS_STALE_TIME,\n });\n // The local backend returns a single page with `next_page_id: null`\n // so this loop is a no-op there; on the cloud backend it walks the\n // cursor to exhaustion.\n return fetchAllProviders(verifiedByProvider, null, new Set(), 0);\n },\n staleTime: VERIFIED_MODELS_STALE_TIME,\n gcTime: VERIFIED_MODELS_GC_TIME,\n });\n"],"mappings":";;;;AAeA,IAAM,IAAuB;AAE7B,eAAe,EACb,GACA,GACA,GACA,GACwB;CACxB,IAAI,KAAS,GACX,MAAU,MACR,gEAAgE,EAAM,EACxE;CAGF,IAAM,IAAO,MAAM,EAAc,gBAC/B,IAAS,EAAE,SAAS,EAAO,IAAI,CAAC,GAChC,CACF;CAEA,IAAI,CAAC,EAAK,cACR,OAAO,EAAK;CAKd,IAAI,EAAY,IAAI,EAAK,YAAY,GACnC,MAAU,MACR,8CAA8C,EAAK,cACrD;CAEF,EAAY,IAAI,EAAK,YAAY;CAEjC,IAAM,IAAO,MAAM,EACjB,GACA,EAAK,cACL,GACA,IAAQ,CACV;CACA,OAAO,CAAC,GAAG,EAAK,OAAO,GAAG,CAAI;AAChC;AAEA,IAAa,UACX,EAAS;CACP,UAAU,CAAC,UAAU,WAAW;CAChC,SAAS,OAAO,EAAE,gBAST,EAAkB,MARQ,EAAO,WAAW;EACjD,UAAU;EACV,SAAS;EACT,WAAW;CACb,CAAC,GAI4C,sBAAM,IAAI,IAAI,GAAG,CAAC;CAEjE,WAAW;CACX,QAAQ;AACV,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../utils/get-git-path.cjs"),o=require("../../api/git-service/agent-server-git-service.api.cjs");let s=require("react");s=e.__toESM(s,1);var c=()=>{let{conversationId:e}=t.useConversationId(),{data:c}=r.useActiveConversation(),[l,u]=s.default.useState([]),d=s.default.useRef(null),f=i.useRuntimeIsReady(),p=c?.conversation_url,m=c?.session_api_key,h=c?.selected_repository,g=c?.workspace?.working_dir?.trim(),_=s.default.useMemo(()=>a.getGitPath(h,g),[h,g]),v=n.useQuery({queryKey:[`file_changes`,e,p,m,_],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return o.default.getGitChanges(e,p,m,_)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:f&&!!e,meta:{disableToast:!0}});return s.default.useEffect(()=>{if(!v.isFetching&&v.isSuccess&&v.data){let e=v.data;if(e!==d.current)if(d.current=e,Array.isArray(e)){let t=new Set(e.map(e=>e.path)),n=new Set(l.map(e=>e.path)),r=e.filter(e=>!n.has(e.path)),i=l.filter(e=>t.has(e.path));u([...r,...i])}else u([e])}},[v.isFetching,v.isSuccess,v.data]),{data:l,isLoading:v.isLoading,isFetching:v.isFetching,isSuccess:v.isSuccess,isError:v.isError,error:v.error,refetch:v.refetch}};exports.useUnifiedGetGitChanges=c;
|
|
2
2
|
//# sourceMappingURL=use-unified-get-git-changes.cjs.map
|
|
@@ -2,12 +2,12 @@ import { useConversationId as e } from "../use-conversation-id.js";
|
|
|
2
2
|
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
3
|
import { useActiveConversation as n } from "./use-active-conversation.js";
|
|
4
4
|
import { useRuntimeIsReady as r } from "../use-runtime-is-ready.js";
|
|
5
|
-
import i from "../../
|
|
6
|
-
import
|
|
5
|
+
import { getGitPath as i } from "../../utils/get-git-path.js";
|
|
6
|
+
import a from "../../api/git-service/agent-server-git-service.api.js";
|
|
7
7
|
import o from "react";
|
|
8
8
|
//#region src/hooks/query/use-unified-get-git-changes.ts
|
|
9
9
|
var s = () => {
|
|
10
|
-
let { conversationId: s } = e(), { data: c } = n(), [l, u] = o.useState([]), d = o.useRef(null), f = r(), p = c?.conversation_url, m = c?.session_api_key, h = c?.selected_repository, g = c?.workspace?.working_dir?.trim(), _ = o.useMemo(() =>
|
|
10
|
+
let { conversationId: s } = e(), { data: c } = n(), [l, u] = o.useState([]), d = o.useRef(null), f = r(), p = c?.conversation_url, m = c?.session_api_key, h = c?.selected_repository, g = c?.workspace?.working_dir?.trim(), _ = o.useMemo(() => i(h, g), [h, g]), v = t({
|
|
11
11
|
queryKey: [
|
|
12
12
|
"file_changes",
|
|
13
13
|
s,
|
|
@@ -17,7 +17,7 @@ var s = () => {
|
|
|
17
17
|
],
|
|
18
18
|
queryFn: async () => {
|
|
19
19
|
if (!s) throw Error("No conversation ID");
|
|
20
|
-
return
|
|
20
|
+
return a.getGitChanges(s, p, m, _);
|
|
21
21
|
},
|
|
22
22
|
retry: !1,
|
|
23
23
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../utils/get-git-path.cjs"),o=require("../../api/git-service/agent-server-git-service.api.cjs");let s=require("react");s=e.__toESM(s,1);var c=()=>{let{conversationId:e}=t.useConversationId(),{data:c}=r.useActiveConversation(),l=i.useRuntimeIsReady(),u=c?.conversation_url,d=c?.session_api_key,f=c?.selected_repository,p=c?.workspace?.working_dir?.trim(),m=s.default.useMemo(()=>a.getGitPath(f,p),[f,p]),h=n.useQuery({queryKey:[`git_commits`,e,u,d,m],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return o.default.getGitCommits(u,d,m,50)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:l&&!!e,meta:{disableToast:!0}});return{commits:h.data?.commits??[],hasMore:h.data?.hasMore??!1,isUnsupported:h.data===null,isLoading:h.isLoading,isFetching:h.isFetching,isSuccess:h.isSuccess,isError:h.isError}};exports.useUnifiedGitCommits=c;
|
|
2
2
|
//# sourceMappingURL=use-unified-git-commits.cjs.map
|
|
@@ -2,11 +2,11 @@ import { useConversationId as e } from "../use-conversation-id.js";
|
|
|
2
2
|
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
3
|
import { useActiveConversation as n } from "./use-active-conversation.js";
|
|
4
4
|
import { useRuntimeIsReady as r } from "../use-runtime-is-ready.js";
|
|
5
|
-
import i from "../../
|
|
6
|
-
import
|
|
5
|
+
import { getGitPath as i } from "../../utils/get-git-path.js";
|
|
6
|
+
import a from "../../api/git-service/agent-server-git-service.api.js";
|
|
7
7
|
import o from "react";
|
|
8
8
|
var s = () => {
|
|
9
|
-
let { conversationId: s } = e(), { data: c } = n(), l = r(), u = c?.conversation_url, d = c?.session_api_key, f = c?.selected_repository, p = c?.workspace?.working_dir?.trim(), m = o.useMemo(() =>
|
|
9
|
+
let { conversationId: s } = e(), { data: c } = n(), l = r(), u = c?.conversation_url, d = c?.session_api_key, f = c?.selected_repository, p = c?.workspace?.working_dir?.trim(), m = o.useMemo(() => i(f, p), [f, p]), h = t({
|
|
10
10
|
queryKey: [
|
|
11
11
|
"git_commits",
|
|
12
12
|
s,
|
|
@@ -16,7 +16,7 @@ var s = () => {
|
|
|
16
16
|
],
|
|
17
17
|
queryFn: async () => {
|
|
18
18
|
if (!s) throw Error("No conversation ID");
|
|
19
|
-
return
|
|
19
|
+
return a.getGitCommits(u, d, m, 50);
|
|
20
20
|
},
|
|
21
21
|
retry: !1,
|
|
22
22
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../../
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../../utils/get-git-path.cjs"),a=require("../../api/git-service/agent-server-git-service.api.cjs");let o=require("react");o=e.__toESM(o,1);var s=e=>{let{conversationId:s}=t.useConversationId(),{data:c}=r.useActiveConversation(),l=c?.conversation_url,u=c?.session_api_key,d=c?.selected_repository,f=c?.workspace?.working_dir?.trim(),p=o.default.useMemo(()=>`${i.getGitPath(d,f)}/${e.filePath}`,[d,e.filePath,f]),m=e.type===`D`;return n.useQuery({queryKey:e.commit?[`commit_file_diff`,s,l,u,e.commit,p]:[`file_diff`,s,l,u,p],queryFn:async()=>{if(!s)throw Error(`No conversation ID`);return a.default.getGitChangeDiff(s,l,u,p,e.commit)},enabled:e.enabled&&(!m||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};exports.useUnifiedGitDiff=s;
|
|
2
2
|
//# sourceMappingURL=use-unified-git-diff.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useConversationId as e } from "../use-conversation-id.js";
|
|
2
2
|
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
3
|
import { useActiveConversation as n } from "./use-active-conversation.js";
|
|
4
|
-
import r from "../../
|
|
5
|
-
import
|
|
4
|
+
import { getGitPath as r } from "../../utils/get-git-path.js";
|
|
5
|
+
import i from "../../api/git-service/agent-server-git-service.api.js";
|
|
6
6
|
import a from "react";
|
|
7
7
|
//#region src/hooks/query/use-unified-git-diff.ts
|
|
8
8
|
var o = (o) => {
|
|
9
|
-
let { conversationId: s } = e(), { data: c } = n(), l = c?.conversation_url, u = c?.session_api_key, d = c?.selected_repository, f = c?.workspace?.working_dir?.trim(), p = a.useMemo(() => `${
|
|
9
|
+
let { conversationId: s } = e(), { data: c } = n(), l = c?.conversation_url, u = c?.session_api_key, d = c?.selected_repository, f = c?.workspace?.working_dir?.trim(), p = a.useMemo(() => `${r(d, f)}/${o.filePath}`, [
|
|
10
10
|
d,
|
|
11
11
|
o.filePath,
|
|
12
12
|
f
|
|
@@ -28,7 +28,7 @@ var o = (o) => {
|
|
|
28
28
|
],
|
|
29
29
|
queryFn: async () => {
|
|
30
30
|
if (!s) throw Error("No conversation ID");
|
|
31
|
-
return
|
|
31
|
+
return i.getGitChangeDiff(s, l, u, p, o.commit);
|
|
32
32
|
},
|
|
33
33
|
enabled: o.enabled && (!m || !!o.commit),
|
|
34
34
|
staleTime: o.commit ? Infinity : 1e3 * 60 * 5,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../i18n/declaration.cjs"),n=require("../use-conversation-id.cjs"),r=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),i=require("../../contexts/active-backend-context.cjs"),a=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),o=require("../../api/conversation-service/conversation-service.api.cjs"),s=require("./use-active-conversation.cjs"),c=require("../use-runtime-is-ready.cjs"),l=require("../../utils/vscode-url-helper.cjs"),u=require("./use-cloud-sandbox.cjs");var
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../i18n/declaration.cjs"),n=require("../use-conversation-id.cjs"),r=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),i=require("../../contexts/active-backend-context.cjs"),a=require("../../api/conversation-service/agent-server-conversation-service.api.cjs"),o=require("../../api/conversation-service/conversation-service.api.cjs"),s=require("./use-active-conversation.cjs"),c=require("../use-runtime-is-ready.cjs"),l=require("../../utils/vscode-url-helper.cjs"),u=require("./use-cloud-sandbox.cjs"),d=require("../../utils/vscode-origin.cjs");var f=`VSCODE`,p=()=>{let{t:p}=e.useTranslation(`openhands`),{conversationId:m}=n.useConversationId(),h=c.useRuntimeIsReady({allowAgentError:!0}),{data:g}=s.useActiveConversation(),_=i.useActiveBackend(),v=g?.conversation_url??null,y=g?.session_api_key??null,b=g?.sandbox_id??null,x=_.backend.kind===`cloud`,S=d.getOriginVSCodeBasePath(),C=S!==null,w=u.useCloudSandbox(x?b:null),T=r.useQuery({queryKey:[`unified`,`vscode_status`,`local`,m,v,y],queryFn:()=>a.default.getVSCodeStatus(v,y),enabled:!x&&C&&h&&!!m,refetchOnMount:!0}),E=T.data?.enabled===!0&&T.data?.running===!0,D=r.useQuery({queryKey:[`unified`,`vscode_url`,`local`,m,v,y],queryFn:async()=>{if(!m)throw Error(`No conversation ID`);return{url:l.transformVSCodeUrl((await a.default.getVSCodeUrl(m,v,y).catch(()=>o.default.getVSCodeUrl(m))).vscode_url)}},enabled:!x&&C&&h&&!!m&&E,refetchOnMount:!0,retry:3}),O,k,A,j,M,N,P,F;if(x){let e=w.data?.exposed_urls?.find(e=>e.name===f)?.url??null;O=w.isSuccess?{url:l.transformVSCodeUrl(e)}:void 0,k=w.isLoading,A=w.isError,j=w.isSuccess,M=w.status,N=w.error,P=async()=>{let e=await w.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===f)?.url??null;return{data:e.data?{url:l.transformVSCodeUrl(t)}:void 0}},F=!1}else O=D.data,k=T.isLoading||D.isLoading,A=T.isError||D.isError,j=D.isSuccess,M=D.status,N=T.error??D.error,P=async()=>({data:(await D.refetch()).data}),F=!C||T.isSuccess&&!E||j&&!D.data?.url||j&&!d.isVSCodeUrlServedByOrigin(D.data?.url,S);let I=O&&!O.url?p(t.I18nKey.VSCODE$URL_NOT_AVAILABLE):null;return{data:O?{...O,error:I}:void 0,error:N,isLoading:k,isError:A,isSuccess:j,isUnavailable:F,status:M,refetch:P}};exports.useUnifiedVSCodeUrl=p;
|
|
2
2
|
//# sourceMappingURL=use-unified-vscode-url.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-unified-vscode-url.cjs","names":[],"sources":["../../../src/hooks/query/use-unified-vscode-url.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { transformVSCodeUrl } from \"#/utils/vscode-url-helper\";\nimport { useRuntimeIsReady } from \"#/hooks/use-runtime-is-ready\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useCloudSandbox } from \"#/hooks/query/use-cloud-sandbox\";\n\ninterface VSCodeUrlResult {\n url: string | null;\n}\n\nconst VSCODE_EXPOSED_URL_NAME = \"VSCODE\";\n\nexport const useUnifiedVSCodeUrl = () => {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useConversationId();\n const runtimeIsReady = useRuntimeIsReady({ allowAgentError: true });\n const { data: conversation } = useActiveConversation();\n const active = useActiveBackend();\n\n const conversationUrl = conversation?.conversation_url ?? null;\n const sessionApiKey = conversation?.session_api_key ?? null;\n const sandboxId = conversation?.sandbox_id ?? null;\n const isCloud = active.backend.kind === \"cloud\";\n\n // Cloud mode: read VSCode URL from the cloud-computed `exposed_urls` on\n // the conversation's sandbox. The runtime's `/api/vscode/url` only\n // knows its internal `localhost:8001`, so calling it returned a URL\n // the user's browser couldn't reach.\n const cloudSandboxQuery = useCloudSandbox(isCloud ? sandboxId : null);\n\n const localQuery = useQuery<VSCodeUrlResult>({\n // Include conversation host + key in the cache key so different\n // conversations don't share VSCode URL data.\n queryKey: [\n \"unified\",\n \"vscode_url\",\n \"local\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n ],\n queryFn: async () => {\n if (!conversationId) throw new Error(\"No conversation ID\");\n\n const response = await AgentServerConversationService.getVSCodeUrl(\n conversationId,\n conversationUrl,\n sessionApiKey,\n ).catch(() => ConversationService.getVSCodeUrl(conversationId));\n\n return { url: transformVSCodeUrl(response.vscode_url) };\n },\n enabled: !isCloud && runtimeIsReady && !!conversationId,\n refetchOnMount: true,\n retry: 3,\n });\n\n let data: VSCodeUrlResult | undefined;\n let isLoading: boolean;\n let isError: boolean;\n let isSuccess: boolean;\n let status: typeof localQuery.status;\n let error: unknown;\n let refetch: () => Promise<{ data: VSCodeUrlResult | undefined }>;\n\n if (isCloud) {\n const sandbox = cloudSandboxQuery.data;\n const exposedUrl =\n sandbox?.exposed_urls?.find((u) => u.name === VSCODE_EXPOSED_URL_NAME)\n ?.url ?? null;\n data = cloudSandboxQuery.isSuccess\n ? { url: transformVSCodeUrl(exposedUrl) }\n : undefined;\n isLoading = cloudSandboxQuery.isLoading;\n isError = cloudSandboxQuery.isError;\n isSuccess = cloudSandboxQuery.isSuccess;\n status = cloudSandboxQuery.status;\n error = cloudSandboxQuery.error;\n refetch = async () => {\n const result = await cloudSandboxQuery.refetch();\n const refreshedUrl =\n result.data?.exposed_urls?.find(\n (u) => u.name === VSCODE_EXPOSED_URL_NAME,\n )?.url ?? null;\n return {\n data: result.data\n ? { url: transformVSCodeUrl(refreshedUrl) }\n : undefined,\n };\n };\n } else {\n data = localQuery.data;\n isLoading = localQuery.isLoading;\n isError = localQuery.isError;\n isSuccess = localQuery.isSuccess;\n status = localQuery.status;\n error = localQuery.error;\n refetch = async () => {\n const result = await localQuery.refetch();\n return { data: result.data };\n };\n }\n\n // Derive the i18n'd \"URL unavailable\" message outside `queryFn` so the\n // queryKey doesn't have to include `t`.\n const errorMessage =\n data && !data.url ? t(I18nKey.VSCODE$URL_NOT_AVAILABLE) : null;\n\n return {\n data: data ? { ...data, error: errorMessage } : undefined,\n error,\n isLoading,\n isError,\n isSuccess,\n status,\n refetch,\n };\n};\n"],"mappings":"6pBAgBA,IAAM,EAA0B,SAEnB,MAA4B,CACvC,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAE,kBAAmB,EAAA,kBAAkB,EACvC,EAAiB,EAAA,kBAAkB,CAAE,gBAAiB,EAAK,CAAC,EAC5D,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,EAAS,EAAA,iBAAiB,EAE1B,EAAkB,GAAc,kBAAoB,KACpD,EAAgB,GAAc,iBAAmB,KACjD,EAAY,GAAc,YAAc,KACxC,EAAU,EAAO,QAAQ,OAAS,QAMlC,EAAoB,EAAA,gBAAgB,EAAU,EAAY,IAAI,EAE9D,EAAa,EAAA,SAA0B,CAG3C,SAAU,CACR,UACA,aACA,QACA,EACA,EACA,CACF,EACA,QAAS,SAAY,CACnB,GAAI,CAAC,EAAgB,MAAU,MAAM,oBAAoB,EAQzD,MAAO,CAAE,IAAK,EAAA,oBAAmB,MANV,EAAA,QAA+B,aACpD,EACA,EACA,CACF,EAAE,UAAY,EAAA,QAAoB,aAAa,CAAc,CAAC,GAEpB,UAAU,CAAE,CACxD,EACA,QAAS,CAAC,GAAW,GAAkB,CAAC,CAAC,EACzC,eAAgB,GAChB,MAAO,CACT,CAAC,EAEG,EACA,EACA,EACA,EACA,EACA,EACA,EAEJ,GAAI,EAAS,CAEX,IAAM,EADU,EAAkB,MAEvB,cAAc,KAAM,GAAM,EAAE,OAAS,CAAuB,GACjE,KAAO,KACb,EAAO,EAAkB,UACrB,CAAE,IAAK,EAAA,mBAAmB,CAAU,CAAE,EACtC,IAAA,GACJ,EAAY,EAAkB,UAC9B,EAAU,EAAkB,QAC5B,EAAY,EAAkB,UAC9B,EAAS,EAAkB,OAC3B,EAAQ,EAAkB,MAC1B,EAAU,SAAY,CACpB,IAAM,EAAS,MAAM,EAAkB,QAAQ,EACzC,EACJ,EAAO,MAAM,cAAc,KACxB,GAAM,EAAE,OAAS,CACpB,GAAG,KAAO,KACZ,MAAO,CACL,KAAM,EAAO,KACT,CAAE,IAAK,EAAA,mBAAmB,CAAY,CAAE,EACxC,IAAA,EACN,CACF,CACF,MACE,EAAO,EAAW,KAClB,EAAY,EAAW,UACvB,EAAU,EAAW,QACrB,EAAY,EAAW,UACvB,EAAS,EAAW,OACpB,EAAQ,EAAW,MACnB,EAAU,UAED,CAAE,MAAM,MADM,EAAW,QAAQ,GAClB,IAAK,GAM/B,IAAM,EACJ,GAAQ,CAAC,EAAK,IAAM,EAAE,EAAA,QAAQ,wBAAwB,EAAI,KAE5D,MAAO,CACL,KAAM,EAAO,CAAE,GAAG,EAAM,MAAO,CAAa,EAAI,IAAA,GAChD,QACA,YACA,UACA,YACA,SACA,SACF,CACF"}
|
|
1
|
+
{"version":3,"file":"use-unified-vscode-url.cjs","names":[],"sources":["../../../src/hooks/query/use-unified-vscode-url.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport type { VSCodeStatusResponse } from \"@openhands/typescript-client\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { transformVSCodeUrl } from \"#/utils/vscode-url-helper\";\nimport { useRuntimeIsReady } from \"#/hooks/use-runtime-is-ready\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useCloudSandbox } from \"#/hooks/query/use-cloud-sandbox\";\nimport {\n getOriginVSCodeBasePath,\n isVSCodeUrlServedByOrigin,\n} from \"#/utils/vscode-origin\";\n\ninterface VSCodeUrlResult {\n url: string | null;\n}\n\nconst VSCODE_EXPOSED_URL_NAME = \"VSCODE\";\n\nexport const useUnifiedVSCodeUrl = () => {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useConversationId();\n const runtimeIsReady = useRuntimeIsReady({ allowAgentError: true });\n const { data: conversation } = useActiveConversation();\n const active = useActiveBackend();\n\n const conversationUrl = conversation?.conversation_url ?? null;\n const sessionApiKey = conversation?.session_api_key ?? null;\n const sandboxId = conversation?.sandbox_id ?? null;\n const isCloud = active.backend.kind === \"cloud\";\n\n // The origin half of the availability question. The agent-server will\n // happily report an editor this page has no route to — see\n // `#/utils/vscode-origin`. `null` means this origin serves no editor, in\n // which case there is nothing to probe for and nothing to render.\n const originBasePath = getOriginVSCodeBasePath();\n const originServesEditor = originBasePath !== null;\n\n // Cloud mode: read VSCode URL from the cloud-computed `exposed_urls` on\n // the conversation's sandbox. The runtime's `/api/vscode/url` only\n // knows its internal `localhost:8001`, so calling it returned a URL\n // the user's browser couldn't reach.\n const cloudSandboxQuery = useCloudSandbox(isCloud ? sandboxId : null);\n\n // Capability probe. `/api/vscode/status` answers 200 with\n // `enabled: false` when the deployment set `enable_vscode: false`, so a\n // deliberately editor-less deployment is a value here rather than an\n // error — unlike `/api/vscode/url`, which answers 503 and is therefore\n // indistinguishable from an auth, proxy, or server failure.\n //\n // Gating the URL request on this means a disabled editor never issues\n // the 503 in the first place, so the global error toast needs no\n // blanket suppression and genuine failures stay observable.\n const statusQuery = useQuery<VSCodeStatusResponse>({\n queryKey: [\n \"unified\",\n \"vscode_status\",\n \"local\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n ],\n queryFn: () =>\n AgentServerConversationService.getVSCodeStatus(\n conversationUrl,\n sessionApiKey,\n ),\n enabled:\n !isCloud && originServesEditor && runtimeIsReady && !!conversationId,\n refetchOnMount: true,\n });\n\n // `enabled: false` is the deployment switch. `running: false` alongside\n // `enabled: true` means the process failed to start or has died: the\n // agent-server awaits `VSCodeService.start()` in its lifespan before it\n // serves any request, so this is a terminal state rather than a startup\n // window we would be racing.\n const editorIsAvailable =\n statusQuery.data?.enabled === true && statusQuery.data?.running === true;\n\n const localQuery = useQuery<VSCodeUrlResult>({\n // Include conversation host + key in the cache key so different\n // conversations don't share VSCode URL data.\n queryKey: [\n \"unified\",\n \"vscode_url\",\n \"local\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n ],\n queryFn: async () => {\n if (!conversationId) throw new Error(\"No conversation ID\");\n\n const response = await AgentServerConversationService.getVSCodeUrl(\n conversationId,\n conversationUrl,\n sessionApiKey,\n ).catch(() => ConversationService.getVSCodeUrl(conversationId));\n\n return { url: transformVSCodeUrl(response.vscode_url) };\n },\n enabled:\n !isCloud &&\n originServesEditor &&\n runtimeIsReady &&\n !!conversationId &&\n editorIsAvailable,\n refetchOnMount: true,\n retry: 3,\n });\n\n let data: VSCodeUrlResult | undefined;\n let isLoading: boolean;\n let isError: boolean;\n let isSuccess: boolean;\n let status: typeof localQuery.status;\n let error: unknown;\n let refetch: () => Promise<{ data: VSCodeUrlResult | undefined }>;\n // True once we know there is nothing to open, so callers can render nothing\n // instead of a control whose activation is a no-op.\n let isUnavailable: boolean;\n\n if (isCloud) {\n const sandbox = cloudSandboxQuery.data;\n const exposedUrl =\n sandbox?.exposed_urls?.find((u) => u.name === VSCODE_EXPOSED_URL_NAME)\n ?.url ?? null;\n data = cloudSandboxQuery.isSuccess\n ? { url: transformVSCodeUrl(exposedUrl) }\n : undefined;\n isLoading = cloudSandboxQuery.isLoading;\n isError = cloudSandboxQuery.isError;\n isSuccess = cloudSandboxQuery.isSuccess;\n status = cloudSandboxQuery.status;\n error = cloudSandboxQuery.error;\n refetch = async () => {\n const result = await cloudSandboxQuery.refetch();\n const refreshedUrl =\n result.data?.exposed_urls?.find(\n (u) => u.name === VSCODE_EXPOSED_URL_NAME,\n )?.url ?? null;\n return {\n data: result.data\n ? { url: transformVSCodeUrl(refreshedUrl) }\n : undefined,\n };\n };\n // Cloud behavior is deliberately unchanged: a sandbox with no VSCODE\n // entry in `exposed_urls` still surfaces the control. Narrowing this\n // change to self-hosted keeps its blast radius off the cloud path.\n isUnavailable = false;\n } else {\n data = localQuery.data;\n // The URL request only starts once the capability probe has cleared it,\n // so the control is \"loading\" for the probe as well — otherwise it would\n // look ready while there is still nothing to open.\n isLoading = statusQuery.isLoading || localQuery.isLoading;\n isError = statusQuery.isError || localQuery.isError;\n isSuccess = localQuery.isSuccess;\n status = localQuery.status;\n error = statusQuery.error ?? localQuery.error;\n refetch = async () => {\n // Load-bearing and easy to misread: this fires a real request even when\n // the probe failed and left the URL query `enabled: false`. An observer's\n // own `refetch()` does not consult `enabled` — only\n // `queryClient.refetchQueries` skips disabled queries — so a click after\n // a failed probe still retries rather than silently doing nothing.\n const result = await localQuery.refetch();\n return { data: result.data };\n };\n // Hide only on an explicit, terminal capability answer:\n // - this origin serves no editor at all, so nothing it advertises is\n // reachable from this page,\n // - the probe succeeded and reports no usable editor (disabled, or\n // enabled but not running),\n // - the editor is there but reports no URL to open, or\n // - the URL resolves somewhere this origin does not route the editor —\n // an extra backend with no prefix of its own hands back the canvas\n // root, which would open this app again instead of an editor.\n // A failed probe is deliberately not \"unavailable\": transport, auth and\n // server faults stay visible as query errors with their normal retry and\n // toast, rather than silently removing the control.\n isUnavailable =\n !originServesEditor ||\n (statusQuery.isSuccess && !editorIsAvailable) ||\n (isSuccess && !localQuery.data?.url) ||\n (isSuccess &&\n !isVSCodeUrlServedByOrigin(localQuery.data?.url, originBasePath));\n }\n\n // Derive the i18n'd \"URL unavailable\" message outside `queryFn` so the\n // queryKey doesn't have to include `t`.\n const errorMessage =\n data && !data.url ? t(I18nKey.VSCODE$URL_NOT_AVAILABLE) : null;\n\n return {\n data: data ? { ...data, error: errorMessage } : undefined,\n error,\n isLoading,\n isError,\n isSuccess,\n isUnavailable,\n status,\n refetch,\n };\n};\n"],"mappings":"wsBAqBA,IAAM,EAA0B,SAEnB,MAA4B,CACvC,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAE,kBAAmB,EAAA,kBAAkB,EACvC,EAAiB,EAAA,kBAAkB,CAAE,gBAAiB,EAAK,CAAC,EAC5D,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,EAAS,EAAA,iBAAiB,EAE1B,EAAkB,GAAc,kBAAoB,KACpD,EAAgB,GAAc,iBAAmB,KACjD,EAAY,GAAc,YAAc,KACxC,EAAU,EAAO,QAAQ,OAAS,QAMlC,EAAiB,EAAA,wBAAwB,EACzC,EAAqB,IAAmB,KAMxC,EAAoB,EAAA,gBAAgB,EAAU,EAAY,IAAI,EAW9D,EAAc,EAAA,SAA+B,CACjD,SAAU,CACR,UACA,gBACA,QACA,EACA,EACA,CACF,EACA,YACE,EAAA,QAA+B,gBAC7B,EACA,CACF,EACF,QACE,CAAC,GAAW,GAAsB,GAAkB,CAAC,CAAC,EACxD,eAAgB,EAClB,CAAC,EAOK,EACJ,EAAY,MAAM,UAAY,IAAQ,EAAY,MAAM,UAAY,GAEhE,EAAa,EAAA,SAA0B,CAG3C,SAAU,CACR,UACA,aACA,QACA,EACA,EACA,CACF,EACA,QAAS,SAAY,CACnB,GAAI,CAAC,EAAgB,MAAU,MAAM,oBAAoB,EAQzD,MAAO,CAAE,IAAK,EAAA,oBAAmB,MANV,EAAA,QAA+B,aACpD,EACA,EACA,CACF,EAAE,UAAY,EAAA,QAAoB,aAAa,CAAc,CAAC,GAEpB,UAAU,CAAE,CACxD,EACA,QACE,CAAC,GACD,GACA,GACA,CAAC,CAAC,GACF,EACF,eAAgB,GAChB,MAAO,CACT,CAAC,EAEG,EACA,EACA,EACA,EACA,EACA,EACA,EAGA,EAEJ,GAAI,EAAS,CAEX,IAAM,EADU,EAAkB,MAEvB,cAAc,KAAM,GAAM,EAAE,OAAS,CAAuB,GACjE,KAAO,KACb,EAAO,EAAkB,UACrB,CAAE,IAAK,EAAA,mBAAmB,CAAU,CAAE,EACtC,IAAA,GACJ,EAAY,EAAkB,UAC9B,EAAU,EAAkB,QAC5B,EAAY,EAAkB,UAC9B,EAAS,EAAkB,OAC3B,EAAQ,EAAkB,MAC1B,EAAU,SAAY,CACpB,IAAM,EAAS,MAAM,EAAkB,QAAQ,EACzC,EACJ,EAAO,MAAM,cAAc,KACxB,GAAM,EAAE,OAAS,CACpB,GAAG,KAAO,KACZ,MAAO,CACL,KAAM,EAAO,KACT,CAAE,IAAK,EAAA,mBAAmB,CAAY,CAAE,EACxC,IAAA,EACN,CACF,EAIA,EAAgB,EAClB,MACE,EAAO,EAAW,KAIlB,EAAY,EAAY,WAAa,EAAW,UAChD,EAAU,EAAY,SAAW,EAAW,QAC5C,EAAY,EAAW,UACvB,EAAS,EAAW,OACpB,EAAQ,EAAY,OAAS,EAAW,MACxC,EAAU,UAOD,CAAE,MAAM,MADM,EAAW,QAAQ,GAClB,IAAK,GAc7B,EACE,CAAC,GACA,EAAY,WAAa,CAAC,GAC1B,GAAa,CAAC,EAAW,MAAM,KAC/B,GACC,CAAC,EAAA,0BAA0B,EAAW,MAAM,IAAK,CAAc,EAKrE,IAAM,EACJ,GAAQ,CAAC,EAAK,IAAM,EAAE,EAAA,QAAQ,wBAAwB,EAAI,KAE5D,MAAO,CACL,KAAM,EAAO,CAAE,GAAG,EAAM,MAAO,CAAa,EAAI,IAAA,GAChD,QACA,YACA,UACA,YACA,gBACA,SACA,SACF,CACF"}
|
|
@@ -9,47 +9,61 @@ import { useActiveConversation as s } from "./use-active-conversation.js";
|
|
|
9
9
|
import { useRuntimeIsReady as c } from "../use-runtime-is-ready.js";
|
|
10
10
|
import { transformVSCodeUrl as l } from "../../utils/vscode-url-helper.js";
|
|
11
11
|
import { useCloudSandbox as u } from "./use-cloud-sandbox.js";
|
|
12
|
+
import { getOriginVSCodeBasePath as d, isVSCodeUrlServedByOrigin as f } from "../../utils/vscode-origin.js";
|
|
12
13
|
//#region src/hooks/query/use-unified-vscode-url.ts
|
|
13
|
-
var
|
|
14
|
-
let { t:
|
|
14
|
+
var p = "VSCODE", m = () => {
|
|
15
|
+
let { t: m } = e("openhands"), { conversationId: h } = n(), g = c({ allowAgentError: !0 }), { data: _ } = s(), v = i(), y = _?.conversation_url ?? null, b = _?.session_api_key ?? null, x = _?.sandbox_id ?? null, S = v.backend.kind === "cloud", C = d(), w = C !== null, T = u(S ? x : null), E = r({
|
|
16
|
+
queryKey: [
|
|
17
|
+
"unified",
|
|
18
|
+
"vscode_status",
|
|
19
|
+
"local",
|
|
20
|
+
h,
|
|
21
|
+
y,
|
|
22
|
+
b
|
|
23
|
+
],
|
|
24
|
+
queryFn: () => a.getVSCodeStatus(y, b),
|
|
25
|
+
enabled: !S && w && g && !!h,
|
|
26
|
+
refetchOnMount: !0
|
|
27
|
+
}), D = E.data?.enabled === !0 && E.data?.running === !0, O = r({
|
|
15
28
|
queryKey: [
|
|
16
29
|
"unified",
|
|
17
30
|
"vscode_url",
|
|
18
31
|
"local",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
h,
|
|
33
|
+
y,
|
|
34
|
+
b
|
|
22
35
|
],
|
|
23
36
|
queryFn: async () => {
|
|
24
|
-
if (!
|
|
25
|
-
return { url: l((await a.getVSCodeUrl(
|
|
37
|
+
if (!h) throw Error("No conversation ID");
|
|
38
|
+
return { url: l((await a.getVSCodeUrl(h, y, b).catch(() => o.getVSCodeUrl(h))).vscode_url) };
|
|
26
39
|
},
|
|
27
|
-
enabled: !
|
|
40
|
+
enabled: !S && w && g && !!h && D,
|
|
28
41
|
refetchOnMount: !0,
|
|
29
42
|
retry: 3
|
|
30
|
-
}),
|
|
31
|
-
if (
|
|
32
|
-
let e =
|
|
33
|
-
|
|
34
|
-
let e = await
|
|
43
|
+
}), k, A, j, M, N, P, F, I;
|
|
44
|
+
if (S) {
|
|
45
|
+
let e = T.data?.exposed_urls?.find((e) => e.name === p)?.url ?? null;
|
|
46
|
+
k = T.isSuccess ? { url: l(e) } : void 0, A = T.isLoading, j = T.isError, M = T.isSuccess, N = T.status, P = T.error, F = async () => {
|
|
47
|
+
let e = await T.refetch(), t = e.data?.exposed_urls?.find((e) => e.name === p)?.url ?? null;
|
|
35
48
|
return { data: e.data ? { url: l(t) } : void 0 };
|
|
36
|
-
};
|
|
37
|
-
} else
|
|
38
|
-
let
|
|
49
|
+
}, I = !1;
|
|
50
|
+
} else k = O.data, A = E.isLoading || O.isLoading, j = E.isError || O.isError, M = O.isSuccess, N = O.status, P = E.error ?? O.error, F = async () => ({ data: (await O.refetch()).data }), I = !w || E.isSuccess && !D || M && !O.data?.url || M && !f(O.data?.url, C);
|
|
51
|
+
let L = k && !k.url ? m(t.VSCODE$URL_NOT_AVAILABLE) : null;
|
|
39
52
|
return {
|
|
40
|
-
data:
|
|
41
|
-
...
|
|
42
|
-
error:
|
|
53
|
+
data: k ? {
|
|
54
|
+
...k,
|
|
55
|
+
error: L
|
|
43
56
|
} : void 0,
|
|
44
|
-
error:
|
|
45
|
-
isLoading:
|
|
46
|
-
isError:
|
|
47
|
-
isSuccess:
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
error: P,
|
|
58
|
+
isLoading: A,
|
|
59
|
+
isError: j,
|
|
60
|
+
isSuccess: M,
|
|
61
|
+
isUnavailable: I,
|
|
62
|
+
status: N,
|
|
63
|
+
refetch: F
|
|
50
64
|
};
|
|
51
65
|
};
|
|
52
66
|
//#endregion
|
|
53
|
-
export {
|
|
67
|
+
export { m as useUnifiedVSCodeUrl };
|
|
54
68
|
|
|
55
69
|
//# sourceMappingURL=use-unified-vscode-url.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-unified-vscode-url.js","names":[],"sources":["../../../src/hooks/query/use-unified-vscode-url.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { transformVSCodeUrl } from \"#/utils/vscode-url-helper\";\nimport { useRuntimeIsReady } from \"#/hooks/use-runtime-is-ready\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useCloudSandbox } from \"#/hooks/query/use-cloud-sandbox\";\n\ninterface VSCodeUrlResult {\n url: string | null;\n}\n\nconst VSCODE_EXPOSED_URL_NAME = \"VSCODE\";\n\nexport const useUnifiedVSCodeUrl = () => {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useConversationId();\n const runtimeIsReady = useRuntimeIsReady({ allowAgentError: true });\n const { data: conversation } = useActiveConversation();\n const active = useActiveBackend();\n\n const conversationUrl = conversation?.conversation_url ?? null;\n const sessionApiKey = conversation?.session_api_key ?? null;\n const sandboxId = conversation?.sandbox_id ?? null;\n const isCloud = active.backend.kind === \"cloud\";\n\n // Cloud mode: read VSCode URL from the cloud-computed `exposed_urls` on\n // the conversation's sandbox. The runtime's `/api/vscode/url` only\n // knows its internal `localhost:8001`, so calling it returned a URL\n // the user's browser couldn't reach.\n const cloudSandboxQuery = useCloudSandbox(isCloud ? sandboxId : null);\n\n const localQuery = useQuery<VSCodeUrlResult>({\n // Include conversation host + key in the cache key so different\n // conversations don't share VSCode URL data.\n queryKey: [\n \"unified\",\n \"vscode_url\",\n \"local\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n ],\n queryFn: async () => {\n if (!conversationId) throw new Error(\"No conversation ID\");\n\n const response = await AgentServerConversationService.getVSCodeUrl(\n conversationId,\n conversationUrl,\n sessionApiKey,\n ).catch(() => ConversationService.getVSCodeUrl(conversationId));\n\n return { url: transformVSCodeUrl(response.vscode_url) };\n },\n enabled: !isCloud && runtimeIsReady && !!conversationId,\n refetchOnMount: true,\n retry: 3,\n });\n\n let data: VSCodeUrlResult | undefined;\n let isLoading: boolean;\n let isError: boolean;\n let isSuccess: boolean;\n let status: typeof localQuery.status;\n let error: unknown;\n let refetch: () => Promise<{ data: VSCodeUrlResult | undefined }>;\n\n if (isCloud) {\n const sandbox = cloudSandboxQuery.data;\n const exposedUrl =\n sandbox?.exposed_urls?.find((u) => u.name === VSCODE_EXPOSED_URL_NAME)\n ?.url ?? null;\n data = cloudSandboxQuery.isSuccess\n ? { url: transformVSCodeUrl(exposedUrl) }\n : undefined;\n isLoading = cloudSandboxQuery.isLoading;\n isError = cloudSandboxQuery.isError;\n isSuccess = cloudSandboxQuery.isSuccess;\n status = cloudSandboxQuery.status;\n error = cloudSandboxQuery.error;\n refetch = async () => {\n const result = await cloudSandboxQuery.refetch();\n const refreshedUrl =\n result.data?.exposed_urls?.find(\n (u) => u.name === VSCODE_EXPOSED_URL_NAME,\n )?.url ?? null;\n return {\n data: result.data\n ? { url: transformVSCodeUrl(refreshedUrl) }\n : undefined,\n };\n };\n } else {\n data = localQuery.data;\n isLoading = localQuery.isLoading;\n isError = localQuery.isError;\n isSuccess = localQuery.isSuccess;\n status = localQuery.status;\n error = localQuery.error;\n refetch = async () => {\n const result = await localQuery.refetch();\n return { data: result.data };\n };\n }\n\n // Derive the i18n'd \"URL unavailable\" message outside `queryFn` so the\n // queryKey doesn't have to include `t`.\n const errorMessage =\n data && !data.url ? t(I18nKey.VSCODE$URL_NOT_AVAILABLE) : null;\n\n return {\n data: data ? { ...data, error: errorMessage } : undefined,\n error,\n isLoading,\n isError,\n isSuccess,\n status,\n refetch,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAgBA,IAAM,IAA0B,UAEnB,UAA4B;CACvC,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,sBAAmB,EAAkB,GACvC,IAAiB,EAAkB,EAAE,iBAAiB,GAAK,CAAC,GAC5D,EAAE,MAAM,MAAiB,EAAsB,GAC/C,IAAS,EAAiB,GAE1B,IAAkB,GAAc,oBAAoB,MACpD,IAAgB,GAAc,mBAAmB,MACjD,IAAY,GAAc,cAAc,MACxC,IAAU,EAAO,QAAQ,SAAS,SAMlC,IAAoB,EAAgB,IAAU,IAAY,IAAI,GAE9D,IAAa,EAA0B;EAG3C,UAAU;GACR;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS,YAAY;GACnB,IAAI,CAAC,GAAgB,MAAU,MAAM,oBAAoB;GAQzD,OAAO,EAAE,KAAK,GAAmB,MANV,EAA+B,aACpD,GACA,GACA,CACF,EAAE,YAAY,EAAoB,aAAa,CAAc,CAAC,GAEpB,UAAU,EAAE;EACxD;EACA,SAAS,CAAC,KAAW,KAAkB,CAAC,CAAC;EACzC,gBAAgB;EAChB,OAAO;CACT,CAAC,GAEG,GACA,GACA,GACA,GACA,GACA,GACA;CAEJ,IAAI,GAAS;EAEX,IAAM,IADU,EAAkB,MAEvB,cAAc,MAAM,MAAM,EAAE,SAAS,CAAuB,GACjE,OAAO;EASb,AARA,IAAO,EAAkB,YACrB,EAAE,KAAK,EAAmB,CAAU,EAAE,IACtC,KAAA,GACJ,IAAY,EAAkB,WAC9B,IAAU,EAAkB,SAC5B,IAAY,EAAkB,WAC9B,IAAS,EAAkB,QAC3B,IAAQ,EAAkB,OAC1B,IAAU,YAAY;GACpB,IAAM,IAAS,MAAM,EAAkB,QAAQ,GACzC,IACJ,EAAO,MAAM,cAAc,MACxB,MAAM,EAAE,SAAS,CACpB,GAAG,OAAO;GACZ,OAAO,EACL,MAAM,EAAO,OACT,EAAE,KAAK,EAAmB,CAAY,EAAE,IACxC,KAAA,EACN;EACF;CACF,OAOE,AANA,IAAO,EAAW,MAClB,IAAY,EAAW,WACvB,IAAU,EAAW,SACrB,IAAY,EAAW,WACvB,IAAS,EAAW,QACpB,IAAQ,EAAW,OACnB,IAAU,aAED,EAAE,OAAM,MADM,EAAW,QAAQ,GAClB,KAAK;CAM/B,IAAM,IACJ,KAAQ,CAAC,EAAK,MAAM,EAAE,EAAQ,wBAAwB,IAAI;CAE5D,OAAO;EACL,MAAM,IAAO;GAAE,GAAG;GAAM,OAAO;EAAa,IAAI,KAAA;EAChD;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"use-unified-vscode-url.js","names":[],"sources":["../../../src/hooks/query/use-unified-vscode-url.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport type { VSCodeStatusResponse } from \"@openhands/typescript-client\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ConversationService from \"#/api/conversation-service/conversation-service.api\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { transformVSCodeUrl } from \"#/utils/vscode-url-helper\";\nimport { useRuntimeIsReady } from \"#/hooks/use-runtime-is-ready\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useCloudSandbox } from \"#/hooks/query/use-cloud-sandbox\";\nimport {\n getOriginVSCodeBasePath,\n isVSCodeUrlServedByOrigin,\n} from \"#/utils/vscode-origin\";\n\ninterface VSCodeUrlResult {\n url: string | null;\n}\n\nconst VSCODE_EXPOSED_URL_NAME = \"VSCODE\";\n\nexport const useUnifiedVSCodeUrl = () => {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useConversationId();\n const runtimeIsReady = useRuntimeIsReady({ allowAgentError: true });\n const { data: conversation } = useActiveConversation();\n const active = useActiveBackend();\n\n const conversationUrl = conversation?.conversation_url ?? null;\n const sessionApiKey = conversation?.session_api_key ?? null;\n const sandboxId = conversation?.sandbox_id ?? null;\n const isCloud = active.backend.kind === \"cloud\";\n\n // The origin half of the availability question. The agent-server will\n // happily report an editor this page has no route to — see\n // `#/utils/vscode-origin`. `null` means this origin serves no editor, in\n // which case there is nothing to probe for and nothing to render.\n const originBasePath = getOriginVSCodeBasePath();\n const originServesEditor = originBasePath !== null;\n\n // Cloud mode: read VSCode URL from the cloud-computed `exposed_urls` on\n // the conversation's sandbox. The runtime's `/api/vscode/url` only\n // knows its internal `localhost:8001`, so calling it returned a URL\n // the user's browser couldn't reach.\n const cloudSandboxQuery = useCloudSandbox(isCloud ? sandboxId : null);\n\n // Capability probe. `/api/vscode/status` answers 200 with\n // `enabled: false` when the deployment set `enable_vscode: false`, so a\n // deliberately editor-less deployment is a value here rather than an\n // error — unlike `/api/vscode/url`, which answers 503 and is therefore\n // indistinguishable from an auth, proxy, or server failure.\n //\n // Gating the URL request on this means a disabled editor never issues\n // the 503 in the first place, so the global error toast needs no\n // blanket suppression and genuine failures stay observable.\n const statusQuery = useQuery<VSCodeStatusResponse>({\n queryKey: [\n \"unified\",\n \"vscode_status\",\n \"local\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n ],\n queryFn: () =>\n AgentServerConversationService.getVSCodeStatus(\n conversationUrl,\n sessionApiKey,\n ),\n enabled:\n !isCloud && originServesEditor && runtimeIsReady && !!conversationId,\n refetchOnMount: true,\n });\n\n // `enabled: false` is the deployment switch. `running: false` alongside\n // `enabled: true` means the process failed to start or has died: the\n // agent-server awaits `VSCodeService.start()` in its lifespan before it\n // serves any request, so this is a terminal state rather than a startup\n // window we would be racing.\n const editorIsAvailable =\n statusQuery.data?.enabled === true && statusQuery.data?.running === true;\n\n const localQuery = useQuery<VSCodeUrlResult>({\n // Include conversation host + key in the cache key so different\n // conversations don't share VSCode URL data.\n queryKey: [\n \"unified\",\n \"vscode_url\",\n \"local\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n ],\n queryFn: async () => {\n if (!conversationId) throw new Error(\"No conversation ID\");\n\n const response = await AgentServerConversationService.getVSCodeUrl(\n conversationId,\n conversationUrl,\n sessionApiKey,\n ).catch(() => ConversationService.getVSCodeUrl(conversationId));\n\n return { url: transformVSCodeUrl(response.vscode_url) };\n },\n enabled:\n !isCloud &&\n originServesEditor &&\n runtimeIsReady &&\n !!conversationId &&\n editorIsAvailable,\n refetchOnMount: true,\n retry: 3,\n });\n\n let data: VSCodeUrlResult | undefined;\n let isLoading: boolean;\n let isError: boolean;\n let isSuccess: boolean;\n let status: typeof localQuery.status;\n let error: unknown;\n let refetch: () => Promise<{ data: VSCodeUrlResult | undefined }>;\n // True once we know there is nothing to open, so callers can render nothing\n // instead of a control whose activation is a no-op.\n let isUnavailable: boolean;\n\n if (isCloud) {\n const sandbox = cloudSandboxQuery.data;\n const exposedUrl =\n sandbox?.exposed_urls?.find((u) => u.name === VSCODE_EXPOSED_URL_NAME)\n ?.url ?? null;\n data = cloudSandboxQuery.isSuccess\n ? { url: transformVSCodeUrl(exposedUrl) }\n : undefined;\n isLoading = cloudSandboxQuery.isLoading;\n isError = cloudSandboxQuery.isError;\n isSuccess = cloudSandboxQuery.isSuccess;\n status = cloudSandboxQuery.status;\n error = cloudSandboxQuery.error;\n refetch = async () => {\n const result = await cloudSandboxQuery.refetch();\n const refreshedUrl =\n result.data?.exposed_urls?.find(\n (u) => u.name === VSCODE_EXPOSED_URL_NAME,\n )?.url ?? null;\n return {\n data: result.data\n ? { url: transformVSCodeUrl(refreshedUrl) }\n : undefined,\n };\n };\n // Cloud behavior is deliberately unchanged: a sandbox with no VSCODE\n // entry in `exposed_urls` still surfaces the control. Narrowing this\n // change to self-hosted keeps its blast radius off the cloud path.\n isUnavailable = false;\n } else {\n data = localQuery.data;\n // The URL request only starts once the capability probe has cleared it,\n // so the control is \"loading\" for the probe as well — otherwise it would\n // look ready while there is still nothing to open.\n isLoading = statusQuery.isLoading || localQuery.isLoading;\n isError = statusQuery.isError || localQuery.isError;\n isSuccess = localQuery.isSuccess;\n status = localQuery.status;\n error = statusQuery.error ?? localQuery.error;\n refetch = async () => {\n // Load-bearing and easy to misread: this fires a real request even when\n // the probe failed and left the URL query `enabled: false`. An observer's\n // own `refetch()` does not consult `enabled` — only\n // `queryClient.refetchQueries` skips disabled queries — so a click after\n // a failed probe still retries rather than silently doing nothing.\n const result = await localQuery.refetch();\n return { data: result.data };\n };\n // Hide only on an explicit, terminal capability answer:\n // - this origin serves no editor at all, so nothing it advertises is\n // reachable from this page,\n // - the probe succeeded and reports no usable editor (disabled, or\n // enabled but not running),\n // - the editor is there but reports no URL to open, or\n // - the URL resolves somewhere this origin does not route the editor —\n // an extra backend with no prefix of its own hands back the canvas\n // root, which would open this app again instead of an editor.\n // A failed probe is deliberately not \"unavailable\": transport, auth and\n // server faults stay visible as query errors with their normal retry and\n // toast, rather than silently removing the control.\n isUnavailable =\n !originServesEditor ||\n (statusQuery.isSuccess && !editorIsAvailable) ||\n (isSuccess && !localQuery.data?.url) ||\n (isSuccess &&\n !isVSCodeUrlServedByOrigin(localQuery.data?.url, originBasePath));\n }\n\n // Derive the i18n'd \"URL unavailable\" message outside `queryFn` so the\n // queryKey doesn't have to include `t`.\n const errorMessage =\n data && !data.url ? t(I18nKey.VSCODE$URL_NOT_AVAILABLE) : null;\n\n return {\n data: data ? { ...data, error: errorMessage } : undefined,\n error,\n isLoading,\n isError,\n isSuccess,\n isUnavailable,\n status,\n refetch,\n };\n};\n"],"mappings":";;;;;;;;;;;;;AAqBA,IAAM,IAA0B,UAEnB,UAA4B;CACvC,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,sBAAmB,EAAkB,GACvC,IAAiB,EAAkB,EAAE,iBAAiB,GAAK,CAAC,GAC5D,EAAE,MAAM,MAAiB,EAAsB,GAC/C,IAAS,EAAiB,GAE1B,IAAkB,GAAc,oBAAoB,MACpD,IAAgB,GAAc,mBAAmB,MACjD,IAAY,GAAc,cAAc,MACxC,IAAU,EAAO,QAAQ,SAAS,SAMlC,IAAiB,EAAwB,GACzC,IAAqB,MAAmB,MAMxC,IAAoB,EAAgB,IAAU,IAAY,IAAI,GAW9D,IAAc,EAA+B;EACjD,UAAU;GACR;GACA;GACA;GACA;GACA;GACA;EACF;EACA,eACE,EAA+B,gBAC7B,GACA,CACF;EACF,SACE,CAAC,KAAW,KAAsB,KAAkB,CAAC,CAAC;EACxD,gBAAgB;CAClB,CAAC,GAOK,IACJ,EAAY,MAAM,YAAY,MAAQ,EAAY,MAAM,YAAY,IAEhE,IAAa,EAA0B;EAG3C,UAAU;GACR;GACA;GACA;GACA;GACA;GACA;EACF;EACA,SAAS,YAAY;GACnB,IAAI,CAAC,GAAgB,MAAU,MAAM,oBAAoB;GAQzD,OAAO,EAAE,KAAK,GAAmB,MANV,EAA+B,aACpD,GACA,GACA,CACF,EAAE,YAAY,EAAoB,aAAa,CAAc,CAAC,GAEpB,UAAU,EAAE;EACxD;EACA,SACE,CAAC,KACD,KACA,KACA,CAAC,CAAC,KACF;EACF,gBAAgB;EAChB,OAAO;CACT,CAAC,GAEG,GACA,GACA,GACA,GACA,GACA,GACA,GAGA;CAEJ,IAAI,GAAS;EAEX,IAAM,IADU,EAAkB,MAEvB,cAAc,MAAM,MAAM,EAAE,SAAS,CAAuB,GACjE,OAAO;EAwBb,AAvBA,IAAO,EAAkB,YACrB,EAAE,KAAK,EAAmB,CAAU,EAAE,IACtC,KAAA,GACJ,IAAY,EAAkB,WAC9B,IAAU,EAAkB,SAC5B,IAAY,EAAkB,WAC9B,IAAS,EAAkB,QAC3B,IAAQ,EAAkB,OAC1B,IAAU,YAAY;GACpB,IAAM,IAAS,MAAM,EAAkB,QAAQ,GACzC,IACJ,EAAO,MAAM,cAAc,MACxB,MAAM,EAAE,SAAS,CACpB,GAAG,OAAO;GACZ,OAAO,EACL,MAAM,EAAO,OACT,EAAE,KAAK,EAAmB,CAAY,EAAE,IACxC,KAAA,EACN;EACF,GAIA,IAAgB;CAClB,OA+BE,AA9BA,IAAO,EAAW,MAIlB,IAAY,EAAY,aAAa,EAAW,WAChD,IAAU,EAAY,WAAW,EAAW,SAC5C,IAAY,EAAW,WACvB,IAAS,EAAW,QACpB,IAAQ,EAAY,SAAS,EAAW,OACxC,IAAU,aAOD,EAAE,OAAM,MADM,EAAW,QAAQ,GAClB,KAAK,IAc7B,IACE,CAAC,KACA,EAAY,aAAa,CAAC,KAC1B,KAAa,CAAC,EAAW,MAAM,OAC/B,KACC,CAAC,EAA0B,EAAW,MAAM,KAAK,CAAc;CAKrE,IAAM,IACJ,KAAQ,CAAC,EAAK,MAAM,EAAE,EAAQ,wBAAwB,IAAI;CAE5D,OAAO;EACL,MAAM,IAAO;GAAE,GAAG;GAAM,OAAO;EAAa,IAAI,KAAA;EAChD;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../api/backend-registry/active-store.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),n=require("../../api/cloud/conversation-service.api.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../api/backend-registry/active-store.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),n=require("../../api/cloud/conversation-service.api.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../stores/use-workspace-mutation-counter.cjs"),o=require("../../utils/get-git-path.cjs"),s=require("./use-workspace-session.cjs");var c=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`ico`,`svg`,`avif`]),l=new Set([`pdf`]);function u(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function d(e){switch(u(e)){case`html`:case`htm`:return`text/html`;case`css`:return`text/css`;case`js`:case`mjs`:case`cjs`:return`text/javascript`;case`json`:return`application/json`;case`md`:case`markdown`:return`text/markdown`;case`svg`:return`image/svg+xml`;case`png`:return`image/png`;case`jpg`:case`jpeg`:return`image/jpeg`;case`gif`:return`image/gif`;case`webp`:return`image/webp`;case`bmp`:return`image/bmp`;case`ico`:return`image/x-icon`;case`avif`:return`image/avif`;case`pdf`:return`application/pdf`;default:return`text/plain`}}function f(e){let t=u(e);return c.has(t)?`image`:l.has(t)?`pdf`:`text`}function p(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}function m(e){let t=new Uint8Array(e),n=32768,r=``;for(let e=0;e<t.length;e+=n)r+=String.fromCharCode.apply(null,t.subarray(e,e+n));return btoa(r)}function h(c){let{data:l}=r.useActiveConversation(),u=i.useRuntimeIsReady(),{data:h}=s.useWorkspaceSession(),g=a.useWorkspaceMutationCounter(e=>e.count),_=l?.id,v=l?.conversation_url,y=l?.session_api_key,b=l?.selected_repository,x=l?.workspace?.working_dir?.trim(),S=h?.baseUrl,C=e.getActiveBackend().backend.kind===`cloud`,w=o.getGitPath(b,x),T=w.startsWith(`/`)?w:`/${w}`,E=c?`${T}/${c}`:null;return t.useQuery({queryKey:[`workspace-file-content`,_,v,y,C?`cloud`:S,c,E,g],queryFn:async()=>{if(!c)throw Error(`No path`);let e=f(c),t=d(c);if(C){let r=await n.readCloudConversationFile(_,E);if(e===`text`){let e=new TextEncoder().encode(r);return p(e.buffer)?{path:c,kind:`binary`,text:null,staticUrl:`data:application/octet-stream;base64,${m(e.buffer)}`,mimeType:`application/octet-stream`}:{path:c,kind:`text`,text:r,staticUrl:`data:${t};charset=utf-8;base64,${m(e.buffer)}`,mimeType:t}}return{path:c,kind:e,text:null,staticUrl:`data:${t};base64,${m(new TextEncoder().encode(r).buffer)}`,mimeType:t}}if(!S)throw Error(`No workspace session`);let r=s.joinWorkspaceUrl(S,c);if(e!==`text`)return{path:c,kind:e,text:null,staticUrl:r,mimeType:t};let i=await fetch(r,{credentials:`include`});if(!i.ok)throw Error(`Failed to read ${c}: ${i.status}`);let a=await i.arrayBuffer();return p(a)?{path:c,kind:`binary`,text:null,staticUrl:r,mimeType:`application/octet-stream`}:{path:c,kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(a),staticUrl:r,mimeType:t}},enabled:u&&!!_&&!!c&&(C||!!S),retry:!1,staleTime:1e3*5,gcTime:1e3*60,meta:{disableToast:!0}})}exports.useWorkspaceFileContent=h;
|
|
2
2
|
//# sourceMappingURL=use-workspace-file-content.cjs.map
|
|
@@ -3,9 +3,9 @@ import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/mo
|
|
|
3
3
|
import { readCloudConversationFile as n } from "../../api/cloud/conversation-service.api.js";
|
|
4
4
|
import { useActiveConversation as r } from "./use-active-conversation.js";
|
|
5
5
|
import { useRuntimeIsReady as i } from "../use-runtime-is-ready.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useWorkspaceMutationCounter as a } from "../../stores/use-workspace-mutation-counter.js";
|
|
7
|
+
import { getGitPath as o } from "../../utils/get-git-path.js";
|
|
8
|
+
import { joinWorkspaceUrl as s, useWorkspaceSession as c } from "./use-workspace-session.js";
|
|
9
9
|
//#region src/hooks/query/use-workspace-file-content.ts
|
|
10
10
|
var l = new Set([
|
|
11
11
|
"png",
|
|
@@ -61,7 +61,7 @@ function h(e) {
|
|
|
61
61
|
return btoa(r);
|
|
62
62
|
}
|
|
63
63
|
function g(l) {
|
|
64
|
-
let { data: u } = r(), d = i(), { data: g } =
|
|
64
|
+
let { data: u } = r(), d = i(), { data: g } = c(), _ = a((e) => e.count), v = u?.id, y = u?.conversation_url, b = u?.session_api_key, x = u?.selected_repository, S = u?.workspace?.working_dir?.trim(), C = g?.baseUrl, w = e().backend.kind === "cloud", T = o(x, S), E = T.startsWith("/") ? T : `/${T}`, D = l ? `${E}/${l}` : null;
|
|
65
65
|
return t({
|
|
66
66
|
queryKey: [
|
|
67
67
|
"workspace-file-content",
|
|
@@ -103,7 +103,7 @@ function g(l) {
|
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
if (!C) throw Error("No workspace session");
|
|
106
|
-
let r =
|
|
106
|
+
let r = s(C, l);
|
|
107
107
|
if (e !== "text") return {
|
|
108
108
|
path: l,
|
|
109
109
|
kind: e,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../use-conversation-id.cjs"),t=require("../../api/backend-registry/active-store.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("../../api/cloud/conversation-service.api.cjs"),i=require("./use-active-conversation.cjs"),a=require("../use-runtime-is-ready.cjs"),o=require("../../
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../use-conversation-id.cjs"),t=require("../../api/backend-registry/active-store.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("../../api/cloud/conversation-service.api.cjs"),i=require("./use-active-conversation.cjs"),a=require("../use-runtime-is-ready.cjs"),o=require("../../api/runtime-service/agent-server-runtime-service.cjs"),s=require("../../utils/get-git-path.cjs");let c=require("react");var l=2e3,u=[`.git`,`node_modules`,`.venv`,`venv`,`__pycache__`,`dist`,`build`,`.next`,`.cache`,`.pytest_cache`,`.mypy_cache`,`.turbo`,`.parcel-cache`,`target`];function d(){return`find . \\( ${u.map(e=>`-name '${e}' -prune`).join(` -o `)} \\) -o -type f -print 2>/dev/null | sort | head -n ${l}`}function f(e){return e.startsWith(`./`)?e.slice(2):e}function p(e){let{data:t}=i.useActiveConversation(),r=a.useRuntimeIsReady(),s=t?.id,c=t?.conversation_url,u=t?.session_api_key,p=t?.workspace?.working_dir?.trim(),m=n.useQuery({queryKey:[`workspace-files`,s,c,u,p],queryFn:async()=>{let e=await o.default.executeCommand(c,u,d(),p,30);if(e.exit_code!==0)throw Error(e.stderr?.trim()||`Failed to list workspace files`);let t=e.stdout.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(f);return Array.from(new Set(t)).slice(0,l)},enabled:e&&r&&!!s&&!!p,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}});return{data:m.data,isLoading:m.isLoading}}function m(t){let{conversationId:o}=e.useOptionalConversationId(),{data:c}=i.useActiveConversation(),u=a.useRuntimeIsReady(),d=c?.selected_repository,p=c?.workspace?.working_dir?.trim(),m=s.getGitPath(d,p),h=m.startsWith(`/`)?m:`/${m}`,g=n.useQuery({queryKey:[`workspace-files-cloud`,o,h],queryFn:async()=>{let e=(await r.listCloudConversationFiles(o,h)).map(f).filter(Boolean);return Array.from(new Set(e)).slice(0,l)},enabled:t&&u&&!!o,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}});return{data:g.data,isLoading:g.isLoading}}function h(){let e=(0,c.useSyncExternalStore)(t.subscribeActiveBackend,t.getSnapshot,t.getSnapshot).active.backend.kind===`cloud`,n=p(!e),r=m(e);return e?r:n}exports.useWorkspaceFiles=h;
|
|
2
2
|
//# sourceMappingURL=use-workspace-files.cjs.map
|
|
@@ -4,8 +4,8 @@ import { useQuery as r } from "../../node_modules/@tanstack/react-query/build/mo
|
|
|
4
4
|
import { listCloudConversationFiles as i } from "../../api/cloud/conversation-service.api.js";
|
|
5
5
|
import { useActiveConversation as a } from "./use-active-conversation.js";
|
|
6
6
|
import { useRuntimeIsReady as o } from "../use-runtime-is-ready.js";
|
|
7
|
-
import
|
|
8
|
-
import c from "../../
|
|
7
|
+
import s from "../../api/runtime-service/agent-server-runtime-service.js";
|
|
8
|
+
import { getGitPath as c } from "../../utils/get-git-path.js";
|
|
9
9
|
import { useSyncExternalStore as l } from "react";
|
|
10
10
|
//#region src/hooks/query/use-workspace-files.ts
|
|
11
11
|
var u = 2e3, d = [
|
|
@@ -31,16 +31,16 @@ function p(e) {
|
|
|
31
31
|
return e.startsWith("./") ? e.slice(2) : e;
|
|
32
32
|
}
|
|
33
33
|
function m(e) {
|
|
34
|
-
let { data: t } = a(), n = o(), i = t?.id,
|
|
34
|
+
let { data: t } = a(), n = o(), i = t?.id, c = t?.conversation_url, l = t?.session_api_key, d = t?.workspace?.working_dir?.trim(), m = r({
|
|
35
35
|
queryKey: [
|
|
36
36
|
"workspace-files",
|
|
37
37
|
i,
|
|
38
|
-
|
|
38
|
+
c,
|
|
39
39
|
l,
|
|
40
40
|
d
|
|
41
41
|
],
|
|
42
42
|
queryFn: async () => {
|
|
43
|
-
let e = await
|
|
43
|
+
let e = await s.executeCommand(c, l, f(), d, 30);
|
|
44
44
|
if (e.exit_code !== 0) throw Error(e.stderr?.trim() || "Failed to list workspace files");
|
|
45
45
|
let t = e.stdout.split(/\r?\n/).map((e) => e.trim()).filter(Boolean).map(p);
|
|
46
46
|
return Array.from(new Set(t)).slice(0, u);
|
|
@@ -57,7 +57,7 @@ function m(e) {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function h(t) {
|
|
60
|
-
let { conversationId: n } = e(), { data:
|
|
60
|
+
let { conversationId: n } = e(), { data: s } = a(), l = o(), d = s?.selected_repository, f = s?.workspace?.working_dir?.trim(), m = c(d, f), h = m.startsWith("/") ? m : `/${m}`, g = r({
|
|
61
61
|
queryKey: [
|
|
62
62
|
"workspace-files-cloud",
|
|
63
63
|
n,
|
|
@@ -11,6 +11,12 @@ export interface AcpCredentialForm {
|
|
|
11
11
|
hasValueFor: (name: string) => boolean;
|
|
12
12
|
/** ``[credential, conflicting]`` pairs currently both set (typed or saved). */
|
|
13
13
|
conflicts: Array<[string, string]>;
|
|
14
|
+
/** Whether a credential (a ``secret`` field — API key, OAuth token, or
|
|
15
|
+
* file-content blob) is already saved on the backend for this provider. This
|
|
16
|
+
* is the backend-truthful auth signal that works on Docker/cloud, where the
|
|
17
|
+
* host-login probe can't run (agent-canvas#1244). A non-credential field (a
|
|
18
|
+
* base URL or GCP scalar) being set does not count. */
|
|
19
|
+
credentialsConfigured: boolean;
|
|
14
20
|
/** Whether the active backend can materialise file-content (``multiline``)
|
|
15
21
|
* credentials to disk. False on cloud (agent-canvas#1016), where such a
|
|
16
22
|
* credential would be orphaned. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("./use-conversation-id.cjs"),t=require("../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"),n=require("./query/use-active-conversation.cjs"),r=require("./use-runtime-is-ready.cjs"),i=require("../
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("./use-conversation-id.cjs"),t=require("../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"),n=require("./query/use-active-conversation.cjs"),r=require("./use-runtime-is-ready.cjs"),i=require("../utils/get-git-path.cjs"),a=require("../api/git-service/agent-server-git-service.api.cjs"),o=require("./query/use-unified-get-git-changes.cjs"),s=require("../utils/git-diff-stats.cjs");let c=require("react");function l(){let{conversationId:l}=e.useConversationId(),{data:u}=n.useActiveConversation(),d=r.useRuntimeIsReady(),{data:f,isLoading:p,isSuccess:m,isError:h}=o.useUnifiedGetGitChanges(),g=u?.conversation_url,_=u?.session_api_key,v=(0,c.useMemo)(()=>i.getGitPath(u?.selected_repository,u?.workspace?.working_dir?.trim()),[u?.selected_repository,u?.workspace?.working_dir]),y=t.useQueries({queries:(0,c.useMemo)(()=>(f??[]).filter(e=>e.status!==`D`),[f]).map(e=>({queryKey:[`conversation_overview_file_diff`,l,g,_,v,e.path],queryFn:async()=>a.default.getGitChangeDiff(l,g,_,`${v}/${e.path}`),enabled:d&&!!l&&m&&!!e.path,staleTime:1e3*60*5,meta:{disableToast:!0}}))}),b=y.some(e=>e.isLoading),x=s.sumGitDiffLineStats(y.flatMap(e=>e.data?[s.countGitChangeDiffStats(e.data)]:[]));return{additions:x.additions,deletions:x.deletions,changeCount:f?.length??0,isLoading:p||b,isError:h}}exports.useConversationOverviewGitDiffStats=l;
|
|
2
2
|
//# sourceMappingURL=use-conversation-overview-git-diff-stats.cjs.map
|
|
@@ -2,14 +2,14 @@ import { useConversationId as e } from "./use-conversation-id.js";
|
|
|
2
2
|
import { useQueries as t } from "../node_modules/@tanstack/react-query/build/modern/useQueries.js";
|
|
3
3
|
import { useActiveConversation as n } from "./query/use-active-conversation.js";
|
|
4
4
|
import { useRuntimeIsReady as r } from "./use-runtime-is-ready.js";
|
|
5
|
-
import i from "../
|
|
6
|
-
import
|
|
5
|
+
import { getGitPath as i } from "../utils/get-git-path.js";
|
|
6
|
+
import a from "../api/git-service/agent-server-git-service.api.js";
|
|
7
7
|
import { useUnifiedGetGitChanges as o } from "./query/use-unified-get-git-changes.js";
|
|
8
8
|
import { countGitChangeDiffStats as s, sumGitDiffLineStats as c } from "../utils/git-diff-stats.js";
|
|
9
9
|
import { useMemo as l } from "react";
|
|
10
10
|
//#region src/hooks/use-conversation-overview-git-diff-stats.ts
|
|
11
11
|
function u() {
|
|
12
|
-
let { conversationId: u } = e(), { data: d } = n(), f = r(), { data: p, isLoading: m, isSuccess: h, isError: g } = o(), _ = d?.conversation_url, v = d?.session_api_key, y = l(() =>
|
|
12
|
+
let { conversationId: u } = e(), { data: d } = n(), f = r(), { data: p, isLoading: m, isSuccess: h, isError: g } = o(), _ = d?.conversation_url, v = d?.session_api_key, y = l(() => i(d?.selected_repository, d?.workspace?.working_dir?.trim()), [d?.selected_repository, d?.workspace?.working_dir]), b = t({ queries: l(() => (p ?? []).filter((e) => e.status !== "D"), [p]).map((e) => ({
|
|
13
13
|
queryKey: [
|
|
14
14
|
"conversation_overview_file_diff",
|
|
15
15
|
u,
|
|
@@ -18,7 +18,7 @@ function u() {
|
|
|
18
18
|
y,
|
|
19
19
|
e.path
|
|
20
20
|
],
|
|
21
|
-
queryFn: async () =>
|
|
21
|
+
queryFn: async () => a.getGitChangeDiff(u, _, v, `${y}/${e.path}`),
|
|
22
22
|
enabled: f && !!u && h && !!e.path,
|
|
23
23
|
staleTime: 1e3 * 60 * 5,
|
|
24
24
|
meta: { disableToast: !0 }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs"),require("../api/backend-registry/active-store.cjs");const e=require("../contexts/active-backend-context.cjs"),t=require("../manifests/automation-interface.cjs"),n=require("../node_modules/@uidotdev/usehooks/index.cjs");let r=require("react");var i=`oh:pinned-home-route`,a=`/customize`;function o(e,t){return`${i}:${e}:${t??`-`}`}function s(e){return e===`/customize`?!0:e===t.automationListPath()?t.hasAutomationInterface():!1}function c(e){return typeof e!=`string`||!e?null:s(e)?e:null}function l(){let t=e.useActiveBackend(),[i,a]=n.useLocalStorage(o(t.backend.id,t.orgId),null),l=(0,r.useMemo)(()=>c(i),[i]);return{pinnedRoute:l,isPinnedRoute:(0,r.useCallback)(e=>l===e,[l]),togglePinnedRoute:(0,r.useCallback)(e=>{if(l===e){a(null);return}s(e)&&a(e)},[l,a])}}exports.CUSTOMIZE_PATH=a,exports.usePinnedHomeRoute=l;
|
|
2
|
+
//# sourceMappingURL=use-pinned-home-route.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pinned-home-route.cjs","names":[],"sources":["../../src/hooks/use-pinned-home-route.ts"],"sourcesContent":["import { useLocalStorage } from \"@uidotdev/usehooks\";\nimport { useCallback, useMemo } from \"react\";\nimport {\n getActiveBackend,\n isNoBackend,\n} from \"#/api/backend-registry/active-store\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n automationListPath,\n hasAutomationInterface,\n} from \"#/manifests/automation-interface\";\n\nexport const PINNED_HOME_ROUTE_KEY = \"oh:pinned-home-route\";\n\n/** Sidebar Customize entry; also the pin target, so the two cannot drift. */\nexport const CUSTOMIZE_PATH = \"/customize\";\n\n/**\n * The pin is stored per backend + org: it may reference a surface that only\n * exists on the backend that set it (e.g. /automations requires that\n * deployment's interface manifest) — a shared key would let one backend\n * redirect `/` on another.\n */\nexport function getPinnedHomeRouteKey(\n backendId: string,\n orgId: string | null,\n): string {\n return `${PINNED_HOME_ROUTE_KEY}:${backendId}:${orgId ?? \"-\"}`;\n}\n\n/**\n * Whether `path` may serve as the home route right now. Shared by the\n * sidebar pin affordance and the `/` loader, so a stored pin that stops\n * resolving (backend switch, manifest absent) is ignored rather than an\n * error. `/` is never pinnable, which makes a redirect loop impossible.\n * Canvas Extensions pages can later add an `/extensions/…` branch here\n * without any storage or loader change.\n */\nexport function isPinnableRoute(path: string): boolean {\n if (path === CUSTOMIZE_PATH) return true;\n if (path === automationListPath()) return hasAutomationInterface();\n return false;\n}\n\nfunction sanitizePinnedRoute(value: unknown): string | null {\n if (typeof value !== \"string\" || !value) return null;\n return isPinnableRoute(value) ? value : null;\n}\n\n/**\n * Synchronous pin read for route loaders (no React context). Reads the key\n * `usePinnedHomeRoute` writes; `useLocalStorage` JSON-serializes values, so\n * parse defensively and treat anything unreadable as \"no pin\". An invalid\n * pin is ignored, not cleared — it may become valid again (e.g. the\n * automations interface returning after a backend switch back).\n */\nexport function readPinnedHomeRoute(): string | null {\n const active = getActiveBackend();\n if (isNoBackend(active.backend)) return null;\n\n let raw: string | null = null;\n try {\n raw = window.localStorage.getItem(\n getPinnedHomeRouteKey(active.backend.id, active.orgId),\n );\n } catch {\n return null;\n }\n if (raw === null) return null;\n\n try {\n return sanitizePinnedRoute(JSON.parse(raw));\n } catch {\n return null;\n }\n}\n\n/** Pin state for the home route: `/` redirects to the pinned sidebar page. */\nexport function usePinnedHomeRoute() {\n const active = useActiveBackend();\n const [rawPinnedRoute, setRawPinnedRoute] = useLocalStorage<string | null>(\n getPinnedHomeRouteKey(active.backend.id, active.orgId),\n null,\n );\n\n const pinnedRoute = useMemo(\n () => sanitizePinnedRoute(rawPinnedRoute),\n [rawPinnedRoute],\n );\n\n const isPinnedRoute = useCallback(\n (path: string) => pinnedRoute === path,\n [pinnedRoute],\n );\n\n const togglePinnedRoute = useCallback(\n (path: string) => {\n if (pinnedRoute === path) {\n setRawPinnedRoute(null);\n return;\n }\n if (!isPinnableRoute(path)) return;\n setRawPinnedRoute(path);\n },\n [pinnedRoute, setRawPinnedRoute],\n );\n\n return {\n pinnedRoute,\n isPinnedRoute,\n togglePinnedRoute,\n };\n}\n"],"mappings":"+RAYA,IAAa,EAAwB,uBAGxB,EAAiB,aAQ9B,SAAgB,EACd,EACA,EACQ,CACR,MAAO,GAAG,EAAsB,GAAG,EAAU,GAAG,GAAS,KAC3D,CAUA,SAAgB,EAAgB,EAAuB,CAGrD,OAFI,IAAA,aAAgC,GAChC,IAAS,EAAA,mBAAmB,EAAU,EAAA,uBAAuB,EAC1D,EACT,CAEA,SAAS,EAAoB,EAA+B,CAE1D,OADI,OAAO,GAAU,UAAY,CAAC,EAAc,KACzC,EAAgB,CAAK,EAAI,EAAQ,IAC1C,CA+BA,SAAgB,GAAqB,CACnC,IAAM,EAAS,EAAA,iBAAiB,EAC1B,CAAC,EAAgB,GAAqB,EAAA,gBAC1C,EAAsB,EAAO,QAAQ,GAAI,EAAO,KAAK,EACrD,IACF,EAEM,GAAA,EAAA,EAAA,aACE,EAAoB,CAAc,EACxC,CAAC,CAAc,CACjB,EAmBA,MAAO,CACL,cACA,eAAA,EAAA,EAAA,aAlBC,GAAiB,IAAgB,EAClC,CAAC,CAAW,CAiBZ,EACA,mBAAA,EAAA,EAAA,aAdC,GAAiB,CAChB,GAAI,IAAgB,EAAM,CACxB,EAAkB,IAAI,EACtB,MACF,CACK,EAAgB,CAAI,GACzB,EAAkB,CAAI,CACxB,EACA,CAAC,EAAa,CAAiB,CAM/B,CACF,CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const PINNED_HOME_ROUTE_KEY = "oh:pinned-home-route";
|
|
2
|
+
/** Sidebar Customize entry; also the pin target, so the two cannot drift. */
|
|
3
|
+
export declare const CUSTOMIZE_PATH = "/customize";
|
|
4
|
+
/**
|
|
5
|
+
* The pin is stored per backend + org: it may reference a surface that only
|
|
6
|
+
* exists on the backend that set it (e.g. /automations requires that
|
|
7
|
+
* deployment's interface manifest) — a shared key would let one backend
|
|
8
|
+
* redirect `/` on another.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getPinnedHomeRouteKey(backendId: string, orgId: string | null): string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether `path` may serve as the home route right now. Shared by the
|
|
13
|
+
* sidebar pin affordance and the `/` loader, so a stored pin that stops
|
|
14
|
+
* resolving (backend switch, manifest absent) is ignored rather than an
|
|
15
|
+
* error. `/` is never pinnable, which makes a redirect loop impossible.
|
|
16
|
+
* Canvas Extensions pages can later add an `/extensions/…` branch here
|
|
17
|
+
* without any storage or loader change.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isPinnableRoute(path: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Synchronous pin read for route loaders (no React context). Reads the key
|
|
22
|
+
* `usePinnedHomeRoute` writes; `useLocalStorage` JSON-serializes values, so
|
|
23
|
+
* parse defensively and treat anything unreadable as "no pin". An invalid
|
|
24
|
+
* pin is ignored, not cleared — it may become valid again (e.g. the
|
|
25
|
+
* automations interface returning after a backend switch back).
|
|
26
|
+
*/
|
|
27
|
+
export declare function readPinnedHomeRoute(): string | null;
|
|
28
|
+
/** Pin state for the home route: `/` redirects to the pinned sidebar page. */
|
|
29
|
+
export declare function usePinnedHomeRoute(): {
|
|
30
|
+
pinnedRoute: string | null;
|
|
31
|
+
isPinnedRoute: (path: string) => boolean;
|
|
32
|
+
togglePinnedRoute: (path: string) => void;
|
|
33
|
+
};
|