@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message-banner.cjs","names":[],"sources":["../../../../src/components/features/chat/error-message-banner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Check, CircleX, Copy, X } from \"lucide-react\";\nimport { OH_STATUS_ERROR_COLOR } from \"#/constants/status-colors\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { getAcpErrorHeaderKey } from \"#/utils/acp-error-codes\";\nimport { cn } from \"#/utils/utils\";\n\ninterface ErrorMessageBannerProps {\n message: string;\n /** Structured error code (e.g. \"ACPAuthRequired\") used to pick a header. */\n code?: string | null;\n onDismiss?: () => void;\n onRetry?: () => void;\n /** Recovery action (e.g. re-authenticate) shown for credential failures. */\n onReauth?: () => void;\n}\n\nconst DEFAULT_MAX_COLLAPSED_CHARS = 220;\n\nexport function ErrorMessageBanner({\n message,\n code,\n onDismiss,\n onRetry,\n onReauth,\n}: ErrorMessageBannerProps) {\n const { t, i18n } = useTranslation(\"openhands\");\n const headerKey = getAcpErrorHeaderKey(code);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [isMultiLine, setIsMultiLine] = React.useState(false);\n const [isCopied, setIsCopied] = React.useState(false);\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const isI18nKey = i18n.exists(message, { ns: \"openhands\" });\n const displayTextForLength = isI18nKey ? String(t(message)) : message;\n const shouldShowToggle =\n displayTextForLength.length > DEFAULT_MAX_COLLAPSED_CHARS;\n\n const isCollapsed = shouldShowToggle && !isExpanded;\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(displayTextForLength);\n setIsCopied(true);\n } catch {\n displayErrorToast(t(I18nKey.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED));\n }\n };\n\n React.useEffect(() => {\n if (!isCopied) return undefined;\n\n const timeout = setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n\n return () => clearTimeout(timeout);\n }, [isCopied]);\n\n React.useEffect(() => {\n setIsCopied(false);\n }, [displayTextForLength]);\n\n React.useLayoutEffect(() => {\n const content = contentRef.current;\n if (!content) {\n return undefined;\n }\n\n const updateIsMultiLine = () => {\n const lineHeight = Number.parseFloat(\n getComputedStyle(content).lineHeight,\n );\n if (!Number.isFinite(lineHeight) || lineHeight <= 0) {\n setIsMultiLine(false);\n return;\n }\n\n setIsMultiLine(content.getBoundingClientRect().height > lineHeight * 1.5);\n };\n\n updateIsMultiLine();\n\n const observer = new ResizeObserver(updateIsMultiLine);\n observer.observe(content);\n\n return () => observer.disconnect();\n }, [displayTextForLength, isCollapsed, isExpanded, message]);\n\n return (\n <div\n className={cn(\n \"flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\",\n isMultiLine ? \"items-start\" : \"items-center\",\n )}\n data-testid=\"error-message-banner\"\n >\n <CircleX\n
|
|
1
|
+
{"version":3,"file":"error-message-banner.cjs","names":[],"sources":["../../../../src/components/features/chat/error-message-banner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Check, CircleAlert, CircleX, Copy, X } from \"lucide-react\";\nimport { OH_STATUS_ERROR_COLOR } from \"#/constants/status-colors\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { getAcpErrorHeaderKey } from \"#/utils/acp-error-codes\";\nimport { cn } from \"#/utils/utils\";\nimport type { ErrorClassification } from \"@openhands/typescript-client\";\n\ninterface ErrorMessageBannerProps {\n message: string;\n /** Structured error code (e.g. \"ACPAuthRequired\") used to pick a header. */\n code?: string | null;\n onDismiss?: () => void;\n onRetry?: () => void;\n /** Recovery action (e.g. re-authenticate) shown for credential failures. */\n onReauth?: () => void;\n classification?: ErrorClassification | null;\n}\n\nconst DEFAULT_MAX_COLLAPSED_CHARS = 220;\n\nexport function ErrorMessageBanner({\n message,\n code,\n onDismiss,\n onRetry,\n onReauth,\n classification,\n}: ErrorMessageBannerProps) {\n const { t, i18n } = useTranslation(\"openhands\");\n const headerKey = getAcpErrorHeaderKey(code);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [isMultiLine, setIsMultiLine] = React.useState(false);\n const [isCopied, setIsCopied] = React.useState(false);\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const isI18nKey = i18n.exists(message, { ns: \"openhands\" });\n const displayTextForLength = isI18nKey ? String(t(message)) : message;\n const shouldShowToggle =\n displayTextForLength.length > DEFAULT_MAX_COLLAPSED_CHARS;\n\n const isCollapsed = shouldShowToggle && !isExpanded;\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(displayTextForLength);\n setIsCopied(true);\n } catch {\n displayErrorToast(t(I18nKey.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED));\n }\n };\n\n React.useEffect(() => {\n if (!isCopied) return undefined;\n\n const timeout = setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n\n return () => clearTimeout(timeout);\n }, [isCopied]);\n\n React.useEffect(() => {\n setIsCopied(false);\n }, [displayTextForLength]);\n\n React.useLayoutEffect(() => {\n const content = contentRef.current;\n if (!content) {\n return undefined;\n }\n\n const updateIsMultiLine = () => {\n const lineHeight = Number.parseFloat(\n getComputedStyle(content).lineHeight,\n );\n if (!Number.isFinite(lineHeight) || lineHeight <= 0) {\n setIsMultiLine(false);\n return;\n }\n\n setIsMultiLine(content.getBoundingClientRect().height > lineHeight * 1.5);\n };\n\n updateIsMultiLine();\n\n const observer = new ResizeObserver(updateIsMultiLine);\n observer.observe(content);\n\n return () => observer.disconnect();\n }, [displayTextForLength, isCollapsed, isExpanded, message]);\n\n return (\n <div\n className={cn(\n \"flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\",\n isMultiLine ? \"items-start\" : \"items-center\",\n )}\n data-testid=\"error-message-banner\"\n >\n {classification != null &&\n classification.kind !== \"internal\" &&\n classification.kind !== \"unknown\" ? (\n <CircleAlert\n aria-hidden\n className=\"h-4 w-4 shrink-0 text-[var(--oh-warning)]\"\n strokeWidth={2}\n data-testid=\"warning-message-banner-icon\"\n />\n ) : (\n <CircleX\n aria-hidden\n className=\"h-4 w-4 shrink-0\"\n strokeWidth={2}\n style={{ color: OH_STATUS_ERROR_COLOR }}\n data-testid=\"error-message-banner-icon\"\n />\n )}\n <div className=\"min-w-0 flex-1\">\n {headerKey && (\n <div\n className=\"text-sm font-medium text-[var(--oh-foreground)]\"\n data-testid=\"error-message-banner-header\"\n >\n {t(headerKey)}\n </div>\n )}\n <div\n ref={contentRef}\n className={cn(\n \"whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]\",\n isCollapsed && \"line-clamp-3\",\n )}\n data-testid=\"error-message-banner-content\"\n >\n {isI18nKey ? <Trans ns=\"openhands\" i18nKey={message} /> : message}\n </div>\n\n {onReauth && (\n <button\n type=\"button\"\n onClick={onReauth}\n className=\"mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"error-message-banner-reauth\"\n >\n {t(I18nKey.ERROR$ACP_UPDATE_CREDENTIALS)}\n </button>\n )}\n\n {shouldShowToggle && (\n <button\n type=\"button\"\n className=\"mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline\"\n onClick={() => setIsExpanded((prev) => !prev)}\n data-testid=\"error-message-banner-toggle\"\n >\n {isExpanded\n ? t(I18nKey.COMMON$VIEW_LESS)\n : t(I18nKey.COMMON$VIEW_MORE)}\n </button>\n )}\n </div>\n\n <div\n className={cn(\n \"flex shrink-0 gap-1\",\n isMultiLine ? \"self-start\" : \"items-center\",\n )}\n >\n {onRetry && (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"error-message-banner-retry\"\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_RETRY)}\n </button>\n )}\n\n <button\n type=\"button\"\n onClick={handleCopy}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(isCopied ? I18nKey.BUTTON$COPIED : I18nKey.BUTTON$COPY)}\n data-testid=\"error-message-banner-copy\"\n >\n {isCopied ? (\n <Check className=\"h-4 w-4\" aria-hidden />\n ) : (\n <Copy className=\"h-4 w-4\" aria-hidden />\n )}\n </button>\n\n {onDismiss && (\n <button\n type=\"button\"\n onClick={onDismiss}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(I18nKey.BUTTON$CLOSE)}\n data-testid=\"error-message-banner-dismiss\"\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ErrorClassification } from "@openhands/typescript-client";
|
|
2
3
|
interface ErrorMessageBannerProps {
|
|
3
4
|
message: string;
|
|
4
5
|
/** Structured error code (e.g. "ACPAuthRequired") used to pick a header. */
|
|
@@ -7,6 +8,7 @@ interface ErrorMessageBannerProps {
|
|
|
7
8
|
onRetry?: () => void;
|
|
8
9
|
/** Recovery action (e.g. re-authenticate) shown for credential failures. */
|
|
9
10
|
onReauth?: () => void;
|
|
11
|
+
classification?: ErrorClassification | null;
|
|
10
12
|
}
|
|
11
|
-
export declare function ErrorMessageBanner({ message, code, onDismiss, onRetry, onReauth, }: ErrorMessageBannerProps): React.JSX.Element;
|
|
13
|
+
export declare function ErrorMessageBanner({ message, code, onDismiss, onRetry, onReauth, classification, }: ErrorMessageBannerProps): React.JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -2,124 +2,130 @@ import { Trans as e } from "../../../node_modules/react-i18next/dist/es/Trans.js
|
|
|
2
2
|
import { useTranslation as t } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
3
3
|
import { I18nKey as n } from "../../../i18n/declaration.js";
|
|
4
4
|
import { Check as r } from "../../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import d from "
|
|
13
|
-
import
|
|
5
|
+
import { CircleAlert as i } from "../../../node_modules/lucide-react/dist/esm/icons/circle-alert.js";
|
|
6
|
+
import { CircleX as a } from "../../../node_modules/lucide-react/dist/esm/icons/circle-x.js";
|
|
7
|
+
import { Copy as o } from "../../../node_modules/lucide-react/dist/esm/icons/copy.js";
|
|
8
|
+
import { X as s } from "../../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
9
|
+
import { OH_STATUS_ERROR_COLOR as c } from "../../../constants/status-colors.js";
|
|
10
|
+
import { cn as l } from "../../../utils/utils.js";
|
|
11
|
+
import { displayErrorToast as u } from "../../../utils/custom-toast-handlers.js";
|
|
12
|
+
import { getAcpErrorHeaderKey as d } from "../../../utils/acp-error-codes.js";
|
|
13
|
+
import f from "react";
|
|
14
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
15
|
//#region src/components/features/chat/error-message-banner.tsx
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let { t:
|
|
18
|
-
return
|
|
19
|
-
if (!
|
|
16
|
+
var h = 220;
|
|
17
|
+
function g({ message: g, code: _, onDismiss: v, onRetry: y, onReauth: b, classification: x }) {
|
|
18
|
+
let { t: S, i18n: C } = t("openhands"), w = d(_), [T, E] = f.useState(!1), [D, O] = f.useState(!1), [k, A] = f.useState(!1), j = f.useRef(null), M = C.exists(g, { ns: "openhands" }), N = M ? String(S(g)) : g, P = N.length > h, F = P && !T;
|
|
19
|
+
return f.useEffect(() => {
|
|
20
|
+
if (!k) return;
|
|
20
21
|
let e = setTimeout(() => {
|
|
21
|
-
|
|
22
|
+
A(!1);
|
|
22
23
|
}, 2e3);
|
|
23
24
|
return () => clearTimeout(e);
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
let e =
|
|
25
|
+
}, [k]), f.useEffect(() => {
|
|
26
|
+
A(!1);
|
|
27
|
+
}, [N]), f.useLayoutEffect(() => {
|
|
28
|
+
let e = j.current;
|
|
28
29
|
if (!e) return;
|
|
29
30
|
let t = () => {
|
|
30
31
|
let t = Number.parseFloat(getComputedStyle(e).lineHeight);
|
|
31
32
|
if (!Number.isFinite(t) || t <= 0) {
|
|
32
|
-
|
|
33
|
+
O(!1);
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
O(e.getBoundingClientRect().height > t * 1.5);
|
|
36
37
|
};
|
|
37
38
|
t();
|
|
38
39
|
let n = new ResizeObserver(t);
|
|
39
40
|
return n.observe(e), () => n.disconnect();
|
|
40
41
|
}, [
|
|
41
|
-
j,
|
|
42
42
|
N,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
F,
|
|
44
|
+
T,
|
|
45
|
+
g
|
|
46
|
+
]), /* @__PURE__ */ m("div", {
|
|
47
|
+
className: l("flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]", D ? "items-start" : "items-center"),
|
|
47
48
|
"data-testid": "error-message-banner",
|
|
48
49
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
x != null && x.kind !== "internal" && x.kind !== "unknown" ? /* @__PURE__ */ p(i, {
|
|
51
|
+
"aria-hidden": !0,
|
|
52
|
+
className: "h-4 w-4 shrink-0 text-[var(--oh-warning)]",
|
|
53
|
+
strokeWidth: 2,
|
|
54
|
+
"data-testid": "warning-message-banner-icon"
|
|
55
|
+
}) : /* @__PURE__ */ p(a, {
|
|
50
56
|
"aria-hidden": !0,
|
|
51
57
|
className: "h-4 w-4 shrink-0",
|
|
52
58
|
strokeWidth: 2,
|
|
53
|
-
style: { color:
|
|
59
|
+
style: { color: c },
|
|
54
60
|
"data-testid": "error-message-banner-icon"
|
|
55
61
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ m("div", {
|
|
57
63
|
className: "min-w-0 flex-1",
|
|
58
64
|
children: [
|
|
59
|
-
|
|
65
|
+
w && /* @__PURE__ */ p("div", {
|
|
60
66
|
className: "text-sm font-medium text-[var(--oh-foreground)]",
|
|
61
67
|
"data-testid": "error-message-banner-header",
|
|
62
|
-
children:
|
|
68
|
+
children: S(w)
|
|
63
69
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
ref:
|
|
66
|
-
className:
|
|
70
|
+
/* @__PURE__ */ p("div", {
|
|
71
|
+
ref: j,
|
|
72
|
+
className: l("whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]", F && "line-clamp-3"),
|
|
67
73
|
"data-testid": "error-message-banner-content",
|
|
68
|
-
children:
|
|
74
|
+
children: M ? /* @__PURE__ */ p(e, {
|
|
69
75
|
ns: "openhands",
|
|
70
|
-
i18nKey:
|
|
71
|
-
}) :
|
|
76
|
+
i18nKey: g
|
|
77
|
+
}) : g
|
|
72
78
|
}),
|
|
73
|
-
|
|
79
|
+
b && /* @__PURE__ */ p("button", {
|
|
74
80
|
type: "button",
|
|
75
|
-
onClick:
|
|
81
|
+
onClick: b,
|
|
76
82
|
className: "mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]",
|
|
77
83
|
"data-testid": "error-message-banner-reauth",
|
|
78
|
-
children:
|
|
84
|
+
children: S(n.ERROR$ACP_UPDATE_CREDENTIALS)
|
|
79
85
|
}),
|
|
80
|
-
|
|
86
|
+
P && /* @__PURE__ */ p("button", {
|
|
81
87
|
type: "button",
|
|
82
88
|
className: "mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline",
|
|
83
|
-
onClick: () =>
|
|
89
|
+
onClick: () => E((e) => !e),
|
|
84
90
|
"data-testid": "error-message-banner-toggle",
|
|
85
|
-
children:
|
|
91
|
+
children: S(T ? n.COMMON$VIEW_LESS : n.COMMON$VIEW_MORE)
|
|
86
92
|
})
|
|
87
93
|
]
|
|
88
94
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
className:
|
|
95
|
+
/* @__PURE__ */ m("div", {
|
|
96
|
+
className: l("flex shrink-0 gap-1", D ? "self-start" : "items-center"),
|
|
91
97
|
children: [
|
|
92
|
-
|
|
98
|
+
y && /* @__PURE__ */ p("button", {
|
|
93
99
|
type: "button",
|
|
94
|
-
onClick:
|
|
100
|
+
onClick: y,
|
|
95
101
|
className: "cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]",
|
|
96
102
|
"data-testid": "error-message-banner-retry",
|
|
97
|
-
children:
|
|
103
|
+
children: S(n.CHAT_INTERFACE$MESSAGE_RETRY)
|
|
98
104
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ p("button", {
|
|
100
106
|
type: "button",
|
|
101
107
|
onClick: async () => {
|
|
102
108
|
try {
|
|
103
|
-
await navigator.clipboard.writeText(
|
|
109
|
+
await navigator.clipboard.writeText(N), A(!0);
|
|
104
110
|
} catch {
|
|
105
|
-
|
|
111
|
+
u(S(n.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED));
|
|
106
112
|
}
|
|
107
113
|
},
|
|
108
114
|
className: "shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]",
|
|
109
|
-
"aria-label":
|
|
115
|
+
"aria-label": S(k ? n.BUTTON$COPIED : n.BUTTON$COPY),
|
|
110
116
|
"data-testid": "error-message-banner-copy",
|
|
111
|
-
children:
|
|
117
|
+
children: p(k ? r : o, {
|
|
112
118
|
className: "h-4 w-4",
|
|
113
119
|
"aria-hidden": !0
|
|
114
120
|
})
|
|
115
121
|
}),
|
|
116
|
-
|
|
122
|
+
v && /* @__PURE__ */ p("button", {
|
|
117
123
|
type: "button",
|
|
118
|
-
onClick:
|
|
124
|
+
onClick: v,
|
|
119
125
|
className: "shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]",
|
|
120
|
-
"aria-label":
|
|
126
|
+
"aria-label": S(n.BUTTON$CLOSE),
|
|
121
127
|
"data-testid": "error-message-banner-dismiss",
|
|
122
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ p(s, {
|
|
123
129
|
className: "h-4 w-4",
|
|
124
130
|
"aria-hidden": !0
|
|
125
131
|
})
|
|
@@ -130,6 +136,6 @@ function h({ message: h, code: g, onDismiss: _, onRetry: v, onReauth: y }) {
|
|
|
130
136
|
});
|
|
131
137
|
}
|
|
132
138
|
//#endregion
|
|
133
|
-
export {
|
|
139
|
+
export { g as ErrorMessageBanner };
|
|
134
140
|
|
|
135
141
|
//# sourceMappingURL=error-message-banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message-banner.js","names":[],"sources":["../../../../src/components/features/chat/error-message-banner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Check, CircleX, Copy, X } from \"lucide-react\";\nimport { OH_STATUS_ERROR_COLOR } from \"#/constants/status-colors\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { getAcpErrorHeaderKey } from \"#/utils/acp-error-codes\";\nimport { cn } from \"#/utils/utils\";\n\ninterface ErrorMessageBannerProps {\n message: string;\n /** Structured error code (e.g. \"ACPAuthRequired\") used to pick a header. */\n code?: string | null;\n onDismiss?: () => void;\n onRetry?: () => void;\n /** Recovery action (e.g. re-authenticate) shown for credential failures. */\n onReauth?: () => void;\n}\n\nconst DEFAULT_MAX_COLLAPSED_CHARS = 220;\n\nexport function ErrorMessageBanner({\n message,\n code,\n onDismiss,\n onRetry,\n onReauth,\n}: ErrorMessageBannerProps) {\n const { t, i18n } = useTranslation(\"openhands\");\n const headerKey = getAcpErrorHeaderKey(code);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [isMultiLine, setIsMultiLine] = React.useState(false);\n const [isCopied, setIsCopied] = React.useState(false);\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const isI18nKey = i18n.exists(message, { ns: \"openhands\" });\n const displayTextForLength = isI18nKey ? String(t(message)) : message;\n const shouldShowToggle =\n displayTextForLength.length > DEFAULT_MAX_COLLAPSED_CHARS;\n\n const isCollapsed = shouldShowToggle && !isExpanded;\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(displayTextForLength);\n setIsCopied(true);\n } catch {\n displayErrorToast(t(I18nKey.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED));\n }\n };\n\n React.useEffect(() => {\n if (!isCopied) return undefined;\n\n const timeout = setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n\n return () => clearTimeout(timeout);\n }, [isCopied]);\n\n React.useEffect(() => {\n setIsCopied(false);\n }, [displayTextForLength]);\n\n React.useLayoutEffect(() => {\n const content = contentRef.current;\n if (!content) {\n return undefined;\n }\n\n const updateIsMultiLine = () => {\n const lineHeight = Number.parseFloat(\n getComputedStyle(content).lineHeight,\n );\n if (!Number.isFinite(lineHeight) || lineHeight <= 0) {\n setIsMultiLine(false);\n return;\n }\n\n setIsMultiLine(content.getBoundingClientRect().height > lineHeight * 1.5);\n };\n\n updateIsMultiLine();\n\n const observer = new ResizeObserver(updateIsMultiLine);\n observer.observe(content);\n\n return () => observer.disconnect();\n }, [displayTextForLength, isCollapsed, isExpanded, message]);\n\n return (\n <div\n className={cn(\n \"flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\",\n isMultiLine ? \"items-start\" : \"items-center\",\n )}\n data-testid=\"error-message-banner\"\n >\n <CircleX\n
|
|
1
|
+
{"version":3,"file":"error-message-banner.js","names":[],"sources":["../../../../src/components/features/chat/error-message-banner.tsx"],"sourcesContent":["import React from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Check, CircleAlert, CircleX, Copy, X } from \"lucide-react\";\nimport { OH_STATUS_ERROR_COLOR } from \"#/constants/status-colors\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\nimport { getAcpErrorHeaderKey } from \"#/utils/acp-error-codes\";\nimport { cn } from \"#/utils/utils\";\nimport type { ErrorClassification } from \"@openhands/typescript-client\";\n\ninterface ErrorMessageBannerProps {\n message: string;\n /** Structured error code (e.g. \"ACPAuthRequired\") used to pick a header. */\n code?: string | null;\n onDismiss?: () => void;\n onRetry?: () => void;\n /** Recovery action (e.g. re-authenticate) shown for credential failures. */\n onReauth?: () => void;\n classification?: ErrorClassification | null;\n}\n\nconst DEFAULT_MAX_COLLAPSED_CHARS = 220;\n\nexport function ErrorMessageBanner({\n message,\n code,\n onDismiss,\n onRetry,\n onReauth,\n classification,\n}: ErrorMessageBannerProps) {\n const { t, i18n } = useTranslation(\"openhands\");\n const headerKey = getAcpErrorHeaderKey(code);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const [isMultiLine, setIsMultiLine] = React.useState(false);\n const [isCopied, setIsCopied] = React.useState(false);\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const isI18nKey = i18n.exists(message, { ns: \"openhands\" });\n const displayTextForLength = isI18nKey ? String(t(message)) : message;\n const shouldShowToggle =\n displayTextForLength.length > DEFAULT_MAX_COLLAPSED_CHARS;\n\n const isCollapsed = shouldShowToggle && !isExpanded;\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(displayTextForLength);\n setIsCopied(true);\n } catch {\n displayErrorToast(t(I18nKey.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED));\n }\n };\n\n React.useEffect(() => {\n if (!isCopied) return undefined;\n\n const timeout = setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n\n return () => clearTimeout(timeout);\n }, [isCopied]);\n\n React.useEffect(() => {\n setIsCopied(false);\n }, [displayTextForLength]);\n\n React.useLayoutEffect(() => {\n const content = contentRef.current;\n if (!content) {\n return undefined;\n }\n\n const updateIsMultiLine = () => {\n const lineHeight = Number.parseFloat(\n getComputedStyle(content).lineHeight,\n );\n if (!Number.isFinite(lineHeight) || lineHeight <= 0) {\n setIsMultiLine(false);\n return;\n }\n\n setIsMultiLine(content.getBoundingClientRect().height > lineHeight * 1.5);\n };\n\n updateIsMultiLine();\n\n const observer = new ResizeObserver(updateIsMultiLine);\n observer.observe(content);\n\n return () => observer.disconnect();\n }, [displayTextForLength, isCollapsed, isExpanded, message]);\n\n return (\n <div\n className={cn(\n \"flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\",\n isMultiLine ? \"items-start\" : \"items-center\",\n )}\n data-testid=\"error-message-banner\"\n >\n {classification != null &&\n classification.kind !== \"internal\" &&\n classification.kind !== \"unknown\" ? (\n <CircleAlert\n aria-hidden\n className=\"h-4 w-4 shrink-0 text-[var(--oh-warning)]\"\n strokeWidth={2}\n data-testid=\"warning-message-banner-icon\"\n />\n ) : (\n <CircleX\n aria-hidden\n className=\"h-4 w-4 shrink-0\"\n strokeWidth={2}\n style={{ color: OH_STATUS_ERROR_COLOR }}\n data-testid=\"error-message-banner-icon\"\n />\n )}\n <div className=\"min-w-0 flex-1\">\n {headerKey && (\n <div\n className=\"text-sm font-medium text-[var(--oh-foreground)]\"\n data-testid=\"error-message-banner-header\"\n >\n {t(headerKey)}\n </div>\n )}\n <div\n ref={contentRef}\n className={cn(\n \"whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]\",\n isCollapsed && \"line-clamp-3\",\n )}\n data-testid=\"error-message-banner-content\"\n >\n {isI18nKey ? <Trans ns=\"openhands\" i18nKey={message} /> : message}\n </div>\n\n {onReauth && (\n <button\n type=\"button\"\n onClick={onReauth}\n className=\"mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"error-message-banner-reauth\"\n >\n {t(I18nKey.ERROR$ACP_UPDATE_CREDENTIALS)}\n </button>\n )}\n\n {shouldShowToggle && (\n <button\n type=\"button\"\n className=\"mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline\"\n onClick={() => setIsExpanded((prev) => !prev)}\n data-testid=\"error-message-banner-toggle\"\n >\n {isExpanded\n ? t(I18nKey.COMMON$VIEW_LESS)\n : t(I18nKey.COMMON$VIEW_MORE)}\n </button>\n )}\n </div>\n\n <div\n className={cn(\n \"flex shrink-0 gap-1\",\n isMultiLine ? \"self-start\" : \"items-center\",\n )}\n >\n {onRetry && (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]\"\n data-testid=\"error-message-banner-retry\"\n >\n {t(I18nKey.CHAT_INTERFACE$MESSAGE_RETRY)}\n </button>\n )}\n\n <button\n type=\"button\"\n onClick={handleCopy}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(isCopied ? I18nKey.BUTTON$COPIED : I18nKey.BUTTON$COPY)}\n data-testid=\"error-message-banner-copy\"\n >\n {isCopied ? (\n <Check className=\"h-4 w-4\" aria-hidden />\n ) : (\n <Copy className=\"h-4 w-4\" aria-hidden />\n )}\n </button>\n\n {onDismiss && (\n <button\n type=\"button\"\n onClick={onDismiss}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(I18nKey.BUTTON$CLOSE)}\n data-testid=\"error-message-banner-dismiss\"\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../utils/event-logger.cjs");let t=require("react/jsx-runtime");var n=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},r=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,i=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return r(e)&&!n.endsWith(`/`)?`${n}/`:n};function a(r){let{children:a}=r,o=r=>{try{let e=n(r);return(0,t.jsx)(`span`,{className:`font-mono`,title:e,children:i(e)})}catch(n){return e.default.error(String(n)),(0,t.jsx)(`span`,{className:`font-mono`,children:r})}};return Array.isArray(a)?(0,t.jsx)(`
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../utils/event-logger.cjs");let t=require("react/jsx-runtime");var n=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},r=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,i=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return r(e)&&!n.endsWith(`/`)?`${n}/`:n};function a(r){let{children:a}=r,o=r=>{try{let e=n(r);return(0,t.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,title:e,children:i(e)})}catch(n){return e.default.error(String(n)),(0,t.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,children:r})}};return Array.isArray(a)?(0,t.jsx)(`span`,{className:`font-normal tracking-tight`,children:a.map((e,n)=>typeof e==`string`?(0,t.jsx)(`span`,{children:o(e)},`${e}-${n}`):e)}):typeof a==`string`?(0,t.jsx)(`span`,{className:`font-normal tracking-tight`,children:o(a)}):(0,t.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,children:a})}exports.PathComponent=a;
|
|
2
2
|
//# sourceMappingURL=path-component.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-component.cjs","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span
|
|
1
|
+
{"version":3,"file":"path-component.cjs","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span\n className=\"font-mono font-normal tracking-tight\"\n title={decodedPath}\n >\n {filename}\n </span>\n );\n } catch (e) {\n // Just log the error without any message to avoid localization issues\n EventLogger.error(String(e));\n return (\n <span className=\"font-mono font-normal tracking-tight\">{path}</span>\n );\n }\n };\n\n if (Array.isArray(children)) {\n const processedChildren = children.map((child, index) =>\n typeof child === \"string\" ? (\n <span key={`${child}-${index}`}>{processPath(child)}</span>\n ) : (\n child\n ),\n );\n\n return (\n <span className=\"font-normal tracking-tight\">{processedChildren}</span>\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <span className=\"font-normal tracking-tight\">\n {processPath(children)}\n </span>\n );\n }\n\n return (\n <span className=\"font-mono font-normal tracking-tight\">{children}</span>\n );\n}\n\nexport { PathComponent, isLikelyDirectory };\n"],"mappings":"yIAQA,IAAM,EAAsB,GAAyB,CACnD,IAAM,EAAW,SAAS,cAAc,UAAU,EAElD,MADA,GAAS,UAAY,EACd,EAAS,KAClB,EAOM,EAAqB,GACpB,EAED,EAAK,SAAS,GAAG,GAAK,EAAK,SAAS,IAAI,EAAU,GAI/C,EAFU,EAAK,MAAM,OAAO,EAAE,IAAI,GAAK,IAE7B,SAAS,GAAG,EANX,GAcd,EAAmB,GAAyB,CAChD,GAAI,CAAC,EAAM,MAAO,GAElB,IAAM,EAAQ,EAAK,MAAM,OAAO,EAC1B,EAAW,EAAM,EAAM,OAAS,GAOtC,OAJI,EAAkB,CAAI,GAAK,CAAC,EAAS,SAAS,GAAG,EAC5C,GAAG,EAAS,GAGd,CACT,EAMA,SAAS,EAAc,EAAiC,CACtD,GAAM,CAAE,YAAa,EAEf,EAAe,GAAiB,CACpC,GAAI,CAEF,IAAM,EAAc,EAAmB,CAAI,EAG3C,OACE,EAAA,EAAA,KAAC,OAAD,CACE,UAAU,uCACV,MAAO,WAJM,EAAgB,CAM5B,CACG,CAAA,CAEV,OAAS,EAAG,CAGV,OADA,EAAA,QAAY,MAAM,OAAO,CAAC,CAAC,GAEzB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,gDAAwC,CAAW,CAAA,CAEvE,CACF,EAwBA,OAtBI,MAAM,QAAQ,CAAQ,GAUtB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sCATQ,EAAS,KAAK,EAAO,IAC7C,OAAO,GAAU,UACf,EAAA,EAAA,KAAC,OAAD,CAAA,SAAiC,EAAY,CAAK,CAAQ,EAA/C,GAAG,EAAM,GAAG,GAAmC,EAE1D,CAK4C,CAAwB,CAAA,EAItE,OAAO,GAAa,UAEpB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sCACb,EAAY,CAAQ,CACjB,CAAA,GAKR,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,uCAAwC,UAAe,CAAA,CAE3E"}
|
|
@@ -14,22 +14,25 @@ function a(r) {
|
|
|
14
14
|
try {
|
|
15
15
|
let e = n(r);
|
|
16
16
|
return /* @__PURE__ */ t("span", {
|
|
17
|
-
className: "font-mono",
|
|
17
|
+
className: "font-mono font-normal tracking-tight",
|
|
18
18
|
title: e,
|
|
19
19
|
children: i(e)
|
|
20
20
|
});
|
|
21
21
|
} catch (n) {
|
|
22
22
|
return e.error(String(n)), /* @__PURE__ */ t("span", {
|
|
23
|
-
className: "font-mono",
|
|
23
|
+
className: "font-mono font-normal tracking-tight",
|
|
24
24
|
children: r
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
return Array.isArray(a) ? /* @__PURE__ */ t("
|
|
29
|
-
className: "font-
|
|
28
|
+
return Array.isArray(a) ? /* @__PURE__ */ t("span", {
|
|
29
|
+
className: "font-normal tracking-tight",
|
|
30
30
|
children: a.map((e, n) => typeof e == "string" ? /* @__PURE__ */ t("span", { children: o(e) }, `${e}-${n}`) : e)
|
|
31
|
-
}) : typeof a == "string" ? /* @__PURE__ */ t("
|
|
32
|
-
className: "font-
|
|
31
|
+
}) : typeof a == "string" ? /* @__PURE__ */ t("span", {
|
|
32
|
+
className: "font-normal tracking-tight",
|
|
33
|
+
children: o(a)
|
|
34
|
+
}) : /* @__PURE__ */ t("span", {
|
|
35
|
+
className: "font-mono font-normal tracking-tight",
|
|
33
36
|
children: a
|
|
34
37
|
});
|
|
35
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-component.js","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span
|
|
1
|
+
{"version":3,"file":"path-component.js","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span\n className=\"font-mono font-normal tracking-tight\"\n title={decodedPath}\n >\n {filename}\n </span>\n );\n } catch (e) {\n // Just log the error without any message to avoid localization issues\n EventLogger.error(String(e));\n return (\n <span className=\"font-mono font-normal tracking-tight\">{path}</span>\n );\n }\n };\n\n if (Array.isArray(children)) {\n const processedChildren = children.map((child, index) =>\n typeof child === \"string\" ? (\n <span key={`${child}-${index}`}>{processPath(child)}</span>\n ) : (\n child\n ),\n );\n\n return (\n <span className=\"font-normal tracking-tight\">{processedChildren}</span>\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <span className=\"font-normal tracking-tight\">\n {processPath(children)}\n </span>\n );\n }\n\n return (\n <span className=\"font-mono font-normal tracking-tight\">{children}</span>\n );\n}\n\nexport { PathComponent, isLikelyDirectory };\n"],"mappings":";;;AAQA,IAAM,KAAsB,MAAyB;CACnD,IAAM,IAAW,SAAS,cAAc,UAAU;CAElD,OADA,EAAS,YAAY,GACd,EAAS;AAClB,GAOM,KAAqB,MACpB,IAED,EAAK,SAAS,GAAG,KAAK,EAAK,SAAS,IAAI,IAAU,KAI/C,EAFU,EAAK,MAAM,OAAO,EAAE,IAAI,KAAK,IAE7B,SAAS,GAAG,IANX,IAcd,KAAmB,MAAyB;CAChD,IAAI,CAAC,GAAM,OAAO;CAElB,IAAM,IAAQ,EAAK,MAAM,OAAO,GAC1B,IAAW,EAAM,EAAM,SAAS;CAOtC,OAJI,EAAkB,CAAI,KAAK,CAAC,EAAS,SAAS,GAAG,IAC5C,GAAG,EAAS,KAGd;AACT;AAMA,SAAS,EAAc,GAAiC;CACtD,IAAM,EAAE,gBAAa,GAEf,KAAe,MAAiB;EACpC,IAAI;GAEF,IAAM,IAAc,EAAmB,CAAI;GAG3C,OACE,kBAAC,QAAD;IACE,WAAU;IACV,OAAO;cAJM,EAAgB,CAM5B;GACG,CAAA;EAEV,SAAS,GAAG;GAGV,OADA,EAAY,MAAM,OAAO,CAAC,CAAC,GAEzB,kBAAC,QAAD;IAAM,WAAU;cAAwC;GAAW,CAAA;EAEvE;CACF;CAwBA,OAtBI,MAAM,QAAQ,CAAQ,IAUtB,kBAAC,QAAD;EAAM,WAAU;YATQ,EAAS,KAAK,GAAO,MAC7C,OAAO,KAAU,WACf,kBAAC,QAAD,EAAA,UAAiC,EAAY,CAAK,EAAQ,GAA/C,GAAG,EAAM,GAAG,GAAmC,IAE1D,CAK4C;CAAwB,CAAA,IAItE,OAAO,KAAa,WAEpB,kBAAC,QAAD;EAAM,WAAU;YACb,EAAY,CAAQ;CACjB,CAAA,IAKR,kBAAC,QAAD;EAAM,WAAU;EAAwC;CAAe,CAAA;AAE3E"}
|
|
@@ -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("../../../node_modules/lucide-react/dist/esm/icons/arrow-up-right.cjs"),r=require("../../../utils/utils.cjs"),i=require("../markdown/markdown-renderer.cjs"),a=require("../../../ui/typography.cjs"),o=require("../../../icons/lesson-plan.cjs"),s=require("../../../
|
|
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("../../../utils/utils.cjs"),i=require("../markdown/markdown-renderer.cjs"),a=require("../../../ui/typography.cjs"),o=require("../../../icons/lesson-plan.cjs"),s=require("../../../hooks/use-select-conversation-tab.cjs"),c=require("../../../context/scroll-context.cjs"),l=require("../../../hooks/use-handle-build-plan-click.cjs"),u=require("../markdown/plan-components.cjs");let d=require("react"),f=require("react/jsx-runtime");var p=300,m=u.createPlanComponents(`shine-text`);function h({planContent:h,isStreaming:g,isBuildDisabled:_}){let{t:v}=e.useTranslation(`openhands`),{navigateToTab:y}=s.useSelectConversationTab(),{handleBuildPlanClick:b}=l.useHandleBuildPlanClick(),{scrollDomToBottom:x}=c.useScrollContext(),S=()=>{y(`planner`)},C=(0,d.useCallback)(e=>{b(e),x()},[b,x]),w=(0,d.useMemo)(()=>h?h.length<=p?h:`${h.slice(0,p)}...`:``,[h]);return h?(0,f.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,f.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,f.jsx)(o.default,{width:18,height:18,color:`var(--oh-muted)`}),(0,f.jsx)(a.Typography.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:v(t.I18nKey.COMMON$PLAN_MD)}),(0,f.jsx)(`div`,{className:`flex-1`}),(0,f.jsxs)(`button`,{type:`button`,onClick:S,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,f.jsx)(a.Typography.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:v(t.I18nKey.COMMON$VIEW)}),(0,f.jsx)(n.ArrowUpRight,{className:`text-white`,size:18})]})]}),(0,f.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:w&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i.MarkdownRenderer,{includeStandard:!0,components:g?m:u.planComponents,children:w}),h&&h.length>p&&(0,f.jsx)(`button`,{type:`button`,onClick:S,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:v(t.I18nKey.COMMON$READ_MORE)})]})}),(0,f.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,f.jsx)(`button`,{type:`button`,onClick:C,disabled:_,className:r.cn(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,_?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,f.jsxs)(a.Typography.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[v(t.I18nKey.COMMON$BUILD),` `,(0,f.jsx)(a.Typography.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}exports.PlanPreview=h;
|
|
2
2
|
//# sourceMappingURL=plan-preview.cjs.map
|
|
@@ -5,16 +5,16 @@ import { cn as r } from "../../../utils/utils.js";
|
|
|
5
5
|
import { MarkdownRenderer as i } from "../markdown/markdown-renderer.js";
|
|
6
6
|
import { Typography as a } from "../../../ui/typography.js";
|
|
7
7
|
import o from "../../../icons/lesson-plan.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { useSelectConversationTab as s } from "../../../hooks/use-select-conversation-tab.js";
|
|
9
|
+
import { useScrollContext as c } from "../../../context/scroll-context.js";
|
|
10
|
+
import { useHandleBuildPlanClick as l } from "../../../hooks/use-handle-build-plan-click.js";
|
|
11
11
|
import { createPlanComponents as u, planComponents as d } from "../markdown/plan-components.js";
|
|
12
12
|
import { useCallback as f, useMemo as p } from "react";
|
|
13
13
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/features/chat/plan-preview.tsx
|
|
15
15
|
var _ = 300, v = u("shine-text");
|
|
16
16
|
function y({ planContent: u, isStreaming: y, isBuildDisabled: b }) {
|
|
17
|
-
let { t: x } = e("openhands"), { navigateToTab: S } =
|
|
17
|
+
let { t: x } = e("openhands"), { navigateToTab: S } = s(), { handleBuildPlanClick: C } = l(), { scrollDomToBottom: w } = c(), T = () => {
|
|
18
18
|
S("planner");
|
|
19
19
|
}, E = f((e) => {
|
|
20
20
|
C(e), w();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("../define.cjs"),
|
|
1
|
+
const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../../hooks/use-conversation-id.cjs"),n=require("../../../../../stores/files-tab-store.cjs"),r=require("../../../../../hooks/query/use-active-conversation.cjs"),i=require("../../../../../hooks/use-select-conversation-tab.cjs"),a=require("../define.cjs"),o=require("../text-content.cjs"),s=require("../primitives/code-block.cjs"),c=require("../../../../../utils/get-language-from-path.cjs"),l=require("../../../../../utils/workspace-relative-path.cjs"),u=require("../primitives/diff-view.cjs"),d=require("../primitives/file-path-chip.cjs"),f=require("../../../../../utils/is-markdown-file-path.cjs"),p=require("../primitives/markdown-file-preview.cjs");let m=require("react");m=e.__toESM(m,1);let h=require("react/jsx-runtime");var g=({action:e,observation:t})=>t?.observation.path??e?.action.path??``;function _({action:e,observation:t,onOpenFile:n}){let r=g({action:e,observation:t}),i=t?.observation.command??e?.action.command,a=c.getLanguageFromPath(r),l=e?.action.view_range,m=i===`view`&&l?`${l[0]}-${l[1]}`:void 0,_=r?(0,h.jsx)(d.FilePathChip,{path:r,range:m,onClick:n}):null,v=e=>r&&i===`create`&&f.isMarkdownFilePath(r)?{chip:null,body:(0,h.jsx)(p.MarkdownFilePreview,{content:e,path:r,onView:n})}:{chip:_,body:(0,h.jsx)(s.CodeBlock,{code:e,language:a})};if(t){let e=t.observation,n=null,r=_;if(e.error)n=(0,h.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:e.error});else if(e.old_content!=null&&e.new_content!=null)n=(0,h.jsx)(u.DiffView,{oldText:e.old_content,newText:e.new_content});else{let t=e.new_content||e.output||(e.content?o.textFromContent(e.content):``);if(t){let e=v(t);r=e.chip,n=e.body}}return(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,n]})}if(e){let t=e.action,n=null,r=_;if(t.command===`create`&&t.file_text){let e=v(t.file_text);r=e.chip,n=e.body}else (t.command===`str_replace`||t.command===`insert`)&&t.new_str!=null&&(n=(0,h.jsx)(u.DiffView,{oldText:t.old_str??``,newText:t.new_str}));return(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,n]})}return null}function v({conversationId:e,...t}){let{navigateToTab:a}=i.useSelectConversationTab(),o=n.useFilesTabStore(e=>e.setSelectedPath),{data:s}=r.useActiveConversation(),c=g(t),u=s?.workspace?.working_dir,d=c&&t.observation?()=>{o(l.toWorkspaceRelativePath(c,u),e),a(`files`)}:void 0;return(0,h.jsx)(_,{...t,onOpenFile:d})}var y=a.defineVisualizer({actionKinds:[`FileEditorAction`,`StrReplaceEditorAction`],observationKinds:[`FileEditorObservation`,`StrReplaceEditorObservation`],Body:function(e){let{conversationId:n}=t.useOptionalConversationId();return n?(0,h.jsx)(v,{...e,conversationId:n}):(0,h.jsx)(_,{...e})}});exports.fileEditorVisualizer=y;
|
|
2
2
|
//# sourceMappingURL=file-editor.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-editor.cjs","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"file-editor.cjs","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":"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"}
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File-editor visualizer for `file_editor` / `str_replace_editor` tools.
|
|
3
|
-
*
|
|
4
|
-
* Observation card: error → message; `str_replace`/`insert` → diff of the file
|
|
5
|
-
* before vs after; `create`/`view` → the file content. Action card (shown while
|
|
6
|
-
* the edit is in flight): `create` → new content; `str_replace` → diff of the
|
|
7
|
-
* replaced snippet; `view`/`undo_edit` → just the path + range.
|
|
8
|
-
*/
|
|
9
1
|
export declare const fileEditorVisualizer: import("../define").RegisteredVisualizer;
|