@openhands/agent-canvas 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-BkL3HWa3.js → acp-providers-CYy8qA2z.js} +1 -1
- package/build/assets/active-backend-context-BZDG15C0.js +2 -0
- package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DGWBBbcp.js} +1 -1
- package/build/assets/agent-profiles-settings-DrkGdf4_.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DK56YPTs.js +86 -0
- package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-DfcSgkLD.js} +2 -2
- package/build/assets/agent-settings-Lrc5-twS.js +1 -0
- package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-BgDHhL7b.js} +1 -1
- package/build/assets/api-error-message-BEIE_yD1.js +1 -0
- package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-DaZnOlVo.js} +1 -1
- package/build/assets/{app-settings-D0OKHB3M.js → app-settings-BG5NAUbC.js} +1 -1
- package/build/assets/automation-detail-D4Hs831Z.js +3 -0
- package/build/assets/automation-export-n0X6FB0C.js +2 -0
- package/build/assets/automation-git-sync-CDrm8WV7.js +1 -0
- package/build/assets/automation-setup-route-CZCl4ONs.js +1 -0
- package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DFF96AdL.js} +1 -1
- package/build/assets/automations-list-Bl-oGOrV.js +1 -0
- package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-H_ThtDA0.js} +1 -1
- package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-CbCemvHt.js} +1 -1
- package/build/assets/backend-not-configured-DP8KLNq_.js +1 -0
- package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-BBASWqsb.js} +1 -1
- package/build/assets/{badge-Dpn3-LTV.js → badge-B-51h-SW.js} +1 -1
- package/build/assets/{base-modal-3NmIOKDm.js → base-modal-BbjycA8X.js} +1 -1
- package/build/assets/bot-CGPCg03p.js +1 -0
- package/build/assets/{brand-button-CJcwjnfb.js → brand-button-Blxv5nww.js} +1 -1
- package/build/assets/browser-CuW0nWvh.js +7 -0
- package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-D5G0ORwt.js} +1 -1
- package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-BD2tii1r.js} +1 -1
- package/build/assets/check-DSuS-lyr.js +1 -0
- package/build/assets/chevron-down-CgGcmtE2.js +1 -0
- package/build/assets/circle-check-CG5-NPw7.js +1 -0
- package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-ASbpB8vN.js} +1 -1
- package/build/assets/cloud-funnel-analytics-GlCUG0gk.js +1 -0
- package/build/assets/cog-CZiR80uT.js +1 -0
- package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-DvpEsh2O.js} +1 -1
- package/build/assets/{command-menu-BKOLj-TC.js → command-menu-DwUQzjYP.js} +1 -1
- package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BptcoiLA.js} +1 -1
- package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-CiEwxZAA.js} +1 -1
- package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-CdcamfM1.js} +1 -1
- package/build/assets/conversation-DREHj4nT.js +1 -0
- package/build/assets/conversation-DotRfiDz.js +90 -0
- package/build/assets/conversation-panel-DREHj4nT.js +1 -0
- package/build/assets/conversation-state-store-DMLtlHbE.js +1 -0
- package/build/assets/conversation-store-Blc5xysY.js +6 -0
- package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-D-puECpY.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-BGxcUbgy.js} +1 -1
- package/build/assets/{device-verify-BIjXeW9N.js → device-verify-CZJfWaJf.js} +1 -1
- package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-tLhpwtxS.js} +1 -1
- package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-D8GnI6GZ.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-Fk8k60nk.js} +1 -1
- package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-DeztVYuL.js} +1 -1
- package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-Cd6GCYzq.js} +1 -1
- package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-C4sgZg-y.js} +1 -1
- package/build/assets/external-link-C0UpBgsE.js +1 -0
- package/build/assets/{file-text-RecuaId_.js → file-text-C6WYtNdV.js} +1 -1
- package/build/assets/files-tab-BW_qzyAm.js +1 -0
- package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-CGXBLcn1.js} +1 -1
- package/build/assets/format-model-name-BNPKVsIq.js +1 -0
- package/build/assets/format-relative-time-ZhQD4rsl.js +1 -0
- package/build/assets/git-provider-icon-CaQ1yLPi.js +1 -0
- package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-CgXR6M_E.js} +1 -1
- package/build/assets/git-repo-dropdown-D2Uei3CO.js +1 -0
- package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_YOp8Fo.js} +1 -1
- package/build/assets/home-DNzzJcMP.js +1 -0
- package/build/assets/home-aCos-5vc.js +1 -0
- package/build/assets/{home-store-Cubdq0uP.js → home-store-DgzViC3f.js} +1 -1
- package/build/assets/index-home-DNzzJcMP.js +1 -0
- package/build/assets/info-CLoC1LRo.js +1 -0
- package/build/assets/install-server-modal-D7zIqNKz.js +1 -0
- package/build/assets/kebab-menu-item-content-DERMdnDv.js +1 -0
- package/build/assets/{launch-c4GEP8oo.js → launch-5PjKeLak.js} +1 -1
- package/build/assets/{list-todo-CheUtB7F.js → list-todo-BF049YaY.js} +1 -1
- package/build/assets/llm-not-configured-banner-BK9z5eS0.js +27 -0
- package/build/assets/llm-settings-BLAMK2tR.js +1 -0
- package/build/assets/llm-settings-BWsbarGM.js +1 -0
- package/build/assets/llm-subscription-service-SfnEV9Uc.js +1 -0
- package/build/assets/loader-circle-D7IagAyF.js +1 -0
- package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-DBgXgra0.js} +1 -1
- package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-BTqNPhzc.js} +1 -1
- package/build/assets/manifest-abebca3c.js +1 -0
- package/build/assets/manifest-subpage-layout-Rn-glaxV.js +1 -0
- package/build/assets/{map-provider-7Bp2aih5.js → map-provider-BK4HnqYz.js} +1 -1
- package/build/assets/markdown-renderer-Cp6DlHQN.js +8 -0
- package/build/assets/{mcp-Da7wFU7A.js → mcp-BC-Ixn4T.js} +2 -2
- package/build/assets/mcp-marketplace-utils-BJWJgbB6.js +1 -0
- package/build/assets/messages-CzFKrzPG.js +40 -0
- package/build/assets/{modal-body-duRaxj_K.js → modal-body-BdKfD3Hl.js} +1 -1
- package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D5_b5vMi.js} +1 -1
- package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-objukxk_.js} +1 -1
- package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-C_gXyLyD.js} +1 -1
- package/build/assets/{npm-Cswluf6-.js → npm-CHVHV1MC.js} +1 -1
- package/build/assets/{onboarding-BKbTYlW1.js → onboarding-Diw0V51A.js} +1 -1
- package/build/assets/onboarding-modal-Da4yHzsA.js +1 -0
- package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-BztSy69u.js} +1 -1
- package/build/assets/parse-git-remote-url-BkXN9jzl.js +1 -0
- package/build/assets/pencil-49avMHlD.js +1 -0
- package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-CJiSpNax.js} +1 -1
- package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-lHdNKWNU.js} +1 -1
- package/build/assets/plus-C0BagBpV.js +1 -0
- package/build/assets/profiles-service.api-BLr7FXec.js +1 -0
- package/build/assets/providers-CWXnb7S3.js +1 -0
- package/build/assets/{proxy-b4aqL4SX.js → proxy-DYDXxtje.js} +1 -1
- package/build/assets/{puzzle-B3v361yY.js → puzzle-Bt2B1rzf.js} +1 -1
- package/build/assets/recommended-automations-launcher-CcFMfJRR.js +1 -0
- package/build/assets/refresh-cw-nmcesifB.js +1 -0
- package/build/assets/root-CT4t7apy.css +1 -0
- package/build/assets/root-DnRgLKpU.js +2 -0
- package/build/assets/root-layout-2L9tr-BN.js +2 -0
- package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-C59lVZTA.js} +1 -1
- package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-BbBEQQjq.js} +1 -1
- package/build/assets/search-CYSDBczG.js +1 -0
- package/build/assets/secrets-service-BtsgYSlj.js +1 -0
- package/build/assets/secrets-settings-DJ0OKa4_.js +1 -0
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DiVfTZuN.js} +1 -1
- package/build/assets/{settings-CZPGNens.js → settings-CDqL_Uqh.js} +1 -1
- package/build/assets/{settings-CWFxymAf.js → settings-DcNPxz0v.js} +1 -1
- package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-Ba1UN5Du.js} +1 -1
- package/build/assets/{settings-index-Dtlegd6s.js → settings-index-Cz2cKt2K.js} +1 -1
- package/build/assets/{settings-input-D61Vzp9e.js → settings-input-CWUEHHvS.js} +1 -1
- package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-DdcLXDGn.js} +1 -1
- package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-nEEK1Kh1.js} +1 -1
- package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api-3yAUFcaP.js} +1 -1
- package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-Dk9hChx1.js} +1 -1
- package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-CxjtCSB3.js} +1 -1
- package/build/assets/shared-conversation-DbAcrx3s.js +1 -0
- package/build/assets/shield-check-CiOTXxV2.js +1 -0
- package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-lrfPooIB.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-KERXfNu1.js} +1 -1
- package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-B8lFD6Cb.js} +1 -1
- package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-u6pUpxJ7.js} +1 -1
- package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-dGIUzr_b.js} +1 -1
- package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-kkOWZ89w.js} +1 -1
- package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-DWN1PBPH.js} +1 -1
- package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-DFjH2Nq6.js} +1 -1
- package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-DIHpl3ol.js} +2 -2
- package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-ntyMLnbj.js} +1 -1
- package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-B6JXcsmL.js} +1 -1
- package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-aEJzEcHD.js} +1 -1
- package/build/assets/{terminal-DRrJo-cR.js → terminal-Dch7Ty5K.js} +1 -1
- package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-B2MLKsgt.js} +1 -1
- package/build/assets/trash-2-yZnDM4Ji.js +1 -0
- package/build/assets/{typography-D9tiHct7.js → typography-DB5HoCk0.js} +1 -1
- package/build/assets/usage-tab-DrEtBmBT.js +1 -0
- package/build/assets/use-acp-credential-form-c8KXAa8A.js +1 -0
- package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-B0p34N3q.js} +1 -1
- package/build/assets/use-agent-profiles-CPIc6wLH.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dz_8Eqkv.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-DvUVqCle.js} +1 -1
- package/build/assets/use-config-C3PO4TBw.js +1 -0
- package/build/assets/use-create-conversation-DVrA_uLD.js +1 -0
- package/build/assets/use-create-secret-DbBIpaCR.js +1 -0
- package/build/assets/use-get-secrets-6PBitf54.js +1 -0
- package/build/assets/use-has-permission-CQ31Cl8j.js +1 -0
- package/build/assets/use-is-authed-2UrDIziV.js +1 -0
- package/build/assets/use-is-creating-conversation-BvYpmb3v.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js} +1 -1
- package/build/assets/use-llm-profiles-diZS4FiN.js +1 -0
- package/build/assets/use-manifest-capabilities-HIWCtIUm.js +1 -0
- package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-Bs8PcXik.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-BCuNLFsr.js} +1 -1
- package/build/assets/use-save-agent-profile-BaMNSpBV.js +1 -0
- package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-BahvC2Gw.js} +1 -1
- package/build/assets/{use-settings-BmLzQjnC.js → use-settings-C6ZxpBDX.js} +1 -1
- package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-Bqn69Ggw.js} +2 -2
- package/build/assets/use-tracking-Bhu7gk2y.js +3 -0
- package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-BkNXpXrd.js} +1 -1
- package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-c_OmS3lK.js} +1 -1
- package/build/assets/{useMutation-ChpkYxI5.js → useMutation-6ZsQCqAn.js} +1 -1
- package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-xDrGlTO_.js} +1 -1
- package/build/assets/{useQuery-BCnzy4LX.js → useQuery-Bs5NFz2s.js} +1 -1
- package/build/assets/utils-DUD5ScdA.js +1 -0
- package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
- package/build/assets/{vendor~entry.client-CgNUwtQL.js → vendor~entry.client-BFE7Llz9.js} +1 -1
- package/build/assets/{vendor~entry.client-zSIea5EO.js → vendor~entry.client-BaKt_PIp.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js} +3 -3
- package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-B6POTS66.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js +13 -0
- package/build/assets/vendor~root-layout-DeQACFVA.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js} +2 -2
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js} +1 -1
- package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-COueVXmM.js} +1 -1
- package/build/assets/{wrench-B1_H-tL1.js → wrench-C95ujnYo.js} +1 -1
- package/build/assets/x-86ZCfxKY.js +1 -0
- package/build/assets/zap-DRa-r-Tf.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +88 -3
- package/build/locales/ca/openhands.json +88 -3
- package/build/locales/de/openhands.json +88 -3
- package/build/locales/en/openhands.json +88 -3
- package/build/locales/es/openhands.json +88 -3
- package/build/locales/fr/openhands.json +88 -3
- package/build/locales/it/openhands.json +88 -3
- package/build/locales/ja/openhands.json +88 -3
- package/build/locales/ko-KR/openhands.json +88 -3
- package/build/locales/no/openhands.json +88 -3
- package/build/locales/pt/openhands.json +88 -3
- package/build/locales/tr/openhands.json +88 -3
- package/build/locales/uk/openhands.json +88 -3
- package/build/locales/zh-CN/openhands.json +88 -3
- package/build/locales/zh-TW/openhands.json +88 -3
- package/config/defaults.json +3 -3
- 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.js +1 -1
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +10 -0
- package/dist/api/automation-service/automation-service.api.js +42 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +9 -0
- package/dist/api/cloud/conversation-service.api.js +11 -1
- package/dist/api/cloud/conversation-service.api.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.d.ts +24 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +116 -97
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/llm-balance-service.cjs +2 -0
- package/dist/api/llm-balance-service.cjs.map +1 -0
- package/dist/api/llm-balance-service.d.ts +33 -0
- package/dist/api/llm-balance-service.js +53 -0
- package/dist/api/llm-balance-service.js.map +1 -0
- package/dist/api/llm-subscription-service.cjs +1 -1
- package/dist/api/llm-subscription-service.cjs.map +1 -1
- package/dist/api/llm-subscription-service.js +42 -34
- package/dist/api/llm-subscription-service.js.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.d.ts +15 -2
- package/dist/api/profiles-service/profiles-service.api.js +25 -2
- package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.d.ts +5 -0
- package/dist/api/secrets-service.js +12 -6
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/components/conversation/index.cjs +1 -1
- package/dist/components/conversation/index.d.ts +0 -1
- package/dist/components/conversation/index.js +0 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +24 -23
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/index.d.ts +0 -1
- package/dist/components/conversation-events/chat/group-events.cjs +1 -1
- package/dist/components/conversation-events/chat/group-events.cjs.map +1 -1
- package/dist/components/conversation-events/chat/group-events.d.ts +3 -3
- package/dist/components/conversation-events/chat/group-events.js +27 -26
- package/dist/components/conversation-events/chat/group-events.js.map +1 -1
- package/dist/components/features/automations/git-sync/git-sync-activity-row.d.ts +15 -0
- package/dist/components/features/automations/git-sync/git-sync-config-form.d.ts +13 -0
- package/dist/components/features/automations/git-sync/git-sync-error-banner.d.ts +6 -0
- package/dist/components/features/automations/git-sync/git-sync-not-local-state.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-overview-section.d.ts +12 -0
- package/dist/components/features/automations/git-sync/git-sync-skeleton.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-status-pill.d.ts +7 -0
- package/dist/components/features/automations/git-sync/git-sync-unsupported-state.d.ts +7 -0
- package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
- package/dist/components/features/automations/responder-deployment-modal.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +177 -176
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +123 -118
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-grip.js +7 -7
- package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
- package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
- package/dist/components/features/chat/components/context-window-meter.js +131 -0
- package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
- package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
- package/dist/components/features/chat/components/context-window-ring.js +45 -0
- package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.js +68 -67
- package/dist/components/features/chat/custom-chat-input.js.map +1 -1
- package/dist/components/features/chat/error-message-banner.cjs +1 -1
- package/dist/components/features/chat/error-message-banner.cjs.map +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +3 -1
- package/dist/components/features/chat/error-message-banner.js +64 -58
- package/dist/components/features/chat/error-message-banner.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 +9 -6
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/chat/plan-preview.cjs +1 -1
- package/dist/components/features/chat/plan-preview.js +4 -4
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.d.ts +0 -8
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +92 -50
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +7 -2
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +15 -9
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs +2 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map +1 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.d.ts +20 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js +76 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map +1 -0
- package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu.cjs.map +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +5 -3
- package/dist/components/features/controls/server-status-context-menu.js +8 -8
- package/dist/components/features/controls/server-status-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.js +58 -61
- package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +74 -46
- package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
- package/dist/components/features/conversation/conversation-name.cjs +1 -1
- package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name.js +69 -71
- package/dist/components/features/conversation/conversation-name.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +7 -6
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +92 -86
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +81 -71
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.js +6 -6
- package/dist/components/features/conversation/metrics-modal/cost-section.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +2 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.js +10 -9
- package/dist/components/features/conversation/metrics-modal/metric-row.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js +2 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js.map +1 -1
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.d.ts +16 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js +59 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.d.ts +19 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js +46 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.d.ts +7 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js +57 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.d.ts +9 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.js +68 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.js.map +1 -0
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.js +10 -13
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.js +2 -2
- package/dist/components/features/conversation-panel/budget-progress-bar.js.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +6 -6
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +25 -17
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +9 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +27 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +240 -175
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +22 -25
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.js +2 -2
- package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +10 -7
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/llm-balance.cjs +2 -0
- package/dist/constants/llm-balance.cjs.map +1 -0
- package/dist/constants/llm-balance.d.ts +13 -0
- package/dist/constants/llm-balance.js +6 -0
- package/dist/constants/llm-balance.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +227 -219
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
- package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
- package/dist/hooks/chat/use-grip-resize.js +39 -30
- package/dist/hooks/chat/use-grip-resize.js.map +1 -1
- package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
- package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
- package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
- package/dist/hooks/mutation/use-condense-conversation.js +17 -0
- package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +30 -21
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +1 -1
- package/dist/hooks/query/use-commit-changes.js +4 -4
- package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.js +1 -1
- package/dist/hooks/query/use-conversation-metrics.js.map +1 -1
- package/dist/hooks/query/use-git-sync.d.ts +19 -0
- package/dist/hooks/query/use-llm-balance.cjs +2 -0
- package/dist/hooks/query/use-llm-balance.cjs.map +1 -0
- package/dist/hooks/query/use-llm-balance.d.ts +10 -0
- package/dist/hooks/query/use-llm-balance.js +24 -0
- package/dist/hooks/query/use-llm-balance.js.map +1 -0
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +1 -1
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/query/use-task-polling.cjs +1 -1
- package/dist/hooks/query/use-task-polling.cjs.map +1 -1
- package/dist/hooks/query/use-task-polling.js +12 -10
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
- package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
- package/dist/hooks/query/use-unified-git-commits.js +4 -4
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.js +4 -4
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.cjs.map +1 -1
- package/dist/hooks/query/use-workspace-files.d.ts +14 -4
- package/dist/hooks/query/use-workspace-files.js +45 -32
- package/dist/hooks/query/use-workspace-files.js.map +1 -1
- package/dist/hooks/use-await-context-compaction.cjs +2 -0
- package/dist/hooks/use-await-context-compaction.cjs.map +1 -0
- package/dist/hooks/use-await-context-compaction.d.ts +38 -0
- package/dist/hooks/use-await-context-compaction.js +61 -0
- package/dist/hooks/use-await-context-compaction.js.map +1 -0
- package/dist/hooks/use-compact-context-action.cjs +2 -0
- package/dist/hooks/use-compact-context-action.cjs.map +1 -0
- package/dist/hooks/use-compact-context-action.d.ts +10 -0
- package/dist/hooks/use-compact-context-action.js +61 -0
- package/dist/hooks/use-compact-context-action.js.map +1 -0
- package/dist/hooks/use-context-window-usage.cjs +2 -0
- package/dist/hooks/use-context-window-usage.cjs.map +1 -0
- package/dist/hooks/use-context-window-usage.d.ts +5 -0
- package/dist/hooks/use-context-window-usage.js +20 -0
- package/dist/hooks/use-context-window-usage.js.map +1 -0
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
- package/dist/hooks/use-conversation-name-context-menu.d.ts +0 -3
- package/dist/hooks/use-conversation-name-context-menu.js +54 -57
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.d.ts +8 -0
- package/dist/hooks/use-drag-resize.js +21 -18
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-live-conversation-metrics.cjs +2 -0
- package/dist/hooks/use-live-conversation-metrics.cjs.map +1 -0
- package/dist/hooks/use-live-conversation-metrics.d.ts +18 -0
- package/dist/hooks/use-live-conversation-metrics.js +37 -0
- package/dist/hooks/use-live-conversation-metrics.js.map +1 -0
- package/dist/hooks/use-responder-url-secret.d.ts +5 -0
- package/dist/hooks/use-select-conversation-tab.cjs +1 -1
- package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
- package/dist/hooks/use-select-conversation-tab.js +2 -2
- package/dist/hooks/use-select-conversation-tab.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +6 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.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 +86 -1
- 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 +1475 -30
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +28 -29
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +0 -1
- package/dist/locales/ar/openhands.json +88 -3
- package/dist/locales/ca/openhands.json +88 -3
- package/dist/locales/de/openhands.json +88 -3
- package/dist/locales/en/openhands.json +88 -3
- package/dist/locales/es/openhands.json +88 -3
- package/dist/locales/fr/openhands.json +88 -3
- package/dist/locales/it/openhands.json +88 -3
- package/dist/locales/ja/openhands.json +88 -3
- package/dist/locales/ko-KR/openhands.json +88 -3
- package/dist/locales/no/openhands.json +88 -3
- package/dist/locales/pt/openhands.json +88 -3
- package/dist/locales/tr/openhands.json +88 -3
- package/dist/locales/uk/openhands.json +88 -3
- package/dist/locales/zh-CN/openhands.json +88 -3
- package/dist/locales/zh-TW/openhands.json +88 -3
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs +5 -5
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs.map +1 -1
- package/dist/node_modules/@microlink/react-json-view/dist/main.js +5194 -5187
- package/dist/node_modules/@microlink/react-json-view/dist/main.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +22 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +33 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +56 -22
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +31 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +9 -5
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.js +2 -2
- package/dist/node_modules/i18next-http-backend/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js +31 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js.map +1 -0
- package/dist/node_modules/zustand/esm/middleware.cjs +3 -3
- package/dist/node_modules/zustand/esm/middleware.cjs.map +1 -1
- package/dist/node_modules/zustand/esm/middleware.js +33 -31
- package/dist/node_modules/zustand/esm/middleware.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +17 -16
- package/dist/package.js.map +1 -1
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.js +11 -11
- package/dist/routes/files-tab.js.map +1 -1
- package/dist/routes/usage-tab.cjs +2 -0
- package/dist/routes/usage-tab.cjs.map +1 -0
- package/dist/routes/usage-tab.d.ts +2 -0
- package/dist/routes/usage-tab.js +10 -0
- package/dist/routes/usage-tab.js.map +1 -0
- package/dist/services/child-conversation-launch.cjs +1 -1
- package/dist/services/child-conversation-launch.cjs.map +1 -1
- package/dist/services/child-conversation-launch.js +11 -5
- package/dist/services/child-conversation-launch.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +2 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.js +47 -51
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/archived-conversations-store.cjs +2 -0
- package/dist/stores/archived-conversations-store.cjs.map +1 -0
- package/dist/stores/archived-conversations-store.d.ts +24 -0
- package/dist/stores/archived-conversations-store.js +33 -0
- package/dist/stores/archived-conversations-store.js.map +1 -0
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +3 -0
- package/dist/stores/conversation-panel-preferences-store.js +4 -0
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +1 -1
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/error-message-store.cjs +1 -1
- package/dist/stores/error-message-store.cjs.map +1 -1
- package/dist/stores/error-message-store.d.ts +3 -1
- package/dist/stores/error-message-store.js +5 -3
- package/dist/stores/error-message-store.js.map +1 -1
- package/dist/stores/metrics-store.cjs +1 -1
- package/dist/stores/metrics-store.cjs.map +1 -1
- package/dist/stores/metrics-store.d.ts +1 -0
- package/dist/stores/metrics-store.js +7 -4
- package/dist/stores/metrics-store.js.map +1 -1
- package/dist/types/agent-server/core/events/condensation-event.d.ts +3 -0
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +4 -6
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +5 -0
- package/dist/types/agent-server/type-guards.js +3 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/git-sync.d.ts +51 -0
- package/dist/utils/conversation-local-storage.cjs +1 -1
- package/dist/utils/conversation-local-storage.cjs.map +1 -1
- package/dist/utils/conversation-local-storage.js +2 -1
- package/dist/utils/conversation-local-storage.js.map +1 -1
- package/dist/utils/error-handler.cjs +1 -1
- package/dist/utils/error-handler.cjs.map +1 -1
- package/dist/utils/error-handler.d.ts +3 -2
- package/dist/utils/error-handler.js +18 -5
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +1 -0
- package/dist/utils/format-model-name.js +1 -0
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/format-token-count.cjs +2 -0
- package/dist/utils/format-token-count.cjs.map +1 -0
- package/dist/utils/format-token-count.d.ts +3 -0
- package/dist/utils/format-token-count.js +19 -0
- package/dist/utils/format-token-count.js.map +1 -0
- package/dist/utils/hover-reveal-classes.cjs +2 -0
- package/dist/utils/hover-reveal-classes.cjs.map +1 -0
- package/dist/utils/hover-reveal-classes.d.ts +34 -0
- package/dist/utils/hover-reveal-classes.js +41 -0
- package/dist/utils/hover-reveal-classes.js.map +1 -0
- package/dist/utils/is-markdown-file-path.cjs +2 -0
- package/dist/utils/is-markdown-file-path.cjs.map +1 -0
- package/dist/utils/is-markdown-file-path.d.ts +4 -0
- package/dist/utils/is-markdown-file-path.js +14 -0
- package/dist/utils/is-markdown-file-path.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 -0
- package/dist/utils/mcp-marketplace-utils.js +19 -16
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/transcript-export/index.cjs +3 -3
- package/dist/utils/transcript-export/index.cjs.map +1 -1
- package/dist/utils/transcript-export/index.js +12 -12
- package/dist/utils/transcript-export/index.js.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.js +25 -17
- package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
- package/dist/utils/workspace-relative-path.cjs +2 -0
- package/dist/utils/workspace-relative-path.cjs.map +1 -0
- package/dist/utils/workspace-relative-path.d.ts +10 -0
- package/dist/utils/workspace-relative-path.js +22 -0
- package/dist/utils/workspace-relative-path.js.map +1 -0
- package/package.json +17 -16
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +3 -0
- package/scripts/dev-process-utils.mjs +6 -1
- package/scripts/dev-safe.mjs +57 -2
- package/scripts/dev-with-automation.mjs +98 -9
- package/build/assets/active-backend-context-B_bg5h9O.js +0 -2
- package/build/assets/agent-profiles-settings-hd2cAIZM.js +0 -1
- package/build/assets/agent-server-conversation-service.api-BheU4HX3.js +0 -86
- package/build/assets/agent-settings-D_SVrWhI.js +0 -1
- package/build/assets/automation-detail-C0SxWTnQ.js +0 -3
- package/build/assets/automation-export-BjQa_fT6.js +0 -2
- package/build/assets/automation-setup-route-BzCNpljP.js +0 -1
- package/build/assets/automations-list-dZg8zOCl.js +0 -1
- package/build/assets/bot-DuN83i3p.js +0 -1
- package/build/assets/browser--eoQOo4M.js +0 -6
- package/build/assets/check-DLOKoFU9.js +0 -1
- package/build/assets/chevron-down-CnIbtM6i.js +0 -1
- package/build/assets/circle-check-CxCYJrpZ.js +0 -1
- package/build/assets/cloud-funnel-analytics-CcSez21r.js +0 -1
- package/build/assets/conversation-Cmyw9bFh.js +0 -90
- package/build/assets/conversation-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-panel-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-state-store-CtgILxWF.js +0 -1
- package/build/assets/conversation-store-B8Eahyeg.js +0 -6
- package/build/assets/external-link-zWbg5KXS.js +0 -1
- package/build/assets/files-tab-D5zuU5TY.js +0 -1
- package/build/assets/format-model-name-BN_rx1Y3.js +0 -1
- package/build/assets/format-relative-time-BerVamGl.js +0 -1
- package/build/assets/git-provider-icon-zuKz2cwo.js +0 -1
- package/build/assets/git-repo-dropdown-Bo7ciSNX.js +0 -1
- package/build/assets/home-DqyeeFA_.js +0 -1
- package/build/assets/home-Y0aDou-a.js +0 -1
- package/build/assets/index-home-DqyeeFA_.js +0 -1
- package/build/assets/info-C9lpK5pw.js +0 -1
- package/build/assets/install-server-modal-DW6dSyGr.js +0 -1
- package/build/assets/kebab-menu-item-content-CKydZrbH.js +0 -1
- package/build/assets/llm-not-configured-banner-DCE_0B4I.js +0 -27
- package/build/assets/llm-settings-8eWBF3Ij.js +0 -1
- package/build/assets/llm-settings-D9ko42Pi.js +0 -1
- package/build/assets/llm-subscription-service-B3K-97lP.js +0 -1
- package/build/assets/loader-circle-C5AnEN8r.js +0 -1
- package/build/assets/manifest-e1c3bc3b.js +0 -1
- package/build/assets/manifest-subpage-layout-Ds7G5GZ8.js +0 -1
- package/build/assets/markdown-renderer-DzvgdZey.js +0 -8
- package/build/assets/mcp-marketplace-utils-DSLou4n7.js +0 -1
- package/build/assets/messages-B2l0qLVk.js +0 -40
- package/build/assets/onboarding-modal-DrrGlEQq.js +0 -1
- package/build/assets/pencil-Bl3GWhgq.js +0 -1
- package/build/assets/plus-CtzlyAoF.js +0 -1
- package/build/assets/profiles-service.api-vcE_jJCe.js +0 -1
- package/build/assets/providers-CdrPPm0z.js +0 -1
- package/build/assets/recommended-automations-launcher-DIYgUdMm.js +0 -1
- package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
- package/build/assets/root-CBBi6IAe.js +0 -2
- package/build/assets/root-CRK9fOFd.css +0 -1
- package/build/assets/root-layout-BFN2rCOy.js +0 -2
- package/build/assets/search-CYaiKHRp.js +0 -1
- package/build/assets/secrets-service-BHF4fxML.js +0 -1
- package/build/assets/secrets-settings-aBGXtQhX.js +0 -1
- package/build/assets/shared-conversation-BIAcuORk.js +0 -1
- package/build/assets/shield-check-D2cpEpv3.js +0 -1
- package/build/assets/trash-2-CzDVN-Iw.js +0 -1
- package/build/assets/use-acp-credential-form-DGyo0QvL.js +0 -1
- package/build/assets/use-agent-profiles-B37XWDLq.js +0 -1
- package/build/assets/use-config-DapX3pjC.js +0 -1
- package/build/assets/use-create-conversation-CRf1dCm5.js +0 -1
- package/build/assets/use-create-secret-DcpT3RPw.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-is-creating-conversation-CVefC9Ns.js +0 -1
- package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
- package/build/assets/use-manifest-capabilities-zihHDbMW.js +0 -1
- package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
- package/build/assets/use-tracking-salbPJxT.js +0 -3
- package/build/assets/utils-DPQfkd-7.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js +0 -13
- package/build/assets/x-RYDBg-e2.js +0 -1
- package/build/assets/zap-tbKDzCe3.js +0 -1
- package/dist/api/cloud/suggestions-service.api.d.ts +0 -8
- package/dist/api/suggestions-service/suggestions-service.api.d.ts +0 -11
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +0 -7
- package/dist/components/conversation-events/index.d.ts +0 -1
- package/dist/components/features/automations/metadata-chip.d.ts +0 -6
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +0 -10
- package/dist/components/features/controls/tools.d.ts +0 -2
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/context-window-section.js +0 -46
- package/dist/components/features/conversation/metrics-modal/context-window-section.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.js +0 -18
- package/dist/components/features/conversation/metrics-modal/empty-state.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +0 -5
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js +0 -20
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js +0 -57
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js.map +0 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +0 -23
- package/dist/components/features/home/home-header/guide-message.d.ts +0 -1
- package/dist/components/features/home/home-header/home-header.d.ts +0 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +0 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +0 -1
- package/dist/components/features/home/new-conversation.d.ts +0 -1
- package/dist/components/features/home/tasks/task-card.d.ts +0 -6
- package/dist/components/features/home/tasks/task-group.d.ts +0 -7
- package/dist/components/features/home/tasks/task-issue-number.d.ts +0 -6
- package/dist/components/features/home/tasks/task-item-title.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +0 -6
- package/dist/components/features/settings/agent-server-onboarding.d.ts +0 -10
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +0 -6
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +0 -8
- package/dist/hooks/query/use-suggested-tasks.d.ts +0 -1
- package/dist/hooks/use-should-show-user-features.d.ts +0 -1
- package/dist/icons/u-credit-card.cjs +0 -2
- package/dist/icons/u-credit-card.cjs.map +0 -1
- package/dist/icons/u-credit-card.js +0 -21
- package/dist/icons/u-credit-card.js.map +0 -1
- package/dist/ui/card-title.d.ts +0 -16
- package/dist/ui/card.d.ts +0 -14
- package/dist/utils/group-suggested-tasks.d.ts +0 -7
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js} +0 -0
|
@@ -1,59 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useOptionalConversationId as e } from "../../../../../hooks/use-conversation-id.js";
|
|
2
|
+
import { useFilesTabStore as t } from "../../../../../stores/files-tab-store.js";
|
|
3
|
+
import { useActiveConversation as n } from "../../../../../hooks/query/use-active-conversation.js";
|
|
4
|
+
import { useSelectConversationTab as r } from "../../../../../hooks/use-select-conversation-tab.js";
|
|
5
|
+
import { defineVisualizer as i } from "../define.js";
|
|
6
|
+
import { textFromContent as a } from "../text-content.js";
|
|
7
|
+
import { CodeBlock as o } from "../primitives/code-block.js";
|
|
8
|
+
import { getLanguageFromPath as s } from "../../../../../utils/get-language-from-path.js";
|
|
9
|
+
import { toWorkspaceRelativePath as c } from "../../../../../utils/workspace-relative-path.js";
|
|
10
|
+
import { DiffView as l } from "../primitives/diff-view.js";
|
|
11
|
+
import { FilePathChip as u } from "../primitives/file-path-chip.js";
|
|
12
|
+
import { isMarkdownFilePath as d } from "../../../../../utils/is-markdown-file-path.js";
|
|
13
|
+
import { MarkdownFilePreview as f } from "../primitives/markdown-file-preview.js";
|
|
7
14
|
import "react";
|
|
8
|
-
import { jsx as
|
|
15
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
16
|
//#region src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
var h = ({ action: e, observation: t }) => t?.observation.path ?? e?.action.path ?? "";
|
|
18
|
+
function g({ action: e, observation: t, onOpenFile: n }) {
|
|
19
|
+
let r = h({
|
|
20
|
+
action: e,
|
|
21
|
+
observation: t
|
|
22
|
+
}), i = t?.observation.command ?? e?.action.command, c = s(r), g = e?.action.view_range, _ = i === "view" && g ? `${g[0]}-${g[1]}` : void 0, v = r ? /* @__PURE__ */ p(u, {
|
|
23
|
+
path: r,
|
|
24
|
+
range: _,
|
|
25
|
+
onClick: n
|
|
26
|
+
}) : null, y = (e) => r && i === "create" && d(r) ? {
|
|
27
|
+
chip: null,
|
|
28
|
+
body: /* @__PURE__ */ p(f, {
|
|
29
|
+
content: e,
|
|
30
|
+
path: r,
|
|
31
|
+
onView: n
|
|
32
|
+
})
|
|
33
|
+
} : {
|
|
34
|
+
chip: v,
|
|
35
|
+
body: /* @__PURE__ */ p(o, {
|
|
36
|
+
code: e,
|
|
37
|
+
language: c
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
if (t) {
|
|
41
|
+
let e = t.observation, n = null, r = v;
|
|
42
|
+
if (e.error) n = /* @__PURE__ */ p("span", {
|
|
43
|
+
className: "whitespace-pre-wrap text-xs text-danger",
|
|
44
|
+
children: e.error
|
|
45
|
+
});
|
|
46
|
+
else if (e.old_content != null && e.new_content != null) n = /* @__PURE__ */ p(l, {
|
|
47
|
+
oldText: e.old_content,
|
|
48
|
+
newText: e.new_content
|
|
49
|
+
});
|
|
50
|
+
else {
|
|
51
|
+
let t = e.new_content || e.output || (e.content ? a(e.content) : "");
|
|
52
|
+
if (t) {
|
|
53
|
+
let e = y(t);
|
|
54
|
+
r = e.chip, n = e.body;
|
|
34
55
|
}
|
|
35
|
-
return /* @__PURE__ */ s("div", {
|
|
36
|
-
className: "flex flex-col gap-2",
|
|
37
|
-
children: [m, r]
|
|
38
|
-
});
|
|
39
56
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
return /* @__PURE__ */ m("div", {
|
|
58
|
+
className: "flex flex-col gap-2",
|
|
59
|
+
children: [r, n]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (e) {
|
|
63
|
+
let t = e.action, n = null, r = v;
|
|
64
|
+
if (t.command === "create" && t.file_text) {
|
|
65
|
+
let e = y(t.file_text);
|
|
66
|
+
r = e.chip, n = e.body;
|
|
67
|
+
} else (t.command === "str_replace" || t.command === "insert") && t.new_str != null && (n = /* @__PURE__ */ p(l, {
|
|
68
|
+
oldText: t.old_str ?? "",
|
|
69
|
+
newText: t.new_str
|
|
70
|
+
}));
|
|
71
|
+
return /* @__PURE__ */ m("div", {
|
|
72
|
+
className: "flex flex-col gap-2",
|
|
73
|
+
children: [r, n]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
function _({ conversationId: e, ...i }) {
|
|
79
|
+
let { navigateToTab: a } = r(), o = t((e) => e.setSelectedPath), { data: s } = n(), l = h(i), u = s?.workspace?.working_dir, d = l && i.observation ? () => {
|
|
80
|
+
o(c(l, u), e), a("files");
|
|
81
|
+
} : void 0;
|
|
82
|
+
return /* @__PURE__ */ p(g, {
|
|
83
|
+
...i,
|
|
84
|
+
onOpenFile: d
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
var v = i({
|
|
88
|
+
actionKinds: ["FileEditorAction", "StrReplaceEditorAction"],
|
|
89
|
+
observationKinds: ["FileEditorObservation", "StrReplaceEditorObservation"],
|
|
90
|
+
Body: function(t) {
|
|
91
|
+
let { conversationId: n } = e();
|
|
92
|
+
return n ? /* @__PURE__ */ p(_, {
|
|
93
|
+
...t,
|
|
94
|
+
conversationId: n
|
|
95
|
+
}) : /* @__PURE__ */ p(g, { ...t });
|
|
54
96
|
}
|
|
55
97
|
});
|
|
56
98
|
//#endregion
|
|
57
|
-
export {
|
|
99
|
+
export { v as fileEditorVisualizer };
|
|
58
100
|
|
|
59
101
|
//# sourceMappingURL=file-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-editor.js","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"file-editor.js","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx"],"sourcesContent":["/**\n * File-editor visualizer for `file_editor` / `str_replace_editor` tools.\n *\n * Observation card: error → message; `str_replace`/`insert` → diff of the file\n * before vs after; `create`/`view` → the file content. Action card (shown while\n * the edit is in flight): `create` → new content; `str_replace` → diff of the\n * replaced snippet; `view`/`undo_edit` → just the path + range.\n *\n * Created Markdown artifacts get a height-clipped rich preview with a View bar\n * that opens the Files drawer, instead of dumping the full source into a code\n * block. Reads/edits of `.md` files keep the normal CodeBlock / DiffView path.\n */\nimport React from \"react\";\nimport { getLanguageFromPath } from \"#/utils/get-language-from-path\";\nimport { toWorkspaceRelativePath } from \"#/utils/workspace-relative-path\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useSelectConversationTab } from \"#/hooks/use-select-conversation-tab\";\nimport { useFilesTabStore } from \"#/stores/files-tab-store\";\nimport type {\n FileEditorAction,\n StrReplaceEditorAction,\n} from \"#/types/agent-server/core/base/action\";\nimport type {\n FileEditorObservation,\n StrReplaceEditorObservation,\n} from \"#/types/agent-server/core/base/observation\";\nimport { defineVisualizer, VisualizerProps } from \"../define\";\nimport { textFromContent } from \"../text-content\";\nimport { CodeBlock } from \"../primitives/code-block\";\nimport { DiffView } from \"../primitives/diff-view\";\nimport { FilePathChip } from \"../primitives/file-path-chip\";\nimport {\n isMarkdownFilePath,\n MarkdownFilePreview,\n} from \"../primitives/markdown-file-preview\";\n\ntype FileEditorCardProps = VisualizerProps<\n FileEditorAction | StrReplaceEditorAction,\n FileEditorObservation | StrReplaceEditorObservation\n>;\n\n/** The path the event touched; observations win because they are authoritative. */\nconst resolvePath = ({ action, observation }: FileEditorCardProps): string =>\n observation?.observation.path ?? action?.action.path ?? \"\";\n\ninterface FileEditorCardBodyProps extends FileEditorCardProps {\n /**\n * Deep-links the file into the Files drawer. Absent outside a conversation\n * route, where there is no drawer to open; the card then stays read-only.\n * Also omitted for in-flight creates so View does not open a missing file.\n */\n onOpenFile?: () => void;\n}\n\nfunction FileEditorCardBody({\n action,\n observation,\n onOpenFile,\n}: FileEditorCardBodyProps) {\n const path = resolvePath({ action, observation });\n const command = observation?.observation.command ?? action?.action.command;\n const language = getLanguageFromPath(path);\n\n const viewRange = action?.action.view_range;\n const range =\n command === \"view\" && viewRange\n ? `${viewRange[0]}-${viewRange[1]}`\n : undefined;\n const chip = path ? (\n <FilePathChip path={path} range={range} onClick={onOpenFile} />\n ) : null;\n\n const renderFileContent = (content: string) => {\n // Only created Markdown artifacts get the rich preview — `view` returns\n // `cat -n` numbered snippets that must stay in a CodeBlock.\n if (path && command === \"create\" && isMarkdownFilePath(path)) {\n // Markdown artifacts own their card (clipped preview + optional View),\n // so skip the separate path chip to avoid a duplicate filename affordance.\n return {\n chip: null as React.ReactNode,\n body: (\n <MarkdownFilePreview\n content={content}\n path={path}\n onView={onOpenFile}\n />\n ),\n };\n }\n return {\n chip,\n body: <CodeBlock code={content} language={language} />,\n };\n };\n\n if (observation) {\n const obs = observation.observation;\n let body: React.ReactNode = null;\n let leadingChip: React.ReactNode = chip;\n if (obs.error) {\n body = (\n <span className=\"whitespace-pre-wrap text-xs text-danger\">\n {obs.error}\n </span>\n );\n } else if (obs.old_content != null && obs.new_content != null) {\n // Nullish, not truthy: an empty string is a valid side of the diff —\n // clearing a file or inserting into an empty file must still render it.\n body = <DiffView oldText={obs.old_content} newText={obs.new_content} />;\n } else {\n // `view` returns the snippet the agent saw in `content` (the `cat -n`\n // output) rather than `output`/`new_content`, so fall back to it.\n // Mirrors the markdown path's \"prefer content for view\" handling.\n const content =\n obs.new_content ||\n obs.output ||\n (obs.content ? textFromContent(obs.content) : \"\");\n if (content) {\n const rendered = renderFileContent(content);\n leadingChip = rendered.chip;\n body = rendered.body;\n }\n }\n return (\n <div className=\"flex flex-col gap-2\">\n {leadingChip}\n {body}\n </div>\n );\n }\n\n if (action) {\n const act = action.action;\n let body: React.ReactNode = null;\n let leadingChip: React.ReactNode = chip;\n if (act.command === \"create\" && act.file_text) {\n const rendered = renderFileContent(act.file_text);\n leadingChip = rendered.chip;\n body = rendered.body;\n } else if (\n (act.command === \"str_replace\" || act.command === \"insert\") &&\n act.new_str != null\n ) {\n // `insert` carries only `new_str`, no `old_str`. Key on `new_str` and\n // default `old_str` to \"\" so an in-flight insert shows an addition diff\n // instead of nothing.\n body = <DiffView oldText={act.old_str ?? \"\"} newText={act.new_str} />;\n }\n return (\n <div className=\"flex flex-col gap-2\">\n {leadingChip}\n {body}\n </div>\n );\n }\n\n return null;\n}\n\n/**\n * Conversation-scoped wrapper: owns the Files-drawer deep link. Split from the\n * card so the conversation-only hooks below never run outside a conversation\n * route (they throw on a missing conversation id).\n */\nfunction FileEditorCardWithDrawerLink({\n conversationId,\n ...props\n}: FileEditorCardProps & { conversationId: string }) {\n const { navigateToTab } = useSelectConversationTab();\n const setSelectedPath = useFilesTabStore((state) => state.setSelectedPath);\n const { data: conversation } = useActiveConversation();\n const path = resolvePath(props);\n const workingDir = conversation?.workspace?.working_dir;\n\n // Only deep-link once the observation exists — the file is not guaranteed\n // to be on disk while the create action is still in flight.\n const onOpenFile =\n path && props.observation\n ? () => {\n setSelectedPath(\n toWorkspaceRelativePath(path, workingDir),\n conversationId,\n );\n navigateToTab(\"files\");\n }\n : undefined;\n\n return <FileEditorCardBody {...props} onOpenFile={onOpenFile} />;\n}\n\nexport const fileEditorVisualizer = defineVisualizer({\n actionKinds: [\"FileEditorAction\", \"StrReplaceEditorAction\"],\n observationKinds: [\"FileEditorObservation\", \"StrReplaceEditorObservation\"],\n Body: function FileEditorBody(props) {\n const { conversationId } = useOptionalConversationId();\n\n return conversationId ? (\n <FileEditorCardWithDrawerLink\n {...props}\n conversationId={conversationId}\n />\n ) : (\n <FileEditorCardBody {...props} />\n );\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,IAAM,KAAe,EAAE,WAAQ,qBAC7B,GAAa,YAAY,QAAQ,GAAQ,OAAO,QAAQ;AAW1D,SAAS,EAAmB,EAC1B,WACA,gBACA,iBAC0B;CAC1B,IAAM,IAAO,EAAY;EAAE;EAAQ;CAAY,CAAC,GAC1C,IAAU,GAAa,YAAY,WAAW,GAAQ,OAAO,SAC7D,IAAW,EAAoB,CAAI,GAEnC,IAAY,GAAQ,OAAO,YAC3B,IACJ,MAAY,UAAU,IAClB,GAAG,EAAU,GAAG,GAAG,EAAU,OAC7B,KAAA,GACA,IAAO,IACX,kBAAC,GAAD;EAAoB;EAAa;EAAO,SAAS;CAAa,CAAA,IAC5D,MAEE,KAAqB,MAGrB,KAAQ,MAAY,YAAY,EAAmB,CAAI,IAGlD;EACL,MAAM;EACN,MACE,kBAAC,GAAD;GACW;GACH;GACN,QAAQ;EACT,CAAA;CAEL,IAEK;EACL;EACA,MAAM,kBAAC,GAAD;GAAW,MAAM;GAAmB;EAAW,CAAA;CACvD;CAGF,IAAI,GAAa;EACf,IAAM,IAAM,EAAY,aACpB,IAAwB,MACxB,IAA+B;EACnC,IAAI,EAAI,OACN,IACE,kBAAC,QAAD;GAAM,WAAU;aACb,EAAI;EACD,CAAA;OAEH,IAAI,EAAI,eAAe,QAAQ,EAAI,eAAe,MAGvD,IAAO,kBAAC,GAAD;GAAU,SAAS,EAAI;GAAa,SAAS,EAAI;EAAc,CAAA;OACjE;GAIL,IAAM,IACJ,EAAI,eACJ,EAAI,WACH,EAAI,UAAU,EAAgB,EAAI,OAAO,IAAI;GAChD,IAAI,GAAS;IACX,IAAM,IAAW,EAAkB,CAAO;IAE1C,AADA,IAAc,EAAS,MACvB,IAAO,EAAS;GAClB;EACF;EACA,OACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACG,GACA,CACE;;CAET;CAEA,IAAI,GAAQ;EACV,IAAM,IAAM,EAAO,QACf,IAAwB,MACxB,IAA+B;EACnC,IAAI,EAAI,YAAY,YAAY,EAAI,WAAW;GAC7C,IAAM,IAAW,EAAkB,EAAI,SAAS;GAEhD,AADA,IAAc,EAAS,MACvB,IAAO,EAAS;EAClB,OAAO,CACJ,EAAI,YAAY,iBAAiB,EAAI,YAAY,aAClD,EAAI,WAAW,SAKf,IAAO,kBAAC,GAAD;GAAU,SAAS,EAAI,WAAW;GAAI,SAAS,EAAI;EAAU,CAAA;EAEtE,OACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACG,GACA,CACE;;CAET;CAEA,OAAO;AACT;AAOA,SAAS,EAA6B,EACpC,mBACA,GAAG,KACgD;CACnD,IAAM,EAAE,qBAAkB,EAAyB,GAC7C,IAAkB,GAAkB,MAAU,EAAM,eAAe,GACnE,EAAE,MAAM,MAAiB,EAAsB,GAC/C,IAAO,EAAY,CAAK,GACxB,IAAa,GAAc,WAAW,aAItC,IACJ,KAAQ,EAAM,oBACJ;EAKJ,AAJA,EACE,EAAwB,GAAM,CAAU,GACxC,CACF,GACA,EAAc,OAAO;CACvB,IACA,KAAA;CAEN,OAAO,kBAAC,GAAD;EAAoB,GAAI;EAAmB;CAAa,CAAA;AACjE;AAEA,IAAa,IAAuB,EAAiB;CACnD,aAAa,CAAC,oBAAoB,wBAAwB;CAC1D,kBAAkB,CAAC,yBAAyB,6BAA6B;CACzE,MAAM,SAAwB,GAAO;EACnC,IAAM,EAAE,sBAAmB,EAA0B;EAErD,OAAO,IACL,kBAAC,GAAD;GACE,GAAI;GACY;EACjB,CAAA,IAED,kBAAC,GAAD,EAAoB,GAAI,EAAQ,CAAA;CAEpC;AACF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../../icons/file.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");function i({path:e,range:n}){
|
|
1
|
+
const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../../icons/file.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");function i({path:e,range:n,onClick:i}){let a=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.default,{className:`h-3.5 w-3.5 flex-shrink-0 text-muted`}),(0,r.jsx)(`span`,{className:`break-all`,children:n?`${e}:${n}`:e})]}),o=`inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground`;return i?(0,r.jsx)(`button`,{type:`button`,className:`${o} cursor-pointer hover:bg-[var(--oh-interactive-hover)]`,onClick:i,children:a}):(0,r.jsx)(`span`,{className:o,children:a})}exports.FilePathChip=i;
|
|
2
2
|
//# sourceMappingURL=file-path-chip.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-path-chip.cjs","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/primitives/file-path-chip.tsx"],"sourcesContent":["import React from \"react\";\nimport FileIcon from \"#/icons/file.svg?react\";\n\ninterface FilePathChipProps {\n path: string;\n /** Optional line-range suffix, e.g. \"12-48\". */\n range?: string;\n}\n\n/**\n * Monospace file-path pill with a
|
|
1
|
+
{"version":3,"file":"file-path-chip.cjs","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/primitives/file-path-chip.tsx"],"sourcesContent":["import React from \"react\";\nimport FileIcon from \"#/icons/file.svg?react\";\n\ninterface FilePathChipProps {\n path: string;\n /** Optional line-range suffix, e.g. \"12-48\". */\n range?: string;\n /** Opens the referenced file when the surrounding visualizer can navigate. */\n onClick?: () => void;\n}\n\n/**\n * Monospace file-path pill with an optional navigation affordance.\n *\n * The static variant remains available for visualizers without a workspace\n * target; passing `onClick` upgrades the same visual language to a button.\n */\nexport function FilePathChip({ path, range, onClick }: FilePathChipProps) {\n const content = (\n <>\n <FileIcon className=\"h-3.5 w-3.5 flex-shrink-0 text-muted\" />\n <span className=\"break-all\">{range ? `${path}:${range}` : path}</span>\n </>\n );\n const className =\n \"inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground\";\n\n if (onClick) {\n return (\n <button\n type=\"button\"\n className={`${className} cursor-pointer hover:bg-[var(--oh-interactive-hover)]`}\n onClick={onClick}\n >\n {content}\n </button>\n );\n }\n\n return <span className={className}>{content}</span>;\n}\n"],"mappings":"uLAiBA,SAAgB,EAAa,CAAE,OAAM,QAAO,WAA8B,CACxE,IAAM,GACJ,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,QAAD,CAAU,UAAU,sCAAwC,CAAA,GAC5D,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,qBAAa,EAAQ,GAAG,EAAK,GAAG,IAAU,CAAW,CAAA,CACrE,CAAA,CAAA,EAEE,EACJ,iIAcF,OAZI,GAEA,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,UAAW,GAAG,EAAU,wDACf,mBAER,CACK,CAAA,GAIL,EAAA,EAAA,KAAC,OAAD,CAAiB,qBAAY,CAAc,CAAA,CACpD"}
|
|
@@ -3,9 +3,14 @@ interface FilePathChipProps {
|
|
|
3
3
|
path: string;
|
|
4
4
|
/** Optional line-range suffix, e.g. "12-48". */
|
|
5
5
|
range?: string;
|
|
6
|
+
/** Opens the referenced file when the surrounding visualizer can navigate. */
|
|
7
|
+
onClick?: () => void;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
|
-
* Monospace file-path pill with
|
|
10
|
+
* Monospace file-path pill with an optional navigation affordance.
|
|
11
|
+
*
|
|
12
|
+
* The static variant remains available for visualizers without a workspace
|
|
13
|
+
* target; passing `onClick` upgrades the same visual language to a button.
|
|
9
14
|
*/
|
|
10
|
-
export declare function FilePathChip({ path, range }: FilePathChipProps): React.JSX.Element;
|
|
15
|
+
export declare function FilePathChip({ path, range, onClick }: FilePathChipProps): React.JSX.Element;
|
|
11
16
|
export {};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import e from "../../../../../icons/file.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/features/chat/tool-visualizers/primitives/file-path-chip.tsx
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
className: "
|
|
8
|
-
children:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
function i({ path: i, range: a, onClick: o }) {
|
|
6
|
+
let s = /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(e, { className: "h-3.5 w-3.5 flex-shrink-0 text-muted" }), /* @__PURE__ */ n("span", {
|
|
7
|
+
className: "break-all",
|
|
8
|
+
children: a ? `${i}:${a}` : i
|
|
9
|
+
})] }), c = "inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground";
|
|
10
|
+
return o ? /* @__PURE__ */ n("button", {
|
|
11
|
+
type: "button",
|
|
12
|
+
className: `${c} cursor-pointer hover:bg-[var(--oh-interactive-hover)]`,
|
|
13
|
+
onClick: o,
|
|
14
|
+
children: s
|
|
15
|
+
}) : /* @__PURE__ */ n("span", {
|
|
16
|
+
className: c,
|
|
17
|
+
children: s
|
|
12
18
|
});
|
|
13
19
|
}
|
|
14
20
|
//#endregion
|
|
15
|
-
export {
|
|
21
|
+
export { i as FilePathChip };
|
|
16
22
|
|
|
17
23
|
//# sourceMappingURL=file-path-chip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-path-chip.js","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/primitives/file-path-chip.tsx"],"sourcesContent":["import React from \"react\";\nimport FileIcon from \"#/icons/file.svg?react\";\n\ninterface FilePathChipProps {\n path: string;\n /** Optional line-range suffix, e.g. \"12-48\". */\n range?: string;\n}\n\n/**\n * Monospace file-path pill with a
|
|
1
|
+
{"version":3,"file":"file-path-chip.js","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/primitives/file-path-chip.tsx"],"sourcesContent":["import React from \"react\";\nimport FileIcon from \"#/icons/file.svg?react\";\n\ninterface FilePathChipProps {\n path: string;\n /** Optional line-range suffix, e.g. \"12-48\". */\n range?: string;\n /** Opens the referenced file when the surrounding visualizer can navigate. */\n onClick?: () => void;\n}\n\n/**\n * Monospace file-path pill with an optional navigation affordance.\n *\n * The static variant remains available for visualizers without a workspace\n * target; passing `onClick` upgrades the same visual language to a button.\n */\nexport function FilePathChip({ path, range, onClick }: FilePathChipProps) {\n const content = (\n <>\n <FileIcon className=\"h-3.5 w-3.5 flex-shrink-0 text-muted\" />\n <span className=\"break-all\">{range ? `${path}:${range}` : path}</span>\n </>\n );\n const className =\n \"inline-flex max-w-full items-center gap-1.5 self-start rounded bg-surface-raised px-2 py-0.5 font-mono text-xs text-foreground\";\n\n if (onClick) {\n return (\n <button\n type=\"button\"\n className={`${className} cursor-pointer hover:bg-[var(--oh-interactive-hover)]`}\n onClick={onClick}\n >\n {content}\n </button>\n );\n }\n\n return <span className={className}>{content}</span>;\n}\n"],"mappings":";;;;AAiBA,SAAgB,EAAa,EAAE,SAAM,UAAO,cAA8B;CACxE,IAAM,IACJ,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,EAAU,WAAU,uCAAwC,CAAA,GAC5D,kBAAC,QAAD;EAAM,WAAU;YAAa,IAAQ,GAAG,EAAK,GAAG,MAAU;CAAW,CAAA,CACrE,EAAA,CAAA,GAEE,IACJ;CAcF,OAZI,IAEA,kBAAC,UAAD;EACE,MAAK;EACL,WAAW,GAAG,EAAU;EACf;YAER;CACK,CAAA,IAIL,kBAAC,QAAD;EAAiB;YAAY;CAAc,CAAA;AACpD"}
|
|
@@ -0,0 +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("../../../../../node_modules/lucide-react/dist/esm/icons/arrow-up-right.cjs"),r=require("../../../../../types/agent-server/type-guards.cjs"),i=require("../../../markdown/markdown-renderer.cjs"),a=require("../../../../../icons/file.cjs"),o=require("../../../../../ui/typography.cjs"),s=require("../../../markdown/plan-components.cjs"),c=require("../../../../../utils/is-markdown-file-path.cjs");let l=require("react/jsx-runtime");var u=new Set([`FileEditorAction`,`StrReplaceEditorAction`]),d=new Set([`FileEditorObservation`,`StrReplaceEditorObservation`]);function f(e,t){if(r.isActionEvent(e)&&u.has(e.action.kind))return e.action.path||null;if(r.isObservationEvent(e)&&d.has(e.observation.kind)){let n=e.observation.path;if(n)return n;if(t&&u.has(t.action.kind))return t.action.path||null}return null}function p(e,t){if(r.isActionEvent(e)&&u.has(e.action.kind))return e.action.command||null;if(r.isObservationEvent(e)&&d.has(e.observation.kind)){let n=e.observation.command;if(n)return n;if(t&&u.has(t.action.kind))return t.action.command||null}return null}function m(e,t){let n=f(e,t),r=p(e,t);return!!(n&&r===`create`&&c.isMarkdownFilePath(n))}function h({content:r,path:c,onView:u}){let{t:d}=e.useTranslation(`openhands`),f=c.split(`/`).pop()||c;return(0,l.jsxs)(`div`,{className:`w-full overflow-hidden rounded-[12px] border border-[var(--oh-border)] bg-[var(--oh-surface)]`,"data-testid":`markdown-file-preview`,children:[(0,l.jsx)(`div`,{"data-testid":`markdown-file-preview-content`,className:`max-h-40 overflow-y-auto px-4 py-3 text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]`,children:(0,l.jsx)(i.MarkdownRenderer,{content:r,includeStandard:!0,includeHeadings:!0,components:s.planComponents})}),(0,l.jsxs)(`div`,{className:`flex h-10 items-center justify-between gap-2 border-t border-[var(--oh-border)] px-3`,children:[(0,l.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,l.jsx)(a.default,{className:`h-3.5 w-3.5 flex-shrink-0 text-[var(--oh-muted)]`}),(0,l.jsx)(o.Typography.Text,{className:`truncate font-mono text-[11px] leading-4 tracking-[0.11px] text-[var(--oh-muted)]`,children:f})]}),u?(0,l.jsxs)(`button`,{type:`button`,onClick:u,className:`flex shrink-0 cursor-pointer items-center gap-1 transition-opacity hover:opacity-80`,"data-testid":`markdown-file-preview-view`,children:[(0,l.jsx)(o.Typography.Text,{className:`text-[11px] leading-4 tracking-[0.11px] text-white`,children:d(t.I18nKey.COMMON$VIEW)}),(0,l.jsx)(n.ArrowUpRight,{className:`text-white`,size:16})]}):null]})]})}exports.MarkdownFilePreview=h,exports.isMarkdownFileEditorEvent=m;
|
|
2
|
+
//# sourceMappingURL=markdown-file-preview.cjs.map
|
package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-file-preview.cjs","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/primitives/markdown-file-preview.tsx"],"sourcesContent":["/**\n * Inline markdown artifact preview for chat tool cards.\n *\n * Shows a height-limited scrollable rich preview so long reports stay compact\n * in the stream; the footer View action deep-links into the Files drawer for\n * the full document. Markdown *create* file-editor events stay expanded and\n * ungrouped so the preview is visible without an extra click.\n */\nimport { useTranslation } from \"react-i18next\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport FileIcon from \"#/icons/file.svg?react\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { MarkdownRenderer } from \"#/components/features/markdown/markdown-renderer\";\nimport { planComponents } from \"#/components/features/markdown/plan-components\";\nimport { Typography } from \"#/ui/typography\";\nimport { isMarkdownFilePath } from \"#/utils/is-markdown-file-path\";\nimport type {\n ActionEvent,\n ObservationEvent,\n OpenHandsEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport type {\n FileEditorAction,\n StrReplaceEditorAction,\n} from \"#/types/agent-server/core/base/action\";\nimport type {\n FileEditorObservation,\n StrReplaceEditorObservation,\n} from \"#/types/agent-server/core/base/observation\";\n\nexport { isMarkdownFilePath } from \"#/utils/is-markdown-file-path\";\n\nconst FILE_EDITOR_ACTION_KINDS = new Set([\n \"FileEditorAction\",\n \"StrReplaceEditorAction\",\n]);\nconst FILE_EDITOR_OBSERVATION_KINDS = new Set([\n \"FileEditorObservation\",\n \"StrReplaceEditorObservation\",\n]);\n\ninterface MarkdownFilePreviewProps {\n content: string;\n path: string;\n /** When omitted (e.g. in-flight create), the View affordance is hidden. */\n onView?: () => void;\n}\n\n/**\n * Resolves the file path for a file-editor action/observation, including the\n * observation's originating action when the observation omits `path`.\n */\nfunction getFileEditorEventPath(\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): string | null {\n if (isActionEvent(event) && FILE_EDITOR_ACTION_KINDS.has(event.action.kind)) {\n return (\n (event as ActionEvent<FileEditorAction | StrReplaceEditorAction>).action\n .path || null\n );\n }\n\n if (\n isObservationEvent(event) &&\n FILE_EDITOR_OBSERVATION_KINDS.has(event.observation.kind)\n ) {\n const path = (\n event as ObservationEvent<\n FileEditorObservation | StrReplaceEditorObservation\n >\n ).observation.path;\n if (path) return path;\n if (\n correspondingAction &&\n FILE_EDITOR_ACTION_KINDS.has(correspondingAction.action.kind)\n ) {\n return (\n (\n correspondingAction as ActionEvent<\n FileEditorAction | StrReplaceEditorAction\n >\n ).action.path || null\n );\n }\n }\n\n return null;\n}\n\n/**\n * Resolves the file-editor command (`create` / `view` / …), including the\n * observation's originating action when the observation omits `command`.\n */\nfunction getFileEditorEventCommand(\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): string | null {\n if (isActionEvent(event) && FILE_EDITOR_ACTION_KINDS.has(event.action.kind)) {\n return (\n (event as ActionEvent<FileEditorAction | StrReplaceEditorAction>).action\n .command || null\n );\n }\n\n if (\n isObservationEvent(event) &&\n FILE_EDITOR_OBSERVATION_KINDS.has(event.observation.kind)\n ) {\n const command = (\n event as ObservationEvent<\n FileEditorObservation | StrReplaceEditorObservation\n >\n ).observation.command;\n if (command) return command;\n if (\n correspondingAction &&\n FILE_EDITOR_ACTION_KINDS.has(correspondingAction.action.kind)\n ) {\n return (\n (\n correspondingAction as ActionEvent<\n FileEditorAction | StrReplaceEditorAction\n >\n ).action.command || null\n );\n }\n }\n\n return null;\n}\n\n/**\n * True for file-editor *create* events whose path is a markdown artifact.\n *\n * Used to keep those cards expanded and outside collapsed action groups so\n * the clipped preview is visible by default. Reads/edits of `.md` files stay\n * on the normal groupable path.\n */\nexport function isMarkdownFileEditorEvent(\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): boolean {\n const path = getFileEditorEventPath(event, correspondingAction);\n const command = getFileEditorEventCommand(event, correspondingAction);\n return Boolean(path && command === \"create\" && isMarkdownFilePath(path));\n}\n\n/**\n * Height-clipped markdown card with an optional View bar that opens the file.\n */\nexport function MarkdownFilePreview({\n content,\n path,\n onView,\n}: MarkdownFilePreviewProps) {\n const { t } = useTranslation(\"openhands\");\n const fileName = path.split(\"/\").pop() || path;\n\n return (\n <div\n className=\"w-full overflow-hidden rounded-[12px] border border-[var(--oh-border)] bg-[var(--oh-surface)]\"\n data-testid=\"markdown-file-preview\"\n >\n <div\n data-testid=\"markdown-file-preview-content\"\n className=\"max-h-40 overflow-y-auto px-4 py-3 text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]\"\n >\n {/* Deliberately compact: the clipped in-stream card reuses the plan\n preview's small typography; the Files drawer renders the same\n artifact full-size with the default components. */}\n <MarkdownRenderer\n content={content}\n includeStandard\n includeHeadings\n components={planComponents}\n />\n </div>\n <div className=\"flex h-10 items-center justify-between gap-2 border-t border-[var(--oh-border)] px-3\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <FileIcon className=\"h-3.5 w-3.5 flex-shrink-0 text-[var(--oh-muted)]\" />\n <Typography.Text className=\"truncate font-mono text-[11px] leading-4 tracking-[0.11px] text-[var(--oh-muted)]\">\n {fileName}\n </Typography.Text>\n </div>\n {onView ? (\n <button\n type=\"button\"\n onClick={onView}\n className=\"flex shrink-0 cursor-pointer items-center gap-1 transition-opacity hover:opacity-80\"\n data-testid=\"markdown-file-preview-view\"\n >\n <Typography.Text className=\"text-[11px] leading-4 tracking-[0.11px] text-white\">\n {t(I18nKey.COMMON$VIEW)}\n </Typography.Text>\n <ArrowUpRight className=\"text-white\" size={16} />\n </button>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":"ynBAoCA,IAAM,EAA2B,IAAI,IAAI,CACvC,mBACA,wBACF,CAAC,EACK,EAAgC,IAAI,IAAI,CAC5C,wBACA,6BACF,CAAC,EAaD,SAAS,EACP,EACA,EACe,CACf,GAAI,EAAA,cAAc,CAAK,GAAK,EAAyB,IAAI,EAAM,OAAO,IAAI,EACxE,OACG,EAAiE,OAC/D,MAAQ,KAIf,GACE,EAAA,mBAAmB,CAAK,GACxB,EAA8B,IAAI,EAAM,YAAY,IAAI,EACxD,CACA,IAAM,EACJ,EAGA,YAAY,KACd,GAAI,EAAM,OAAO,EACjB,GACE,GACA,EAAyB,IAAI,EAAoB,OAAO,IAAI,EAE5D,OAEI,EAGA,OAAO,MAAQ,IAGvB,CAEA,OAAO,IACT,CAMA,SAAS,EACP,EACA,EACe,CACf,GAAI,EAAA,cAAc,CAAK,GAAK,EAAyB,IAAI,EAAM,OAAO,IAAI,EACxE,OACG,EAAiE,OAC/D,SAAW,KAIlB,GACE,EAAA,mBAAmB,CAAK,GACxB,EAA8B,IAAI,EAAM,YAAY,IAAI,EACxD,CACA,IAAM,EACJ,EAGA,YAAY,QACd,GAAI,EAAS,OAAO,EACpB,GACE,GACA,EAAyB,IAAI,EAAoB,OAAO,IAAI,EAE5D,OAEI,EAGA,OAAO,SAAW,IAG1B,CAEA,OAAO,IACT,CASA,SAAgB,EACd,EACA,EACS,CACT,IAAM,EAAO,EAAuB,EAAO,CAAmB,EACxD,EAAU,EAA0B,EAAO,CAAmB,EACpE,MAAO,GAAQ,GAAQ,IAAY,UAAY,EAAA,mBAAmB,CAAI,EACxE,CAKA,SAAgB,EAAoB,CAClC,UACA,OACA,UAC2B,CAC3B,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAW,EAAK,MAAM,GAAG,EAAE,IAAI,GAAK,EAE1C,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAU,gGACV,cAAY,iCAFd,EAIE,EAAA,EAAA,KAAC,MAAD,CACE,cAAY,gCACZ,UAAU,4HAKV,EAAA,EAAA,KAAC,EAAA,iBAAD,CACW,UACT,gBAAA,GACA,gBAAA,GACA,WAAY,EAAA,cACb,CAAA,CACE,CAAA,GACL,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,gGAAf,EACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,6CAAf,EACE,EAAA,EAAA,KAAC,EAAA,QAAD,CAAU,UAAU,kDAAoD,CAAA,GACxE,EAAA,EAAA,KAAC,EAAA,WAAW,KAAZ,CAAiB,UAAU,6FACxB,CACc,CAAA,CACd,IACJ,GACC,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,QAAS,EACT,UAAU,sFACV,cAAY,sCAJd,EAME,EAAA,EAAA,KAAC,EAAA,WAAW,KAAZ,CAAiB,UAAU,8DACxB,EAAE,EAAA,QAAQ,WAAW,CACP,CAAA,GACjB,EAAA,EAAA,KAAC,EAAA,aAAD,CAAc,UAAU,aAAa,KAAM,EAAK,CAAA,CAC1C,IACN,IACD,GACF,GAET"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ActionEvent, OpenHandsEvent } from "#/types/agent-server/core";
|
|
2
|
+
export { isMarkdownFilePath } from "#/utils/is-markdown-file-path";
|
|
3
|
+
interface MarkdownFilePreviewProps {
|
|
4
|
+
content: string;
|
|
5
|
+
path: string;
|
|
6
|
+
/** When omitted (e.g. in-flight create), the View affordance is hidden. */
|
|
7
|
+
onView?: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* True for file-editor *create* events whose path is a markdown artifact.
|
|
11
|
+
*
|
|
12
|
+
* Used to keep those cards expanded and outside collapsed action groups so
|
|
13
|
+
* the clipped preview is visible by default. Reads/edits of `.md` files stay
|
|
14
|
+
* on the normal groupable path.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isMarkdownFileEditorEvent(event: OpenHandsEvent, correspondingAction?: ActionEvent): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Height-clipped markdown card with an optional View bar that opens the file.
|
|
19
|
+
*/
|
|
20
|
+
export declare function MarkdownFilePreview({ content, path, onView, }: MarkdownFilePreviewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useTranslation as e } from "../../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
|
+
import { I18nKey as t } from "../../../../../i18n/declaration.js";
|
|
3
|
+
import { ArrowUpRight as n } from "../../../../../node_modules/lucide-react/dist/esm/icons/arrow-up-right.js";
|
|
4
|
+
import { isActionEvent as r, isObservationEvent as i } from "../../../../../types/agent-server/type-guards.js";
|
|
5
|
+
import { MarkdownRenderer as a } from "../../../markdown/markdown-renderer.js";
|
|
6
|
+
import o from "../../../../../icons/file.js";
|
|
7
|
+
import { Typography as s } from "../../../../../ui/typography.js";
|
|
8
|
+
import { planComponents as c } from "../../../markdown/plan-components.js";
|
|
9
|
+
import { isMarkdownFilePath as l } from "../../../../../utils/is-markdown-file-path.js";
|
|
10
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/features/chat/tool-visualizers/primitives/markdown-file-preview.tsx
|
|
12
|
+
var f = new Set(["FileEditorAction", "StrReplaceEditorAction"]), p = new Set(["FileEditorObservation", "StrReplaceEditorObservation"]);
|
|
13
|
+
function m(e, t) {
|
|
14
|
+
if (r(e) && f.has(e.action.kind)) return e.action.path || null;
|
|
15
|
+
if (i(e) && p.has(e.observation.kind)) {
|
|
16
|
+
let n = e.observation.path;
|
|
17
|
+
if (n) return n;
|
|
18
|
+
if (t && f.has(t.action.kind)) return t.action.path || null;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
function h(e, t) {
|
|
23
|
+
if (r(e) && f.has(e.action.kind)) return e.action.command || null;
|
|
24
|
+
if (i(e) && p.has(e.observation.kind)) {
|
|
25
|
+
let n = e.observation.command;
|
|
26
|
+
if (n) return n;
|
|
27
|
+
if (t && f.has(t.action.kind)) return t.action.command || null;
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
function g(e, t) {
|
|
32
|
+
let n = m(e, t), r = h(e, t);
|
|
33
|
+
return !!(n && r === "create" && l(n));
|
|
34
|
+
}
|
|
35
|
+
function _({ content: r, path: i, onView: l }) {
|
|
36
|
+
let { t: f } = e("openhands"), p = i.split("/").pop() || i;
|
|
37
|
+
return /* @__PURE__ */ d("div", {
|
|
38
|
+
className: "w-full overflow-hidden rounded-[12px] border border-[var(--oh-border)] bg-[var(--oh-surface)]",
|
|
39
|
+
"data-testid": "markdown-file-preview",
|
|
40
|
+
children: [/* @__PURE__ */ u("div", {
|
|
41
|
+
"data-testid": "markdown-file-preview-content",
|
|
42
|
+
className: "max-h-40 overflow-y-auto px-4 py-3 text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]",
|
|
43
|
+
children: /* @__PURE__ */ u(a, {
|
|
44
|
+
content: r,
|
|
45
|
+
includeStandard: !0,
|
|
46
|
+
includeHeadings: !0,
|
|
47
|
+
components: c
|
|
48
|
+
})
|
|
49
|
+
}), /* @__PURE__ */ d("div", {
|
|
50
|
+
className: "flex h-10 items-center justify-between gap-2 border-t border-[var(--oh-border)] px-3",
|
|
51
|
+
children: [/* @__PURE__ */ d("div", {
|
|
52
|
+
className: "flex min-w-0 items-center gap-1.5",
|
|
53
|
+
children: [/* @__PURE__ */ u(o, { className: "h-3.5 w-3.5 flex-shrink-0 text-[var(--oh-muted)]" }), /* @__PURE__ */ u(s.Text, {
|
|
54
|
+
className: "truncate font-mono text-[11px] leading-4 tracking-[0.11px] text-[var(--oh-muted)]",
|
|
55
|
+
children: p
|
|
56
|
+
})]
|
|
57
|
+
}), l ? /* @__PURE__ */ d("button", {
|
|
58
|
+
type: "button",
|
|
59
|
+
onClick: l,
|
|
60
|
+
className: "flex shrink-0 cursor-pointer items-center gap-1 transition-opacity hover:opacity-80",
|
|
61
|
+
"data-testid": "markdown-file-preview-view",
|
|
62
|
+
children: [/* @__PURE__ */ u(s.Text, {
|
|
63
|
+
className: "text-[11px] leading-4 tracking-[0.11px] text-white",
|
|
64
|
+
children: f(t.COMMON$VIEW)
|
|
65
|
+
}), /* @__PURE__ */ u(n, {
|
|
66
|
+
className: "text-white",
|
|
67
|
+
size: 16
|
|
68
|
+
})]
|
|
69
|
+
}) : null]
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { _ as MarkdownFilePreview, g as isMarkdownFileEditorEvent };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=markdown-file-preview.js.map
|
package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-file-preview.js","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/primitives/markdown-file-preview.tsx"],"sourcesContent":["/**\n * Inline markdown artifact preview for chat tool cards.\n *\n * Shows a height-limited scrollable rich preview so long reports stay compact\n * in the stream; the footer View action deep-links into the Files drawer for\n * the full document. Markdown *create* file-editor events stay expanded and\n * ungrouped so the preview is visible without an extra click.\n */\nimport { useTranslation } from \"react-i18next\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport FileIcon from \"#/icons/file.svg?react\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { MarkdownRenderer } from \"#/components/features/markdown/markdown-renderer\";\nimport { planComponents } from \"#/components/features/markdown/plan-components\";\nimport { Typography } from \"#/ui/typography\";\nimport { isMarkdownFilePath } from \"#/utils/is-markdown-file-path\";\nimport type {\n ActionEvent,\n ObservationEvent,\n OpenHandsEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport type {\n FileEditorAction,\n StrReplaceEditorAction,\n} from \"#/types/agent-server/core/base/action\";\nimport type {\n FileEditorObservation,\n StrReplaceEditorObservation,\n} from \"#/types/agent-server/core/base/observation\";\n\nexport { isMarkdownFilePath } from \"#/utils/is-markdown-file-path\";\n\nconst FILE_EDITOR_ACTION_KINDS = new Set([\n \"FileEditorAction\",\n \"StrReplaceEditorAction\",\n]);\nconst FILE_EDITOR_OBSERVATION_KINDS = new Set([\n \"FileEditorObservation\",\n \"StrReplaceEditorObservation\",\n]);\n\ninterface MarkdownFilePreviewProps {\n content: string;\n path: string;\n /** When omitted (e.g. in-flight create), the View affordance is hidden. */\n onView?: () => void;\n}\n\n/**\n * Resolves the file path for a file-editor action/observation, including the\n * observation's originating action when the observation omits `path`.\n */\nfunction getFileEditorEventPath(\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): string | null {\n if (isActionEvent(event) && FILE_EDITOR_ACTION_KINDS.has(event.action.kind)) {\n return (\n (event as ActionEvent<FileEditorAction | StrReplaceEditorAction>).action\n .path || null\n );\n }\n\n if (\n isObservationEvent(event) &&\n FILE_EDITOR_OBSERVATION_KINDS.has(event.observation.kind)\n ) {\n const path = (\n event as ObservationEvent<\n FileEditorObservation | StrReplaceEditorObservation\n >\n ).observation.path;\n if (path) return path;\n if (\n correspondingAction &&\n FILE_EDITOR_ACTION_KINDS.has(correspondingAction.action.kind)\n ) {\n return (\n (\n correspondingAction as ActionEvent<\n FileEditorAction | StrReplaceEditorAction\n >\n ).action.path || null\n );\n }\n }\n\n return null;\n}\n\n/**\n * Resolves the file-editor command (`create` / `view` / …), including the\n * observation's originating action when the observation omits `command`.\n */\nfunction getFileEditorEventCommand(\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): string | null {\n if (isActionEvent(event) && FILE_EDITOR_ACTION_KINDS.has(event.action.kind)) {\n return (\n (event as ActionEvent<FileEditorAction | StrReplaceEditorAction>).action\n .command || null\n );\n }\n\n if (\n isObservationEvent(event) &&\n FILE_EDITOR_OBSERVATION_KINDS.has(event.observation.kind)\n ) {\n const command = (\n event as ObservationEvent<\n FileEditorObservation | StrReplaceEditorObservation\n >\n ).observation.command;\n if (command) return command;\n if (\n correspondingAction &&\n FILE_EDITOR_ACTION_KINDS.has(correspondingAction.action.kind)\n ) {\n return (\n (\n correspondingAction as ActionEvent<\n FileEditorAction | StrReplaceEditorAction\n >\n ).action.command || null\n );\n }\n }\n\n return null;\n}\n\n/**\n * True for file-editor *create* events whose path is a markdown artifact.\n *\n * Used to keep those cards expanded and outside collapsed action groups so\n * the clipped preview is visible by default. Reads/edits of `.md` files stay\n * on the normal groupable path.\n */\nexport function isMarkdownFileEditorEvent(\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): boolean {\n const path = getFileEditorEventPath(event, correspondingAction);\n const command = getFileEditorEventCommand(event, correspondingAction);\n return Boolean(path && command === \"create\" && isMarkdownFilePath(path));\n}\n\n/**\n * Height-clipped markdown card with an optional View bar that opens the file.\n */\nexport function MarkdownFilePreview({\n content,\n path,\n onView,\n}: MarkdownFilePreviewProps) {\n const { t } = useTranslation(\"openhands\");\n const fileName = path.split(\"/\").pop() || path;\n\n return (\n <div\n className=\"w-full overflow-hidden rounded-[12px] border border-[var(--oh-border)] bg-[var(--oh-surface)]\"\n data-testid=\"markdown-file-preview\"\n >\n <div\n data-testid=\"markdown-file-preview-content\"\n className=\"max-h-40 overflow-y-auto px-4 py-3 text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]\"\n >\n {/* Deliberately compact: the clipped in-stream card reuses the plan\n preview's small typography; the Files drawer renders the same\n artifact full-size with the default components. */}\n <MarkdownRenderer\n content={content}\n includeStandard\n includeHeadings\n components={planComponents}\n />\n </div>\n <div className=\"flex h-10 items-center justify-between gap-2 border-t border-[var(--oh-border)] px-3\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <FileIcon className=\"h-3.5 w-3.5 flex-shrink-0 text-[var(--oh-muted)]\" />\n <Typography.Text className=\"truncate font-mono text-[11px] leading-4 tracking-[0.11px] text-[var(--oh-muted)]\">\n {fileName}\n </Typography.Text>\n </div>\n {onView ? (\n <button\n type=\"button\"\n onClick={onView}\n className=\"flex shrink-0 cursor-pointer items-center gap-1 transition-opacity hover:opacity-80\"\n data-testid=\"markdown-file-preview-view\"\n >\n <Typography.Text className=\"text-[11px] leading-4 tracking-[0.11px] text-white\">\n {t(I18nKey.COMMON$VIEW)}\n </Typography.Text>\n <ArrowUpRight className=\"text-white\" size={16} />\n </button>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAoCA,IAAM,IAA2B,IAAI,IAAI,CACvC,oBACA,wBACF,CAAC,GACK,IAAgC,IAAI,IAAI,CAC5C,yBACA,6BACF,CAAC;AAaD,SAAS,EACP,GACA,GACe;CACf,IAAI,EAAc,CAAK,KAAK,EAAyB,IAAI,EAAM,OAAO,IAAI,GACxE,OACG,EAAiE,OAC/D,QAAQ;CAIf,IACE,EAAmB,CAAK,KACxB,EAA8B,IAAI,EAAM,YAAY,IAAI,GACxD;EACA,IAAM,IACJ,EAGA,YAAY;EACd,IAAI,GAAM,OAAO;EACjB,IACE,KACA,EAAyB,IAAI,EAAoB,OAAO,IAAI,GAE5D,OAEI,EAGA,OAAO,QAAQ;CAGvB;CAEA,OAAO;AACT;AAMA,SAAS,EACP,GACA,GACe;CACf,IAAI,EAAc,CAAK,KAAK,EAAyB,IAAI,EAAM,OAAO,IAAI,GACxE,OACG,EAAiE,OAC/D,WAAW;CAIlB,IACE,EAAmB,CAAK,KACxB,EAA8B,IAAI,EAAM,YAAY,IAAI,GACxD;EACA,IAAM,IACJ,EAGA,YAAY;EACd,IAAI,GAAS,OAAO;EACpB,IACE,KACA,EAAyB,IAAI,EAAoB,OAAO,IAAI,GAE5D,OAEI,EAGA,OAAO,WAAW;CAG1B;CAEA,OAAO;AACT;AASA,SAAgB,EACd,GACA,GACS;CACT,IAAM,IAAO,EAAuB,GAAO,CAAmB,GACxD,IAAU,EAA0B,GAAO,CAAmB;CACpE,OAAO,GAAQ,KAAQ,MAAY,YAAY,EAAmB,CAAI;AACxE;AAKA,SAAgB,EAAoB,EAClC,YACA,SACA,aAC2B;CAC3B,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,IAAW,EAAK,MAAM,GAAG,EAAE,IAAI,KAAK;CAE1C,OACE,kBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,kBAAC,OAAD;GACE,eAAY;GACZ,WAAU;aAKV,kBAAC,GAAD;IACW;IACT,iBAAA;IACA,iBAAA;IACA,YAAY;GACb,CAAA;EACE,CAAA,GACL,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAU,WAAU,mDAAoD,CAAA,GACxE,kBAAC,EAAW,MAAZ;KAAiB,WAAU;eACxB;IACc,CAAA,CACd;OACJ,IACC,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;IACV,eAAY;cAJd,CAME,kBAAC,EAAW,MAAZ;KAAiB,WAAU;eACxB,EAAE,EAAQ,WAAW;IACP,CAAA,GACjB,kBAAC,GAAD;KAAc,WAAU;KAAa,MAAM;IAAK,CAAA,CAC1C;QACN,IACD;IACF;;AAET"}
|
|
@@ -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("../../../utils/status.cjs"),r=require("../../../utils/utils.cjs"),i=require("../../../ui/context-menu.cjs"),a=require("../../../hooks/use-click-outside-element.cjs"),o=require("../../../ui/divider.cjs"),s=require("../../../icons/stop-circle.cjs"),c=require("../../../icons/play-circle.cjs"),l=require("./server-status-context-menu-icon-text.cjs"),u=require("./server-status.cjs");let d=require("react/jsx-runtime");function f({onClose:f,onStopServer:p,onStartServer:m,executionStatus:h,position:g=`top`,className:_=``,isPausing:v=!1}){let{t:
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("../../../utils/status.cjs"),r=require("../../../utils/utils.cjs"),i=require("../../../ui/context-menu.cjs"),a=require("../../../hooks/use-click-outside-element.cjs"),o=require("../../../ui/divider.cjs"),s=require("../../../icons/stop-circle.cjs"),c=require("../../../icons/play-circle.cjs"),l=require("./server-status-context-menu-icon-text.cjs"),u=require("./server-status.cjs");let d=require("react/jsx-runtime");function f({onClose:f,onStopServer:p,onStartServer:m,executionStatus:h,position:g=`top`,className:_=``,isPausing:v=!1,ignoreOutsideClickRef:y}){let{t:b}=e.useTranslation(`openhands`),x=a.useClickOutsideElement(f,y),S=n.isExecutionActive(h),C=n.isExecutionPaused(h),w=S||C;return(0,d.jsxs)(i.ContextMenu,{ref:x,testId:`server-status-context-menu`,position:g,alignment:`left`,size:`default`,className:r.cn(`left-2 w-fit min-w-42`,_),children:[(0,d.jsx)(u.default,{executionStatus:h,isPausing:v,className:`pl-0 pr-2 py-1`}),w&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.Divider,{inset:`menu`}),S&&p&&(0,d.jsx)(l.ServerStatusContextMenuIconText,{icon:(0,d.jsx)(s.default,{width:18,height:18}),text:b(t.I18nKey.COMMON$STOP_RUNTIME),onClick:p,testId:`stop-server-button`}),C&&m&&(0,d.jsx)(l.ServerStatusContextMenuIconText,{icon:(0,d.jsx)(c.default,{width:18,height:18}),text:b(t.I18nKey.COMMON$START_RUNTIME),onClick:m,testId:`start-server-button`})]})]})}exports.ServerStatusContextMenu=f;
|
|
2
2
|
//# sourceMappingURL=server-status-context-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-status-context-menu.cjs","names":[],"sources":["../../../../src/components/features/controls/server-status-context-menu.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport StopCircleIcon from \"#/icons/stop-circle.svg?react\";\nimport PlayCircleIcon from \"#/icons/play-circle.svg?react\";\nimport { ServerStatusContextMenuIconText } from \"./server-status-context-menu-icon-text\";\nimport { ServerStatus } from \"./server-status\";\nimport { Divider } from \"#/ui/divider\";\nimport { cn } from \"#/utils/utils\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionActive, isExecutionPaused } from \"#/utils/status\";\n\ninterface ServerStatusContextMenuProps {\n onClose: () => void;\n onStopServer?: (event:
|
|
1
|
+
{"version":3,"file":"server-status-context-menu.cjs","names":[],"sources":["../../../../src/components/features/controls/server-status-context-menu.tsx"],"sourcesContent":["import type { MouseEvent, RefObject } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport StopCircleIcon from \"#/icons/stop-circle.svg?react\";\nimport PlayCircleIcon from \"#/icons/play-circle.svg?react\";\nimport { ServerStatusContextMenuIconText } from \"./server-status-context-menu-icon-text\";\nimport { ServerStatus } from \"./server-status\";\nimport { Divider } from \"#/ui/divider\";\nimport { cn } from \"#/utils/utils\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionActive, isExecutionPaused } from \"#/utils/status\";\n\ninterface ServerStatusContextMenuProps {\n onClose: () => void;\n onStopServer?: (event: MouseEvent<HTMLButtonElement>) => void;\n onStartServer?: (event: MouseEvent<HTMLButtonElement>) => void;\n executionStatus: ExecutionStatus | null;\n position?: \"top\" | \"bottom\";\n className?: string;\n isPausing?: boolean;\n ignoreOutsideClickRef?: RefObject<HTMLElement | null>;\n}\n\nexport function ServerStatusContextMenu({\n onClose,\n onStopServer,\n onStartServer,\n executionStatus,\n position = \"top\",\n className = \"\",\n isPausing = false,\n ignoreOutsideClickRef,\n}: ServerStatusContextMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const ref = useClickOutsideElement<HTMLUListElement>(\n onClose,\n ignoreOutsideClickRef,\n );\n\n const isActive = isExecutionActive(executionStatus);\n const isPaused = isExecutionPaused(executionStatus);\n const shouldActionShown = isActive || isPaused;\n\n return (\n <ContextMenu\n ref={ref}\n testId=\"server-status-context-menu\"\n position={position}\n alignment=\"left\"\n size=\"default\"\n className={cn(\"left-2 w-fit min-w-42\", className)}\n >\n <ServerStatus\n executionStatus={executionStatus}\n isPausing={isPausing}\n className=\"pl-0 pr-2 py-1\"\n />\n\n {shouldActionShown && (\n <>\n <Divider inset=\"menu\" />\n\n {isActive && onStopServer && (\n <ServerStatusContextMenuIconText\n icon={<StopCircleIcon width={18} height={18} />}\n text={t(I18nKey.COMMON$STOP_RUNTIME)}\n onClick={onStopServer}\n testId=\"stop-server-button\"\n />\n )}\n\n {isPaused && onStartServer && (\n <ServerStatusContextMenuIconText\n icon={<PlayCircleIcon width={18} height={18} />}\n text={t(I18nKey.COMMON$START_RUNTIME)}\n onClick={onStartServer}\n testId=\"start-server-button\"\n />\n )}\n </>\n )}\n </ContextMenu>\n );\n}\n"],"mappings":"0lBAyBA,SAAgB,EAAwB,CACtC,UACA,eACA,gBACA,kBACA,WAAW,MACX,YAAY,GACZ,YAAY,GACZ,yBAC+B,CAC/B,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAM,EAAA,uBACV,EACA,CACF,EAEM,EAAW,EAAA,kBAAkB,CAAe,EAC5C,EAAW,EAAA,kBAAkB,CAAe,EAC5C,EAAoB,GAAY,EAEtC,OACE,EAAA,EAAA,MAAC,EAAA,YAAD,CACO,MACL,OAAO,6BACG,WACV,UAAU,OACV,KAAK,UACL,UAAW,EAAA,GAAG,wBAAyB,CAAS,WANlD,EAQE,EAAA,EAAA,KAAC,EAAA,QAAD,CACmB,kBACN,YACX,UAAU,gBACX,CAAA,EAEA,IACC,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAA,QAAD,CAAS,MAAM,MAAQ,CAAA,EAEtB,GAAY,IACX,EAAA,EAAA,KAAC,EAAA,gCAAD,CACE,MAAM,EAAA,EAAA,KAAC,EAAA,QAAD,CAAgB,MAAO,GAAI,OAAQ,EAAK,CAAA,EAC9C,KAAM,EAAE,EAAA,QAAQ,mBAAmB,EACnC,QAAS,EACT,OAAO,oBACR,CAAA,EAGF,GAAY,IACX,EAAA,EAAA,KAAC,EAAA,gCAAD,CACE,MAAM,EAAA,EAAA,KAAC,EAAA,QAAD,CAAgB,MAAO,GAAI,OAAQ,EAAK,CAAA,EAC9C,KAAM,EAAE,EAAA,QAAQ,oBAAoB,EACpC,QAAS,EACT,OAAO,qBACR,CAAA,CAEH,CAAA,CAAA,CAEO,GAEjB"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import type { MouseEvent, RefObject } from "react";
|
|
1
2
|
import { ExecutionStatus } from "#/types/agent-server/core/base/common";
|
|
2
3
|
interface ServerStatusContextMenuProps {
|
|
3
4
|
onClose: () => void;
|
|
4
|
-
onStopServer?: (event:
|
|
5
|
-
onStartServer?: (event:
|
|
5
|
+
onStopServer?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
onStartServer?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
7
|
executionStatus: ExecutionStatus | null;
|
|
7
8
|
position?: "top" | "bottom";
|
|
8
9
|
className?: string;
|
|
9
10
|
isPausing?: boolean;
|
|
11
|
+
ignoreOutsideClickRef?: RefObject<HTMLElement | null>;
|
|
10
12
|
}
|
|
11
|
-
export declare function ServerStatusContextMenu({ onClose, onStopServer, onStartServer, executionStatus, position, className, isPausing, }: ServerStatusContextMenuProps): import("react").JSX.Element;
|
|
13
|
+
export declare function ServerStatusContextMenu({ onClose, onStopServer, onStartServer, executionStatus, position, className, isPausing, ignoreOutsideClickRef, }: ServerStatusContextMenuProps): import("react").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -11,10 +11,10 @@ import { ServerStatusContextMenuIconText as u } from "./server-status-context-me
|
|
|
11
11
|
import d from "./server-status.js";
|
|
12
12
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/features/controls/server-status-context-menu.tsx
|
|
14
|
-
function h({ onClose: h, onStopServer: g, onStartServer: _, executionStatus: v, position: y = "top", className: b = "", isPausing: x = !1 }) {
|
|
15
|
-
let { t:
|
|
14
|
+
function h({ onClose: h, onStopServer: g, onStartServer: _, executionStatus: v, position: y = "top", className: b = "", isPausing: x = !1, ignoreOutsideClickRef: S }) {
|
|
15
|
+
let { t: C } = e("openhands"), w = o(h, S), T = n(v), E = r(v), D = T || E;
|
|
16
16
|
return /* @__PURE__ */ m(a, {
|
|
17
|
-
ref:
|
|
17
|
+
ref: w,
|
|
18
18
|
testId: "server-status-context-menu",
|
|
19
19
|
position: y,
|
|
20
20
|
alignment: "left",
|
|
@@ -24,23 +24,23 @@ function h({ onClose: h, onStopServer: g, onStartServer: _, executionStatus: v,
|
|
|
24
24
|
executionStatus: v,
|
|
25
25
|
isPausing: x,
|
|
26
26
|
className: "pl-0 pr-2 py-1"
|
|
27
|
-
}),
|
|
27
|
+
}), D && /* @__PURE__ */ m(f, { children: [
|
|
28
28
|
/* @__PURE__ */ p(s, { inset: "menu" }),
|
|
29
|
-
|
|
29
|
+
T && g && /* @__PURE__ */ p(u, {
|
|
30
30
|
icon: /* @__PURE__ */ p(c, {
|
|
31
31
|
width: 18,
|
|
32
32
|
height: 18
|
|
33
33
|
}),
|
|
34
|
-
text:
|
|
34
|
+
text: C(t.COMMON$STOP_RUNTIME),
|
|
35
35
|
onClick: g,
|
|
36
36
|
testId: "stop-server-button"
|
|
37
37
|
}),
|
|
38
|
-
|
|
38
|
+
E && _ && /* @__PURE__ */ p(u, {
|
|
39
39
|
icon: /* @__PURE__ */ p(l, {
|
|
40
40
|
width: 18,
|
|
41
41
|
height: 18
|
|
42
42
|
}),
|
|
43
|
-
text:
|
|
43
|
+
text: C(t.COMMON$START_RUNTIME),
|
|
44
44
|
onClick: _,
|
|
45
45
|
testId: "start-server-button"
|
|
46
46
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-status-context-menu.js","names":[],"sources":["../../../../src/components/features/controls/server-status-context-menu.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport StopCircleIcon from \"#/icons/stop-circle.svg?react\";\nimport PlayCircleIcon from \"#/icons/play-circle.svg?react\";\nimport { ServerStatusContextMenuIconText } from \"./server-status-context-menu-icon-text\";\nimport { ServerStatus } from \"./server-status\";\nimport { Divider } from \"#/ui/divider\";\nimport { cn } from \"#/utils/utils\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionActive, isExecutionPaused } from \"#/utils/status\";\n\ninterface ServerStatusContextMenuProps {\n onClose: () => void;\n onStopServer?: (event:
|
|
1
|
+
{"version":3,"file":"server-status-context-menu.js","names":[],"sources":["../../../../src/components/features/controls/server-status-context-menu.tsx"],"sourcesContent":["import type { MouseEvent, RefObject } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport StopCircleIcon from \"#/icons/stop-circle.svg?react\";\nimport PlayCircleIcon from \"#/icons/play-circle.svg?react\";\nimport { ServerStatusContextMenuIconText } from \"./server-status-context-menu-icon-text\";\nimport { ServerStatus } from \"./server-status\";\nimport { Divider } from \"#/ui/divider\";\nimport { cn } from \"#/utils/utils\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionActive, isExecutionPaused } from \"#/utils/status\";\n\ninterface ServerStatusContextMenuProps {\n onClose: () => void;\n onStopServer?: (event: MouseEvent<HTMLButtonElement>) => void;\n onStartServer?: (event: MouseEvent<HTMLButtonElement>) => void;\n executionStatus: ExecutionStatus | null;\n position?: \"top\" | \"bottom\";\n className?: string;\n isPausing?: boolean;\n ignoreOutsideClickRef?: RefObject<HTMLElement | null>;\n}\n\nexport function ServerStatusContextMenu({\n onClose,\n onStopServer,\n onStartServer,\n executionStatus,\n position = \"top\",\n className = \"\",\n isPausing = false,\n ignoreOutsideClickRef,\n}: ServerStatusContextMenuProps) {\n const { t } = useTranslation(\"openhands\");\n const ref = useClickOutsideElement<HTMLUListElement>(\n onClose,\n ignoreOutsideClickRef,\n );\n\n const isActive = isExecutionActive(executionStatus);\n const isPaused = isExecutionPaused(executionStatus);\n const shouldActionShown = isActive || isPaused;\n\n return (\n <ContextMenu\n ref={ref}\n testId=\"server-status-context-menu\"\n position={position}\n alignment=\"left\"\n size=\"default\"\n className={cn(\"left-2 w-fit min-w-42\", className)}\n >\n <ServerStatus\n executionStatus={executionStatus}\n isPausing={isPausing}\n className=\"pl-0 pr-2 py-1\"\n />\n\n {shouldActionShown && (\n <>\n <Divider inset=\"menu\" />\n\n {isActive && onStopServer && (\n <ServerStatusContextMenuIconText\n icon={<StopCircleIcon width={18} height={18} />}\n text={t(I18nKey.COMMON$STOP_RUNTIME)}\n onClick={onStopServer}\n testId=\"stop-server-button\"\n />\n )}\n\n {isPaused && onStartServer && (\n <ServerStatusContextMenuIconText\n icon={<PlayCircleIcon width={18} height={18} />}\n text={t(I18nKey.COMMON$START_RUNTIME)}\n onClick={onStartServer}\n testId=\"start-server-button\"\n />\n )}\n </>\n )}\n </ContextMenu>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,SAAgB,EAAwB,EACtC,YACA,iBACA,kBACA,oBACA,cAAW,OACX,eAAY,IACZ,eAAY,IACZ,4BAC+B;CAC/B,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,IAAM,EACV,GACA,CACF,GAEM,IAAW,EAAkB,CAAe,GAC5C,IAAW,EAAkB,CAAe,GAC5C,IAAoB,KAAY;CAEtC,OACE,kBAAC,GAAD;EACO;EACL,QAAO;EACG;EACV,WAAU;EACV,MAAK;EACL,WAAW,EAAG,yBAAyB,CAAS;YANlD,CAQE,kBAAC,GAAD;GACmB;GACN;GACX,WAAU;EACX,CAAA,GAEA,KACC,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,GAAD,EAAS,OAAM,OAAQ,CAAA;GAEtB,KAAY,KACX,kBAAC,GAAD;IACE,MAAM,kBAAC,GAAD;KAAgB,OAAO;KAAI,QAAQ;IAAK,CAAA;IAC9C,MAAM,EAAE,EAAQ,mBAAmB;IACnC,SAAS;IACT,QAAO;GACR,CAAA;GAGF,KAAY,KACX,kBAAC,GAAD;IACE,MAAM,kBAAC,GAAD;KAAgB,OAAO;KAAI,QAAQ;IAAK,CAAA;IAC9C,MAAM,EAAE,EAAQ,oBAAoB;IACpC,SAAS;IACT,QAAO;GACR,CAAA;EAEH,EAAA,CAAA,CAEO;;AAEjB"}
|