@openhands/agent-canvas 1.0.0-rc.8 → 1.0.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 +46 -31
- package/README.windows.md +2 -2
- package/bin/agent-canvas.mjs +3 -1
- package/build/assets/Trans-CBypf0vt.js +1 -0
- package/build/assets/{acp-providers-BqUvf67Q.js → acp-providers-BMyF5WII.js} +1 -1
- package/build/assets/active-backend-context-Cy_Ui5d7.js +1 -0
- package/build/assets/add-backend-modal-CUw7x0zm.js +1 -0
- package/build/assets/agent-server-client-options-FoO1qgAQ.js +1 -0
- package/build/assets/agent-server-conversation-service.api-D6Cmbnhd.js +5 -0
- package/build/assets/{agent-settings-DoHXHcoA.js → agent-settings-DW4vwOaz.js} +2 -2
- package/build/assets/{alert-banner-Bsvys-hT.js → alert-banner-BHmoArV2.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-CVhsAREx.js → analytics-consent-form-modal-BNK0yu4L.js} +1 -1
- package/build/assets/api-key-entry-screen-BjVajIjf.js +1 -0
- package/build/assets/app-settings-C-5X6RzZ.js +1 -0
- package/build/assets/automation-detail-uDMoYmAc.js +1 -0
- package/build/assets/automations-list-DBCKCbId.js +1 -0
- package/build/assets/{back-nav-button-D20Avel_.js → back-nav-button-Bckz5Wh6.js} +1 -1
- package/build/assets/backend-form-modal-D2-XqJA4.js +1 -0
- package/build/assets/{backend-synced-settings-badge-Dcd4712m.js → backend-synced-settings-badge-Dx16CR_k.js} +1 -1
- package/build/assets/{base-modal-DvuGYyu1.js → base-modal-7QRNzf6r.js} +1 -1
- package/build/assets/{brand-button-9SOzmqPP.js → brand-button-CKLvirxz.js} +1 -1
- package/build/assets/browser-D1ZybR7v.js +5 -0
- package/build/assets/browser-store-hzasvz9c.js +1 -0
- package/build/assets/{browser-tab-bveyJhG9.js → browser-tab-iOQjXzmI.js} +1 -1
- package/build/assets/chat-send-button-_Uc9iFpG.js +1 -0
- package/build/assets/check-DfvhVBub.js +1 -0
- package/build/assets/{checkmark--JWAesua.js → checkmark-BHPhb50L.js} +1 -1
- package/build/assets/{chevron-down-B9j6lcFg.js → chevron-down-CMkqyPEY.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-AO9DWyDX.js → circle-plus-check-toggle-ChmnRlpR.js} +1 -1
- package/build/assets/{close--W-tHn1h.js → close-DBs90sI6.js} +1 -1
- package/build/assets/{code-tag-chmctf4w.js → code-tag-BtHOqHwB.js} +1 -1
- package/build/assets/{color-themes-0biOprdo.js → color-themes-CBikRn3w.js} +1 -1
- package/build/assets/{combobox-caret-C9BNHfSu.js → combobox-caret-evUAh6YW.js} +1 -1
- package/build/assets/{command-store-UzKGSUC2.js → command-store-DZfR8QtE.js} +1 -1
- package/build/assets/condenser-settings-0tw3yXX8.js +1 -0
- package/build/assets/{confirmation-modal-Cq3eqvqH.js → confirmation-modal-DWuxe1zG.js} +1 -1
- package/build/assets/{context-menu-list-item-BQU0jZPq.js → context-menu-list-item-BbHFxHaq.js} +1 -1
- package/build/assets/conversation-B1v96pQf.js +19 -0
- package/build/assets/conversation-DgfcjCPm.js +1 -0
- package/build/assets/{conversation-local-storage-an3MiIiJ.js → conversation-local-storage-Btum2xBJ.js} +1 -1
- package/build/assets/conversation-panel-TJ7swm6a.js +1 -0
- package/build/assets/conversation-service.api-DXawvmNN.js +1 -0
- package/build/assets/conversation-state-store-DmuPn875.js +1 -0
- package/build/assets/{conversation-store-FQmakEd-.js → conversation-store-Bu89Yxg1.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-C8tztloo.js → conversation-tab-empty-state-7js7FjYM.js} +1 -1
- package/build/assets/{copy-CdKN5rtJ.js → copy-B0SkXenR.js} +1 -1
- package/build/assets/copy-to-clipboard-button-CfH2EQz9.js +1 -0
- package/build/assets/{createLucideIcon-CkGTf9Qj.js → createLucideIcon-Bazr-V-B.js} +1 -1
- package/build/assets/declaration-Cn-NXHEy.js +1 -0
- package/build/assets/{device-verify-YuGXnpRk.js → device-verify-CWKyQ680.js} +1 -1
- package/build/assets/{dist-5dObF4p4.js → dist-Cbu6eGx8.js} +1 -1
- package/build/assets/dist-Dg2JWLGc.js +1 -0
- package/build/assets/{dropdown-classes-CVp0kVdt.js → dropdown-classes-BI1bI1ho.js} +1 -1
- package/build/assets/edit-automation-modal-DdAG6kFZ.js +1 -0
- package/build/assets/{ellipsis-button-k7HLwYth.js → ellipsis-button-DdCsOBHV.js} +1 -1
- package/build/assets/entry.client-DXyvKj5G.js +2 -0
- package/build/assets/{enum-filter-dropdown-COqUq3mB.js → enum-filter-dropdown-WROAIeys.js} +1 -1
- package/build/assets/{environment-switch-overlay-wB5LxfYZ.js → environment-switch-overlay-Dv0imPE6.js} +1 -1
- package/build/assets/{extensions-hub-CoWO3SzQ.js → extensions-hub-CkyDPXvn.js} +1 -1
- package/build/assets/{extensions-navigation-D5w2sFQe.js → extensions-navigation-gMR-la1J.js} +1 -1
- package/build/assets/{external-link-BATfjnkz.js → external-link-FsutnU75.js} +1 -1
- package/build/assets/files-tab-DNUoveJZ.js +1 -0
- package/build/assets/files-tab-store-SyvkH3ic.js +1 -0
- package/build/assets/{folder-DPTBlxWb.js → folder-DusyBXDE.js} +1 -1
- package/build/assets/{globe-Dpgjreyy.js → globe-BUcin4kT.js} +1 -1
- package/build/assets/home-D809jWVS.js +1 -0
- package/build/assets/{iconBase-BVhFI-0E.js → iconBase-B6CXDDaE.js} +1 -1
- package/build/assets/index-redirect-nMYgOTBX.js +1 -0
- package/build/assets/install-server-modal-D92Qy57I.js +1 -0
- package/build/assets/{launch-fU77utLO.js → launch-BnCG2g2a.js} +1 -1
- package/build/assets/lesson-plan-j-ZaE8vK.js +3 -0
- package/build/assets/{lightbulb-S616sGEL.js → lightbulb-BJ5tWmAh.js} +1 -1
- package/build/assets/{link-external-ooNztGLp.js → link-external-DUtmHAHi.js} +1 -1
- package/build/assets/{list-todo-nCa9zxVE.js → list-todo-C-gekh-4.js} +1 -1
- package/build/assets/{llm-client-P9f2gKeW.js → llm-client-BZUkZYlc.js} +1 -1
- package/build/assets/llm-not-configured-banner-PlvJ99rE.js +27 -0
- package/build/assets/llm-settings-Dgk32xRW.js +1 -0
- package/build/assets/llm-settings-Dxo7owKm.js +1 -0
- package/build/assets/llm-subscription-Bvu8BLXc.js +1 -0
- package/build/assets/llm-subscription-service-Bq6z3Wkv.js +1 -0
- package/build/assets/loader-circle-Cw7_q9hg.js +1 -0
- package/build/assets/{loading-spinner-D7bOU6I7.js → loading-spinner-RF3IlMF5.js} +1 -1
- package/build/assets/manage-backends-modal-BT66a6e0.js +1 -0
- package/build/assets/manifest-b8402d59.js +1 -0
- package/build/assets/markdown-renderer-Tw6FR2ad.js +2 -0
- package/build/assets/mcp-B_pA7vZg.js +9 -0
- package/build/assets/mcp-client-ppbYplKX.js +1 -0
- package/build/assets/messages-Cg9aNVi6.js +41 -0
- package/build/assets/{modal-backdrop-_VbcKk5K.js → modal-backdrop-DRpBVVW5.js} +1 -1
- package/build/assets/{modal-body-Cd-PtMHr.js → modal-body-CEV2O67p.js} +1 -1
- package/build/assets/{modal-classes-CNm4ovfm.js → modal-classes-B2DuQ9qD.js} +1 -1
- package/build/assets/{modal-close-button-Dbo0NAMt.js → modal-close-button-gtb7RHFB.js} +1 -1
- package/build/assets/model-selector-CAv3RrJ3.js +1 -0
- package/build/assets/{mouse-pointer-click-D0QNGSIo.js → mouse-pointer-click-B3i6HcaF.js} +1 -1
- package/build/assets/{navigation-context-BpAOh_t5.js → navigation-context-CM9JmTvm.js} +1 -1
- package/build/assets/{navigation-link-Dci7Nuyf.js → navigation-link-FmXzqR1J.js} +1 -1
- package/build/assets/onboarding-Q9CzuVWy.js +1 -0
- package/build/assets/{openhands-logo-Dzm-d_V_.js → openhands-logo-B4aEO2sf.js} +1 -1
- package/build/assets/option-service.api-C-s2BYZp.js +1 -0
- package/build/assets/organization-service.api-CXTKpFnV.js +1 -0
- package/build/assets/{path-utils-YlkpoImJ.js → path-utils-CE98fIFP.js} +1 -1
- package/build/assets/{pencil-DPEtl5QD.js → pencil-bWrxRWlr.js} +1 -1
- package/build/assets/{plan-components-CutRBi0G.js → plan-components-BF-X7vnQ.js} +1 -1
- package/build/assets/{planner-tab-DjIFIQDk.js → planner-tab-jkyaGiRc.js} +1 -1
- package/build/assets/plus-BTCK8WtR.js +1 -0
- package/build/assets/{profiles-client-BNvHck-I.js → profiles-client-CQ9L1yHR.js} +1 -1
- package/build/assets/providers-B3hkV58J.js +1 -0
- package/build/assets/proxy-BOcEWkCD.js +1 -0
- package/build/assets/{react-dom-hVBnwgwZ.js → react-dom-BBXlXOZX.js} +1 -1
- package/build/assets/{react-CM_dJw1Z.js → react-uQK8du1l.js} +1 -1
- package/build/assets/{react-Dy05vyj5.js → react-x84lbX6s.js} +1 -1
- package/build/assets/{recommended-automations-launcher-DCi0RXIj.js → recommended-automations-launcher-DMk35aFI.js} +11 -11
- package/build/assets/root-CV0kyxfP.js +2 -0
- package/build/assets/root-PB2Jnj61.css +1 -0
- package/build/assets/root-layout-Bl4Qzg5J.js +2 -0
- package/build/assets/{runtime-waiting-state-8i0Z3A_i.js → runtime-waiting-state-C1hJpXxl.js} +1 -1
- package/build/assets/sdk-section-page-DHbC2_j3.js +1 -0
- package/build/assets/sdk-settings-schema-z51bBmMl.js +1 -0
- package/build/assets/{search-C_l_XW4e.js → search-Dxm1MUMi.js} +1 -1
- package/build/assets/{secrets-service-D6Gcymcs.js → secrets-service-DlScPUwy.js} +1 -1
- package/build/assets/secrets-settings-B97-JKBe.js +1 -0
- package/build/assets/settings-BpmooyBV.js +1 -0
- package/build/assets/{settings-dropdown-input-BP-arqjU.js → settings-dropdown-input-hIIAlmHb.js} +1 -1
- package/build/assets/{settings-gear-f-zWpxfI.js → settings-gear-DQLTCnFx.js} +1 -1
- package/build/assets/{settings-index-B035V2pu.js → settings-index-kKASonWk.js} +1 -1
- package/build/assets/{settings-input-BM8ANxDb.js → settings-input-BlOzCtP3.js} +1 -1
- package/build/assets/{settings-list-classes-B9uo5WES.js → settings-list-classes-BFRbCy4U.js} +1 -1
- package/build/assets/settings-modal-C4pZwj-l.js +1 -0
- package/build/assets/{settings-section-header-context-Cid25HM2.js → settings-section-header-context-iz4Go0dL.js} +1 -1
- package/build/assets/settings-service.api-DVLwi82B.js +1 -0
- package/build/assets/{settings-switch-xa6q4M6j.js → settings-switch-6cXIH-UE.js} +1 -1
- package/build/assets/{settings-utils--H_EvFjx.js → settings-utils-CfScEaPn.js} +1 -1
- package/build/assets/shared-conversation-CLkayApe.js +1 -0
- package/build/assets/sidebar-mobile-menu-toggle-C8uT4Mhd.js +1 -0
- package/build/assets/{sidebar-nav-link-CPWuQ_c6.js → sidebar-nav-link-BKZiAQxQ.js} +1 -1
- package/build/assets/{skill-card-pill-row-DeodrwPG.js → skill-card-pill-row-D13WRKIE.js} +1 -1
- package/build/assets/{skills-BE5HJuGM.js → skills-NpRk6v79.js} +1 -1
- package/build/assets/{skills-client-Ui_9FvXp.js → skills-client-DsqwQEwj.js} +1 -1
- package/build/assets/{skills-plugins-Dc4ec3CW.js → skills-plugins-bkwxItAw.js} +1 -1
- package/build/assets/{skills-settings-B6HwvA0S.js → skills-settings-DMbrlB2b.js} +2 -2
- package/build/assets/{square-chevron-right-BWAB7NPp.js → square-chevron-right-DxZKcVq4.js} +1 -1
- package/build/assets/{styled-tooltip-X61SEwqk.js → styled-tooltip-DG1ofAcS.js} +1 -1
- package/build/assets/suspense-sOGeme-f.js +1 -0
- package/build/assets/{switch-skeleton-BbIWemkK.js → switch-skeleton-CZ6XCVZk.js} +1 -1
- package/build/assets/{task-list-tab-BFnyHGsn.js → task-list-tab-CddMPNCD.js} +1 -1
- package/build/assets/telemetry-CX4mTZUw.js +2 -0
- package/build/assets/{terminal-CltMeLv4.js → terminal-BOAVxAej.js} +1 -1
- package/build/assets/{terminal-B92mACR5.js → terminal-DbtwHqt4.js} +1 -1
- package/build/assets/{toggle-switch-CL_wRiGs.js → toggle-switch-C0t6ge2m.js} +1 -1
- package/build/assets/{trash-2-C-RvV8WA.js → trash-2-Dmprz0A0.js} +1 -1
- package/build/assets/{typography-BLSEGjph.js → typography-CNHbO1eE.js} +1 -1
- package/build/assets/{u-check-circle-dG_VJqx5.js → u-check-circle-CX66WzfT.js} +1 -1
- package/build/assets/{u-check-circle-half-D-5ZPRnd.js → u-check-circle-half-Bj853Ub0.js} +1 -1
- package/build/assets/{u-circuit-BXoisXOA.js → u-circuit-B9bLCP7N.js} +1 -1
- package/build/assets/{u-edit-DIgADxLH.js → u-edit-D7JyvoWm.js} +1 -1
- package/build/assets/use-acp-credential-form-Cj_oUYd5.js +1 -0
- package/build/assets/{use-active-conversation-B0_rXnqa.js → use-active-conversation-B64-yy2X.js} +1 -1
- package/build/assets/use-agent-settings-schema-BzbQYEzb.js +1 -0
- package/build/assets/{use-agent-state-BuOzLeFN.js → use-agent-state-DxFk391r.js} +1 -1
- package/build/assets/{use-breakpoint-DpxHDmuH.js → use-breakpoint-Cent5lpI.js} +1 -1
- package/build/assets/{use-click-outside-element-DhxCUyWl.js → use-click-outside-element-DOYR26nw.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-DVZXa_WH.js → use-cloud-current-user-id-BVf7pb8n.js} +1 -1
- package/build/assets/use-config-CvdJUq4E.js +1 -0
- package/build/assets/use-create-conversation-Cnouynop.js +1 -0
- package/build/assets/{use-create-secret-ClPpLBgD.js → use-create-secret-Cgu4uxyr.js} +1 -1
- package/build/assets/{use-event-store-DNSmyzUh.js → use-event-store-Nv92IYMU.js} +1 -1
- package/build/assets/use-handle-plan-click-C7824bbe.js +1 -0
- package/build/assets/use-is-authed-mnJtd2bw.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BTgXIu3N.js → use-launch-skill-in-chat-NDUo_UCA.js} +1 -1
- package/build/assets/use-llm-profiles-9eH3Y3Ef.js +1 -0
- package/build/assets/use-runtime-is-ready-DEnxJH7W.js +1 -0
- package/build/assets/use-save-settings-DrClHnX7.js +1 -0
- package/build/assets/use-settings-BNAoCX93.js +1 -0
- package/build/assets/{use-settings-nav-items-DVrMNk0I.js → use-settings-nav-items-CLIW2p2n.js} +2 -2
- package/build/assets/{use-skills-Bv8LXrys.js → use-skills-B9gOHrOj.js} +1 -1
- package/build/assets/{use-task-list-E5t-jtgs.js → use-task-list-DLKPnq3I.js} +1 -1
- package/build/assets/{use-tracking-BhyV5A9i.js → use-tracking-Dph_dRlL.js} +1 -1
- package/build/assets/{use-user-conversation-6yFVEXiG.js → use-user-conversation-leIsQH1B.js} +1 -1
- package/build/assets/useMutation-cXADjWAv.js +1 -0
- package/build/assets/useQuery-BQr6A6ry.js +1 -0
- package/build/assets/useTranslation-Bp1btAjp.js +1 -0
- package/build/assets/{utils-eXk6yerZ.js → utils-o-OXNtEy.js} +1 -1
- package/build/assets/v4-DOSjXdIn.js +1 -0
- package/build/assets/{vendor~browser-tab-BGJDGHyS.js → vendor~browser-tab-642bOcE1.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-D98u43rl.js → vendor~conversation-panel~conversation-DqmbnXRn.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CtjHOMO_.js → vendor~conversation-panel~conversation~alert-banner-CSDVP1nw.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~index-BXt2-3Cc.js → vendor~conversation-panel~conversation~index-DITarr3F.js} +1 -1
- package/build/assets/{vendor~entry.client-DrAdOKqA.js → vendor~entry.client-CQ77DucR.js} +1 -1
- package/build/assets/{vendor~entry.client-EcEhmoJW.js → vendor~entry.client-ePAFmSwg.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~f0pn7nss-DUk-MwlC.js +177 -0
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lb3qbbk3-BvmOva8I.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-Cl4h-NSi.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BkQQxq_q.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BmOMM-6e.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-8xF3WeB9.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-BjMt2JeR.js → vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~nyk4vv4g-UzR6fe3Y.js} +1 -1
- package/build/assets/{vendor~files-tab--640YzQO.js → vendor~files-tab-Cko7Kr5k.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation-dhKA2JVJ.js → vendor~home~conversation-panel~conversation-D3otw5Jn.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DMOoHVBy.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CMdKUYP2.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BoE6JRJj.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DSR6Mugx.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dqpi2xyZ.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DdOzMvB1.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DX2CmDJ0.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dj2eezvL.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BNExlCqT.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DyN8jeZz.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DCn1M97v.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-lpEWrbMA.js} +1 -1
- package/build/assets/{vendor~launch-C0VvUe2W.js → vendor~launch-DoYO54df.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-COLUW-6M.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BGwU2SbU.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-eG1kjEbj.js → vendor~root-layout~home~conversation-panel~conversation-Iqs0j4Wo.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-7eqKdLSQ.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-BdS6bbw9.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-BP3MGAAY.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-Fd3F3jth.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ceijy54y-Dkd2wxJA.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ceijy54y-Cg0AqwMN.js} +2 -2
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~bxn4ldi1-_LydBB1e.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~bxn4ldi1-BlsbqRyZ.js} +1 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~ec6pk3ix-CBICqfKC.js +48 -0
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~mcp~automati~dou5smdo-DavKsAvB.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~nv6afr11-BYNoKMU0.js} +97 -69
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CsO1gYxF.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BspUuSsP.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-D40jgugf.js → vendor~root-layout~home~mcp~automations-list-C9U_eOqU.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~automations-list-cNHi83v_.js → vendor~root-layout~home~mcp~automations-list-DhQ3LPVw.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-xCM3k6Rd.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BEbhHQYg.js} +1 -1
- package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BIm99UaF.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-DdgDNzMc.js} +2 -2
- package/build/assets/{verification-settings-Be6NxjuT.js → verification-settings-D7R-Ne6L.js} +1 -1
- package/build/assets/x-DCZg87p7.js +1 -0
- package/build/assets/{x-mark-C42svtnu.js → x-mark-jrBTJbnP.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +22 -0
- package/build/locales/ca/openhands.json +22 -0
- package/build/locales/de/openhands.json +22 -0
- package/build/locales/en/openhands.json +22 -0
- package/build/locales/es/openhands.json +22 -0
- package/build/locales/fr/openhands.json +22 -0
- package/build/locales/it/openhands.json +22 -0
- package/build/locales/ja/openhands.json +22 -0
- package/build/locales/ko-KR/openhands.json +22 -0
- package/build/locales/no/openhands.json +22 -0
- package/build/locales/pt/openhands.json +22 -0
- package/build/locales/tr/openhands.json +22 -0
- package/build/locales/uk/openhands.json +22 -0
- package/build/locales/zh-CN/openhands.json +22 -0
- package/build/locales/zh-TW/openhands.json +22 -0
- package/config/defaults.json +4 -7
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +8 -0
- package/dist/api/agent-server-adapter.js +82 -80
- 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 +10 -0
- package/dist/api/agent-server-compatibility.js +69 -25
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/backend-registry/default-backend.cjs +1 -1
- package/dist/api/backend-registry/default-backend.cjs.map +1 -1
- package/dist/api/backend-registry/default-backend.d.ts +6 -5
- package/dist/api/backend-registry/default-backend.js +1 -1
- package/dist/api/backend-registry/default-backend.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +38 -68
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/cloud/proxy.cjs +1 -1
- package/dist/api/cloud/proxy.cjs.map +1 -1
- package/dist/api/cloud/proxy.d.ts +3 -16
- package/dist/api/cloud/proxy.js +1 -1
- package/dist/api/cloud/proxy.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +75 -75
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/llm-subscription-service.cjs +2 -0
- package/dist/api/llm-subscription-service.cjs.map +1 -0
- package/dist/api/llm-subscription-service.d.ts +23 -0
- package/dist/api/llm-subscription-service.js +109 -0
- package/dist/api/llm-subscription-service.js.map +1 -0
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.d.ts +2 -3
- package/dist/api/mcp-service/mcp-service.api.js +38 -13
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- 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.js +41 -42
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/messages.cjs +1 -1
- package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
- package/dist/components/conversation-events/chat/messages.js +4 -4
- package/dist/components/conversation-events/chat/messages.js.map +1 -1
- 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 +136 -135
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +103 -91
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +14 -8
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/path-component.cjs +1 -1
- package/dist/components/features/chat/path-component.cjs.map +1 -1
- package/dist/components/features/chat/path-component.js +1 -1
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs.map +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js +77 -66
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +1 -0
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.js +73 -46
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/marketplace-card.cjs +1 -1
- package/dist/components/features/mcp-page/marketplace-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/marketplace-card.js +6 -2
- package/dist/components/features/mcp-page/marketplace-card.js.map +1 -1
- package/dist/components/features/settings/brand-button.cjs +1 -1
- package/dist/components/features/settings/brand-button.cjs.map +1 -1
- package/dist/components/features/settings/brand-button.js +1 -1
- package/dist/components/features/settings/brand-button.js.map +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs +2 -0
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs.map +1 -0
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +5 -0
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js +167 -0
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js.map +1 -0
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.d.ts +1 -2
- package/dist/components/shared/modals/settings/model-selector.js +59 -65
- package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
- package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-form.cjs.map +1 -1
- package/dist/components/shared/modals/settings/settings-form.js +1 -2
- package/dist/components/shared/modals/settings/settings-form.js.map +1 -1
- package/dist/config/defaults.cjs +2 -0
- package/dist/config/defaults.cjs.map +1 -0
- package/dist/config/defaults.js +35 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/constants/llm-subscription.cjs +2 -0
- package/dist/constants/llm-subscription.cjs.map +1 -0
- package/dist/constants/llm-subscription.d.ts +16 -0
- package/dist/constants/llm-subscription.js +47 -0
- package/dist/constants/llm-subscription.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +1 -1
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +1 -1
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/mutation/use-llm-subscription-auth.cjs +2 -0
- package/dist/hooks/mutation/use-llm-subscription-auth.cjs.map +1 -0
- package/dist/hooks/mutation/use-llm-subscription-auth.d.ts +3 -0
- package/dist/hooks/mutation/use-llm-subscription-auth.js +30 -0
- package/dist/hooks/mutation/use-llm-subscription-auth.js.map +1 -0
- package/dist/hooks/mutation/use-save-fields-as-secrets.cjs +1 -1
- package/dist/hooks/mutation/use-save-fields-as-secrets.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-fields-as-secrets.d.ts +8 -6
- package/dist/hooks/mutation/use-save-fields-as-secrets.js +1 -1
- package/dist/hooks/mutation/use-save-fields-as-secrets.js.map +1 -1
- package/dist/hooks/mutation/use-test-mcp-server.d.ts +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +5 -0
- package/dist/hooks/query/query-keys.js +14 -2
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-agent-settings-schema.cjs +1 -1
- package/dist/hooks/query/use-agent-settings-schema.cjs.map +1 -1
- package/dist/hooks/query/use-agent-settings-schema.d.ts +2 -2
- package/dist/hooks/query/use-agent-settings-schema.js +21 -19
- package/dist/hooks/query/use-agent-settings-schema.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.js +38 -36
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-llm-subscription-models.cjs +2 -0
- package/dist/hooks/query/use-llm-subscription-models.cjs.map +1 -0
- package/dist/hooks/query/use-llm-subscription-models.d.ts +3 -0
- package/dist/hooks/query/use-llm-subscription-models.js +19 -0
- package/dist/hooks/query/use-llm-subscription-models.js.map +1 -0
- package/dist/hooks/query/use-llm-subscription-status.cjs +2 -0
- package/dist/hooks/query/use-llm-subscription-status.cjs.map +1 -0
- package/dist/hooks/query/use-llm-subscription-status.d.ts +3 -0
- package/dist/hooks/query/use-llm-subscription-status.js +19 -0
- package/dist/hooks/query/use-llm-subscription-status.js.map +1 -0
- package/dist/hooks/use-websocket.cjs +1 -1
- package/dist/hooks/use-websocket.cjs.map +1 -1
- package/dist/hooks/use-websocket.d.ts +0 -1
- package/dist/hooks/use-websocket.js +37 -38
- package/dist/hooks/use-websocket.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +22 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +374 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +22 -0
- package/dist/locales/ca/openhands.json +22 -0
- package/dist/locales/de/openhands.json +22 -0
- package/dist/locales/en/openhands.json +22 -0
- package/dist/locales/es/openhands.json +22 -0
- package/dist/locales/fr/openhands.json +22 -0
- package/dist/locales/it/openhands.json +22 -0
- package/dist/locales/ja/openhands.json +22 -0
- package/dist/locales/ko-KR/openhands.json +22 -0
- package/dist/locales/no/openhands.json +22 -0
- package/dist/locales/pt/openhands.json +22 -0
- package/dist/locales/tr/openhands.json +22 -0
- package/dist/locales/uk/openhands.json +22 -0
- package/dist/locales/zh-CN/openhands.json +22 -0
- package/dist/locales/zh-TW/openhands.json +22 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +10 -22
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +97 -69
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +3 -3
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -5
- package/dist/package.js.map +1 -1
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.cjs.map +1 -1
- package/dist/routes/files-tab.js +28 -17
- 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 +142 -85
- 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 +1 -1
- package/dist/services/canvas-ui.js +2 -2
- package/dist/services/canvas-ui.js.map +1 -1
- package/dist/stores/files-tab-store.cjs +1 -1
- package/dist/stores/files-tab-store.cjs.map +1 -1
- package/dist/stores/files-tab-store.d.ts +2 -1
- package/dist/stores/files-tab-store.js +5 -1
- package/dist/stores/files-tab-store.js.map +1 -1
- package/dist/stores/use-event-store.cjs +1 -1
- package/dist/stores/use-event-store.cjs.map +1 -1
- package/dist/stores/use-event-store.js +39 -34
- package/dist/stores/use-event-store.js.map +1 -1
- package/dist/types/mcp-server.d.ts +21 -0
- package/dist/ui/dropdown/dropdown.cjs +1 -1
- package/dist/ui/dropdown/dropdown.cjs.map +1 -1
- package/dist/ui/dropdown/dropdown.js +6 -2
- package/dist/ui/dropdown/dropdown.js.map +1 -1
- package/dist/utils/handle-event-for-ui.cjs +1 -1
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.d.ts +2 -0
- package/dist/utils/handle-event-for-ui.js +1 -1
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/llm-subscription-schema.cjs +2 -0
- package/dist/utils/llm-subscription-schema.cjs.map +1 -0
- package/dist/utils/llm-subscription-schema.d.ts +2 -0
- package/dist/utils/llm-subscription-schema.js +22 -0
- package/dist/utils/llm-subscription-schema.js.map +1 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.js +32 -17
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-credential-validation.cjs +2 -0
- package/dist/utils/mcp-credential-validation.cjs.map +1 -0
- package/dist/utils/mcp-credential-validation.d.ts +22 -0
- package/dist/utils/mcp-credential-validation.js +31 -0
- package/dist/utils/mcp-credential-validation.js.map +1 -0
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.d.ts +7 -2
- package/dist/utils/mcp-marketplace-utils.js +33 -48
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/sdk-settings-schema.cjs +1 -1
- package/dist/utils/sdk-settings-schema.cjs.map +1 -1
- package/dist/utils/sdk-settings-schema.js +64 -61
- package/dist/utils/sdk-settings-schema.js.map +1 -1
- package/dist/utils/websocket-url.cjs +1 -1
- package/dist/utils/websocket-url.cjs.map +1 -1
- package/dist/utils/websocket-url.js +2 -2
- package/dist/utils/websocket-url.js.map +1 -1
- package/package.json +3 -5
- package/scripts/check-sdk-version-sync.mjs +9 -27
- package/scripts/dev-with-automation.mjs +1 -3
- package/scripts/docker-build.mjs +0 -4
- package/scripts/run-staged-typecheck.mjs +44 -0
- package/build/assets/QueryClientProvider-XcSjsfpb.js +0 -1
- package/build/assets/Trans-sy4l4TyQ.js +0 -1
- package/build/assets/active-backend-context-CNF2lPkA.js +0 -1
- package/build/assets/add-backend-modal-BywVr6uq.js +0 -1
- package/build/assets/agent-server-adapter-k8veH-1O.js +0 -5
- package/build/assets/agent-server-client-options-B-C8JaTb.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CGbkhsLj.js +0 -1
- package/build/assets/api-key-entry-screen-Dnr5TcV0.js +0 -1
- package/build/assets/app-settings-Bgm2-yOM.js +0 -1
- package/build/assets/automation-detail-86M_yMqz.js +0 -1
- package/build/assets/automations-list-BWUILrqY.js +0 -1
- package/build/assets/backend-form-modal-Dl29wkF5.js +0 -1
- package/build/assets/browser-store-JRrcGdlk.js +0 -1
- package/build/assets/browser-wz8UzRmF.js +0 -5
- package/build/assets/chat-send-button-BhoO7T0s.js +0 -1
- package/build/assets/check-BhnsMsWy.js +0 -1
- package/build/assets/condenser-settings-DgQ0rsAf.js +0 -1
- package/build/assets/context-CI9FqkUp.js +0 -1
- package/build/assets/conversation-CayU5Lrr.js +0 -19
- package/build/assets/conversation-erinyBqT.js +0 -1
- package/build/assets/conversation-panel-DiI4q-8-.js +0 -1
- package/build/assets/conversation-service.api-shHWtFwu.js +0 -1
- package/build/assets/conversation-state-store-NEktJKfL.js +0 -1
- package/build/assets/declaration-D9ucT0fq.js +0 -1
- package/build/assets/dist-BCpEDEJq.js +0 -1
- package/build/assets/edit-automation-modal-8y9Uctxo.js +0 -1
- package/build/assets/entry.client-D_wtryHT.js +0 -2
- package/build/assets/files-tab-CxdtgkIe.js +0 -1
- package/build/assets/files-tab-store-DSKUhziI.js +0 -1
- package/build/assets/home-3joHMYSR.js +0 -1
- package/build/assets/index-redirect-BQ_55qN6.js +0 -1
- package/build/assets/install-server-modal-_7l1gcjd.js +0 -1
- package/build/assets/lesson-plan-CHGc-B8Y.js +0 -3
- package/build/assets/llm-not-configured-banner-BMGzpBPV.js +0 -27
- package/build/assets/llm-settings-BRotm_g6.js +0 -1
- package/build/assets/llm-settings-yDgbXP6Q.js +0 -1
- package/build/assets/loader-circle-1XB9nbwF.js +0 -1
- package/build/assets/manage-backends-modal-tfdzTXWU.js +0 -1
- package/build/assets/manifest-bbc1374e.js +0 -1
- package/build/assets/markdown-renderer-z446oW0Z.js +0 -2
- package/build/assets/mcp-Dopstf0t.js +0 -9
- package/build/assets/mcp-settings-redirect-l3Zbmc0F.js +0 -1
- package/build/assets/messages-CsFUrAen.js +0 -41
- package/build/assets/model-selector-sioC8xP4.js +0 -1
- package/build/assets/onboarding-CQh50i2z.js +0 -1
- package/build/assets/option-service.api-DjPvPAtd.js +0 -1
- package/build/assets/organization-service.api-BNc9Kn6n.js +0 -1
- package/build/assets/plus-DKUID4kd.js +0 -1
- package/build/assets/providers-BiWSYwRT.js +0 -1
- package/build/assets/proxy--Uy1iGsW.js +0 -1
- package/build/assets/query-client-config-Ca3tW1AH.js +0 -1
- package/build/assets/root-CRkz_h2T.css +0 -1
- package/build/assets/root-DrHpnAqU.js +0 -2
- package/build/assets/root-layout-Cf7FC9DC.js +0 -2
- package/build/assets/sdk-section-page-COlGKv4E.js +0 -1
- package/build/assets/sdk-settings-schema-Big50zDH.js +0 -1
- package/build/assets/secrets-settings-DYfTc5c8.js +0 -1
- package/build/assets/settings-DRmVFdOc.js +0 -1
- package/build/assets/settings-modal-CeRvS5Bc.js +0 -1
- package/build/assets/settings-service.api-CFt5HmXD.js +0 -1
- package/build/assets/shared-conversation-CBbpyPaD.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-SKcwsEtD.js +0 -1
- package/build/assets/suspense-Bqb0V0q1.js +0 -1
- package/build/assets/telemetry-DCFAqpIA.js +0 -2
- package/build/assets/use-acp-credential-form-LjCIhMSK.js +0 -1
- package/build/assets/use-agent-settings-schema-D8x5LJVS.js +0 -1
- package/build/assets/use-config-5zEjywCL.js +0 -1
- package/build/assets/use-create-conversation-pV2eA-e9.js +0 -1
- package/build/assets/use-handle-plan-click-CwN_nNib.js +0 -1
- package/build/assets/use-is-authed-B8eLO-Xq.js +0 -1
- package/build/assets/use-llm-profiles-CWLfWjav.js +0 -1
- package/build/assets/use-runtime-is-ready-Bbory9-s.js +0 -1
- package/build/assets/use-save-settings-Xp8DD-jf.js +0 -1
- package/build/assets/use-settings-0SeqaDeW.js +0 -1
- package/build/assets/useMutation-Dm84WAKR.js +0 -1
- package/build/assets/useQuery-DGRSm7IT.js +0 -1
- package/build/assets/useTranslation-CL6FTf1b.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfbjdnyv-C5ZIbuq8.js +0 -177
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~mcp~settings~settings-index~~m3acswdn-CGm-Jxp5.js +0 -48
- package/build/assets/x-CCfDppg5.js +0 -1
- package/dist/api/settings-service/legacy-app-preferences-migration.cjs +0 -2
- package/dist/api/settings-service/legacy-app-preferences-migration.cjs.map +0 -1
- package/dist/api/settings-service/legacy-app-preferences-migration.d.ts +0 -34
- package/dist/api/settings-service/legacy-app-preferences-migration.js +0 -52
- package/dist/api/settings-service/legacy-app-preferences-migration.js.map +0 -1
- package/dist/hooks/query/use-openhands-verified-models.cjs +0 -2
- package/dist/hooks/query/use-openhands-verified-models.cjs.map +0 -1
- package/dist/hooks/query/use-openhands-verified-models.d.ts +0 -1
- package/dist/hooks/query/use-openhands-verified-models.js +0 -14
- package/dist/hooks/query/use-openhands-verified-models.js.map +0 -1
- package/dist/utils/normalize-display-model.cjs +0 -2
- package/dist/utils/normalize-display-model.cjs.map +0 -1
- package/dist/utils/normalize-display-model.d.ts +0 -9
- package/dist/utils/normalize-display-model.js +0 -13
- package/dist/utils/normalize-display-model.js.map +0 -1
- package/dist/utils/openhands-llm.cjs +0 -2
- package/dist/utils/openhands-llm.cjs.map +0 -1
- package/dist/utils/openhands-llm.d.ts +0 -15
- package/dist/utils/openhands-llm.js +0 -15
- package/dist/utils/openhands-llm.js.map +0 -1
- /package/build/assets/{agent-server-ui-style-scope-BwIZYdC1.js → agent-server-ui-style-scope-1MuaCC1k.js} +0 -0
- /package/build/assets/{common-Dh7OqABE.js → common-DqjLSBOt.js} +0 -0
- /package/build/assets/{environment-switch-store-CiurvTtK.js → environment-switch-store-CBXkf5bS.js} +0 -0
- /package/build/assets/{extension-module-card-classes-DP5J6ngE.js → extension-module-card-classes-CVGfXtoL.js} +0 -0
- /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-DVFXF1_X.js} +0 -0
- /package/build/assets/{handle-capture-consent-CPMXU29K.js → handle-capture-consent-BTvatyfE.js} +0 -0
- /package/build/assets/{map-provider-BM2SJarp.js → map-provider-COgsZR9p.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-DSQKyRhw.js → objectWithoutPropertiesLoose-B80nTzVc.js} +0 -0
- /package/build/assets/{preload-helper-CT1Z6Pdu.js → preload-helper-D_sPnjeL.js} +0 -0
- /package/build/assets/{rolldown-runtime-BFRubm34.js → rolldown-runtime-wFmyQBCi.js} +0 -0
- /package/build/assets/{sdk-settings-field-metadata-p2GVlft7.js → sdk-settings-field-metadata-Cc4D-ut7.js} +0 -0
- /package/build/assets/{settings-wh2sLLJM.js → settings-1287uR2J.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nh19ovoo-DJTFnsA1.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~cg1m3bv7-aUIHudsf.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-BmZcy_kH.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-DPPGSgT1.js} +0 -0
package/dist/package.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`./_virtual/_rolldown/runtime.cjs`);var e={name:`@openhands/agent-canvas`,version:`1.0.0
|
|
1
|
+
require(`./_virtual/_rolldown/runtime.cjs`);var e={name:`@openhands/agent-canvas`,version:`1.0.0`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/agent-canvas`},homepage:`https://github.com/OpenHands/agent-canvas#readme`,bugs:{url:`https://github.com/OpenHands/agent-canvas/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.20`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.5.0`,"@openhands/typescript-client":`1.24.3`,"@react-router/node":`7.17.0`,"@react-router/serve":`7.17.0`,"@tailwindcss/vite":`4.2.4`,"@tanstack/react-query":`5.100.9`,"@types/shell-quote":`^1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.16.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,i18next:`26.0.8`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.0`,isbot:`5.1.39`,"lucide-react":`1.14.0`,"monaco-editor":`0.55.1`,"posthog-js":`1.372.6`,react:`19.2.5`,"react-dom":`19.2.5`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.6`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.17.0`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`^1.8.3`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.5.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.10`,winston:`^3.19.0`,"winston-daily-rotate-file":`^5.0.0`,zustand:`5.0.12`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:coverage":`npm run make-i18n && vitest run --coverage`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`node scripts/run-staged-typecheck.mjs`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.1`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.59.1`,"@react-router/dev":`7.17.0`,"@tailwindcss/typography":`0.5.19`,"@tanstack/eslint-plugin-query":`5.100.9`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`6.9.1`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`25.6.0`,"@types/react":`19.2.14`,"@types/react-dom":`19.2.3`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.59.2`,"@typescript-eslint/parser":`8.59.2`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.5`,"cross-env":`10.1.0`,eslint:`9.39.4`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.4`,"eslint-plugin-i18next":`6.1.4`,"eslint-plugin-import-x":`4.16.2`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.5`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`29.1.1`,"lint-staged":`16.4.0`,msw:`2.14.2`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.2.4`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.5`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{"@vercel/static-config":{ajv:`8.20.0`},dompurify:`3.4.7`},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.5`,"react-dom":`19.2.5`,"react-router":`7.17.0`}};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=package.cjs.map
|
package/dist/package.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0
|
|
1
|
+
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0\",\n \"description\": \"Agent Canvas UI for OpenHands - run AI coding agents with a visual interface\",\n \"license\": \"MIT\",\n \"private\": false,\n \"type\": \"module\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/OpenHands/agent-canvas\"\n },\n \"homepage\": \"https://github.com/OpenHands/agent-canvas#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/OpenHands/agent-canvas/issues\"\n },\n \"bin\": {\n \"agent-canvas\": \"bin/agent-canvas.mjs\"\n },\n \"engines\": {\n \"node\": \">=22.12.0\"\n },\n \"dependencies\": {\n \"@heroui/react\": \"2.8.10\",\n \"@microlink/react-json-view\": \"1.31.20\",\n \"@monaco-editor/react\": \"4.7.0\",\n \"@openhands/extensions\": \"0.5.0\",\n \"@openhands/typescript-client\": \"1.24.3\",\n \"@react-router/node\": \"7.17.0\",\n \"@react-router/serve\": \"7.17.0\",\n \"@tailwindcss/vite\": \"4.2.4\",\n \"@tanstack/react-query\": \"5.100.9\",\n \"@types/shell-quote\": \"^1.7.5\",\n \"@uidotdev/usehooks\": \"2.4.1\",\n \"@xterm/addon-fit\": \"0.11.0\",\n \"@xterm/xterm\": \"6.0.0\",\n \"axios\": \"1.16.0\",\n \"class-variance-authority\": \"0.7.1\",\n \"clsx\": \"2.1.1\",\n \"downshift\": \"9.3.2\",\n \"framer-motion\": \"12.38.0\",\n \"i18next\": \"26.0.8\",\n \"i18next-browser-languagedetector\": \"8.2.1\",\n \"i18next-http-backend\": \"4.0.0\",\n \"isbot\": \"5.1.39\",\n \"lucide-react\": \"1.14.0\",\n \"monaco-editor\": \"0.55.1\",\n \"posthog-js\": \"1.372.6\",\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-hot-toast\": \"2.6.0\",\n \"react-i18next\": \"17.0.6\",\n \"react-icons\": \"5.6.0\",\n \"react-markdown\": \"10.1.0\",\n \"react-router\": \"7.17.0\",\n \"react-syntax-highlighter\": \"16.1.1\",\n \"rehype-raw\": \"7.0.0\",\n \"rehype-sanitize\": \"6.0.0\",\n \"remark-breaks\": \"4.0.0\",\n \"remark-gfm\": \"4.0.1\",\n \"shell-quote\": \"^1.8.3\",\n \"sirv-cli\": \"3.0.1\",\n \"socket.io-client\": \"4.8.3\",\n \"tailwind-merge\": \"3.5.0\",\n \"tailwind-scrollbar\": \"4.0.2\",\n \"unist-util-visit\": \"5.1.0\",\n \"uuid\": \"14.0.0\",\n \"vite\": \"8.0.10\",\n \"winston\": \"^3.19.0\",\n \"winston-daily-rotate-file\": \"^5.0.0\",\n \"zustand\": \"5.0.12\"\n },\n \"scripts\": {\n \"dev\": \"node --env-file-if-exists=.env scripts/dev-with-automation.mjs\",\n \"dev:static\": \"node --env-file-if-exists=.env scripts/dev-static.mjs\",\n \"dev:extra-backend\": \"node --env-file-if-exists=.env scripts/dev-extra-backend.mjs\",\n \"dev:minimal\": \"node --env-file-if-exists=.env scripts/dev-safe.mjs\",\n \"dev:frontend\": \"npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev\",\n \"dev:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev\",\n \"build\": \"npm run build:app\",\n \"build:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router build\",\n \"start\": \"npx sirv-cli build/ --single\",\n \"test\": \"npm run make-i18n && vitest run\",\n \"test:e2e\": \"playwright test --pass-with-no-tests\",\n \"test:e2e:live\": \"node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs\",\n \"test:e2e:mock-llm\": \"playwright test --config=playwright.mock-llm.config.ts\",\n \"test:e2e:mock-llm:docker\": \"playwright test --config=playwright.mock-llm-docker.config.ts\",\n \"test:coverage\": \"npm run make-i18n && vitest run --coverage\",\n \"dev_wsl\": \"VITE_WATCH_USE_POLLING=true vite\",\n \"preview\": \"vite preview\",\n \"make-i18n\": \"node scripts/make-i18n-translations.cjs\",\n \"prelint\": \"npm run make-i18n\",\n \"lint\": \"npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}\",\n \"lint:fix\": \"eslint src --fix && prettier --write src/**/*.{ts,tsx}\",\n \"prepare\": \"husky\",\n \"typecheck\": \"react-router typegen && tsc\",\n \"typecheck:staged\": \"react-router typegen && npx tsc --noEmit --skipLibCheck\",\n \"check-translation-completeness\": \"node scripts/check-translation-completeness.cjs\",\n \"build:app\": \"npm run make-i18n && react-router build\",\n \"build:lib\": \"npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json\",\n \"build:docker\": \"node scripts/docker-build.mjs\"\n },\n \"lint-staged\": {\n \"src/**/*.{ts,tsx,js}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"src/**/*.{ts,tsx}\": [\n \"node scripts/run-staged-typecheck.mjs\"\n ],\n \"src/**/*\": [\n \"npm run check-translation-completeness\"\n ]\n },\n \"devDependencies\": {\n \"@eslint/eslintrc\": \"3.3.1\",\n \"@eslint/js\": \"9.39.4\",\n \"@mswjs/socket.io-binding\": \"0.2.0\",\n \"@playwright/test\": \"1.59.1\",\n \"@react-router/dev\": \"7.17.0\",\n \"@tailwindcss/typography\": \"0.5.19\",\n \"@tanstack/eslint-plugin-query\": \"5.100.9\",\n \"@testing-library/dom\": \"10.4.1\",\n \"@testing-library/jest-dom\": \"6.9.1\",\n \"@testing-library/react\": \"16.3.2\",\n \"@testing-library/user-event\": \"14.6.1\",\n \"@types/mdast\": \"4.0.4\",\n \"@types/node\": \"25.6.0\",\n \"@types/react\": \"19.2.14\",\n \"@types/react-dom\": \"19.2.3\",\n \"@types/react-syntax-highlighter\": \"15.5.13\",\n \"@typescript-eslint/eslint-plugin\": \"8.59.2\",\n \"@typescript-eslint/parser\": \"8.59.2\",\n \"@vercel/react-router\": \"1.3.0\",\n \"@vitest/coverage-v8\": \"4.1.5\",\n \"cross-env\": \"10.1.0\",\n \"eslint\": \"9.39.4\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-i18next\": \"6.1.4\",\n \"eslint-plugin-import-x\": \"4.16.2\",\n \"eslint-plugin-jsx-a11y\": \"6.10.2\",\n \"eslint-plugin-prettier\": \"5.5.5\",\n \"eslint-plugin-react\": \"7.37.5\",\n \"eslint-plugin-react-hooks\": \"7.1.1\",\n \"eslint-plugin-unused-imports\": \"4.4.1\",\n \"globals\": \"16.5.0\",\n \"husky\": \"9.1.7\",\n \"jsdom\": \"29.1.1\",\n \"lint-staged\": \"16.4.0\",\n \"msw\": \"2.14.2\",\n \"postcss-prefix-selector\": \"2.1.1\",\n \"prettier\": \"3.8.3\",\n \"tailwindcss\": \"4.2.4\",\n \"typescript\": \"6.0.3\",\n \"vite-plugin-svgr\": \"5.2.0\",\n \"vitest\": \"4.1.5\"\n },\n \"packageManager\": \"npm@10.5.0\",\n \"volta\": {\n \"node\": \"22.12.0\"\n },\n \"msw\": {\n \"workerDirectory\": [\n \"public\"\n ]\n },\n \"overrides\": {\n \"@vercel/static-config\": {\n \"ajv\": \"8.20.0\"\n },\n \"dompurify\": \"3.4.7\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\",\n \"bin\",\n \"build\",\n \"config\",\n \"scripts\",\n \"tools\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./browser\": {\n \"types\": \"./dist/components/browser/index.d.ts\",\n \"import\": \"./dist/components/browser/index.js\",\n \"require\": \"./dist/components/browser/index.cjs\"\n },\n \"./conversation\": {\n \"types\": \"./dist/components/conversation/index.d.ts\",\n \"import\": \"./dist/components/conversation/index.js\",\n \"require\": \"./dist/components/conversation/index.cjs\"\n },\n \"./files\": {\n \"types\": \"./dist/components/files/index.d.ts\",\n \"import\": \"./dist/components/files/index.js\",\n \"require\": \"./dist/components/files/index.cjs\"\n },\n \"./settings\": {\n \"types\": \"./dist/components/settings/index.d.ts\",\n \"import\": \"./dist/components/settings/index.js\",\n \"require\": \"./dist/components/settings/index.cjs\"\n },\n \"./sidebar\": {\n \"types\": \"./dist/components/sidebar/index.d.ts\",\n \"import\": \"./dist/components/sidebar/index.js\",\n \"require\": \"./dist/components/sidebar/index.cjs\"\n },\n \"./terminal\": {\n \"types\": \"./dist/components/terminal/index.d.ts\",\n \"import\": \"./dist/components/terminal/index.js\",\n \"require\": \"./dist/components/terminal/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./dist/i18n/index.d.ts\",\n \"import\": \"./dist/i18n/index.js\",\n \"require\": \"./dist/i18n/index.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"peerDependencies\": {\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-router\": \"7.17.0\"\n }\n}\n"],"mappings":""}
|
package/dist/package.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var e = {
|
|
2
2
|
name: "@openhands/agent-canvas",
|
|
3
|
-
version: "1.0.0
|
|
3
|
+
version: "1.0.0",
|
|
4
4
|
description: "Agent Canvas UI for OpenHands - run AI coding agents with a visual interface",
|
|
5
5
|
license: "MIT",
|
|
6
6
|
private: !1,
|
|
@@ -17,7 +17,7 @@ var e = {
|
|
|
17
17
|
"@heroui/react": "2.8.10",
|
|
18
18
|
"@microlink/react-json-view": "1.31.20",
|
|
19
19
|
"@monaco-editor/react": "4.7.0",
|
|
20
|
-
"@openhands/extensions": "0.
|
|
20
|
+
"@openhands/extensions": "0.5.0",
|
|
21
21
|
"@openhands/typescript-client": "1.24.3",
|
|
22
22
|
"@react-router/node": "7.17.0",
|
|
23
23
|
"@react-router/serve": "7.17.0",
|
|
@@ -78,8 +78,6 @@ var e = {
|
|
|
78
78
|
"test:e2e:live": "node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs",
|
|
79
79
|
"test:e2e:mock-llm": "playwright test --config=playwright.mock-llm.config.ts",
|
|
80
80
|
"test:e2e:mock-llm:docker": "playwright test --config=playwright.mock-llm-docker.config.ts",
|
|
81
|
-
"test:e2e:snapshots": "playwright test tests/e2e/snapshots --project=chromium --retries=0",
|
|
82
|
-
"test:e2e:snapshots:update": "playwright test tests/e2e/snapshots --project=chromium --update-snapshots",
|
|
83
81
|
"test:coverage": "npm run make-i18n && vitest run --coverage",
|
|
84
82
|
dev_wsl: "VITE_WATCH_USE_POLLING=true vite",
|
|
85
83
|
preview: "vite preview",
|
|
@@ -97,7 +95,7 @@ var e = {
|
|
|
97
95
|
},
|
|
98
96
|
"lint-staged": {
|
|
99
97
|
"src/**/*.{ts,tsx,js}": ["eslint --fix", "prettier --write"],
|
|
100
|
-
"src/**/*.{ts,tsx}": ["
|
|
98
|
+
"src/**/*.{ts,tsx}": ["node scripts/run-staged-typecheck.mjs"],
|
|
101
99
|
"src/**/*": ["npm run check-translation-completeness"]
|
|
102
100
|
},
|
|
103
101
|
devDependencies: {
|
package/dist/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@openhands/agent-canvas\",\n \"version\": \"1.0.0\",\n \"description\": \"Agent Canvas UI for OpenHands - run AI coding agents with a visual interface\",\n \"license\": \"MIT\",\n \"private\": false,\n \"type\": \"module\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/OpenHands/agent-canvas\"\n },\n \"homepage\": \"https://github.com/OpenHands/agent-canvas#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/OpenHands/agent-canvas/issues\"\n },\n \"bin\": {\n \"agent-canvas\": \"bin/agent-canvas.mjs\"\n },\n \"engines\": {\n \"node\": \">=22.12.0\"\n },\n \"dependencies\": {\n \"@heroui/react\": \"2.8.10\",\n \"@microlink/react-json-view\": \"1.31.20\",\n \"@monaco-editor/react\": \"4.7.0\",\n \"@openhands/extensions\": \"0.5.0\",\n \"@openhands/typescript-client\": \"1.24.3\",\n \"@react-router/node\": \"7.17.0\",\n \"@react-router/serve\": \"7.17.0\",\n \"@tailwindcss/vite\": \"4.2.4\",\n \"@tanstack/react-query\": \"5.100.9\",\n \"@types/shell-quote\": \"^1.7.5\",\n \"@uidotdev/usehooks\": \"2.4.1\",\n \"@xterm/addon-fit\": \"0.11.0\",\n \"@xterm/xterm\": \"6.0.0\",\n \"axios\": \"1.16.0\",\n \"class-variance-authority\": \"0.7.1\",\n \"clsx\": \"2.1.1\",\n \"downshift\": \"9.3.2\",\n \"framer-motion\": \"12.38.0\",\n \"i18next\": \"26.0.8\",\n \"i18next-browser-languagedetector\": \"8.2.1\",\n \"i18next-http-backend\": \"4.0.0\",\n \"isbot\": \"5.1.39\",\n \"lucide-react\": \"1.14.0\",\n \"monaco-editor\": \"0.55.1\",\n \"posthog-js\": \"1.372.6\",\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-hot-toast\": \"2.6.0\",\n \"react-i18next\": \"17.0.6\",\n \"react-icons\": \"5.6.0\",\n \"react-markdown\": \"10.1.0\",\n \"react-router\": \"7.17.0\",\n \"react-syntax-highlighter\": \"16.1.1\",\n \"rehype-raw\": \"7.0.0\",\n \"rehype-sanitize\": \"6.0.0\",\n \"remark-breaks\": \"4.0.0\",\n \"remark-gfm\": \"4.0.1\",\n \"shell-quote\": \"^1.8.3\",\n \"sirv-cli\": \"3.0.1\",\n \"socket.io-client\": \"4.8.3\",\n \"tailwind-merge\": \"3.5.0\",\n \"tailwind-scrollbar\": \"4.0.2\",\n \"unist-util-visit\": \"5.1.0\",\n \"uuid\": \"14.0.0\",\n \"vite\": \"8.0.10\",\n \"winston\": \"^3.19.0\",\n \"winston-daily-rotate-file\": \"^5.0.0\",\n \"zustand\": \"5.0.12\"\n },\n \"scripts\": {\n \"dev\": \"node --env-file-if-exists=.env scripts/dev-with-automation.mjs\",\n \"dev:static\": \"node --env-file-if-exists=.env scripts/dev-static.mjs\",\n \"dev:extra-backend\": \"node --env-file-if-exists=.env scripts/dev-extra-backend.mjs\",\n \"dev:minimal\": \"node --env-file-if-exists=.env scripts/dev-safe.mjs\",\n \"dev:frontend\": \"npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev\",\n \"dev:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev\",\n \"build\": \"npm run build:app\",\n \"build:mock\": \"npm run make-i18n && cross-env VITE_MOCK_API=true react-router build\",\n \"start\": \"npx sirv-cli build/ --single\",\n \"test\": \"npm run make-i18n && vitest run\",\n \"test:e2e\": \"playwright test --pass-with-no-tests\",\n \"test:e2e:live\": \"node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs\",\n \"test:e2e:mock-llm\": \"playwright test --config=playwright.mock-llm.config.ts\",\n \"test:e2e:mock-llm:docker\": \"playwright test --config=playwright.mock-llm-docker.config.ts\",\n \"test:coverage\": \"npm run make-i18n && vitest run --coverage\",\n \"dev_wsl\": \"VITE_WATCH_USE_POLLING=true vite\",\n \"preview\": \"vite preview\",\n \"make-i18n\": \"node scripts/make-i18n-translations.cjs\",\n \"prelint\": \"npm run make-i18n\",\n \"lint\": \"npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}\",\n \"lint:fix\": \"eslint src --fix && prettier --write src/**/*.{ts,tsx}\",\n \"prepare\": \"husky\",\n \"typecheck\": \"react-router typegen && tsc\",\n \"typecheck:staged\": \"react-router typegen && npx tsc --noEmit --skipLibCheck\",\n \"check-translation-completeness\": \"node scripts/check-translation-completeness.cjs\",\n \"build:app\": \"npm run make-i18n && react-router build\",\n \"build:lib\": \"npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true VITE_APP_ENV=production vite build && tsc -p tsconfig.lib.json\",\n \"build:docker\": \"node scripts/docker-build.mjs\"\n },\n \"lint-staged\": {\n \"src/**/*.{ts,tsx,js}\": [\n \"eslint --fix\",\n \"prettier --write\"\n ],\n \"src/**/*.{ts,tsx}\": [\n \"node scripts/run-staged-typecheck.mjs\"\n ],\n \"src/**/*\": [\n \"npm run check-translation-completeness\"\n ]\n },\n \"devDependencies\": {\n \"@eslint/eslintrc\": \"3.3.1\",\n \"@eslint/js\": \"9.39.4\",\n \"@mswjs/socket.io-binding\": \"0.2.0\",\n \"@playwright/test\": \"1.59.1\",\n \"@react-router/dev\": \"7.17.0\",\n \"@tailwindcss/typography\": \"0.5.19\",\n \"@tanstack/eslint-plugin-query\": \"5.100.9\",\n \"@testing-library/dom\": \"10.4.1\",\n \"@testing-library/jest-dom\": \"6.9.1\",\n \"@testing-library/react\": \"16.3.2\",\n \"@testing-library/user-event\": \"14.6.1\",\n \"@types/mdast\": \"4.0.4\",\n \"@types/node\": \"25.6.0\",\n \"@types/react\": \"19.2.14\",\n \"@types/react-dom\": \"19.2.3\",\n \"@types/react-syntax-highlighter\": \"15.5.13\",\n \"@typescript-eslint/eslint-plugin\": \"8.59.2\",\n \"@typescript-eslint/parser\": \"8.59.2\",\n \"@vercel/react-router\": \"1.3.0\",\n \"@vitest/coverage-v8\": \"4.1.5\",\n \"cross-env\": \"10.1.0\",\n \"eslint\": \"9.39.4\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-i18next\": \"6.1.4\",\n \"eslint-plugin-import-x\": \"4.16.2\",\n \"eslint-plugin-jsx-a11y\": \"6.10.2\",\n \"eslint-plugin-prettier\": \"5.5.5\",\n \"eslint-plugin-react\": \"7.37.5\",\n \"eslint-plugin-react-hooks\": \"7.1.1\",\n \"eslint-plugin-unused-imports\": \"4.4.1\",\n \"globals\": \"16.5.0\",\n \"husky\": \"9.1.7\",\n \"jsdom\": \"29.1.1\",\n \"lint-staged\": \"16.4.0\",\n \"msw\": \"2.14.2\",\n \"postcss-prefix-selector\": \"2.1.1\",\n \"prettier\": \"3.8.3\",\n \"tailwindcss\": \"4.2.4\",\n \"typescript\": \"6.0.3\",\n \"vite-plugin-svgr\": \"5.2.0\",\n \"vitest\": \"4.1.5\"\n },\n \"packageManager\": \"npm@10.5.0\",\n \"volta\": {\n \"node\": \"22.12.0\"\n },\n \"msw\": {\n \"workerDirectory\": [\n \"public\"\n ]\n },\n \"overrides\": {\n \"@vercel/static-config\": {\n \"ajv\": \"8.20.0\"\n },\n \"dompurify\": \"3.4.7\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\",\n \"bin\",\n \"build\",\n \"config\",\n \"scripts\",\n \"tools\"\n ],\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./browser\": {\n \"types\": \"./dist/components/browser/index.d.ts\",\n \"import\": \"./dist/components/browser/index.js\",\n \"require\": \"./dist/components/browser/index.cjs\"\n },\n \"./conversation\": {\n \"types\": \"./dist/components/conversation/index.d.ts\",\n \"import\": \"./dist/components/conversation/index.js\",\n \"require\": \"./dist/components/conversation/index.cjs\"\n },\n \"./files\": {\n \"types\": \"./dist/components/files/index.d.ts\",\n \"import\": \"./dist/components/files/index.js\",\n \"require\": \"./dist/components/files/index.cjs\"\n },\n \"./settings\": {\n \"types\": \"./dist/components/settings/index.d.ts\",\n \"import\": \"./dist/components/settings/index.js\",\n \"require\": \"./dist/components/settings/index.cjs\"\n },\n \"./sidebar\": {\n \"types\": \"./dist/components/sidebar/index.d.ts\",\n \"import\": \"./dist/components/sidebar/index.js\",\n \"require\": \"./dist/components/sidebar/index.cjs\"\n },\n \"./terminal\": {\n \"types\": \"./dist/components/terminal/index.d.ts\",\n \"import\": \"./dist/components/terminal/index.js\",\n \"require\": \"./dist/components/terminal/index.cjs\"\n },\n \"./i18n\": {\n \"types\": \"./dist/i18n/index.d.ts\",\n \"import\": \"./dist/i18n/index.js\",\n \"require\": \"./dist/i18n/index.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"peerDependencies\": {\n \"react\": \"19.2.5\",\n \"react-dom\": \"19.2.5\",\n \"react-router\": \"7.17.0\"\n }\n}\n"],"mappings":""}
|
|
@@ -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(`../hooks/use-conversation-id.cjs`),r=require(`../utils/conversation-local-storage.cjs`),i=require(`../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs`),a=require(`../stores/files-tab-store.cjs`),o=require(`../icons/link-external.cjs`),s=require(`../components/features/files-tab/no-file-selected-message.cjs`),c=require(`../hooks/query/use-workspace-files.cjs`),l=require(`../stores/use-workspace-mutation-counter.cjs`),u=require(`../hooks/query/use-workspace-file-content.cjs`),d=require(`../hooks/use-has-attached-source.cjs`),f=require(`../hooks/query/use-has-git-commits.cjs`),p=require(`../hooks/use-auto-refresh-files-on-edit.cjs`),m=require(`../hooks/query/use-unified-get-git-changes.cjs`),h=require(`../utils/file-priority.cjs`),g=require(`../components/features/files-tab/file-quick-row.cjs`),_=require(`../components/features/files-tab/file-tree-view.cjs`),v=require(`../components/features/files-tab/file-content-viewer.cjs`),y=require(`../components/features/files-tab/segmented-toggle.cjs`),b=require(`../icons/u-refresh.cjs`),x=require(`./changes-tab.cjs`);let S=require(`react`),C=require(`react/jsx-runtime`);function w(){let{t:w}=e.useTranslation(`openhands`);p.useAutoRefreshFilesOnEdit();let{hasAttachedSource:T,isLoading:E}=d.useHasAttachedSource(),{hasCommits:D}=f.useHasGitCommits({enabled:T}),{conversationId:O}=n.useOptionalConversationId(),{state:k,setFilesTabDiffView:A,setFilesTabContentViewMode:j}=r.useConversationLocalStorageState(O??``),M=(T||E)&&D!==!1,N=k.filesTabDiffView??M,P=k.filesTabContentViewMode,[F,I]=(0,S.useState)(!1),L=c.useWorkspaceFiles(),R=(0,S.useMemo)(()=>L.data??[],[L.data]),z=a.useFilesTabStore(e=>e.selectedPath),B=a.useFilesTabStore(e=>e.setSelectedPath),V=u.useWorkspaceFileContent(
|
|
1
|
+
require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../i18n/declaration.cjs`),n=require(`../hooks/use-conversation-id.cjs`),r=require(`../utils/conversation-local-storage.cjs`),i=require(`../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs`),a=require(`../stores/files-tab-store.cjs`),o=require(`../icons/link-external.cjs`),s=require(`../components/features/files-tab/no-file-selected-message.cjs`),c=require(`../hooks/query/use-workspace-files.cjs`),l=require(`../stores/use-workspace-mutation-counter.cjs`),u=require(`../hooks/query/use-workspace-file-content.cjs`),d=require(`../hooks/use-has-attached-source.cjs`),f=require(`../hooks/query/use-has-git-commits.cjs`),p=require(`../hooks/use-auto-refresh-files-on-edit.cjs`),m=require(`../hooks/query/use-unified-get-git-changes.cjs`),h=require(`../utils/file-priority.cjs`),g=require(`../components/features/files-tab/file-quick-row.cjs`),_=require(`../components/features/files-tab/file-tree-view.cjs`),v=require(`../components/features/files-tab/file-content-viewer.cjs`),y=require(`../components/features/files-tab/segmented-toggle.cjs`),b=require(`../icons/u-refresh.cjs`),x=require(`./changes-tab.cjs`);let S=require(`react`),C=require(`react/jsx-runtime`);function w(){let{t:w}=e.useTranslation(`openhands`);p.useAutoRefreshFilesOnEdit();let{hasAttachedSource:T,isLoading:E}=d.useHasAttachedSource(),{hasCommits:D}=f.useHasGitCommits({enabled:T}),{conversationId:O}=n.useOptionalConversationId(),{state:k,setFilesTabDiffView:A,setFilesTabContentViewMode:j}=r.useConversationLocalStorageState(O??``),M=(T||E)&&D!==!1,N=k.filesTabDiffView??M,P=k.filesTabContentViewMode,[F,I]=(0,S.useState)(!1),L=c.useWorkspaceFiles(),R=(0,S.useMemo)(()=>L.data??[],[L.data]),z=a.useFilesTabStore(e=>e.selectedPath),B=a.useFilesTabStore(e=>e.selectedConversationId),V=a.useFilesTabStore(e=>e.setSelectedPath),H=B===O?z:null,U=(0,S.useCallback)(e=>V(e,O),[O,V]),W=u.useWorkspaceFileContent(H),G=l.useWorkspaceMutationCounter(e=>e.count),K=l.withWorkspaceCacheBuster(W.data?.staticUrl??null,G);(0,S.useEffect)(()=>{B!==O&&V(null,O)},[B,O,V]),(0,S.useEffect)(()=>{if(H||R.length===0)return;let[e]=h.sortFilesByPriority(R);e&&V(e,O)},[R,H,O,V]);let q=i.useQueryClient(),{refetch:J,isFetching:Y}=m.useUnifiedGetGitChanges();return(0,C.jsxs)(`main`,{className:`h-full w-full flex flex-col items-stretch`,"data-testid":`files-tab`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]`,children:[(0,C.jsx)(y.SegmentedToggle,{ariaLabel:w(t.I18nKey.FILES$DIFF_VIEW),testId:`files-tab-diff-toggle`,value:N?`on`:`off`,options:[{value:`on`,label:w(t.I18nKey.FILES$DIFF_VIEW)},{value:`off`,label:w(t.I18nKey.COMMON$FILES)}],onChange:e=>A(e===`on`)}),!N&&(0,C.jsx)(y.SegmentedToggle,{ariaLabel:w(t.I18nKey.FILES$RICH),testId:`files-tab-content-mode-toggle`,value:P,options:[{value:`rich`,label:w(t.I18nKey.FILES$RICH)},{value:`plain`,label:w(t.I18nKey.FILES$PLAIN)}],onChange:j}),(0,C.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[!N&&K&&(0,C.jsx)(`a`,{href:K,target:`_blank`,rel:`noopener noreferrer`,"aria-label":w(t.I18nKey.FILES$OPEN_IN_NEW_WINDOW),title:w(t.I18nKey.FILES$OPEN_IN_NEW_WINDOW),"data-testid":`files-tab-open-in-new-window`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white`,children:(0,C.jsx)(o.default,{width:14,height:14})}),(0,C.jsx)(`button`,{type:`button`,onClick:()=>{J(),q.invalidateQueries({queryKey:[`workspace-files`]}),q.invalidateQueries({queryKey:[`workspace-file-content`]})},disabled:Y,"aria-label":w(t.I18nKey.FILES$REFRESH),title:w(t.I18nKey.FILES$REFRESH),"data-testid":`files-tab-refresh`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,C.jsx)(b.default,{width:12.75,height:15,color:`#ffffff`,className:Y?`animate-spin`:``})})]})]}),N?(0,C.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,C.jsx)(x.default,{})}):(0,C.jsx)(`div`,{className:`flex flex-1 flex-col min-h-0`,children:L.isLoading?(0,C.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]`,children:w(t.I18nKey.FILES$LOADING_FILES)}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(g.FileQuickRow,{paths:R,selectedPath:H,onSelectFile:U,isTreeVisible:F,onToggleTree:()=>I(e=>!e)}),(0,C.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1`,children:[F&&(0,C.jsx)(`aside`,{className:`w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always`,"data-testid":`files-tab-tree`,children:(0,C.jsx)(_.FileTreeView,{paths:R,selectedPath:H,onSelectFile:U})}),(0,C.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,"data-testid":`files-tab-content`,children:H?(0,C.jsx)(v.FileContentViewer,{path:H,viewMode:P}):(0,C.jsx)(s.NoFileSelectedMessage,{})})]})]})})]})}exports.default=w;
|
|
2
2
|
//# sourceMappingURL=files-tab.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files-tab.cjs","names":[],"sources":["../../src/routes/files-tab.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useQueryClient } from \"@tanstack/react-query\";\n\nimport { NoFileSelectedMessage } from \"#/components/features/files-tab/no-file-selected-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useFilesTabStore } from \"#/stores/files-tab-store\";\nimport { useWorkspaceFiles } from \"#/hooks/query/use-workspace-files\";\nimport { useWorkspaceFileContent } from \"#/hooks/query/use-workspace-file-content\";\nimport { useHasAttachedSource } from \"#/hooks/use-has-attached-source\";\nimport { useHasGitCommits } from \"#/hooks/query/use-has-git-commits\";\nimport { useAutoRefreshFilesOnEdit } from \"#/hooks/use-auto-refresh-files-on-edit\";\nimport { useUnifiedGetGitChanges } from \"#/hooks/query/use-unified-get-git-changes\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useConversationLocalStorageState } from \"#/utils/conversation-local-storage\";\nimport {\n useWorkspaceMutationCounter,\n withWorkspaceCacheBuster,\n} from \"#/stores/use-workspace-mutation-counter\";\nimport { sortFilesByPriority } from \"#/utils/file-priority\";\nimport { FileQuickRow } from \"#/components/features/files-tab/file-quick-row\";\nimport { FileTreeView } from \"#/components/features/files-tab/file-tree-view\";\nimport { FileContentViewer } from \"#/components/features/files-tab/file-content-viewer\";\nimport { SegmentedToggle } from \"#/components/features/files-tab/segmented-toggle\";\nimport type { ViewMode } from \"#/components/features/files-tab/view-mode\";\nimport RefreshIcon from \"#/icons/u-refresh.svg?react\";\nimport LinkExternalIcon from \"#/icons/link-external.svg?react\";\nimport GitChanges from \"./changes-tab\";\n\nfunction FilesTab() {\n const { t } = useTranslation(\"openhands\");\n\n // Keep the list / content / diff caches fresh as the agent writes files.\n useAutoRefreshFilesOnEdit();\n\n const { hasAttachedSource, isLoading: isAttachedSourceLoading } =\n useHasAttachedSource();\n // A workspace with zero commits has no diff base to compare against, so\n // the diff view would just be empty / misleading. Only probe when we\n // already believe the user attached a source — saves a workspace round\n // trip on every plain (no-attachment) conversation.\n const { hasCommits } = useHasGitCommits({ enabled: hasAttachedSource });\n\n // Diff view defaults to ON when the user attached a source (repo or\n // local workspace) *and* there's at least one commit, OFF otherwise\n // (no attachment, or attachment with no commits yet).\n //\n // While the attachment / commit probes are still resolving we stay\n // optimistic — most attached conversations live in a real repo, so\n // defaulting to diff during the brief loading window avoids a\n // \"files → diff\" flash on initial load. We only flip to files-view\n // once `hasAttachedSource` *or* `hasCommits` definitively resolves\n // false. The user's persisted choice always wins.\n const { conversationId } = useOptionalConversationId();\n const {\n state: persistedState,\n setFilesTabDiffView,\n setFilesTabContentViewMode,\n } = useConversationLocalStorageState(conversationId ?? \"\");\n\n const diffViewDefault =\n (hasAttachedSource || isAttachedSourceLoading) && hasCommits !== false;\n const diffViewEnabled = persistedState.filesTabDiffView ?? diffViewDefault;\n const contentViewMode = persistedState.filesTabContentViewMode;\n\n // Collapsed by default — the quick-access pill row at the top is usually\n // enough; the user can expand the tree on demand.\n const [isTreeVisible, setIsTreeVisible] = useState(false);\n\n const filesQuery = useWorkspaceFiles();\n const paths = useMemo(() => filesQuery.data ?? [], [filesQuery.data]);\n\n const selectedPath = useFilesTabStore((s) => s.selectedPath);\n const setSelectedPath = useFilesTabStore((s) => s.setSelectedPath);\n\n // Pre-fetch the selected file's content here too so the toolbar's\n // \"open in new window\" link can reach for its `staticUrl`. react-query\n // dedupes against `FileContentViewer`'s identical call, so this costs\n // nothing extra.\n const selectedFileContent = useWorkspaceFileContent(selectedPath);\n const mutationCounter = useWorkspaceMutationCounter((state) => state.count);\n const selectedFileStaticUrl = withWorkspaceCacheBuster(\n selectedFileContent.data?.staticUrl ?? null,\n mutationCounter,\n );\n\n // Auto-select the highest-priority file the first time we load the list,\n // so users see something useful immediately.\n useEffect(() => {\n if (selectedPath || paths.length === 0) return;\n const [first] = sortFilesByPriority(paths);\n if (first) setSelectedPath(first);\n }, [paths, selectedPath]);\n\n // Refresh button: covers the diff view (git changes) and the file viewer\n // (workspace listing + cached file contents). Lives in this toolbar — not\n // in the outer ConversationTabs bar — so it sits with the other\n // files-tab-local controls.\n const queryClient = useQueryClient();\n const { refetch: refetchGitChanges, isFetching: isFetchingGitChanges } =\n useUnifiedGetGitChanges();\n const refreshFiles = () => {\n refetchGitChanges();\n queryClient.invalidateQueries({ queryKey: [\"workspace-files\"] });\n queryClient.invalidateQueries({ queryKey: [\"workspace-file-content\"] });\n };\n\n return (\n <main\n className=\"h-full w-full flex flex-col items-stretch\"\n data-testid=\"files-tab\"\n >\n {/* Top toolbar: diff/files + rich/plain toggles (left-aligned) plus\n the refresh button on the right. */}\n <div className=\"flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]\">\n <SegmentedToggle<\"on\" | \"off\">\n ariaLabel={t(I18nKey.FILES$DIFF_VIEW)}\n testId=\"files-tab-diff-toggle\"\n value={diffViewEnabled ? \"on\" : \"off\"}\n options={[\n { value: \"on\", label: t(I18nKey.FILES$DIFF_VIEW) },\n { value: \"off\", label: t(I18nKey.COMMON$FILES) },\n ]}\n onChange={(value) => setFilesTabDiffView(value === \"on\")}\n />\n\n {!diffViewEnabled && (\n <SegmentedToggle<ViewMode>\n ariaLabel={t(I18nKey.FILES$RICH)}\n testId=\"files-tab-content-mode-toggle\"\n value={contentViewMode}\n options={[\n { value: \"rich\", label: t(I18nKey.FILES$RICH) },\n { value: \"plain\", label: t(I18nKey.FILES$PLAIN) },\n ]}\n onChange={setFilesTabContentViewMode}\n />\n )}\n\n <div className=\"ml-auto flex items-center gap-1\">\n {/* Open the currently-selected file in a new browser tab. Only\n meaningful while we're showing a file (not the diff view) and\n we've resolved its staticUrl from the workspace fileserver. */}\n {!diffViewEnabled && selectedFileStaticUrl && (\n <a\n href={selectedFileStaticUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n title={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n data-testid=\"files-tab-open-in-new-window\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white\"\n >\n <LinkExternalIcon width={14} height={14} />\n </a>\n )}\n <button\n type=\"button\"\n onClick={refreshFiles}\n disabled={isFetchingGitChanges}\n aria-label={t(I18nKey.FILES$REFRESH)}\n title={t(I18nKey.FILES$REFRESH)}\n data-testid=\"files-tab-refresh\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <RefreshIcon\n width={12.75}\n height={15}\n color=\"#ffffff\"\n className={isFetchingGitChanges ? \"animate-spin\" : \"\"}\n />\n </button>\n </div>\n </div>\n\n {diffViewEnabled ? (\n <div className=\"flex-1 min-h-0\">\n <GitChanges />\n </div>\n ) : (\n <div className=\"flex flex-1 flex-col min-h-0\">\n {filesQuery.isLoading ? (\n <div className=\"flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]\">\n {t(I18nKey.FILES$LOADING_FILES)}\n </div>\n ) : (\n <>\n <FileQuickRow\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={setSelectedPath}\n isTreeVisible={isTreeVisible}\n onToggleTree={() => setIsTreeVisible((prev) => !prev)}\n />\n <div className=\"flex h-full min-h-0 flex-1\">\n {isTreeVisible && (\n <aside\n className=\"w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always\"\n data-testid=\"files-tab-tree\"\n >\n <FileTreeView\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={setSelectedPath}\n />\n </aside>\n )}\n <section\n className=\"flex h-full min-h-0 min-w-0 flex-1 flex-col\"\n data-testid=\"files-tab-content\"\n >\n {selectedPath ? (\n <FileContentViewer\n path={selectedPath}\n viewMode={contentViewMode}\n />\n ) : (\n <NoFileSelectedMessage />\n )}\n </section>\n </div>\n </>\n )}\n </div>\n )}\n </main>\n );\n}\n\nexport default FilesTab;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"files-tab.cjs","names":[],"sources":["../../src/routes/files-tab.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useQueryClient } from \"@tanstack/react-query\";\n\nimport { NoFileSelectedMessage } from \"#/components/features/files-tab/no-file-selected-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useFilesTabStore } from \"#/stores/files-tab-store\";\nimport { useWorkspaceFiles } from \"#/hooks/query/use-workspace-files\";\nimport { useWorkspaceFileContent } from \"#/hooks/query/use-workspace-file-content\";\nimport { useHasAttachedSource } from \"#/hooks/use-has-attached-source\";\nimport { useHasGitCommits } from \"#/hooks/query/use-has-git-commits\";\nimport { useAutoRefreshFilesOnEdit } from \"#/hooks/use-auto-refresh-files-on-edit\";\nimport { useUnifiedGetGitChanges } from \"#/hooks/query/use-unified-get-git-changes\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useConversationLocalStorageState } from \"#/utils/conversation-local-storage\";\nimport {\n useWorkspaceMutationCounter,\n withWorkspaceCacheBuster,\n} from \"#/stores/use-workspace-mutation-counter\";\nimport { sortFilesByPriority } from \"#/utils/file-priority\";\nimport { FileQuickRow } from \"#/components/features/files-tab/file-quick-row\";\nimport { FileTreeView } from \"#/components/features/files-tab/file-tree-view\";\nimport { FileContentViewer } from \"#/components/features/files-tab/file-content-viewer\";\nimport { SegmentedToggle } from \"#/components/features/files-tab/segmented-toggle\";\nimport type { ViewMode } from \"#/components/features/files-tab/view-mode\";\nimport RefreshIcon from \"#/icons/u-refresh.svg?react\";\nimport LinkExternalIcon from \"#/icons/link-external.svg?react\";\nimport GitChanges from \"./changes-tab\";\n\nfunction FilesTab() {\n const { t } = useTranslation(\"openhands\");\n\n // Keep the list / content / diff caches fresh as the agent writes files.\n useAutoRefreshFilesOnEdit();\n\n const { hasAttachedSource, isLoading: isAttachedSourceLoading } =\n useHasAttachedSource();\n // A workspace with zero commits has no diff base to compare against, so\n // the diff view would just be empty / misleading. Only probe when we\n // already believe the user attached a source — saves a workspace round\n // trip on every plain (no-attachment) conversation.\n const { hasCommits } = useHasGitCommits({ enabled: hasAttachedSource });\n\n // Diff view defaults to ON when the user attached a source (repo or\n // local workspace) *and* there's at least one commit, OFF otherwise\n // (no attachment, or attachment with no commits yet).\n //\n // While the attachment / commit probes are still resolving we stay\n // optimistic — most attached conversations live in a real repo, so\n // defaulting to diff during the brief loading window avoids a\n // \"files → diff\" flash on initial load. We only flip to files-view\n // once `hasAttachedSource` *or* `hasCommits` definitively resolves\n // false. The user's persisted choice always wins.\n const { conversationId } = useOptionalConversationId();\n const {\n state: persistedState,\n setFilesTabDiffView,\n setFilesTabContentViewMode,\n } = useConversationLocalStorageState(conversationId ?? \"\");\n\n const diffViewDefault =\n (hasAttachedSource || isAttachedSourceLoading) && hasCommits !== false;\n const diffViewEnabled = persistedState.filesTabDiffView ?? diffViewDefault;\n const contentViewMode = persistedState.filesTabContentViewMode;\n\n // Collapsed by default — the quick-access pill row at the top is usually\n // enough; the user can expand the tree on demand.\n const [isTreeVisible, setIsTreeVisible] = useState(false);\n\n const filesQuery = useWorkspaceFiles();\n const paths = useMemo(() => filesQuery.data ?? [], [filesQuery.data]);\n\n const storedSelectedPath = useFilesTabStore((s) => s.selectedPath);\n const selectedConversationId = useFilesTabStore(\n (s) => s.selectedConversationId,\n );\n const setSelectedPath = useFilesTabStore((s) => s.setSelectedPath);\n\n // A selection is scoped to the conversation it was made in. Ignore a path\n // that belongs to a different conversation so we never try to open a file\n // that only exists in the previous conversation's workspace (issue #1350).\n // The auto-select effect below then picks this conversation's top file.\n const selectedPath =\n selectedConversationId === conversationId ? storedSelectedPath : null;\n\n // Tag every selection with the active conversation so it can't leak into\n // the next one. FileQuickRow / FileTreeView call this with just the path.\n const handleSelectFile = useCallback(\n (path: string) => setSelectedPath(path, conversationId),\n [conversationId, setSelectedPath],\n );\n\n // Pre-fetch the selected file's content here too so the toolbar's\n // \"open in new window\" link can reach for its `staticUrl`. react-query\n // dedupes against `FileContentViewer`'s identical call, so this costs\n // nothing extra.\n const selectedFileContent = useWorkspaceFileContent(selectedPath);\n const mutationCounter = useWorkspaceMutationCounter((state) => state.count);\n const selectedFileStaticUrl = withWorkspaceCacheBuster(\n selectedFileContent.data?.staticUrl ?? null,\n mutationCounter,\n );\n\n useEffect(() => {\n if (selectedConversationId === conversationId) return;\n setSelectedPath(null, conversationId);\n }, [selectedConversationId, conversationId, setSelectedPath]);\n\n // Auto-select the highest-priority file the first time we load the list,\n // so users see something useful immediately.\n useEffect(() => {\n if (selectedPath || paths.length === 0) return;\n const [first] = sortFilesByPriority(paths);\n if (first) setSelectedPath(first, conversationId);\n }, [paths, selectedPath, conversationId, setSelectedPath]);\n\n // Refresh button: covers the diff view (git changes) and the file viewer\n // (workspace listing + cached file contents). Lives in this toolbar — not\n // in the outer ConversationTabs bar — so it sits with the other\n // files-tab-local controls.\n const queryClient = useQueryClient();\n const { refetch: refetchGitChanges, isFetching: isFetchingGitChanges } =\n useUnifiedGetGitChanges();\n const refreshFiles = () => {\n refetchGitChanges();\n queryClient.invalidateQueries({ queryKey: [\"workspace-files\"] });\n queryClient.invalidateQueries({ queryKey: [\"workspace-file-content\"] });\n };\n\n return (\n <main\n className=\"h-full w-full flex flex-col items-stretch\"\n data-testid=\"files-tab\"\n >\n {/* Top toolbar: diff/files + rich/plain toggles (left-aligned) plus\n the refresh button on the right. */}\n <div className=\"flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]\">\n <SegmentedToggle<\"on\" | \"off\">\n ariaLabel={t(I18nKey.FILES$DIFF_VIEW)}\n testId=\"files-tab-diff-toggle\"\n value={diffViewEnabled ? \"on\" : \"off\"}\n options={[\n { value: \"on\", label: t(I18nKey.FILES$DIFF_VIEW) },\n { value: \"off\", label: t(I18nKey.COMMON$FILES) },\n ]}\n onChange={(value) => setFilesTabDiffView(value === \"on\")}\n />\n\n {!diffViewEnabled && (\n <SegmentedToggle<ViewMode>\n ariaLabel={t(I18nKey.FILES$RICH)}\n testId=\"files-tab-content-mode-toggle\"\n value={contentViewMode}\n options={[\n { value: \"rich\", label: t(I18nKey.FILES$RICH) },\n { value: \"plain\", label: t(I18nKey.FILES$PLAIN) },\n ]}\n onChange={setFilesTabContentViewMode}\n />\n )}\n\n <div className=\"ml-auto flex items-center gap-1\">\n {/* Open the currently-selected file in a new browser tab. Only\n meaningful while we're showing a file (not the diff view) and\n we've resolved its staticUrl from the workspace fileserver. */}\n {!diffViewEnabled && selectedFileStaticUrl && (\n <a\n href={selectedFileStaticUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n title={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n data-testid=\"files-tab-open-in-new-window\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white\"\n >\n <LinkExternalIcon width={14} height={14} />\n </a>\n )}\n <button\n type=\"button\"\n onClick={refreshFiles}\n disabled={isFetchingGitChanges}\n aria-label={t(I18nKey.FILES$REFRESH)}\n title={t(I18nKey.FILES$REFRESH)}\n data-testid=\"files-tab-refresh\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <RefreshIcon\n width={12.75}\n height={15}\n color=\"#ffffff\"\n className={isFetchingGitChanges ? \"animate-spin\" : \"\"}\n />\n </button>\n </div>\n </div>\n\n {diffViewEnabled ? (\n <div className=\"flex-1 min-h-0\">\n <GitChanges />\n </div>\n ) : (\n <div className=\"flex flex-1 flex-col min-h-0\">\n {filesQuery.isLoading ? (\n <div className=\"flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]\">\n {t(I18nKey.FILES$LOADING_FILES)}\n </div>\n ) : (\n <>\n <FileQuickRow\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={handleSelectFile}\n isTreeVisible={isTreeVisible}\n onToggleTree={() => setIsTreeVisible((prev) => !prev)}\n />\n <div className=\"flex h-full min-h-0 flex-1\">\n {isTreeVisible && (\n <aside\n className=\"w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always\"\n data-testid=\"files-tab-tree\"\n >\n <FileTreeView\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={handleSelectFile}\n />\n </aside>\n )}\n <section\n className=\"flex h-full min-h-0 min-w-0 flex-1 flex-col\"\n data-testid=\"files-tab-content\"\n >\n {selectedPath ? (\n <FileContentViewer\n path={selectedPath}\n viewMode={contentViewMode}\n />\n ) : (\n <NoFileSelectedMessage />\n )}\n </section>\n </div>\n </>\n )}\n </div>\n )}\n </main>\n );\n}\n\nexport default FilesTab;\n"],"mappings":"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"}
|
package/dist/routes/files-tab.js
CHANGED
|
@@ -20,19 +20,30 @@ import { FileContentViewer as y } from "../components/features/files-tab/file-co
|
|
|
20
20
|
import { SegmentedToggle as b } from "../components/features/files-tab/segmented-toggle.js";
|
|
21
21
|
import x from "../icons/u-refresh.js";
|
|
22
22
|
import S from "./changes-tab.js";
|
|
23
|
-
import { useEffect as C, useMemo as w, useState as T } from "react";
|
|
23
|
+
import { useCallback as ee, useEffect as C, useMemo as w, useState as T } from "react";
|
|
24
24
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
25
25
|
//#region src/routes/files-tab.tsx
|
|
26
26
|
function k() {
|
|
27
27
|
let { t: k } = e("openhands");
|
|
28
28
|
m();
|
|
29
|
-
let { hasAttachedSource: A, isLoading: j } = f(), { hasCommits: M } = p({ enabled: A }), { conversationId: N } = n(), { state: P, setFilesTabDiffView: F, setFilesTabContentViewMode: I } = r(N ?? ""), L = (A || j) && M !== !1, R = P.filesTabDiffView ?? L, z = P.filesTabContentViewMode, [B, V] = T(!1), H = c(), U = w(() => H.data ?? [], [H.data]), W = a((e) => e.selectedPath), G = a((e) => e.
|
|
29
|
+
let { hasAttachedSource: A, isLoading: j } = f(), { hasCommits: M } = p({ enabled: A }), { conversationId: N } = n(), { state: P, setFilesTabDiffView: F, setFilesTabContentViewMode: I } = r(N ?? ""), L = (A || j) && M !== !1, R = P.filesTabDiffView ?? L, z = P.filesTabContentViewMode, [B, V] = T(!1), H = c(), U = w(() => H.data ?? [], [H.data]), W = a((e) => e.selectedPath), G = a((e) => e.selectedConversationId), K = a((e) => e.setSelectedPath), q = G === N ? W : null, J = ee((e) => K(e, N), [N, K]), Y = d(q), X = l((e) => e.count), Z = u(Y.data?.staticUrl ?? null, X);
|
|
30
30
|
C(() => {
|
|
31
|
-
|
|
31
|
+
G !== N && K(null, N);
|
|
32
|
+
}, [
|
|
33
|
+
G,
|
|
34
|
+
N,
|
|
35
|
+
K
|
|
36
|
+
]), C(() => {
|
|
37
|
+
if (q || U.length === 0) return;
|
|
32
38
|
let [e] = g(U);
|
|
33
|
-
e &&
|
|
34
|
-
}, [
|
|
35
|
-
|
|
39
|
+
e && K(e, N);
|
|
40
|
+
}, [
|
|
41
|
+
U,
|
|
42
|
+
q,
|
|
43
|
+
N,
|
|
44
|
+
K
|
|
45
|
+
]);
|
|
46
|
+
let Q = i(), { refetch: te, isFetching: $ } = h();
|
|
36
47
|
return /* @__PURE__ */ O("main", {
|
|
37
48
|
className: "h-full w-full flex flex-col items-stretch",
|
|
38
49
|
"data-testid": "files-tab",
|
|
@@ -67,8 +78,8 @@ function k() {
|
|
|
67
78
|
}),
|
|
68
79
|
/* @__PURE__ */ O("div", {
|
|
69
80
|
className: "ml-auto flex items-center gap-1",
|
|
70
|
-
children: [!R &&
|
|
71
|
-
href:
|
|
81
|
+
children: [!R && Z && /* @__PURE__ */ D("a", {
|
|
82
|
+
href: Z,
|
|
72
83
|
target: "_blank",
|
|
73
84
|
rel: "noopener noreferrer",
|
|
74
85
|
"aria-label": k(t.FILES$OPEN_IN_NEW_WINDOW),
|
|
@@ -82,9 +93,9 @@ function k() {
|
|
|
82
93
|
}), /* @__PURE__ */ D("button", {
|
|
83
94
|
type: "button",
|
|
84
95
|
onClick: () => {
|
|
85
|
-
|
|
96
|
+
te(), Q.invalidateQueries({ queryKey: ["workspace-files"] }), Q.invalidateQueries({ queryKey: ["workspace-file-content"] });
|
|
86
97
|
},
|
|
87
|
-
disabled:
|
|
98
|
+
disabled: $,
|
|
88
99
|
"aria-label": k(t.FILES$REFRESH),
|
|
89
100
|
title: k(t.FILES$REFRESH),
|
|
90
101
|
"data-testid": "files-tab-refresh",
|
|
@@ -93,7 +104,7 @@ function k() {
|
|
|
93
104
|
width: 12.75,
|
|
94
105
|
height: 15,
|
|
95
106
|
color: "#ffffff",
|
|
96
|
-
className:
|
|
107
|
+
className: $ ? "animate-spin" : ""
|
|
97
108
|
})
|
|
98
109
|
})]
|
|
99
110
|
})
|
|
@@ -108,8 +119,8 @@ function k() {
|
|
|
108
119
|
children: k(t.FILES$LOADING_FILES)
|
|
109
120
|
}) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(_, {
|
|
110
121
|
paths: U,
|
|
111
|
-
selectedPath:
|
|
112
|
-
onSelectFile:
|
|
122
|
+
selectedPath: q,
|
|
123
|
+
onSelectFile: J,
|
|
113
124
|
isTreeVisible: B,
|
|
114
125
|
onToggleTree: () => V((e) => !e)
|
|
115
126
|
}), /* @__PURE__ */ O("div", {
|
|
@@ -119,14 +130,14 @@ function k() {
|
|
|
119
130
|
"data-testid": "files-tab-tree",
|
|
120
131
|
children: /* @__PURE__ */ D(v, {
|
|
121
132
|
paths: U,
|
|
122
|
-
selectedPath:
|
|
123
|
-
onSelectFile:
|
|
133
|
+
selectedPath: q,
|
|
134
|
+
onSelectFile: J
|
|
124
135
|
})
|
|
125
136
|
}), /* @__PURE__ */ D("section", {
|
|
126
137
|
className: "flex h-full min-h-0 min-w-0 flex-1 flex-col",
|
|
127
138
|
"data-testid": "files-tab-content",
|
|
128
|
-
children:
|
|
129
|
-
path:
|
|
139
|
+
children: q ? /* @__PURE__ */ D(y, {
|
|
140
|
+
path: q,
|
|
130
141
|
viewMode: z
|
|
131
142
|
}) : /* @__PURE__ */ D(s, {})
|
|
132
143
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files-tab.js","names":[],"sources":["../../src/routes/files-tab.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useQueryClient } from \"@tanstack/react-query\";\n\nimport { NoFileSelectedMessage } from \"#/components/features/files-tab/no-file-selected-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useFilesTabStore } from \"#/stores/files-tab-store\";\nimport { useWorkspaceFiles } from \"#/hooks/query/use-workspace-files\";\nimport { useWorkspaceFileContent } from \"#/hooks/query/use-workspace-file-content\";\nimport { useHasAttachedSource } from \"#/hooks/use-has-attached-source\";\nimport { useHasGitCommits } from \"#/hooks/query/use-has-git-commits\";\nimport { useAutoRefreshFilesOnEdit } from \"#/hooks/use-auto-refresh-files-on-edit\";\nimport { useUnifiedGetGitChanges } from \"#/hooks/query/use-unified-get-git-changes\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useConversationLocalStorageState } from \"#/utils/conversation-local-storage\";\nimport {\n useWorkspaceMutationCounter,\n withWorkspaceCacheBuster,\n} from \"#/stores/use-workspace-mutation-counter\";\nimport { sortFilesByPriority } from \"#/utils/file-priority\";\nimport { FileQuickRow } from \"#/components/features/files-tab/file-quick-row\";\nimport { FileTreeView } from \"#/components/features/files-tab/file-tree-view\";\nimport { FileContentViewer } from \"#/components/features/files-tab/file-content-viewer\";\nimport { SegmentedToggle } from \"#/components/features/files-tab/segmented-toggle\";\nimport type { ViewMode } from \"#/components/features/files-tab/view-mode\";\nimport RefreshIcon from \"#/icons/u-refresh.svg?react\";\nimport LinkExternalIcon from \"#/icons/link-external.svg?react\";\nimport GitChanges from \"./changes-tab\";\n\nfunction FilesTab() {\n const { t } = useTranslation(\"openhands\");\n\n // Keep the list / content / diff caches fresh as the agent writes files.\n useAutoRefreshFilesOnEdit();\n\n const { hasAttachedSource, isLoading: isAttachedSourceLoading } =\n useHasAttachedSource();\n // A workspace with zero commits has no diff base to compare against, so\n // the diff view would just be empty / misleading. Only probe when we\n // already believe the user attached a source — saves a workspace round\n // trip on every plain (no-attachment) conversation.\n const { hasCommits } = useHasGitCommits({ enabled: hasAttachedSource });\n\n // Diff view defaults to ON when the user attached a source (repo or\n // local workspace) *and* there's at least one commit, OFF otherwise\n // (no attachment, or attachment with no commits yet).\n //\n // While the attachment / commit probes are still resolving we stay\n // optimistic — most attached conversations live in a real repo, so\n // defaulting to diff during the brief loading window avoids a\n // \"files → diff\" flash on initial load. We only flip to files-view\n // once `hasAttachedSource` *or* `hasCommits` definitively resolves\n // false. The user's persisted choice always wins.\n const { conversationId } = useOptionalConversationId();\n const {\n state: persistedState,\n setFilesTabDiffView,\n setFilesTabContentViewMode,\n } = useConversationLocalStorageState(conversationId ?? \"\");\n\n const diffViewDefault =\n (hasAttachedSource || isAttachedSourceLoading) && hasCommits !== false;\n const diffViewEnabled = persistedState.filesTabDiffView ?? diffViewDefault;\n const contentViewMode = persistedState.filesTabContentViewMode;\n\n // Collapsed by default — the quick-access pill row at the top is usually\n // enough; the user can expand the tree on demand.\n const [isTreeVisible, setIsTreeVisible] = useState(false);\n\n const filesQuery = useWorkspaceFiles();\n const paths = useMemo(() => filesQuery.data ?? [], [filesQuery.data]);\n\n const selectedPath = useFilesTabStore((s) => s.selectedPath);\n const setSelectedPath = useFilesTabStore((s) => s.setSelectedPath);\n\n // Pre-fetch the selected file's content here too so the toolbar's\n // \"open in new window\" link can reach for its `staticUrl`. react-query\n // dedupes against `FileContentViewer`'s identical call, so this costs\n // nothing extra.\n const selectedFileContent = useWorkspaceFileContent(selectedPath);\n const mutationCounter = useWorkspaceMutationCounter((state) => state.count);\n const selectedFileStaticUrl = withWorkspaceCacheBuster(\n selectedFileContent.data?.staticUrl ?? null,\n mutationCounter,\n );\n\n // Auto-select the highest-priority file the first time we load the list,\n // so users see something useful immediately.\n useEffect(() => {\n if (selectedPath || paths.length === 0) return;\n const [first] = sortFilesByPriority(paths);\n if (first) setSelectedPath(first);\n }, [paths, selectedPath]);\n\n // Refresh button: covers the diff view (git changes) and the file viewer\n // (workspace listing + cached file contents). Lives in this toolbar — not\n // in the outer ConversationTabs bar — so it sits with the other\n // files-tab-local controls.\n const queryClient = useQueryClient();\n const { refetch: refetchGitChanges, isFetching: isFetchingGitChanges } =\n useUnifiedGetGitChanges();\n const refreshFiles = () => {\n refetchGitChanges();\n queryClient.invalidateQueries({ queryKey: [\"workspace-files\"] });\n queryClient.invalidateQueries({ queryKey: [\"workspace-file-content\"] });\n };\n\n return (\n <main\n className=\"h-full w-full flex flex-col items-stretch\"\n data-testid=\"files-tab\"\n >\n {/* Top toolbar: diff/files + rich/plain toggles (left-aligned) plus\n the refresh button on the right. */}\n <div className=\"flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]\">\n <SegmentedToggle<\"on\" | \"off\">\n ariaLabel={t(I18nKey.FILES$DIFF_VIEW)}\n testId=\"files-tab-diff-toggle\"\n value={diffViewEnabled ? \"on\" : \"off\"}\n options={[\n { value: \"on\", label: t(I18nKey.FILES$DIFF_VIEW) },\n { value: \"off\", label: t(I18nKey.COMMON$FILES) },\n ]}\n onChange={(value) => setFilesTabDiffView(value === \"on\")}\n />\n\n {!diffViewEnabled && (\n <SegmentedToggle<ViewMode>\n ariaLabel={t(I18nKey.FILES$RICH)}\n testId=\"files-tab-content-mode-toggle\"\n value={contentViewMode}\n options={[\n { value: \"rich\", label: t(I18nKey.FILES$RICH) },\n { value: \"plain\", label: t(I18nKey.FILES$PLAIN) },\n ]}\n onChange={setFilesTabContentViewMode}\n />\n )}\n\n <div className=\"ml-auto flex items-center gap-1\">\n {/* Open the currently-selected file in a new browser tab. Only\n meaningful while we're showing a file (not the diff view) and\n we've resolved its staticUrl from the workspace fileserver. */}\n {!diffViewEnabled && selectedFileStaticUrl && (\n <a\n href={selectedFileStaticUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n title={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n data-testid=\"files-tab-open-in-new-window\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white\"\n >\n <LinkExternalIcon width={14} height={14} />\n </a>\n )}\n <button\n type=\"button\"\n onClick={refreshFiles}\n disabled={isFetchingGitChanges}\n aria-label={t(I18nKey.FILES$REFRESH)}\n title={t(I18nKey.FILES$REFRESH)}\n data-testid=\"files-tab-refresh\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <RefreshIcon\n width={12.75}\n height={15}\n color=\"#ffffff\"\n className={isFetchingGitChanges ? \"animate-spin\" : \"\"}\n />\n </button>\n </div>\n </div>\n\n {diffViewEnabled ? (\n <div className=\"flex-1 min-h-0\">\n <GitChanges />\n </div>\n ) : (\n <div className=\"flex flex-1 flex-col min-h-0\">\n {filesQuery.isLoading ? (\n <div className=\"flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]\">\n {t(I18nKey.FILES$LOADING_FILES)}\n </div>\n ) : (\n <>\n <FileQuickRow\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={setSelectedPath}\n isTreeVisible={isTreeVisible}\n onToggleTree={() => setIsTreeVisible((prev) => !prev)}\n />\n <div className=\"flex h-full min-h-0 flex-1\">\n {isTreeVisible && (\n <aside\n className=\"w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always\"\n data-testid=\"files-tab-tree\"\n >\n <FileTreeView\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={setSelectedPath}\n />\n </aside>\n )}\n <section\n className=\"flex h-full min-h-0 min-w-0 flex-1 flex-col\"\n data-testid=\"files-tab-content\"\n >\n {selectedPath ? (\n <FileContentViewer\n path={selectedPath}\n viewMode={contentViewMode}\n />\n ) : (\n <NoFileSelectedMessage />\n )}\n </section>\n </div>\n </>\n )}\n </div>\n )}\n </main>\n );\n}\n\nexport default FilesTab;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,IAAW;CAClB,IAAM,EAAE,SAAM,EAAe,YAAY;AAGzC,IAA2B;CAE3B,IAAM,EAAE,sBAAmB,WAAW,MACpC,GAAsB,EAKlB,EAAE,kBAAe,EAAiB,EAAE,SAAS,GAAmB,CAAC,EAYjE,EAAE,sBAAmB,GAA2B,EAChD,EACJ,OAAO,GACP,wBACA,kCACE,EAAiC,KAAkB,GAAG,EAEpD,KACH,KAAqB,MAA4B,MAAe,IAC7D,IAAkB,EAAe,oBAAoB,GACrD,IAAkB,EAAe,yBAIjC,CAAC,GAAe,KAAoB,EAAS,GAAM,EAEnD,IAAa,GAAmB,EAChC,IAAQ,QAAc,EAAW,QAAQ,EAAE,EAAE,CAAC,EAAW,KAAK,CAAC,EAE/D,IAAe,GAAkB,MAAM,EAAE,aAAa,EACtD,IAAkB,GAAkB,MAAM,EAAE,gBAAgB,EAM5D,IAAsB,EAAwB,EAAa,EAC3D,IAAkB,GAA6B,MAAU,EAAM,MAAM,EACrE,IAAwB,EAC5B,EAAoB,MAAM,aAAa,MACvC,EACD;AAID,SAAgB;AACd,MAAI,KAAgB,EAAM,WAAW,EAAG;EACxC,IAAM,CAAC,KAAS,EAAoB,EAAM;AAC1C,EAAI,KAAO,EAAgB,EAAM;IAChC,CAAC,GAAO,EAAa,CAAC;CAMzB,IAAM,IAAc,GAAgB,EAC9B,EAAE,SAAS,GAAmB,YAAY,MAC9C,GAAyB;AAO3B,QACE,kBAAC,QAAD;EACE,WAAU;EACV,eAAY;YAFd,CAME,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,GAAD;KACE,WAAW,EAAE,EAAQ,gBAAgB;KACrC,QAAO;KACP,OAAO,IAAkB,OAAO;KAChC,SAAS,CACP;MAAE,OAAO;MAAM,OAAO,EAAE,EAAQ,gBAAgB;MAAE,EAClD;MAAE,OAAO;MAAO,OAAO,EAAE,EAAQ,aAAa;MAAE,CACjD;KACD,WAAW,MAAU,EAAoB,MAAU,KAAK;KACxD,CAAA;IAED,CAAC,KACA,kBAAC,GAAD;KACE,WAAW,EAAE,EAAQ,WAAW;KAChC,QAAO;KACP,OAAO;KACP,SAAS,CACP;MAAE,OAAO;MAAQ,OAAO,EAAE,EAAQ,WAAW;MAAE,EAC/C;MAAE,OAAO;MAAS,OAAO,EAAE,EAAQ,YAAY;MAAE,CAClD;KACD,UAAU;KACV,CAAA;IAGJ,kBAAC,OAAD;KAAK,WAAU;eAAf,CAIG,CAAC,KAAmB,KACnB,kBAAC,KAAD;MACE,MAAM;MACN,QAAO;MACP,KAAI;MACJ,cAAY,EAAE,EAAQ,yBAAyB;MAC/C,OAAO,EAAE,EAAQ,yBAAyB;MAC1C,eAAY;MACZ,WAAU;gBAEV,kBAAC,GAAD;OAAkB,OAAO;OAAI,QAAQ;OAAM,CAAA;MACzC,CAAA,EAEN,kBAAC,UAAD;MACE,MAAK;MACL,eAzDiB;AAGzB,OAFA,GAAmB,EACnB,EAAY,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC,EAChE,EAAY,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,EAAE,CAAC;;MAuD/D,UAAU;MACV,cAAY,EAAE,EAAQ,cAAc;MACpC,OAAO,EAAE,EAAQ,cAAc;MAC/B,eAAY;MACZ,WAAU;gBAEV,kBAAC,GAAD;OACE,OAAO;OACP,QAAQ;OACR,OAAM;OACN,WAAW,IAAuB,iBAAiB;OACnD,CAAA;MACK,CAAA,CACL;;IACF;MAEL,IACC,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD,EAAc,CAAA;GACV,CAAA,GAEN,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAW,YACV,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAE,EAAQ,oBAAoB;IAC3B,CAAA,GAEN,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;IACS;IACO;IACd,cAAc;IACC;IACf,oBAAoB,GAAkB,MAAS,CAAC,EAAK;IACrD,CAAA,EACF,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,KACC,kBAAC,SAAD;KACE,WAAU;KACV,eAAY;eAEZ,kBAAC,GAAD;MACS;MACO;MACd,cAAc;MACd,CAAA;KACI,CAAA,EAEV,kBAAC,WAAD;KACE,WAAU;KACV,eAAY;eAEX,IACC,kBAAC,GAAD;MACE,MAAM;MACN,UAAU;MACV,CAAA,GAEF,kBAAC,GAAD,EAAyB,CAAA;KAEnB,CAAA,CACN;MACL,EAAA,CAAA;GAED,CAAA,CAEH"}
|
|
1
|
+
{"version":3,"file":"files-tab.js","names":[],"sources":["../../src/routes/files-tab.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useQueryClient } from \"@tanstack/react-query\";\n\nimport { NoFileSelectedMessage } from \"#/components/features/files-tab/no-file-selected-message\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useFilesTabStore } from \"#/stores/files-tab-store\";\nimport { useWorkspaceFiles } from \"#/hooks/query/use-workspace-files\";\nimport { useWorkspaceFileContent } from \"#/hooks/query/use-workspace-file-content\";\nimport { useHasAttachedSource } from \"#/hooks/use-has-attached-source\";\nimport { useHasGitCommits } from \"#/hooks/query/use-has-git-commits\";\nimport { useAutoRefreshFilesOnEdit } from \"#/hooks/use-auto-refresh-files-on-edit\";\nimport { useUnifiedGetGitChanges } from \"#/hooks/query/use-unified-get-git-changes\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useConversationLocalStorageState } from \"#/utils/conversation-local-storage\";\nimport {\n useWorkspaceMutationCounter,\n withWorkspaceCacheBuster,\n} from \"#/stores/use-workspace-mutation-counter\";\nimport { sortFilesByPriority } from \"#/utils/file-priority\";\nimport { FileQuickRow } from \"#/components/features/files-tab/file-quick-row\";\nimport { FileTreeView } from \"#/components/features/files-tab/file-tree-view\";\nimport { FileContentViewer } from \"#/components/features/files-tab/file-content-viewer\";\nimport { SegmentedToggle } from \"#/components/features/files-tab/segmented-toggle\";\nimport type { ViewMode } from \"#/components/features/files-tab/view-mode\";\nimport RefreshIcon from \"#/icons/u-refresh.svg?react\";\nimport LinkExternalIcon from \"#/icons/link-external.svg?react\";\nimport GitChanges from \"./changes-tab\";\n\nfunction FilesTab() {\n const { t } = useTranslation(\"openhands\");\n\n // Keep the list / content / diff caches fresh as the agent writes files.\n useAutoRefreshFilesOnEdit();\n\n const { hasAttachedSource, isLoading: isAttachedSourceLoading } =\n useHasAttachedSource();\n // A workspace with zero commits has no diff base to compare against, so\n // the diff view would just be empty / misleading. Only probe when we\n // already believe the user attached a source — saves a workspace round\n // trip on every plain (no-attachment) conversation.\n const { hasCommits } = useHasGitCommits({ enabled: hasAttachedSource });\n\n // Diff view defaults to ON when the user attached a source (repo or\n // local workspace) *and* there's at least one commit, OFF otherwise\n // (no attachment, or attachment with no commits yet).\n //\n // While the attachment / commit probes are still resolving we stay\n // optimistic — most attached conversations live in a real repo, so\n // defaulting to diff during the brief loading window avoids a\n // \"files → diff\" flash on initial load. We only flip to files-view\n // once `hasAttachedSource` *or* `hasCommits` definitively resolves\n // false. The user's persisted choice always wins.\n const { conversationId } = useOptionalConversationId();\n const {\n state: persistedState,\n setFilesTabDiffView,\n setFilesTabContentViewMode,\n } = useConversationLocalStorageState(conversationId ?? \"\");\n\n const diffViewDefault =\n (hasAttachedSource || isAttachedSourceLoading) && hasCommits !== false;\n const diffViewEnabled = persistedState.filesTabDiffView ?? diffViewDefault;\n const contentViewMode = persistedState.filesTabContentViewMode;\n\n // Collapsed by default — the quick-access pill row at the top is usually\n // enough; the user can expand the tree on demand.\n const [isTreeVisible, setIsTreeVisible] = useState(false);\n\n const filesQuery = useWorkspaceFiles();\n const paths = useMemo(() => filesQuery.data ?? [], [filesQuery.data]);\n\n const storedSelectedPath = useFilesTabStore((s) => s.selectedPath);\n const selectedConversationId = useFilesTabStore(\n (s) => s.selectedConversationId,\n );\n const setSelectedPath = useFilesTabStore((s) => s.setSelectedPath);\n\n // A selection is scoped to the conversation it was made in. Ignore a path\n // that belongs to a different conversation so we never try to open a file\n // that only exists in the previous conversation's workspace (issue #1350).\n // The auto-select effect below then picks this conversation's top file.\n const selectedPath =\n selectedConversationId === conversationId ? storedSelectedPath : null;\n\n // Tag every selection with the active conversation so it can't leak into\n // the next one. FileQuickRow / FileTreeView call this with just the path.\n const handleSelectFile = useCallback(\n (path: string) => setSelectedPath(path, conversationId),\n [conversationId, setSelectedPath],\n );\n\n // Pre-fetch the selected file's content here too so the toolbar's\n // \"open in new window\" link can reach for its `staticUrl`. react-query\n // dedupes against `FileContentViewer`'s identical call, so this costs\n // nothing extra.\n const selectedFileContent = useWorkspaceFileContent(selectedPath);\n const mutationCounter = useWorkspaceMutationCounter((state) => state.count);\n const selectedFileStaticUrl = withWorkspaceCacheBuster(\n selectedFileContent.data?.staticUrl ?? null,\n mutationCounter,\n );\n\n useEffect(() => {\n if (selectedConversationId === conversationId) return;\n setSelectedPath(null, conversationId);\n }, [selectedConversationId, conversationId, setSelectedPath]);\n\n // Auto-select the highest-priority file the first time we load the list,\n // so users see something useful immediately.\n useEffect(() => {\n if (selectedPath || paths.length === 0) return;\n const [first] = sortFilesByPriority(paths);\n if (first) setSelectedPath(first, conversationId);\n }, [paths, selectedPath, conversationId, setSelectedPath]);\n\n // Refresh button: covers the diff view (git changes) and the file viewer\n // (workspace listing + cached file contents). Lives in this toolbar — not\n // in the outer ConversationTabs bar — so it sits with the other\n // files-tab-local controls.\n const queryClient = useQueryClient();\n const { refetch: refetchGitChanges, isFetching: isFetchingGitChanges } =\n useUnifiedGetGitChanges();\n const refreshFiles = () => {\n refetchGitChanges();\n queryClient.invalidateQueries({ queryKey: [\"workspace-files\"] });\n queryClient.invalidateQueries({ queryKey: [\"workspace-file-content\"] });\n };\n\n return (\n <main\n className=\"h-full w-full flex flex-col items-stretch\"\n data-testid=\"files-tab\"\n >\n {/* Top toolbar: diff/files + rich/plain toggles (left-aligned) plus\n the refresh button on the right. */}\n <div className=\"flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]\">\n <SegmentedToggle<\"on\" | \"off\">\n ariaLabel={t(I18nKey.FILES$DIFF_VIEW)}\n testId=\"files-tab-diff-toggle\"\n value={diffViewEnabled ? \"on\" : \"off\"}\n options={[\n { value: \"on\", label: t(I18nKey.FILES$DIFF_VIEW) },\n { value: \"off\", label: t(I18nKey.COMMON$FILES) },\n ]}\n onChange={(value) => setFilesTabDiffView(value === \"on\")}\n />\n\n {!diffViewEnabled && (\n <SegmentedToggle<ViewMode>\n ariaLabel={t(I18nKey.FILES$RICH)}\n testId=\"files-tab-content-mode-toggle\"\n value={contentViewMode}\n options={[\n { value: \"rich\", label: t(I18nKey.FILES$RICH) },\n { value: \"plain\", label: t(I18nKey.FILES$PLAIN) },\n ]}\n onChange={setFilesTabContentViewMode}\n />\n )}\n\n <div className=\"ml-auto flex items-center gap-1\">\n {/* Open the currently-selected file in a new browser tab. Only\n meaningful while we're showing a file (not the diff view) and\n we've resolved its staticUrl from the workspace fileserver. */}\n {!diffViewEnabled && selectedFileStaticUrl && (\n <a\n href={selectedFileStaticUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n title={t(I18nKey.FILES$OPEN_IN_NEW_WINDOW)}\n data-testid=\"files-tab-open-in-new-window\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white\"\n >\n <LinkExternalIcon width={14} height={14} />\n </a>\n )}\n <button\n type=\"button\"\n onClick={refreshFiles}\n disabled={isFetchingGitChanges}\n aria-label={t(I18nKey.FILES$REFRESH)}\n title={t(I18nKey.FILES$REFRESH)}\n data-testid=\"files-tab-refresh\"\n className=\"flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <RefreshIcon\n width={12.75}\n height={15}\n color=\"#ffffff\"\n className={isFetchingGitChanges ? \"animate-spin\" : \"\"}\n />\n </button>\n </div>\n </div>\n\n {diffViewEnabled ? (\n <div className=\"flex-1 min-h-0\">\n <GitChanges />\n </div>\n ) : (\n <div className=\"flex flex-1 flex-col min-h-0\">\n {filesQuery.isLoading ? (\n <div className=\"flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]\">\n {t(I18nKey.FILES$LOADING_FILES)}\n </div>\n ) : (\n <>\n <FileQuickRow\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={handleSelectFile}\n isTreeVisible={isTreeVisible}\n onToggleTree={() => setIsTreeVisible((prev) => !prev)}\n />\n <div className=\"flex h-full min-h-0 flex-1\">\n {isTreeVisible && (\n <aside\n className=\"w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always\"\n data-testid=\"files-tab-tree\"\n >\n <FileTreeView\n paths={paths}\n selectedPath={selectedPath}\n onSelectFile={handleSelectFile}\n />\n </aside>\n )}\n <section\n className=\"flex h-full min-h-0 min-w-0 flex-1 flex-col\"\n data-testid=\"files-tab-content\"\n >\n {selectedPath ? (\n <FileContentViewer\n path={selectedPath}\n viewMode={contentViewMode}\n />\n ) : (\n <NoFileSelectedMessage />\n )}\n </section>\n </div>\n </>\n )}\n </div>\n )}\n </main>\n );\n}\n\nexport default FilesTab;\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../i18n/declaration.cjs`);require(`../contexts/active-backend-context.cjs`);const r=require(`../services/settings.cjs`),i=require(`../hooks/query/use-settings.cjs`),
|
|
1
|
+
const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../i18n/declaration.cjs`);require(`../contexts/active-backend-context.cjs`);const r=require(`../services/settings.cjs`),i=require(`../constants/llm-subscription.cjs`),a=require(`../hooks/query/use-settings.cjs`),o=require(`../components/features/settings/settings-input.cjs`),s=require(`../components/features/settings/settings-dropdown-input.cjs`),c=require(`../utils/extract-model-and-provider.cjs`),l=require(`../ui/help-link.cjs`),u=require(`../components/shared/modals/settings/model-selector.cjs`),d=require(`../hooks/query/use-agent-settings-schema.cjs`),f=require(`../components/features/settings/llm-settings/openai-subscription-auth-card.cjs`),p=require(`../components/features/settings/key-status-icon.cjs`),m=require(`../utils/sdk-settings-schema.cjs`),h=require(`../components/features/settings/sdk-settings/sdk-section-page.cjs`);require(`../components/features/settings/llm-profiles/index.cjs`);const g=require(`../hooks/query/use-llm-subscription-models.cjs`);let _=require(`react`);_=e.__toESM(_,1);let v=require(`react/jsx-runtime`);var y=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,i.LLM_AUTH_TYPE_KEY,i.LLM_SUBSCRIPTION_VENDOR_KEY]),b=(e,t)=>!e||!t?null:`${e}/${t}`,x=(e,t)=>e?.sections.flatMap(e=>e.fields).find(e=>e.key===t)?.default??null,S={openai:new Set([`https://api.openai.com`,`https://api.openai.com/v1`])},C=e=>{try{let t=new URL(e),n=t.pathname.replace(/\/+$/,``)||``;return`${t.origin}${n}`}catch{return e.trim().replace(/\/+$/,``)}},w=(e,t)=>{let n=C(t),{provider:r}=c.extractModelAndProvider(e);if(r){let e=S[r];if(e)return e.has(n)}return Object.values(S).some(e=>e?.has(n))};function T({testId:e}){let{t:r}=t.useTranslation(`openhands`);return(0,v.jsx)(l.HelpLink,{testId:e,text:r(n.I18nKey.SETTINGS$OPENHANDS_API_KEY_HELP_TEXT),linkText:r(n.I18nKey.SETTINGS$NAV_API_KEYS),href:`https://app.all-hands.dev/settings/api-keys`,suffix:` ${r(n.I18nKey.SETTINGS$OPENHANDS_API_KEY_HELP_SUFFIX)}`})}function E({scope:e=`personal`,onSaveSuccess:c,initialValueOverrides:S,embedded:C,hideSaveButton:E,suppressSuccessToast:D,onSaveControlChange:O}){let{t:k}=t.useTranslation(`openhands`),{data:A}=a.useSettings(e),{data:j}=d.useAgentSettingsSchema(A?.agent_settings_schema),M=A?.agent_settings?.llm,N=i.resolveLlmAuthType(S?.[`llm.auth_type`]??M?.auth_type),[P,F]=_.default.useState(N===i.LLM_AUTH_TYPE_SUBSCRIPTION),{data:I,isLoading:L,isFetching:R}=g.useOpenAISubscriptionModels({enabled:P}),z=P&&!I&&(L||R),B=_.default.useRef(null),V=_.default.useRef(null);_.default.useEffect(()=>{N===`subscription`&&F(!0)},[N]);let H=String(r.DEFAULT_SETTINGS.agent_settings?.llm?.model??``),U=_.default.useCallback((e,t)=>{let n=m.inferInitialView(e,t);if(n!==`basic`)return n;let r=e.llm_model??``,i=e.llm_base_url?.trim()??``;return i.length>0&&!w(r,i)?`all`:`basic`},[]),W=_.default.useCallback(({values:e,isDisabled:t,view:r,onChange:a})=>{let c=typeof e[`llm.model`]==`string`?e[`llm.model`]:``,d=typeof e[`llm.base_url`]==`string`?e[`llm.base_url`]:``,m=c.startsWith(`openhands/`),h=i.resolveLlmAuthType(e[i.LLM_AUTH_TYPE_KEY]),g=h===i.LLM_AUTH_TYPE_SUBSCRIPTION,_=t||g&&z,y=I?.includes(c)?c:I?.[0]??``,x=typeof e[`llm.api_key`]==`string`?e[`llm.api_key`]:``,S=C?x.length>0:!!A?.llm_api_key_set,w=(e,r)=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o.SettingsInput,{testId:e,label:k(n.I18nKey.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,value:x,placeholder:S?`<hidden>`:``,onChange:e=>a(`llm.api_key`,e),isDisabled:t,startContent:S?(0,v.jsx)(p.KeyStatusIcon,{isSet:S}):void 0}),(0,v.jsx)(l.HelpLink,{testId:r,text:k(n.I18nKey.SETTINGS$DONT_KNOW_API_KEY),linkText:k(n.I18nKey.SETTINGS$CLICK_FOR_INSTRUCTIONS),href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`})]}),E=e=>{let t=e===`subscription`?i.LLM_AUTH_TYPE_SUBSCRIPTION:i.LLM_AUTH_TYPE_API_KEY;if(a(i.LLM_AUTH_TYPE_KEY,t),t===`subscription`){F(!0),c&&!I?.includes(c)&&(B.current=c);let e=V.current&&I?.includes(V.current)?V.current:I?.[0];a(i.LLM_SUBSCRIPTION_VENDOR_KEY,i.OPENAI_SUBSCRIPTION_VENDOR),!I?.includes(c)&&e&&a(`llm.model`,e);return}c&&I?.includes(c)&&(V.current=c,a(`llm.model`,B.current??H))},D=()=>(0,v.jsx)(s.SettingsDropdownInput,{testId:`llm-auth-type-input`,name:i.LLM_AUTH_TYPE_KEY,label:k(n.I18nKey.SETTINGS$LLM_AUTH_TYPE),items:[{key:i.LLM_AUTH_TYPE_API_KEY,label:k(n.I18nKey.SETTINGS$LLM_AUTH_TYPE_API_KEY)},{key:i.LLM_AUTH_TYPE_SUBSCRIPTION,label:k(n.I18nKey.SETTINGS$LLM_AUTH_TYPE_SUBSCRIPTION)}],selectedKey:h,isClearable:!1,required:!0,isDisabled:_,onSelectionChange:E}),O=()=>(0,v.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`llm-subscription-settings`,children:[(0,v.jsx)(s.SettingsDropdownInput,{testId:`llm-subscription-model-input`,name:`llm.subscription_model`,label:k(n.I18nKey.SETTINGS$SUBSCRIPTION_MODEL),items:(I??[]).map(e=>({key:e,label:e})),selectedKey:y,isClearable:!1,required:!0,isDisabled:_||!I?.length,onSelectionChange:e=>{let t=typeof e==`string`?e:I?.[0];t&&a(`llm.model`,t)}}),(0,v.jsx)(f.OpenAISubscriptionAuthCard,{isDisabled:t})]});return(0,v.jsx)(`div`,{className:`flex flex-col gap-6`,children:r===`basic`?(0,v.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`llm-settings-form-basic`,children:[D(),g?O():(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u.ModelSelector,{currentModel:c||void 0,onChange:(e,t)=>{let n=b(e,t);n&&a(`llm.model`,n)},wrapperClassName:`!flex-col !gap-6`,isDisabled:t}),m?(0,v.jsx)(T,{testId:`openhands-api-key-help`}):null,w(`llm-api-key-input`,`llm-api-key-help-anchor`)]})]}):(0,v.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`llm-settings-form-advanced`,children:[D(),g?O():(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o.SettingsInput,{testId:`llm-custom-model-input`,label:k(n.I18nKey.SETTINGS$CUSTOM_MODEL),type:`text`,className:`w-full`,value:c,placeholder:H,onChange:e=>a(`llm.model`,e),isDisabled:t}),m?(0,v.jsx)(T,{testId:`openhands-api-key-help-2`}):null,(0,v.jsx)(o.SettingsInput,{testId:`base-url-input`,label:k(n.I18nKey.SETTINGS$BASE_URL),type:`text`,className:`w-full`,value:d,placeholder:`https://api.openai.com`,onChange:e=>a(`llm.base_url`,e),isDisabled:t}),w(`llm-api-key-input`,`llm-api-key-help-anchor-advanced`)]})]})})},[H,C,z,A?.llm_api_key_set,I,k]),G=_.default.useCallback((e,t)=>{let n=structuredClone(e.agent_settings_diff??{}),r=n.llm??{};if(i.resolveLlmAuthType(t.values[`llm.auth_type`])===`subscription`){r.auth_type=i.LLM_AUTH_TYPE_SUBSCRIPTION,r.subscription_vendor=i.OPENAI_SUBSCRIPTION_VENDOR;let e=typeof r.model==`string`?r.model:String(t.values[`llm.model`]??``),n=I?.[0];if(!I?.includes(e)&&!n)throw Error(`Subscription models are not loaded yet.`);r.model=I?.includes(e)?e:n,delete r.api_key,delete r.base_url}else t.dirty[`llm.auth_type`]&&(r.auth_type=i.LLM_AUTH_TYPE_API_KEY,r.subscription_vendor=null),t.view===`basic`&&r.model!==void 0&&(r.base_url=x(j,`llm.base_url`));return n.llm=r,{agent_settings_diff:n}},[j,I]);return(0,v.jsx)(h.SdkSectionPage,{scope:e,settingsSources:[{settingsSource:`agent_settings`,sectionKeys:[`llm`],excludeKeys:y}],header:W,buildPayload:G,getInitialView:U,forceShowAdvancedView:!0,allowAllView:!0,onSaveSuccess:c,initialValueOverrides:S,embedded:C,hideSaveButton:E,suppressSuccessToast:D,onSaveControlChange:O,testId:`llm-settings-screen`})}exports.LlmSettingsScreen=E;
|
|
2
2
|
//# sourceMappingURL=llm-settings.cjs.map
|