@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":"profiles-service.api.cjs","names":[],"sources":["../../../src/api/profiles-service/profiles-service.api.ts"],"sourcesContent":["/**\n * ProfilesService is the single entry point for LLM-profile CRUD, routing per\n * active backend so callers (hooks, the settings manager) stay backend-agnostic:\n * - local agent-server: the SDK's ProfilesClient (`/api/profiles`), created\n * per-call to pick up current backend configuration;\n * - cloud app-server: `src/api/cloud/profiles-service.api.ts` (the org-gated\n * `/api/organizations/{orgId}/profiles` routes, or the per-user settings\n * route as a fallback) via the org-scoped cloud proxy.\n * This mirrors how SettingsService branches to fetchCloudSettings().\n *\n * Uses ProfilesClient from @openhands/typescript-client v0.2.0+.\n * All types are re-exported from the SDK for consumer convenience.\n *\n * Note: Unlike some SDK clients, we don't call client.close() here for\n * consistency with other services (SettingsService, SecretsService) that\n * also create SDK clients without explicit cleanup. The SDK clients use\n * fetch-based HTTP which doesn't require connection cleanup.\n */\nimport {\n ProfilesClient,\n type GetProfileOptions,\n} from \"@openhands/typescript-client/clients\";\nimport
|
|
1
|
+
{"version":3,"file":"profiles-service.api.cjs","names":[],"sources":["../../../src/api/profiles-service/profiles-service.api.ts"],"sourcesContent":["/**\n * ProfilesService is the single entry point for LLM-profile CRUD, routing per\n * active backend so callers (hooks, the settings manager) stay backend-agnostic:\n * - local agent-server: the SDK's ProfilesClient (`/api/profiles`), created\n * per-call to pick up current backend configuration;\n * - cloud app-server: `src/api/cloud/profiles-service.api.ts` (the org-gated\n * `/api/organizations/{orgId}/profiles` routes, or the per-user settings\n * route as a fallback) via the org-scoped cloud proxy.\n * This mirrors how SettingsService branches to fetchCloudSettings().\n *\n * Uses ProfilesClient from @openhands/typescript-client v0.2.0+.\n * All types are re-exported from the SDK for consumer convenience.\n *\n * Note: Unlike some SDK clients, we don't call client.close() here for\n * consistency with other services (SettingsService, SecretsService) that\n * also create SDK clients without explicit cleanup. The SDK clients use\n * fetch-based HTTP which doesn't require connection cleanup.\n */\nimport {\n ProfilesClient,\n type GetProfileOptions,\n} from \"@openhands/typescript-client/clients\";\nimport {\n type ProfileInfo,\n type ProfileListResponse,\n type ProfileDetailResponse,\n type ProfileMutationResponse,\n type ActivateProfileResponse,\n type SaveProfileRequest,\n type ExposeSecretsMode,\n type ValidateProfileResponse,\n} from \"@openhands/typescript-client\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n activateCloudProfile,\n deleteCloudProfile,\n fetchCloudProfile,\n fetchCloudProfiles,\n renameCloudProfile,\n saveCloudProfile,\n} from \"../cloud/profiles-service.api\";\n\n// Re-export SDK types for consumers\nexport type {\n ProfileInfo,\n ProfileListResponse,\n ProfileDetailResponse,\n ProfileMutationResponse,\n ActivateProfileResponse,\n SaveProfileRequest,\n ExposeSecretsMode,\n ValidateProfileResponse,\n};\n\nfunction isCloudBackend(): boolean {\n return getActiveBackend().backend.kind === \"cloud\";\n}\n\nfunction isAbortLike(error: unknown): boolean {\n if (!error || typeof error !== \"object\") return false;\n const name = \"name\" in error ? error.name : undefined;\n if (name === \"AbortError\" || name === \"TimeoutError\") return true;\n const cause = \"cause\" in error ? error.cause : undefined;\n return (\n !!cause &&\n typeof cause === \"object\" &&\n \"name\" in cause &&\n (cause.name === \"AbortError\" || cause.name === \"TimeoutError\")\n );\n}\n\nclass ProfilesService {\n static async listProfiles(): Promise<ProfileListResponse> {\n if (isCloudBackend()) return fetchCloudProfiles();\n return new ProfilesClient(getAgentServerClientOptions()).listProfiles();\n }\n\n static async getProfile(\n name: string,\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<ProfileDetailResponse> {\n // Cloud never exposes profile secrets (api_key is always nulled with an\n // api_key_set flag), so `exposeSecrets` is local-only.\n if (isCloudBackend()) return fetchCloudProfile(name);\n const options: GetProfileOptions = exposeSecrets ? { exposeSecrets } : {};\n return new ProfilesClient(getAgentServerClientOptions()).getProfile(\n name,\n options,\n );\n }\n\n static async saveProfile(\n name: string,\n request: SaveProfileRequest,\n ): Promise<ProfileMutationResponse> {\n if (isCloudBackend()) return saveCloudProfile(name, request);\n return new ProfilesClient(getAgentServerClientOptions()).saveProfile(\n name,\n request,\n );\n }\n\n static async deleteProfile(name: string): Promise<ProfileMutationResponse> {\n if (isCloudBackend()) return deleteCloudProfile(name);\n return new ProfilesClient(getAgentServerClientOptions()).deleteProfile(\n name,\n );\n }\n\n static async renameProfile(\n name: string,\n newName: string,\n ): Promise<ProfileMutationResponse> {\n if (isCloudBackend()) return renameCloudProfile(name, newName);\n return new ProfilesClient(getAgentServerClientOptions()).renameProfile(\n name,\n newName,\n );\n }\n\n static async activateProfile(name: string): Promise<ActivateProfileResponse> {\n if (isCloudBackend()) return activateCloudProfile(name);\n return new ProfilesClient(getAgentServerClientOptions()).activateProfile(\n name,\n );\n }\n\n /**\n * Pre-flight check: fire a minimal LLM completion to catch misconfigurations\n * (invalid model names, missing provider prefixes, bad base URLs, invalid\n * API keys) before a profile is saved.\n *\n * Returns `{ valid: true }` when the LLM responds, or\n * `{ valid: false, error: { type, message } }` on a blocking error.\n * Transient errors (rate limits, timeouts) are non-blocking.\n *\n * Cloud backends do not implement this endpoint; `null` signals\n * \"no verdict\" so callers fall through to the normal save path.\n */\n static async validateProfile(\n name: string,\n request: SaveProfileRequest,\n ): Promise<ValidateProfileResponse | null> {\n if (isCloudBackend()) return null;\n const client = new ProfilesClient({\n ...getAgentServerClientOptions(),\n timeout: 30000,\n });\n try {\n return await client.validateProfile(name, request);\n } catch (error) {\n // Older agent-server versions don't have the endpoint → 404\n // Treat as \"no verdict\" rather than blocking the save.\n const status =\n error && typeof error === \"object\" && \"status\" in error\n ? (error as { status?: unknown }).status\n : undefined;\n if (\n status === 404 ||\n status === 429 ||\n (typeof status === \"number\" && status >= 500) ||\n isAbortLike(error)\n ) {\n return null;\n }\n throw error;\n } finally {\n client.close();\n }\n }\n}\n\nexport default ProfilesService;\n"],"mappings":"sXAuDA,SAAS,GAA0B,CACjC,OAAO,EAAA,iBAAiB,EAAE,QAAQ,OAAS,OAC7C,CAEA,SAAS,EAAY,EAAyB,CAC5C,GAAI,CAAC,GAAS,OAAO,GAAU,SAAU,MAAO,GAChD,IAAM,EAAO,SAAU,EAAQ,EAAM,KAAO,IAAA,GAC5C,GAAI,IAAS,cAAgB,IAAS,eAAgB,MAAO,GAC7D,IAAM,EAAQ,UAAW,EAAQ,EAAM,MAAQ,IAAA,GAC/C,MACE,CAAC,CAAC,GACF,OAAO,GAAU,UACjB,SAAU,IACT,EAAM,OAAS,cAAgB,EAAM,OAAS,eAEnD,CAEA,IAAM,EAAN,KAAsB,CACpB,aAAa,cAA6C,CAExD,OADI,EAAe,EAAU,EAAA,mBAAmB,EACzC,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,aAAa,CACxE,CAEA,aAAa,WACX,EACA,EACgC,CAGhC,GAAI,EAAe,EAAG,OAAO,EAAA,kBAAkB,CAAI,EACnD,IAAM,EAA6B,EAAgB,CAAE,eAAc,EAAI,CAAC,EACxE,OAAO,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,WACvD,EACA,CACF,CACF,CAEA,aAAa,YACX,EACA,EACkC,CAElC,OADI,EAAe,EAAU,EAAA,iBAAiB,EAAM,CAAO,EACpD,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,YACvD,EACA,CACF,CACF,CAEA,aAAa,cAAc,EAAgD,CAEzE,OADI,EAAe,EAAU,EAAA,mBAAmB,CAAI,EAC7C,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,cACvD,CACF,CACF,CAEA,aAAa,cACX,EACA,EACkC,CAElC,OADI,EAAe,EAAU,EAAA,mBAAmB,EAAM,CAAO,EACtD,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,cACvD,EACA,CACF,CACF,CAEA,aAAa,gBAAgB,EAAgD,CAE3E,OADI,EAAe,EAAU,EAAA,qBAAqB,CAAI,EAC/C,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,gBACvD,CACF,CACF,CAcA,aAAa,gBACX,EACA,EACyC,CACzC,GAAI,EAAe,EAAG,OAAO,KAC7B,IAAM,EAAS,IAAI,EAAA,eAAe,CAChC,GAAG,EAAA,4BAA4B,EAC/B,QAAS,GACX,CAAC,EACD,GAAI,CACF,OAAO,MAAM,EAAO,gBAAgB,EAAM,CAAO,CACnD,OAAS,EAAO,CAGd,IAAM,EACJ,GAAS,OAAO,GAAU,UAAY,WAAY,EAC7C,EAA+B,OAChC,IAAA,GACN,GACE,IAAW,KACX,IAAW,KACV,OAAO,GAAW,UAAY,GAAU,KACzC,EAAY,CAAK,EAEjB,OAAO,KAET,MAAM,CACR,QAAU,CACR,EAAO,MAAM,CACf,CACF,CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export type { ProfileInfo, ProfileListResponse, ProfileDetailResponse, ProfileMutationResponse, ActivateProfileResponse, SaveProfileRequest, ExposeSecretsMode, };
|
|
1
|
+
import { type ProfileInfo, type ProfileListResponse, type ProfileDetailResponse, type ProfileMutationResponse, type ActivateProfileResponse, type SaveProfileRequest, type ExposeSecretsMode, type ValidateProfileResponse } from "@openhands/typescript-client";
|
|
2
|
+
export type { ProfileInfo, ProfileListResponse, ProfileDetailResponse, ProfileMutationResponse, ActivateProfileResponse, SaveProfileRequest, ExposeSecretsMode, ValidateProfileResponse, };
|
|
3
3
|
declare class ProfilesService {
|
|
4
4
|
static listProfiles(): Promise<ProfileListResponse>;
|
|
5
5
|
static getProfile(name: string, exposeSecrets?: ExposeSecretsMode): Promise<ProfileDetailResponse>;
|
|
@@ -7,5 +7,18 @@ declare class ProfilesService {
|
|
|
7
7
|
static deleteProfile(name: string): Promise<ProfileMutationResponse>;
|
|
8
8
|
static renameProfile(name: string, newName: string): Promise<ProfileMutationResponse>;
|
|
9
9
|
static activateProfile(name: string): Promise<ActivateProfileResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Pre-flight check: fire a minimal LLM completion to catch misconfigurations
|
|
12
|
+
* (invalid model names, missing provider prefixes, bad base URLs, invalid
|
|
13
|
+
* API keys) before a profile is saved.
|
|
14
|
+
*
|
|
15
|
+
* Returns `{ valid: true }` when the LLM responds, or
|
|
16
|
+
* `{ valid: false, error: { type, message } }` on a blocking error.
|
|
17
|
+
* Transient errors (rate limits, timeouts) are non-blocking.
|
|
18
|
+
*
|
|
19
|
+
* Cloud backends do not implement this endpoint; `null` signals
|
|
20
|
+
* "no verdict" so callers fall through to the normal save path.
|
|
21
|
+
*/
|
|
22
|
+
static validateProfile(name: string, request: SaveProfileRequest): Promise<ValidateProfileResponse | null>;
|
|
10
23
|
}
|
|
11
24
|
export default ProfilesService;
|
|
@@ -7,7 +7,14 @@ import { activateCloudProfile as r, deleteCloudProfile as i, fetchCloudProfile a
|
|
|
7
7
|
function l() {
|
|
8
8
|
return t().backend.kind === "cloud";
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
function u(e) {
|
|
11
|
+
if (!e || typeof e != "object") return !1;
|
|
12
|
+
let t = "name" in e ? e.name : void 0;
|
|
13
|
+
if (t === "AbortError" || t === "TimeoutError") return !0;
|
|
14
|
+
let n = "cause" in e ? e.cause : void 0;
|
|
15
|
+
return !!n && typeof n == "object" && "name" in n && (n.name === "AbortError" || n.name === "TimeoutError");
|
|
16
|
+
}
|
|
17
|
+
var d = class {
|
|
11
18
|
static async listProfiles() {
|
|
12
19
|
return l() ? o() : new e(n()).listProfiles();
|
|
13
20
|
}
|
|
@@ -28,8 +35,24 @@ var u = class {
|
|
|
28
35
|
static async activateProfile(t) {
|
|
29
36
|
return l() ? r(t) : new e(n()).activateProfile(t);
|
|
30
37
|
}
|
|
38
|
+
static async validateProfile(t, r) {
|
|
39
|
+
if (l()) return null;
|
|
40
|
+
let i = new e({
|
|
41
|
+
...n(),
|
|
42
|
+
timeout: 3e4
|
|
43
|
+
});
|
|
44
|
+
try {
|
|
45
|
+
return await i.validateProfile(t, r);
|
|
46
|
+
} catch (e) {
|
|
47
|
+
let t = e && typeof e == "object" && "status" in e ? e.status : void 0;
|
|
48
|
+
if (t === 404 || t === 429 || typeof t == "number" && t >= 500 || u(e)) return null;
|
|
49
|
+
throw e;
|
|
50
|
+
} finally {
|
|
51
|
+
i.close();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
31
54
|
};
|
|
32
55
|
//#endregion
|
|
33
|
-
export {
|
|
56
|
+
export { d as default };
|
|
34
57
|
|
|
35
58
|
//# sourceMappingURL=profiles-service.api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles-service.api.js","names":[],"sources":["../../../src/api/profiles-service/profiles-service.api.ts"],"sourcesContent":["/**\n * ProfilesService is the single entry point for LLM-profile CRUD, routing per\n * active backend so callers (hooks, the settings manager) stay backend-agnostic:\n * - local agent-server: the SDK's ProfilesClient (`/api/profiles`), created\n * per-call to pick up current backend configuration;\n * - cloud app-server: `src/api/cloud/profiles-service.api.ts` (the org-gated\n * `/api/organizations/{orgId}/profiles` routes, or the per-user settings\n * route as a fallback) via the org-scoped cloud proxy.\n * This mirrors how SettingsService branches to fetchCloudSettings().\n *\n * Uses ProfilesClient from @openhands/typescript-client v0.2.0+.\n * All types are re-exported from the SDK for consumer convenience.\n *\n * Note: Unlike some SDK clients, we don't call client.close() here for\n * consistency with other services (SettingsService, SecretsService) that\n * also create SDK clients without explicit cleanup. The SDK clients use\n * fetch-based HTTP which doesn't require connection cleanup.\n */\nimport {\n ProfilesClient,\n type GetProfileOptions,\n} from \"@openhands/typescript-client/clients\";\nimport
|
|
1
|
+
{"version":3,"file":"profiles-service.api.js","names":[],"sources":["../../../src/api/profiles-service/profiles-service.api.ts"],"sourcesContent":["/**\n * ProfilesService is the single entry point for LLM-profile CRUD, routing per\n * active backend so callers (hooks, the settings manager) stay backend-agnostic:\n * - local agent-server: the SDK's ProfilesClient (`/api/profiles`), created\n * per-call to pick up current backend configuration;\n * - cloud app-server: `src/api/cloud/profiles-service.api.ts` (the org-gated\n * `/api/organizations/{orgId}/profiles` routes, or the per-user settings\n * route as a fallback) via the org-scoped cloud proxy.\n * This mirrors how SettingsService branches to fetchCloudSettings().\n *\n * Uses ProfilesClient from @openhands/typescript-client v0.2.0+.\n * All types are re-exported from the SDK for consumer convenience.\n *\n * Note: Unlike some SDK clients, we don't call client.close() here for\n * consistency with other services (SettingsService, SecretsService) that\n * also create SDK clients without explicit cleanup. The SDK clients use\n * fetch-based HTTP which doesn't require connection cleanup.\n */\nimport {\n ProfilesClient,\n type GetProfileOptions,\n} from \"@openhands/typescript-client/clients\";\nimport {\n type ProfileInfo,\n type ProfileListResponse,\n type ProfileDetailResponse,\n type ProfileMutationResponse,\n type ActivateProfileResponse,\n type SaveProfileRequest,\n type ExposeSecretsMode,\n type ValidateProfileResponse,\n} from \"@openhands/typescript-client\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n activateCloudProfile,\n deleteCloudProfile,\n fetchCloudProfile,\n fetchCloudProfiles,\n renameCloudProfile,\n saveCloudProfile,\n} from \"../cloud/profiles-service.api\";\n\n// Re-export SDK types for consumers\nexport type {\n ProfileInfo,\n ProfileListResponse,\n ProfileDetailResponse,\n ProfileMutationResponse,\n ActivateProfileResponse,\n SaveProfileRequest,\n ExposeSecretsMode,\n ValidateProfileResponse,\n};\n\nfunction isCloudBackend(): boolean {\n return getActiveBackend().backend.kind === \"cloud\";\n}\n\nfunction isAbortLike(error: unknown): boolean {\n if (!error || typeof error !== \"object\") return false;\n const name = \"name\" in error ? error.name : undefined;\n if (name === \"AbortError\" || name === \"TimeoutError\") return true;\n const cause = \"cause\" in error ? error.cause : undefined;\n return (\n !!cause &&\n typeof cause === \"object\" &&\n \"name\" in cause &&\n (cause.name === \"AbortError\" || cause.name === \"TimeoutError\")\n );\n}\n\nclass ProfilesService {\n static async listProfiles(): Promise<ProfileListResponse> {\n if (isCloudBackend()) return fetchCloudProfiles();\n return new ProfilesClient(getAgentServerClientOptions()).listProfiles();\n }\n\n static async getProfile(\n name: string,\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<ProfileDetailResponse> {\n // Cloud never exposes profile secrets (api_key is always nulled with an\n // api_key_set flag), so `exposeSecrets` is local-only.\n if (isCloudBackend()) return fetchCloudProfile(name);\n const options: GetProfileOptions = exposeSecrets ? { exposeSecrets } : {};\n return new ProfilesClient(getAgentServerClientOptions()).getProfile(\n name,\n options,\n );\n }\n\n static async saveProfile(\n name: string,\n request: SaveProfileRequest,\n ): Promise<ProfileMutationResponse> {\n if (isCloudBackend()) return saveCloudProfile(name, request);\n return new ProfilesClient(getAgentServerClientOptions()).saveProfile(\n name,\n request,\n );\n }\n\n static async deleteProfile(name: string): Promise<ProfileMutationResponse> {\n if (isCloudBackend()) return deleteCloudProfile(name);\n return new ProfilesClient(getAgentServerClientOptions()).deleteProfile(\n name,\n );\n }\n\n static async renameProfile(\n name: string,\n newName: string,\n ): Promise<ProfileMutationResponse> {\n if (isCloudBackend()) return renameCloudProfile(name, newName);\n return new ProfilesClient(getAgentServerClientOptions()).renameProfile(\n name,\n newName,\n );\n }\n\n static async activateProfile(name: string): Promise<ActivateProfileResponse> {\n if (isCloudBackend()) return activateCloudProfile(name);\n return new ProfilesClient(getAgentServerClientOptions()).activateProfile(\n name,\n );\n }\n\n /**\n * Pre-flight check: fire a minimal LLM completion to catch misconfigurations\n * (invalid model names, missing provider prefixes, bad base URLs, invalid\n * API keys) before a profile is saved.\n *\n * Returns `{ valid: true }` when the LLM responds, or\n * `{ valid: false, error: { type, message } }` on a blocking error.\n * Transient errors (rate limits, timeouts) are non-blocking.\n *\n * Cloud backends do not implement this endpoint; `null` signals\n * \"no verdict\" so callers fall through to the normal save path.\n */\n static async validateProfile(\n name: string,\n request: SaveProfileRequest,\n ): Promise<ValidateProfileResponse | null> {\n if (isCloudBackend()) return null;\n const client = new ProfilesClient({\n ...getAgentServerClientOptions(),\n timeout: 30000,\n });\n try {\n return await client.validateProfile(name, request);\n } catch (error) {\n // Older agent-server versions don't have the endpoint → 404\n // Treat as \"no verdict\" rather than blocking the save.\n const status =\n error && typeof error === \"object\" && \"status\" in error\n ? (error as { status?: unknown }).status\n : undefined;\n if (\n status === 404 ||\n status === 429 ||\n (typeof status === \"number\" && status >= 500) ||\n isAbortLike(error)\n ) {\n return null;\n }\n throw error;\n } finally {\n client.close();\n }\n }\n}\n\nexport default ProfilesService;\n"],"mappings":";;;;;;AAuDA,SAAS,IAA0B;CACjC,OAAO,EAAiB,EAAE,QAAQ,SAAS;AAC7C;AAEA,SAAS,EAAY,GAAyB;CAC5C,IAAI,CAAC,KAAS,OAAO,KAAU,UAAU,OAAO;CAChD,IAAM,IAAO,UAAU,IAAQ,EAAM,OAAO,KAAA;CAC5C,IAAI,MAAS,gBAAgB,MAAS,gBAAgB,OAAO;CAC7D,IAAM,IAAQ,WAAW,IAAQ,EAAM,QAAQ,KAAA;CAC/C,OACE,CAAC,CAAC,KACF,OAAO,KAAU,YACjB,UA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R,UAAU;GACR,EAAO,MAAM;EACf;CACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/typescript-client/dist/client/settings-client.cjs");require("../node_modules/@openhands/typescript-client/dist/clients.cjs");const t=require("./backend-registry/active-store.cjs"),n=require("./agent-server-client-options.cjs"),r=require("./agent-server-compatibility.cjs"),i=require("./with-retry.cjs"),a=require("./cloud/secrets-service.api.cjs");
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/typescript-client/dist/client/settings-client.cjs");require("../node_modules/@openhands/typescript-client/dist/clients.cjs");const t=require("./backend-registry/active-store.cjs"),n=require("./agent-server-client-options.cjs"),r=require("./agent-server-compatibility.cjs"),i=require("./with-retry.cjs"),a=require("./cloud/secrets-service.api.cjs");async function o(){return t.getActiveBackend().backend.kind===`cloud`?i.withRetry(()=>a.fetchCloudSecrets()):(await i.withRetry(()=>new e.SettingsClient(n.getAgentServerClientOptions()).listSecrets())).secrets.map(e=>({name:e.name,description:e.description}))}var s=class{static async getSecrets(){try{return await o()}catch(e){return console.error(`Failed to fetch secrets after retries:`,e),[]}}static async getSecretsOrThrow(){return o()}static async createSecret(r,o,s){if(t.getActiveBackend().backend.kind===`cloud`){await a.saveCloudSecret({name:r,value:o,description:s});return}await i.withRetry(()=>new e.SettingsClient(n.getAgentServerClientOptions()).upsertSecret({name:r,value:o,description:s}))}static async updateSecret(r,o,s,c){if(t.getActiveBackend().backend.kind===`cloud`){await a.saveCloudSecret({name:o,value:c,description:s,previousName:r});return}let l=new e.SettingsClient(n.getAgentServerClientOptions()),u=c??await i.withRetry(()=>l.getSecret(r));await i.withRetry(()=>l.upsertSecret({name:o,value:u,description:s})),o!==r&&await this.deleteSecret(r)}static async deleteSecret(o){try{if(t.getActiveBackend().backend.kind===`cloud`){await i.withRetry(()=>a.deleteCloudSecret(o));return}await i.withRetry(()=>new e.SettingsClient(n.getAgentServerClientOptions()).deleteSecret(o))}catch(e){if(r.isSdkHttpStatusError(e,404)||e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};exports.SecretsService=s;
|
|
2
2
|
//# sourceMappingURL=secrets-service.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-service.cjs","names":[],"sources":["../../src/api/secrets-service.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport { isSdkHttpStatusError } from \"./agent-server-compatibility\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport {\n deleteCloudSecret,\n fetchCloudSecrets,\n saveCloudSecret,\n} from \"./cloud/secrets-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport { CustomSecretWithoutValue } from \"./secrets-service.types\";\nimport { withRetry } from \"./with-retry\";\n\nexport class SecretsService {\n /**\n * List all custom secrets (names and descriptions only, no values).\n * Uses the agent-server API endpoint: GET /api/settings/secrets\n *\n * Note: The agent-server API doesn't support pagination or search filtering.\n * All secrets are returned in a single response.\n */\n static async getSecrets(): Promise<CustomSecretWithoutValue[]> {\n try {\n
|
|
1
|
+
{"version":3,"file":"secrets-service.cjs","names":[],"sources":["../../src/api/secrets-service.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport { isSdkHttpStatusError } from \"./agent-server-compatibility\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport {\n deleteCloudSecret,\n fetchCloudSecrets,\n saveCloudSecret,\n} from \"./cloud/secrets-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport { CustomSecretWithoutValue } from \"./secrets-service.types\";\nimport { withRetry } from \"./with-retry\";\n\nasync function fetchSecrets(): Promise<CustomSecretWithoutValue[]> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return withRetry(() => fetchCloudSecrets());\n }\n const response = await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).listSecrets(),\n );\n return response.secrets.map((s) => ({\n name: s.name,\n description: s.description,\n }));\n}\n\nexport class SecretsService {\n /**\n * List all custom secrets (names and descriptions only, no values).\n * Uses the agent-server API endpoint: GET /api/settings/secrets\n *\n * Note: The agent-server API doesn't support pagination or search filtering.\n * All secrets are returned in a single response.\n */\n static async getSecrets(): Promise<CustomSecretWithoutValue[]> {\n try {\n return await fetchSecrets();\n } catch (error) {\n console.error(\"Failed to fetch secrets after retries:\", error);\n return [];\n }\n }\n\n /**\n * List all custom secrets, surfacing failures to callers that must\n * distinguish an unavailable list from an empty one.\n */\n static async getSecretsOrThrow(): Promise<CustomSecretWithoutValue[]> {\n return fetchSecrets();\n }\n\n /**\n * Create or update a custom secret (upsert by name).\n * Uses the agent-server API endpoint: PUT /api/settings/secrets\n *\n * @param name - Secret name (must start with letter, contain only letters/numbers/underscores, 1-64 chars)\n * @param value - Secret value\n * @param description - Optional description\n * @throws Error if the API call fails after retries\n */\n static async createSecret(\n name: string,\n value: string,\n description?: string,\n ): Promise<void> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n await saveCloudSecret({ name, value, description });\n return;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).upsertSecret({\n name,\n value,\n description,\n }),\n );\n }\n\n /**\n * Update a secret's name and/or description, and optionally overwrite its\n * value. When no value is given the existing one is preserved: the\n * agent-server only exposes an upsert endpoint, so we fetch the existing\n * value and re-upsert it under the updated name/description.\n *\n * @param secretToEdit - Existing secret name\n * @param name - New (or same) secret name\n * @param description - Optional new description\n * @param value - Optional new value; when omitted the stored value is kept\n * @throws Error if the API call fails after retries\n */\n static async updateSecret(\n secretToEdit: string,\n name: string,\n description?: string,\n value?: string,\n ): Promise<void> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n await saveCloudSecret({\n name,\n value,\n description,\n previousName: secretToEdit,\n });\n return;\n }\n\n const client = new SettingsClient(getAgentServerClientOptions());\n const nextValue =\n value ?? (await withRetry(() => client.getSecret(secretToEdit)));\n\n await withRetry(() =>\n client.upsertSecret({\n name,\n value: nextValue,\n description,\n }),\n );\n\n if (name !== secretToEdit) {\n await this.deleteSecret(secretToEdit);\n }\n }\n\n /**\n * Delete a custom secret by name.\n * Uses the agent-server API endpoint: DELETE /api/settings/secrets/{name}\n *\n * @param name - Secret name to delete\n * @throws Error if the API call fails (except 404, which is treated as success)\n */\n static async deleteSecret(name: string): Promise<void> {\n try {\n if (getActiveBackend().backend.kind === \"cloud\") {\n await withRetry(() => deleteCloudSecret(name));\n return;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteSecret(name),\n );\n } catch (error) {\n // 404 means secret doesn't exist - treat as successful deletion.\n // Both the SDK's HttpError (status on the error itself) and\n // axios-style errors (status under `response`) count.\n if (\n isSdkHttpStatusError(error, 404) ||\n (error &&\n typeof error === \"object\" &&\n \"response\" in error &&\n (error as { response?: { status?: number } }).response?.status ===\n 404)\n ) {\n return;\n }\n throw error;\n }\n }\n}\n"],"mappings":"qbAYA,eAAe,GAAoD,CAOjE,OANI,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QAC/B,EAAA,cAAgB,EAAA,kBAAkB,CAAC,GAKrC,MAHgB,EAAA,cACrB,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,YAAY,CAChE,GACgB,QAAQ,IAAK,IAAO,CAClC,KAAM,EAAE,KACR,YAAa,EAAE,WACjB,EAAE,CACJ,CAEA,IAAa,EAAb,KAA4B,CAQ1B,aAAa,YAAkD,CAC7D,GAAI,CACF,OAAO,MAAM,EAAa,CAC5B,OAAS,EAAO,CAEd,OADA,QAAQ,MAAM,yCAA0C,CAAK,EACtD,CAAC,CACV,CACF,CAMA,aAAa,mBAAyD,CACpE,OAAO,EAAa,CACtB,CAWA,aAAa,aACX,EACA,EACA,EACe,CACf,GAAI,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QAAS,CAC/C,MAAM,EAAA,gBAAgB,CAAE,OAAM,QAAO,aAAY,CAAC,EAClD,MACF,CACA,MAAM,EAAA,cACJ,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,aAAa,CAC7D,OACA,QACA,aACF,CAAC,CACH,CACF,CAcA,aAAa,aACX,EACA,EACA,EACA,EACe,CACf,GAAI,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QAAS,CAC/C,MAAM,EAAA,gBAAgB,CACpB,OACA,QACA,cACA,aAAc,CAChB,CAAC,EACD,MACF,CAEA,IAAM,EAAS,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EACzD,EACJ,GAAU,MAAM,EAAA,cAAgB,EAAO,UAAU,CAAY,CAAC,EAEhE,MAAM,EAAA,cACJ,EAAO,aAAa,CAClB,OACA,MAAO,EACP,aACF,CAAC,CACH,EAEI,IAAS,GACX,MAAM,KAAK,aAAa,CAAY,CAExC,CASA,aAAa,aAAa,EAA6B,CACrD,GAAI,CACF,GAAI,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QAAS,CAC/C,MAAM,EAAA,cAAgB,EAAA,kBAAkB,CAAI,CAAC,EAC7C,MACF,CACA,MAAM,EAAA,cACJ,IAAI,EAAA,eAAe,EAAA,4BAA4B,CAAC,EAAE,aAAa,CAAI,CACrE,CACF,OAAS,EAAO,CAId,GACE,EAAA,qBAAqB,EAAO,GAAG,GAC9B,GACC,OAAO,GAAU,UACjB,aAAc,GACb,EAA6C,UAAU,SACtD,IAEJ,OAEF,MAAM,CACR,CACF,CACF"}
|
|
@@ -8,6 +8,11 @@ export declare class SecretsService {
|
|
|
8
8
|
* All secrets are returned in a single response.
|
|
9
9
|
*/
|
|
10
10
|
static getSecrets(): Promise<CustomSecretWithoutValue[]>;
|
|
11
|
+
/**
|
|
12
|
+
* List all custom secrets, surfacing failures to callers that must
|
|
13
|
+
* distinguish an unavailable list from an empty one.
|
|
14
|
+
*/
|
|
15
|
+
static getSecretsOrThrow(): Promise<CustomSecretWithoutValue[]>;
|
|
11
16
|
/**
|
|
12
17
|
* Create or update a custom secret (upsert by name).
|
|
13
18
|
* Uses the agent-server API endpoint: PUT /api/settings/secrets
|
|
@@ -6,17 +6,23 @@ import { isSdkHttpStatusError as r } from "./agent-server-compatibility.js";
|
|
|
6
6
|
import { withRetry as i } from "./with-retry.js";
|
|
7
7
|
import { deleteCloudSecret as a, fetchCloudSecrets as o, saveCloudSecret as s } from "./cloud/secrets-service.api.js";
|
|
8
8
|
//#region src/api/secrets-service.ts
|
|
9
|
-
|
|
9
|
+
async function c() {
|
|
10
|
+
return t().backend.kind === "cloud" ? i(() => o()) : (await i(() => new e(n()).listSecrets())).secrets.map((e) => ({
|
|
11
|
+
name: e.name,
|
|
12
|
+
description: e.description
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
var l = class {
|
|
10
16
|
static async getSecrets() {
|
|
11
17
|
try {
|
|
12
|
-
return
|
|
13
|
-
name: e.name,
|
|
14
|
-
description: e.description
|
|
15
|
-
}));
|
|
18
|
+
return await c();
|
|
16
19
|
} catch (e) {
|
|
17
20
|
return console.error("Failed to fetch secrets after retries:", e), [];
|
|
18
21
|
}
|
|
19
22
|
}
|
|
23
|
+
static async getSecretsOrThrow() {
|
|
24
|
+
return c();
|
|
25
|
+
}
|
|
20
26
|
static async createSecret(r, a, o) {
|
|
21
27
|
if (t().backend.kind === "cloud") {
|
|
22
28
|
await s({
|
|
@@ -63,6 +69,6 @@ var c = class {
|
|
|
63
69
|
}
|
|
64
70
|
};
|
|
65
71
|
//#endregion
|
|
66
|
-
export {
|
|
72
|
+
export { l as SecretsService };
|
|
67
73
|
|
|
68
74
|
//# sourceMappingURL=secrets-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-service.js","names":[],"sources":["../../src/api/secrets-service.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport { isSdkHttpStatusError } from \"./agent-server-compatibility\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport {\n deleteCloudSecret,\n fetchCloudSecrets,\n saveCloudSecret,\n} from \"./cloud/secrets-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport { CustomSecretWithoutValue } from \"./secrets-service.types\";\nimport { withRetry } from \"./with-retry\";\n\nexport class SecretsService {\n /**\n * List all custom secrets (names and descriptions only, no values).\n * Uses the agent-server API endpoint: GET /api/settings/secrets\n *\n * Note: The agent-server API doesn't support pagination or search filtering.\n * All secrets are returned in a single response.\n */\n static async getSecrets(): Promise<CustomSecretWithoutValue[]> {\n try {\n
|
|
1
|
+
{"version":3,"file":"secrets-service.js","names":[],"sources":["../../src/api/secrets-service.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport { isSdkHttpStatusError } from \"./agent-server-compatibility\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport {\n deleteCloudSecret,\n fetchCloudSecrets,\n saveCloudSecret,\n} from \"./cloud/secrets-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\nimport { CustomSecretWithoutValue } from \"./secrets-service.types\";\nimport { withRetry } from \"./with-retry\";\n\nasync function fetchSecrets(): Promise<CustomSecretWithoutValue[]> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return withRetry(() => fetchCloudSecrets());\n }\n const response = await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).listSecrets(),\n );\n return response.secrets.map((s) => ({\n name: s.name,\n description: s.description,\n }));\n}\n\nexport class SecretsService {\n /**\n * List all custom secrets (names and descriptions only, no values).\n * Uses the agent-server API endpoint: GET /api/settings/secrets\n *\n * Note: The agent-server API doesn't support pagination or search filtering.\n * All secrets are returned in a single response.\n */\n static async getSecrets(): Promise<CustomSecretWithoutValue[]> {\n try {\n return await fetchSecrets();\n } catch (error) {\n console.error(\"Failed to fetch secrets after retries:\", error);\n return [];\n }\n }\n\n /**\n * List all custom secrets, surfacing failures to callers that must\n * distinguish an unavailable list from an empty one.\n */\n static async getSecretsOrThrow(): Promise<CustomSecretWithoutValue[]> {\n return fetchSecrets();\n }\n\n /**\n * Create or update a custom secret (upsert by name).\n * Uses the agent-server API endpoint: PUT /api/settings/secrets\n *\n * @param name - Secret name (must start with letter, contain only letters/numbers/underscores, 1-64 chars)\n * @param value - Secret value\n * @param description - Optional description\n * @throws Error if the API call fails after retries\n */\n static async createSecret(\n name: string,\n value: string,\n description?: string,\n ): Promise<void> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n await saveCloudSecret({ name, value, description });\n return;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).upsertSecret({\n name,\n value,\n description,\n }),\n );\n }\n\n /**\n * Update a secret's name and/or description, and optionally overwrite its\n * value. When no value is given the existing one is preserved: the\n * agent-server only exposes an upsert endpoint, so we fetch the existing\n * value and re-upsert it under the updated name/description.\n *\n * @param secretToEdit - Existing secret name\n * @param name - New (or same) secret name\n * @param description - Optional new description\n * @param value - Optional new value; when omitted the stored value is kept\n * @throws Error if the API call fails after retries\n */\n static async updateSecret(\n secretToEdit: string,\n name: string,\n description?: string,\n value?: string,\n ): Promise<void> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n await saveCloudSecret({\n name,\n value,\n description,\n previousName: secretToEdit,\n });\n return;\n }\n\n const client = new SettingsClient(getAgentServerClientOptions());\n const nextValue =\n value ?? (await withRetry(() => client.getSecret(secretToEdit)));\n\n await withRetry(() =>\n client.upsertSecret({\n name,\n value: nextValue,\n description,\n }),\n );\n\n if (name !== secretToEdit) {\n await this.deleteSecret(secretToEdit);\n }\n }\n\n /**\n * Delete a custom secret by name.\n * Uses the agent-server API endpoint: DELETE /api/settings/secrets/{name}\n *\n * @param name - Secret name to delete\n * @throws Error if the API call fails (except 404, which is treated as success)\n */\n static async deleteSecret(name: string): Promise<void> {\n try {\n if (getActiveBackend().backend.kind === \"cloud\") {\n await withRetry(() => deleteCloudSecret(name));\n return;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteSecret(name),\n );\n } catch (error) {\n // 404 means secret doesn't exist - treat as successful deletion.\n // Both the SDK's HttpError (status on the error itself) and\n // axios-style errors (status under `response`) count.\n if (\n isSdkHttpStatusError(error, 404) ||\n (error &&\n typeof error === \"object\" &&\n \"response\" in error &&\n (error as { response?: { status?: number } }).response?.status ===\n 404)\n ) {\n return;\n }\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;;;AAYA,eAAe,IAAoD;CAOjE,OANI,EAAiB,EAAE,QAAQ,SAAS,UAC/B,QAAgB,EAAkB,CAAC,KAKrC,MAHgB,QACrB,IAAI,EAAe,EAA4B,CAAC,EAAE,YAAY,CAChE,GACgB,QAAQ,KAAK,OAAO;EAClC,MAAM,EAAE;EACR,aAAa,EAAE;CACjB,EAAE;AACJ;AAEA,IAAa,IAAb,MAA4B;CAQ1B,aAAa,aAAkD;EAC7D,IAAI;GACF,OAAO,MAAM,EAAa;EAC5B,SAAS,GAAO;GAEd,OADA,QAAQ,MAAM,0CAA0C,CAAK,GACtD,CAAC;EACV;CACF;CAMA,aAAa,oBAAyD;EACpE,OAAO,EAAa;CACtB;CAWA,aAAa,aACX,GACA,GACA,GACe;EACf,IAAI,EAAiB,EAAE,QAAQ,SAAS,SAAS;GAC/C,MAAM,EAAgB;IAAE;IAAM;IAAO;GAAY,CAAC;GAClD;EACF;EACA,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,aAAa;GAC7D;GACA;GACA;EACF,CAAC,CACH;CACF;CAcA,aAAa,aACX,GACA,GACA,GACA,GACe;EACf,IAAI,EAAiB,EAAE,QAAQ,SAAS,SAAS;GAC/C,MAAM,EAAgB;IACpB;IACA;IACA;IACA,cAAc;GAChB,CAAC;GACD;EACF;EAEA,IAAM,IAAS,IAAI,EAAe,EAA4B,CAAC,GACzD,IACJ,KAAU,MAAM,QAAgB,EAAO,UAAU,CAAY,CAAC;EAUhE,AARA,MAAM,QACJ,EAAO,aAAa;GAClB;GACA,OAAO;GACP;EACF,CAAC,CACH,GAEI,MAAS,KACX,MAAM,KAAK,aAAa,CAAY;CAExC;CASA,aAAa,aAAa,GAA6B;EACrD,IAAI;GACF,IAAI,EAAiB,EAAE,QAAQ,SAAS,SAAS;IAC/C,MAAM,QAAgB,EAAkB,CAAI,CAAC;IAC7C;GACF;GACA,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,aAAa,CAAI,CACrE;EACF,SAAS,GAAO;GAId,IACE,EAAqB,GAAO,GAAG,KAC9B,KACC,OAAO,KAAU,YACjB,cAAc,KACb,EAA6C,UAAU,WACtD,KAEJ;GAEF,MAAM;EACR;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs"),require("../features/chat/chat-interface.cjs"),require("../features/conversation/conversation-main/chat-interface-wrapper.cjs"),require("../features/conversation/conversation-loading.cjs"),require("../features/conversation/
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs"),require("../features/chat/chat-interface.cjs"),require("../features/conversation/conversation-main/chat-interface-wrapper.cjs"),require("../features/conversation/conversation-loading.cjs"),require("../features/conversation/conversation-name.cjs"),require("../features/conversation/conversation-name-with-status.cjs"),require("../features/conversation/conversation-tabs/conversation-tabs.cjs"),require("../features/conversation/conversation-main/conversation-main.cjs"),require("../../routes/conversation.cjs");
|
|
@@ -6,4 +6,3 @@ export { ChatInterfaceWrapper } from "../features/conversation/conversation-main
|
|
|
6
6
|
export { ConversationName } from "../features/conversation/conversation-name";
|
|
7
7
|
export { ConversationNameWithStatus } from "../features/conversation/conversation-name-with-status";
|
|
8
8
|
export { ConversationTabs } from "../features/conversation/conversation-tabs/conversation-tabs";
|
|
9
|
-
export { MetricsModal } from "../features/conversation/metrics-modal/metrics-modal";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "../features/chat/chat-interface.js";
|
|
2
2
|
import "../features/conversation/conversation-main/chat-interface-wrapper.js";
|
|
3
3
|
import "../features/conversation/conversation-loading.js";
|
|
4
|
-
import "../features/conversation/metrics-modal/metrics-modal.js";
|
|
5
4
|
import "../features/conversation/conversation-name.js";
|
|
6
5
|
import "../features/conversation/conversation-name-with-status.js";
|
|
7
6
|
import "../features/conversation/conversation-tabs/conversation-tabs.js";
|
package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../node_modules/react-i18next/dist/es/Trans.cjs"),n=require("../../../../i18n/declaration.cjs"),r=require("../../../../i18n/index.cjs");require("../../../../constants/canvas-ui.cjs"),require("../../../../constants/child-conversation.cjs");const i=require("../../../../types/agent-server/type-guards.cjs"),a=require("./get-acp-tool-call-content.cjs"),o=require("./get-action-event-title.cjs"),s=require("../../../features/chat/mono-component.cjs"),c=require("../../../features/chat/path-component.cjs"),l=require("./get-action-content.cjs"),u=require("./get-observation-content.cjs"),d=require("../task-tracking/task-tracking-observation-content.cjs"),f=require("./create-skill-ready-event.cjs"),p=require("../../../features/chat/tool-visualizers/dispatcher.cjs");let m=require("react");m=e.__toESM(m,1);let h=require("react/jsx-runtime");var g=(e,n)=>r.default.exists(e)?(0,h.jsx)(t.Trans,{ns:`openhands`,i18nKey:e,values:n,components:{path:(0,h.jsx)(c.PathComponent,{}),cmd:(0,h.jsx)(s.MonoComponent,{})}}):e,_=e=>e.kind===`text`?e.text:g(e.key,e.values),v=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?o.trimEventTitleText(n,t):n:null},y=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=v(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},b=(e,t)=>{let n=t?.tool_name,r=e.observation,i=v(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=v((t?.action??{}).profile_name)??v(r.profile_name)??v(r.base_url,80)??v(r.endpoint,80)??v(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},x=e=>i.isActionEvent(e)?y(e)||_(o.getActionEventTitleDescriptor(e)):``,S=(e,t)=>{if(!i.isObservationEvent(e))return``;let n=b(e,t);if(n)return n;if(t){let e=y(t);if(e)return e;let n=o.getActionSummaryTitle(t);if(n)return n}let r=e.observation.kind,a=``,s={};switch(r){case`ExecuteBashObservation`:case`TerminalObservation`:a=`OBSERVATION_MESSAGE$RUN`,s={command:e.observation.command?o.trimEventTitleText(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:a=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:`OBSERVATION_MESSAGE$EDIT`,s={path:e.observation.path||``};break;case`MCPToolObservation`:a=`OBSERVATION_MESSAGE$MCP`,s={mcp_tool_name:e.observation.tool_name};break;case`InvokeSkillObservation`:a=`OBSERVATION_MESSAGE$INVOKE_SKILL`,s={name:e.observation.skill_name};break;case`TaskObservation`:a=`OBSERVATION_MESSAGE$TASK`,s={name:e.observation.subagent};break;case`CanvasUIObservation`:a=`OBSERVATION_MESSAGE$CANVAS_UI`;break;case`ClientToolObservation`:if(e.tool_name===`canvas_ui_control`){a=`OBSERVATION_MESSAGE$CANVAS_UI`;break}if(e.tool_name===`launch_child_conversation`){a=`OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION`;break}return r.replace(`Observation`,``).toUpperCase();case`SwitchLLMObservation`:a=e.observation.is_error?`MODEL$SWITCH_FAILED`:`MODEL$SWITCHED_TO_PROFILE`,s={name:e.observation.profile_name};break;case`BrowserObservation`:a=`OBSERVATION_MESSAGE$BROWSE`;break;case`TaskTrackerObservation`:{let{command:t}=e.observation;a=t===`plan`?`OBSERVATION_MESSAGE$TASK_TRACKING_PLAN`:`OBSERVATION_MESSAGE$TASK_TRACKING_VIEW`;break}case`ThinkObservation`:a=`OBSERVATION_MESSAGE$THINK`;break;case`GlobObservation`:a=`OBSERVATION_MESSAGE$GLOB`,s={pattern:e.observation.pattern?o.trimEventTitleText(e.observation.pattern,50):``};break;case`GrepObservation`:a=`OBSERVATION_MESSAGE$GREP`,s={pattern:e.observation.pattern?o.trimEventTitleText(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return a?g(a,s):r},C=(e,t)=>e.observation.kind!==`ClientToolObservation`||e.tool_name!==`canvas_ui_control`||!t||!i.isCanvasUIActionEvent(t)?null:`UI command '${t.action.command}' dispatched to the Agent Canvas frontend.`,w=(e,t)=>{let o=``,s=``;if(f.isSkillReadyEvent(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;o=r.default.exists(t)?g(t,{}):`Skill Ready`,s=e._skillReadyContent}else i.isActionEvent(e)?(o=x(e),s=p.resolveVisualizerBody(e)??l.getActionContent(e)):i.isObservationEvent(e)?(o=S(e,t),s=e.observation.kind===`TaskTrackerObservation`?(0,h.jsx)(d.TaskTrackingObservationContent,{event:e}):C(e,t)??p.resolveVisualizerBody(e,t)??u.getObservationContent(e)):i.isACPToolCallEvent(e)?(o=g(a.getACPToolCallTitleKey(e),{title:a.stripRedundantTitlePrefix(e)}),s=a.getACPToolCallContent(e)):e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&typeof e.action.kind==`string`&&(o=String(e.action.kind).replace(`Action`,``).toUpperCase());return{title:o||r.default.t(n.I18nKey.EVENT$UNKNOWN_EVENT),details:s}};exports.getEventContent=w;
|
|
1
|
+
const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../node_modules/react-i18next/dist/es/Trans.cjs"),n=require("../../../../i18n/declaration.cjs"),r=require("../../../../i18n/index.cjs");require("../../../../constants/canvas-ui.cjs"),require("../../../../constants/child-conversation.cjs");const i=require("../../../../types/agent-server/type-guards.cjs"),a=require("./get-acp-tool-call-content.cjs"),o=require("./get-action-event-title.cjs"),s=require("../../../features/chat/mono-component.cjs"),c=require("../../../features/chat/path-component.cjs"),l=require("./get-action-content.cjs"),u=require("./get-observation-content.cjs"),d=require("../task-tracking/task-tracking-observation-content.cjs"),f=require("./create-skill-ready-event.cjs"),p=require("../../../features/chat/tool-visualizers/dispatcher.cjs");let m=require("react");m=e.__toESM(m,1);let h=require("react/jsx-runtime");var g=(e,n)=>r.default.exists(e)?(0,h.jsx)(t.Trans,{ns:`openhands`,i18nKey:e,values:n,components:{path:(0,h.jsx)(c.PathComponent,{}),cmd:(0,h.jsx)(s.MonoComponent,{})}}):e,_=e=>e.kind===`text`?e.text:g(e.key,e.values),v=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?o.trimEventTitleText(n,t):n:null},y=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=v(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},b=(e,t)=>{let n=t?.tool_name,r=e.observation,i=v(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=v((t?.action??{}).profile_name)??v(r.profile_name)??v(r.base_url,80)??v(r.endpoint,80)??v(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},x=e=>i.isActionEvent(e)?y(e)||_(o.getActionEventTitleDescriptor(e)):``,S=(e,t)=>{if(!i.isObservationEvent(e))return``;let n=b(e,t);if(n)return n;if(t){let e=y(t);if(e)return e;let n=o.getActionSummaryTitle(t);if(n)return n}let r=e.observation.kind,a=``,s={};switch(r){case`ExecuteBashObservation`:case`TerminalObservation`:a=`OBSERVATION_MESSAGE$RUN`,s={command:e.observation.command?o.trimEventTitleText(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:a=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:e.observation.command===`create`?`OBSERVATION_MESSAGE$WRITE`:`OBSERVATION_MESSAGE$EDIT`,s={path:e.observation.path||``};break;case`MCPToolObservation`:a=`OBSERVATION_MESSAGE$MCP`,s={mcp_tool_name:e.observation.tool_name};break;case`InvokeSkillObservation`:a=`OBSERVATION_MESSAGE$INVOKE_SKILL`,s={name:e.observation.skill_name};break;case`TaskObservation`:a=`OBSERVATION_MESSAGE$TASK`,s={name:e.observation.subagent};break;case`CanvasUIObservation`:a=`OBSERVATION_MESSAGE$CANVAS_UI`;break;case`ClientToolObservation`:if(e.tool_name===`canvas_ui_control`){a=`OBSERVATION_MESSAGE$CANVAS_UI`;break}if(e.tool_name===`launch_child_conversation`){a=`OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION`;break}return r.replace(`Observation`,``).toUpperCase();case`SwitchLLMObservation`:a=e.observation.is_error?`MODEL$SWITCH_FAILED`:`MODEL$SWITCHED_TO_PROFILE`,s={name:e.observation.profile_name};break;case`BrowserObservation`:a=`OBSERVATION_MESSAGE$BROWSE`;break;case`TaskTrackerObservation`:{let{command:t}=e.observation;a=t===`plan`?`OBSERVATION_MESSAGE$TASK_TRACKING_PLAN`:`OBSERVATION_MESSAGE$TASK_TRACKING_VIEW`;break}case`ThinkObservation`:a=`OBSERVATION_MESSAGE$THINK`;break;case`GlobObservation`:a=`OBSERVATION_MESSAGE$GLOB`,s={pattern:e.observation.pattern?o.trimEventTitleText(e.observation.pattern,50):``};break;case`GrepObservation`:a=`OBSERVATION_MESSAGE$GREP`,s={pattern:e.observation.pattern?o.trimEventTitleText(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return a?g(a,s):r},C=(e,t)=>e.observation.kind!==`ClientToolObservation`||e.tool_name!==`canvas_ui_control`||!t||!i.isCanvasUIActionEvent(t)?null:`UI command '${t.action.command}' dispatched to the Agent Canvas frontend.`,w=(e,t)=>{let o=``,s=``;if(f.isSkillReadyEvent(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;o=r.default.exists(t)?g(t,{}):`Skill Ready`,s=e._skillReadyContent}else i.isActionEvent(e)?(o=x(e),s=p.resolveVisualizerBody(e)??l.getActionContent(e)):i.isObservationEvent(e)?(o=S(e,t),s=e.observation.kind===`TaskTrackerObservation`?(0,h.jsx)(d.TaskTrackingObservationContent,{event:e}):C(e,t)??p.resolveVisualizerBody(e,t)??u.getObservationContent(e)):i.isACPToolCallEvent(e)?(o=g(a.getACPToolCallTitleKey(e),{title:a.stripRedundantTitlePrefix(e)}),s=a.getACPToolCallContent(e)):e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&typeof e.action.kind==`string`&&(o=String(e.action.kind).replace(`Action`,``).toUpperCase());return{title:o||r.default.t(n.I18nKey.EVENT$UNKNOWN_EVENT),details:s}};exports.getEventContent=w;
|
|
2
2
|
//# sourceMappingURL=get-event-content.cjs.map
|
package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-content.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport React from \"react\";\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \"#/constants/canvas-ui\";\nimport { LAUNCH_CHILD_CONVERSATION_TOOL_NAME } from \"#/constants/child-conversation\";\nimport {\n OpenHandsEvent,\n ObservationEvent,\n ActionEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n isACPToolCallEvent,\n isCanvasUIActionEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { MonoComponent } from \"../../../features/chat/mono-component\";\nimport { PathComponent } from \"../../../features/chat/path-component\";\nimport { getActionContent } from \"./get-action-content\";\nimport { getObservationContent } from \"./get-observation-content\";\nimport {\n getACPToolCallContent,\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"./get-acp-tool-call-content\";\nimport { TaskTrackingObservationContent } from \"../task-tracking/task-tracking-observation-content\";\nimport { TaskTrackerObservation } from \"#/types/agent-server/core/base/observation\";\nimport { SkillReadyEvent, isSkillReadyEvent } from \"./create-skill-ready-event\";\nimport { resolveVisualizerBody } from \"../../../features/chat/tool-visualizers/dispatcher\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n trimEventTitleText,\n type EventTitleDescriptor,\n} from \"./get-action-event-title\";\n\n// Helper function to create title from translation key\nconst createTitleFromKey = (\n key: string,\n values: Readonly<Record<string, unknown>>,\n): React.ReactNode => {\n if (!i18n.exists(key)) {\n return key;\n }\n\n return (\n <Trans\n ns=\"openhands\"\n i18nKey={key}\n values={values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n );\n};\n\nconst renderTitleDescriptor = (\n descriptor: EventTitleDescriptor,\n): React.ReactNode =>\n descriptor.kind === \"text\"\n ? descriptor.text\n : createTitleFromKey(descriptor.key, descriptor.values);\n\nconst getNonEmptyString = (\n value: unknown,\n maxLength?: number,\n): string | null => {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n return maxLength ? trimEventTitleText(trimmed, maxLength) : trimmed;\n};\n\nconst getVisionInspectActionTitle = (\n event: ActionEvent,\n): React.ReactNode | null => {\n if (event.tool_name !== \"inspect_image_with_vision\") {\n return null;\n }\n\n const action = event.action as unknown as Record<string, unknown>;\n const profileName = getNonEmptyString(action.profile_name);\n\n return profileName\n ? `Describing image with ${profileName}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\nconst getVisionInspectObservationTitle = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode | null => {\n const actionToolName = correspondingAction?.tool_name;\n const observation = event.observation as unknown as Record<string, unknown>;\n const observationToolName = getNonEmptyString(observation.tool_name);\n\n if (\n actionToolName !== \"inspect_image_with_vision\" &&\n observationToolName !== \"inspect_image_with_vision\" &&\n String(event.observation.kind) !== \"VisionInspectObservation\"\n ) {\n return null;\n }\n\n const action = (correspondingAction?.action ?? {}) as unknown as Record<\n string,\n unknown\n >;\n const label =\n getNonEmptyString(action.profile_name) ??\n getNonEmptyString(observation.profile_name) ??\n getNonEmptyString(observation.base_url, 80) ??\n getNonEmptyString(observation.endpoint, 80) ??\n getNonEmptyString(observation.model, 80);\n\n return label\n ? `Describing image with ${label}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\n// Action Event Processing\nconst getActionEventTitle = (event: OpenHandsEvent): React.ReactNode => {\n // Early return if not an action event\n if (!isActionEvent(event)) {\n return \"\";\n }\n\n const visionInspectTitle = getVisionInspectActionTitle(event);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n return renderTitleDescriptor(getActionEventTitleDescriptor(event));\n};\n\n// Observation Event Processing\nconst getObservationEventTitle = (\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode => {\n // Early return if not an observation event\n if (!isObservationEvent(event)) {\n return \"\";\n }\n\n const visionInspectObservationTitle = getVisionInspectObservationTitle(\n event,\n correspondingAction,\n );\n if (visionInspectObservationTitle) {\n return visionInspectObservationTitle;\n }\n\n if (correspondingAction) {\n const visionInspectTitle = getVisionInspectActionTitle(correspondingAction);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getActionSummaryTitle(correspondingAction);\n if (summaryTitle) {\n return summaryTitle;\n }\n }\n\n const observationType = event.observation.kind;\n let observationKey = \"\";\n let observationValues: Record<string, unknown> = {};\n\n switch (observationType) {\n case \"ExecuteBashObservation\":\n case \"TerminalObservation\":\n observationKey = \"OBSERVATION_MESSAGE$RUN\";\n observationValues = {\n command: event.observation.command\n ? trimEventTitleText(event.observation.command, 80)\n : \"\",\n };\n break;\n case \"FileEditorObservation\":\n case \"StrReplaceEditorObservation\":\n if (event.observation.command === \"view\") {\n observationKey = \"OBSERVATION_MESSAGE$READ\";\n } else {\n observationKey = \"OBSERVATION_MESSAGE$EDIT\";\n }\n observationValues = {\n path: event.observation.path || \"\",\n };\n break;\n case \"MCPToolObservation\":\n observationKey = \"OBSERVATION_MESSAGE$MCP\";\n observationValues = {\n mcp_tool_name: event.observation.tool_name,\n };\n break;\n case \"InvokeSkillObservation\":\n observationKey = \"OBSERVATION_MESSAGE$INVOKE_SKILL\";\n observationValues = {\n name: event.observation.skill_name,\n };\n break;\n case \"TaskObservation\":\n observationKey = \"OBSERVATION_MESSAGE$TASK\";\n observationValues = {\n name: event.observation.subagent,\n };\n break;\n case \"CanvasUIObservation\":\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n case \"ClientToolObservation\":\n if (event.tool_name === CANVAS_UI_CLIENT_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n }\n if (event.tool_name === LAUNCH_CHILD_CONVERSATION_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION\";\n break;\n }\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n case \"SwitchLLMObservation\":\n observationKey = event.observation.is_error\n ? \"MODEL$SWITCH_FAILED\"\n : \"MODEL$SWITCHED_TO_PROFILE\";\n observationValues = {\n name: event.observation.profile_name,\n };\n break;\n case \"BrowserObservation\":\n observationKey = \"OBSERVATION_MESSAGE$BROWSE\";\n break;\n case \"TaskTrackerObservation\": {\n const { command } = event.observation;\n if (command === \"plan\") {\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_PLAN\";\n } else {\n // command === \"view\"\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_VIEW\";\n }\n break;\n }\n case \"ThinkObservation\":\n observationKey = \"OBSERVATION_MESSAGE$THINK\";\n break;\n case \"GlobObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GLOB\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n case \"GrepObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GREP\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n default:\n // For unknown observations, use the type name\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n }\n\n if (observationKey) {\n return createTitleFromKey(observationKey, observationValues);\n }\n\n return observationType;\n};\n\nconst getCanvasUIClientObservationContent = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): string | null => {\n if (\n event.observation.kind !== \"ClientToolObservation\" ||\n event.tool_name !== CANVAS_UI_CLIENT_TOOL_NAME ||\n !correspondingAction ||\n !isCanvasUIActionEvent(correspondingAction)\n ) {\n return null;\n }\n\n return `UI command '${correspondingAction.action.command}' dispatched to the Agent Canvas frontend.`;\n};\n\nexport const getEventContent = (\n event: OpenHandsEvent | SkillReadyEvent,\n correspondingAction?: ActionEvent,\n) => {\n let title: React.ReactNode = \"\";\n let details: string | React.ReactNode = \"\";\n\n // Handle Skill Ready events first\n if (isSkillReadyEvent(event)) {\n // Use translation key if available, otherwise use \"SKILL READY\"\n const skillReadyKey = \"OBSERVATION_MESSAGE$SKILL_READY\";\n if (i18n.exists(skillReadyKey)) {\n title = createTitleFromKey(skillReadyKey, {});\n } else {\n title = \"Skill Ready\";\n }\n details = event._skillReadyContent;\n } else if (isActionEvent(event)) {\n title = getActionEventTitle(event);\n // Per-tool React visualizer when one is registered; markdown otherwise.\n details = resolveVisualizerBody(event) ?? getActionContent(event);\n } else if (isObservationEvent(event)) {\n title = getObservationEventTitle(event, correspondingAction);\n\n // For TaskTrackerObservation, use React component instead of markdown\n if (event.observation.kind === \"TaskTrackerObservation\") {\n details = (\n <TaskTrackingObservationContent\n event={event as ObservationEvent<TaskTrackerObservation>}\n />\n );\n } else {\n details =\n getCanvasUIClientObservationContent(event, correspondingAction) ??\n resolveVisualizerBody(event, correspondingAction) ??\n getObservationContent(event);\n }\n } else if (isACPToolCallEvent(event)) {\n // ACP sub-agent tool calls reuse the same card shape as observations:\n // title is \"Running/Editing/Reading …\" via a translation key that\n // mirrors ACTION_MESSAGE$RUN etc.; details are markdown built from\n // raw_input + raw_output the same way getTerminalObservationContent\n // builds \"Command: / Output:\" blocks.\n title = createTitleFromKey(getACPToolCallTitleKey(event), {\n // Strip a redundant verb prefix the ACP server may have inlined\n // (Claude Code emits ``\"Read /path\"`` for a read tool; combined\n // with the ``\"Reading <cmd>{{title}}</cmd>\"`` template that lands\n // as ``\"Reading Read /path\"``). See ``stripRedundantTitlePrefix``.\n title: stripRedundantTitlePrefix(event),\n });\n details = getACPToolCallContent(event);\n } else if (\n // Lenient fallback for action-like events that fail the strict isActionEvent() guard\n // (e.g., missing tool_name or tool_call_id). Extract a title from the action kind\n // so the UI shows something meaningful instead of \"Unknown event\".\n event.source === \"agent\" &&\n \"action\" in event &&\n event.action !== null &&\n typeof event.action === \"object\" &&\n \"kind\" in event.action &&\n typeof event.action.kind === \"string\"\n ) {\n title = String(event.action.kind).replace(\"Action\", \"\").toUpperCase();\n }\n\n return {\n title: title || i18n.t(I18nKey.EVENT$UNKNOWN_EVENT),\n details,\n };\n};\n"],"mappings":"w5BAsCA,IAAM,GACJ,EACA,IAEK,EAAA,QAAK,OAAO,CAAG,GAKlB,EAAA,EAAA,KAAC,EAAA,MAAD,CACE,GAAG,YACH,QAAS,EACD,SACR,WAAY,CACV,MAAM,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,EACtB,KAAK,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,CACvB,CACD,CAAA,EAZM,EAgBL,EACJ,GAEA,EAAW,OAAS,OAChB,EAAW,KACX,EAAmB,EAAW,IAAK,EAAW,MAAM,EAEpD,GACJ,EACA,IACkB,CAClB,GAAI,OAAO,GAAU,SACnB,OAAO,KAGT,IAAM,EAAU,EAAM,KAAK,EAK3B,OAJK,EAIE,EAAY,EAAA,mBAAmB,EAAS,CAAS,EAAI,EAHnD,IAIX,EAEM,EACJ,GAC2B,CAC3B,GAAI,EAAM,YAAc,4BACtB,OAAO,KAGT,IAAM,EAAS,EAAM,OACf,EAAc,EAAkB,EAAO,YAAY,EAEzD,OAAO,EACH,yBAAyB,IACzB,4CACN,EAEM,GACJ,EACA,I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CAAa,EACnB,EAAmB,EAAe,CAAC,CAAC,EAEpC,cAEV,EAAU,EAAM,kBAClB,MAAW,EAAA,cAAc,CAAK,GAC5B,EAAQ,EAAoB,CAAK,EAEjC,EAAU,EAAA,sBAAsB,CAAK,GAAK,EAAA,iBAAiB,CAAK,GACvD,EAAA,mBAAmB,CAAK,GACjC,EAAQ,EAAyB,EAAO,CAAmB,EAG3D,AAOE,EAPE,EAAM,YAAY,OAAS,0BAE3B,EAAA,EAAA,KAAC,EAAA,+BAAD,CACS,OACR,CAAA,EAID,EAAoC,EAAO,CAAmB,GAC9D,EAAA,sBAAsB,EAAO,CAAmB,GAChD,EAAA,sBAAsB,CAAK,GAEtB,EAAA,mBAAmB,CAAK,GAMjC,EAAQ,EAAmB,EAAA,uBAAuB,CAAK,EAAG,CAKxD,MAAO,EAAA,0BAA0B,CAAK,CACxC,CAAC,EACD,EAAU,EAAA,sBAAsB,CAAK,GAKrC,EAAM,SAAW,SACjB,WAAY,GACZ,EAAM,SAAW,MACjB,OAAO,EAAM,QAAW,UACxB,SAAU,EAAM,QAChB,OAAO,EAAM,OAAO,MAAS,WAE7B,EAAQ,OAAO,EAAM,OAAO,IAAI,EAAE,QAAQ,SAAU,EAAE,EAAE,YAAY,GAGtE,MAAO,CACL,MAAO,GAAS,EAAA,QAAK,EAAE,EAAA,QAAQ,mBAAmB,EAClD,SACF,CACF"}
|
|
1
|
+
{"version":3,"file":"get-event-content.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport React from \"react\";\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \"#/constants/canvas-ui\";\nimport { LAUNCH_CHILD_CONVERSATION_TOOL_NAME } from \"#/constants/child-conversation\";\nimport {\n OpenHandsEvent,\n ObservationEvent,\n ActionEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n isACPToolCallEvent,\n isCanvasUIActionEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { MonoComponent } from \"../../../features/chat/mono-component\";\nimport { PathComponent } from \"../../../features/chat/path-component\";\nimport { getActionContent } from \"./get-action-content\";\nimport { getObservationContent } from \"./get-observation-content\";\nimport {\n getACPToolCallContent,\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"./get-acp-tool-call-content\";\nimport { TaskTrackingObservationContent } from \"../task-tracking/task-tracking-observation-content\";\nimport { TaskTrackerObservation } from \"#/types/agent-server/core/base/observation\";\nimport { SkillReadyEvent, isSkillReadyEvent } from \"./create-skill-ready-event\";\nimport { resolveVisualizerBody } from \"../../../features/chat/tool-visualizers/dispatcher\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n trimEventTitleText,\n type EventTitleDescriptor,\n} from \"./get-action-event-title\";\n\n// Helper function to create title from translation key\nconst createTitleFromKey = (\n key: string,\n values: Readonly<Record<string, unknown>>,\n): React.ReactNode => {\n if (!i18n.exists(key)) {\n return key;\n }\n\n return (\n <Trans\n ns=\"openhands\"\n i18nKey={key}\n values={values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n );\n};\n\nconst renderTitleDescriptor = (\n descriptor: EventTitleDescriptor,\n): React.ReactNode =>\n descriptor.kind === \"text\"\n ? descriptor.text\n : createTitleFromKey(descriptor.key, descriptor.values);\n\nconst getNonEmptyString = (\n value: unknown,\n maxLength?: number,\n): string | null => {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n return maxLength ? trimEventTitleText(trimmed, maxLength) : trimmed;\n};\n\nconst getVisionInspectActionTitle = (\n event: ActionEvent,\n): React.ReactNode | null => {\n if (event.tool_name !== \"inspect_image_with_vision\") {\n return null;\n }\n\n const action = event.action as unknown as Record<string, unknown>;\n const profileName = getNonEmptyString(action.profile_name);\n\n return profileName\n ? `Describing image with ${profileName}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\nconst getVisionInspectObservationTitle = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode | null => {\n const actionToolName = correspondingAction?.tool_name;\n const observation = event.observation as unknown as Record<string, unknown>;\n const observationToolName = getNonEmptyString(observation.tool_name);\n\n if (\n actionToolName !== \"inspect_image_with_vision\" &&\n observationToolName !== \"inspect_image_with_vision\" &&\n String(event.observation.kind) !== \"VisionInspectObservation\"\n ) {\n return null;\n }\n\n const action = (correspondingAction?.action ?? {}) as unknown as Record<\n string,\n unknown\n >;\n const label =\n getNonEmptyString(action.profile_name) ??\n getNonEmptyString(observation.profile_name) ??\n getNonEmptyString(observation.base_url, 80) ??\n getNonEmptyString(observation.endpoint, 80) ??\n getNonEmptyString(observation.model, 80);\n\n return label\n ? `Describing image with ${label}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\n// Action Event Processing\nconst getActionEventTitle = (event: OpenHandsEvent): React.ReactNode => {\n // Early return if not an action event\n if (!isActionEvent(event)) {\n return \"\";\n }\n\n const visionInspectTitle = getVisionInspectActionTitle(event);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n return renderTitleDescriptor(getActionEventTitleDescriptor(event));\n};\n\n// Observation Event Processing\nconst getObservationEventTitle = (\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode => {\n // Early return if not an observation event\n if (!isObservationEvent(event)) {\n return \"\";\n }\n\n const visionInspectObservationTitle = getVisionInspectObservationTitle(\n event,\n correspondingAction,\n );\n if (visionInspectObservationTitle) {\n return visionInspectObservationTitle;\n }\n\n if (correspondingAction) {\n const visionInspectTitle = getVisionInspectActionTitle(correspondingAction);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getActionSummaryTitle(correspondingAction);\n if (summaryTitle) {\n return summaryTitle;\n }\n }\n\n const observationType = event.observation.kind;\n let observationKey = \"\";\n let observationValues: Record<string, unknown> = {};\n\n switch (observationType) {\n case \"ExecuteBashObservation\":\n case \"TerminalObservation\":\n observationKey = \"OBSERVATION_MESSAGE$RUN\";\n observationValues = {\n command: event.observation.command\n ? trimEventTitleText(event.observation.command, 80)\n : \"\",\n };\n break;\n case \"FileEditorObservation\":\n case \"StrReplaceEditorObservation\":\n if (event.observation.command === \"view\") {\n observationKey = \"OBSERVATION_MESSAGE$READ\";\n } else if (event.observation.command === \"create\") {\n observationKey = \"OBSERVATION_MESSAGE$WRITE\";\n } else {\n observationKey = \"OBSERVATION_MESSAGE$EDIT\";\n }\n observationValues = {\n path: event.observation.path || \"\",\n };\n break;\n case \"MCPToolObservation\":\n observationKey = \"OBSERVATION_MESSAGE$MCP\";\n observationValues = {\n mcp_tool_name: event.observation.tool_name,\n };\n break;\n case \"InvokeSkillObservation\":\n observationKey = \"OBSERVATION_MESSAGE$INVOKE_SKILL\";\n observationValues = {\n name: event.observation.skill_name,\n };\n break;\n case \"TaskObservation\":\n observationKey = \"OBSERVATION_MESSAGE$TASK\";\n observationValues = {\n name: event.observation.subagent,\n };\n break;\n case \"CanvasUIObservation\":\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n case \"ClientToolObservation\":\n if (event.tool_name === CANVAS_UI_CLIENT_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n }\n if (event.tool_name === LAUNCH_CHILD_CONVERSATION_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION\";\n break;\n }\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n case \"SwitchLLMObservation\":\n observationKey = event.observation.is_error\n ? \"MODEL$SWITCH_FAILED\"\n : \"MODEL$SWITCHED_TO_PROFILE\";\n observationValues = {\n name: event.observation.profile_name,\n };\n break;\n case \"BrowserObservation\":\n observationKey = \"OBSERVATION_MESSAGE$BROWSE\";\n break;\n case \"TaskTrackerObservation\": {\n const { command } = event.observation;\n if (command === \"plan\") {\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_PLAN\";\n } else {\n // command === \"view\"\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_VIEW\";\n }\n break;\n }\n case \"ThinkObservation\":\n observationKey = \"OBSERVATION_MESSAGE$THINK\";\n break;\n case \"GlobObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GLOB\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n case \"GrepObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GREP\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n default:\n // For unknown observations, use the type name\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n }\n\n if (observationKey) {\n return createTitleFromKey(observationKey, observationValues);\n }\n\n return observationType;\n};\n\nconst getCanvasUIClientObservationContent = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): string | null => {\n if (\n event.observation.kind !== \"ClientToolObservation\" ||\n event.tool_name !== CANVAS_UI_CLIENT_TOOL_NAME ||\n !correspondingAction ||\n !isCanvasUIActionEvent(correspondingAction)\n ) {\n return null;\n }\n\n return `UI command '${correspondingAction.action.command}' dispatched to the Agent Canvas frontend.`;\n};\n\nexport const getEventContent = (\n event: OpenHandsEvent | SkillReadyEvent,\n correspondingAction?: ActionEvent,\n) => {\n let title: React.ReactNode = \"\";\n let details: string | React.ReactNode = \"\";\n\n // Handle Skill Ready events first\n if (isSkillReadyEvent(event)) {\n // Use translation key if available, otherwise use \"SKILL READY\"\n const skillReadyKey = \"OBSERVATION_MESSAGE$SKILL_READY\";\n if (i18n.exists(skillReadyKey)) {\n title = createTitleFromKey(skillReadyKey, {});\n } else {\n title = \"Skill Ready\";\n }\n details = event._skillReadyContent;\n } else if (isActionEvent(event)) {\n title = getActionEventTitle(event);\n // Per-tool React visualizer when one is registered; markdown otherwise.\n details = resolveVisualizerBody(event) ?? getActionContent(event);\n } else if (isObservationEvent(event)) {\n title = getObservationEventTitle(event, correspondingAction);\n\n // For TaskTrackerObservation, use React component instead of markdown\n if (event.observation.kind === \"TaskTrackerObservation\") {\n details = (\n <TaskTrackingObservationContent\n event={event as ObservationEvent<TaskTrackerObservation>}\n />\n );\n } else {\n details =\n getCanvasUIClientObservationContent(event, correspondingAction) ??\n resolveVisualizerBody(event, correspondingAction) ??\n getObservationContent(event);\n }\n } else if (isACPToolCallEvent(event)) {\n // ACP sub-agent tool calls reuse the same card shape as observations:\n // title is \"Running/Editing/Reading …\" via a translation key that\n // mirrors ACTION_MESSAGE$RUN etc.; details are markdown built from\n // raw_input + raw_output the same way getTerminalObservationContent\n // builds \"Command: / Output:\" blocks.\n title = createTitleFromKey(getACPToolCallTitleKey(event), {\n // Strip a redundant verb prefix the ACP server may have inlined\n // (Claude Code emits ``\"Read /path\"`` for a read tool; combined\n // with the ``\"Reading <cmd>{{title}}</cmd>\"`` template that lands\n // as ``\"Reading Read /path\"``). See ``stripRedundantTitlePrefix``.\n title: stripRedundantTitlePrefix(event),\n });\n details = getACPToolCallContent(event);\n } else if (\n // Lenient fallback for action-like events that fail the strict isActionEvent() guard\n // (e.g., missing tool_name or tool_call_id). Extract a title from the action kind\n // so the UI shows something meaningful instead of \"Unknown event\".\n event.source === \"agent\" &&\n \"action\" in event &&\n event.action !== null &&\n typeof event.action === \"object\" &&\n \"kind\" in event.action &&\n typeof event.action.kind === \"string\"\n ) {\n title = String(event.action.kind).replace(\"Action\", \"\").toUpperCase();\n }\n\n return {\n title: title || i18n.t(I18nKey.EVENT$UNKNOWN_EVENT),\n details,\n };\n};\n"],"mappings":"w5BAsCA,IAAM,GACJ,EACA,IAEK,EAAA,QAAK,OAAO,CAAG,GAKlB,EAAA,EAAA,KAAC,EAAA,MAAD,CACE,GAAG,YACH,QAAS,EACD,SACR,WAAY,CACV,MAAM,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,EACtB,KAAK,EA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AI,EAAE,QAAQ,SAAU,EAAE,EAAE,YAAY,GAGtE,MAAO,CACL,MAAO,GAAS,EAAA,QAAK,EAAE,EAAA,QAAQ,mBAAmB,EAClD,SACF,CACF"}
|
|
@@ -55,7 +55,7 @@ var x = (t, r) => n.exists(t) ? /* @__PURE__ */ b(e, {
|
|
|
55
55
|
break;
|
|
56
56
|
case "FileEditorObservation":
|
|
57
57
|
case "StrReplaceEditorObservation":
|
|
58
|
-
i = e.observation.command === "view" ? "OBSERVATION_MESSAGE$READ" : "OBSERVATION_MESSAGE$EDIT", a = { path: e.observation.path || "" };
|
|
58
|
+
i = e.observation.command === "view" ? "OBSERVATION_MESSAGE$READ" : e.observation.command === "create" ? "OBSERVATION_MESSAGE$WRITE" : "OBSERVATION_MESSAGE$EDIT", a = { path: e.observation.path || "" };
|
|
59
59
|
break;
|
|
60
60
|
case "MCPToolObservation":
|
|
61
61
|
i = "OBSERVATION_MESSAGE$MCP", a = { mcp_tool_name: e.observation.tool_name };
|
package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-content.js","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport React from \"react\";\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \"#/constants/canvas-ui\";\nimport { LAUNCH_CHILD_CONVERSATION_TOOL_NAME } from \"#/constants/child-conversation\";\nimport {\n OpenHandsEvent,\n ObservationEvent,\n ActionEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n isACPToolCallEvent,\n isCanvasUIActionEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { MonoComponent } from \"../../../features/chat/mono-component\";\nimport { PathComponent } from \"../../../features/chat/path-component\";\nimport { getActionContent } from \"./get-action-content\";\nimport { getObservationContent } from \"./get-observation-content\";\nimport {\n getACPToolCallContent,\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"./get-acp-tool-call-content\";\nimport { TaskTrackingObservationContent } from \"../task-tracking/task-tracking-observation-content\";\nimport { TaskTrackerObservation } from \"#/types/agent-server/core/base/observation\";\nimport { SkillReadyEvent, isSkillReadyEvent } from \"./create-skill-ready-event\";\nimport { resolveVisualizerBody } from \"../../../features/chat/tool-visualizers/dispatcher\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n trimEventTitleText,\n type EventTitleDescriptor,\n} from \"./get-action-event-title\";\n\n// Helper function to create title from translation key\nconst createTitleFromKey = (\n key: string,\n values: Readonly<Record<string, unknown>>,\n): React.ReactNode => {\n if (!i18n.exists(key)) {\n return key;\n }\n\n return (\n <Trans\n ns=\"openhands\"\n i18nKey={key}\n values={values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n );\n};\n\nconst renderTitleDescriptor = (\n descriptor: EventTitleDescriptor,\n): React.ReactNode =>\n descriptor.kind === \"text\"\n ? descriptor.text\n : createTitleFromKey(descriptor.key, descriptor.values);\n\nconst getNonEmptyString = (\n value: unknown,\n maxLength?: number,\n): string | null => {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n return maxLength ? trimEventTitleText(trimmed, maxLength) : trimmed;\n};\n\nconst getVisionInspectActionTitle = (\n event: ActionEvent,\n): React.ReactNode | null => {\n if (event.tool_name !== \"inspect_image_with_vision\") {\n return null;\n }\n\n const action = event.action as unknown as Record<string, unknown>;\n const profileName = getNonEmptyString(action.profile_name);\n\n return profileName\n ? `Describing image with ${profileName}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\nconst getVisionInspectObservationTitle = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode | null => {\n const actionToolName = correspondingAction?.tool_name;\n const observation = event.observation as unknown as Record<string, unknown>;\n const observationToolName = getNonEmptyString(observation.tool_name);\n\n if (\n actionToolName !== \"inspect_image_with_vision\" &&\n observationToolName !== \"inspect_image_with_vision\" &&\n String(event.observation.kind) !== \"VisionInspectObservation\"\n ) {\n return null;\n }\n\n const action = (correspondingAction?.action ?? {}) as unknown as Record<\n string,\n unknown\n >;\n const label =\n getNonEmptyString(action.profile_name) ??\n getNonEmptyString(observation.profile_name) ??\n getNonEmptyString(observation.base_url, 80) ??\n getNonEmptyString(observation.endpoint, 80) ??\n getNonEmptyString(observation.model, 80);\n\n return label\n ? `Describing image with ${label}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\n// Action Event Processing\nconst getActionEventTitle = (event: OpenHandsEvent): React.ReactNode => {\n // Early return if not an action event\n if (!isActionEvent(event)) {\n return \"\";\n }\n\n const visionInspectTitle = getVisionInspectActionTitle(event);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n return renderTitleDescriptor(getActionEventTitleDescriptor(event));\n};\n\n// Observation Event Processing\nconst getObservationEventTitle = (\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode => {\n // Early return if not an observation event\n if (!isObservationEvent(event)) {\n return \"\";\n }\n\n const visionInspectObservationTitle = getVisionInspectObservationTitle(\n event,\n correspondingAction,\n );\n if (visionInspectObservationTitle) {\n return visionInspectObservationTitle;\n }\n\n if (correspondingAction) {\n const visionInspectTitle = getVisionInspectActionTitle(correspondingAction);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getActionSummaryTitle(correspondingAction);\n if (summaryTitle) {\n return summaryTitle;\n }\n }\n\n const observationType = event.observation.kind;\n let observationKey = \"\";\n let observationValues: Record<string, unknown> = {};\n\n switch (observationType) {\n case \"ExecuteBashObservation\":\n case \"TerminalObservation\":\n observationKey = \"OBSERVATION_MESSAGE$RUN\";\n observationValues = {\n command: event.observation.command\n ? trimEventTitleText(event.observation.command, 80)\n : \"\",\n };\n break;\n case \"FileEditorObservation\":\n case \"StrReplaceEditorObservation\":\n if (event.observation.command === \"view\") {\n observationKey = \"OBSERVATION_MESSAGE$READ\";\n } else {\n observationKey = \"OBSERVATION_MESSAGE$EDIT\";\n }\n observationValues = {\n path: event.observation.path || \"\",\n };\n break;\n case \"MCPToolObservation\":\n observationKey = \"OBSERVATION_MESSAGE$MCP\";\n observationValues = {\n mcp_tool_name: event.observation.tool_name,\n };\n break;\n case \"InvokeSkillObservation\":\n observationKey = \"OBSERVATION_MESSAGE$INVOKE_SKILL\";\n observationValues = {\n name: event.observation.skill_name,\n };\n break;\n case \"TaskObservation\":\n observationKey = \"OBSERVATION_MESSAGE$TASK\";\n observationValues = {\n name: event.observation.subagent,\n };\n break;\n case \"CanvasUIObservation\":\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n case \"ClientToolObservation\":\n if (event.tool_name === CANVAS_UI_CLIENT_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n }\n if (event.tool_name === LAUNCH_CHILD_CONVERSATION_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION\";\n break;\n }\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n case \"SwitchLLMObservation\":\n observationKey = event.observation.is_error\n ? \"MODEL$SWITCH_FAILED\"\n : \"MODEL$SWITCHED_TO_PROFILE\";\n observationValues = {\n name: event.observation.profile_name,\n };\n break;\n case \"BrowserObservation\":\n observationKey = \"OBSERVATION_MESSAGE$BROWSE\";\n break;\n case \"TaskTrackerObservation\": {\n const { command } = event.observation;\n if (command === \"plan\") {\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_PLAN\";\n } else {\n // command === \"view\"\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_VIEW\";\n }\n break;\n }\n case \"ThinkObservation\":\n observationKey = \"OBSERVATION_MESSAGE$THINK\";\n break;\n case \"GlobObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GLOB\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n case \"GrepObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GREP\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n default:\n // For unknown observations, use the type name\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n }\n\n if (observationKey) {\n return createTitleFromKey(observationKey, observationValues);\n }\n\n return observationType;\n};\n\nconst getCanvasUIClientObservationContent = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): string | null => {\n if (\n event.observation.kind !== \"ClientToolObservation\" ||\n event.tool_name !== CANVAS_UI_CLIENT_TOOL_NAME ||\n !correspondingAction ||\n !isCanvasUIActionEvent(correspondingAction)\n ) {\n return null;\n }\n\n return `UI command '${correspondingAction.action.command}' dispatched to the Agent Canvas frontend.`;\n};\n\nexport const getEventContent = (\n event: OpenHandsEvent | SkillReadyEvent,\n correspondingAction?: ActionEvent,\n) => {\n let title: React.ReactNode = \"\";\n let details: string | React.ReactNode = \"\";\n\n // Handle Skill Ready events first\n if (isSkillReadyEvent(event)) {\n // Use translation key if available, otherwise use \"SKILL READY\"\n const skillReadyKey = \"OBSERVATION_MESSAGE$SKILL_READY\";\n if (i18n.exists(skillReadyKey)) {\n title = createTitleFromKey(skillReadyKey, {});\n } else {\n title = \"Skill Ready\";\n }\n details = event._skillReadyContent;\n } else if (isActionEvent(event)) {\n title = getActionEventTitle(event);\n // Per-tool React visualizer when one is registered; markdown otherwise.\n details = resolveVisualizerBody(event) ?? getActionContent(event);\n } else if (isObservationEvent(event)) {\n title = getObservationEventTitle(event, correspondingAction);\n\n // For TaskTrackerObservation, use React component instead of markdown\n if (event.observation.kind === \"TaskTrackerObservation\") {\n details = (\n <TaskTrackingObservationContent\n event={event as ObservationEvent<TaskTrackerObservation>}\n />\n );\n } else {\n details =\n getCanvasUIClientObservationContent(event, correspondingAction) ??\n resolveVisualizerBody(event, correspondingAction) ??\n getObservationContent(event);\n }\n } else if (isACPToolCallEvent(event)) {\n // ACP sub-agent tool calls reuse the same card shape as observations:\n // title is \"Running/Editing/Reading …\" via a translation key that\n // mirrors ACTION_MESSAGE$RUN etc.; details are markdown built from\n // raw_input + raw_output the same way getTerminalObservationContent\n // builds \"Command: / Output:\" blocks.\n title = createTitleFromKey(getACPToolCallTitleKey(event), {\n // Strip a redundant verb prefix the ACP server may have inlined\n // (Claude Code emits ``\"Read /path\"`` for a read tool; combined\n // with the ``\"Reading <cmd>{{title}}</cmd>\"`` template that lands\n // as ``\"Reading Read /path\"``). See ``stripRedundantTitlePrefix``.\n title: stripRedundantTitlePrefix(event),\n });\n details = getACPToolCallContent(event);\n } else if (\n // Lenient fallback for action-like events that fail the strict isActionEvent() guard\n // (e.g., missing tool_name or tool_call_id). Extract a title from the action kind\n // so the UI shows something meaningful instead of \"Unknown event\".\n event.source === \"agent\" &&\n \"action\" in event &&\n event.action !== null &&\n typeof event.action === \"object\" &&\n \"kind\" in event.action &&\n typeof event.action.kind === \"string\"\n ) {\n title = String(event.action.kind).replace(\"Action\", \"\").toUpperCase();\n }\n\n return {\n title: title || i18n.t(I18nKey.EVENT$UNKNOWN_EVENT),\n details,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsCA,IAAM,KACJ,GACA,MAEK,EAAK,OAAO,CAAG,IAKlB,kBAAC,GAAD;CACE,IAAG;CACH,SAAS;CACD;CACR,YAAY;EACV,MAAM,kBAAC,GAAD,CAAgB,CAAA;EACtB,KAAK,kBAAC,GAAD,CAAgB,CAAA;CACvB;AACD,CAAA,IAZM,GAgBL,KACJ,MAEA,EAAW,SAAS,SAChB,EAAW,OACX,EAAmB,EAAW,KAAK,EAAW,MAAM,GAEpD,KACJ,GACA,MACkB;CAClB,IAAI,OAAO,KAAU,UACnB,OAAO;CAGT,IAAM,IAAU,EAAM,KAAK;CAK3B,OAJK,IAIE,IAAY,EAAmB,GAAS,CA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AAQ,6CAG9C,KACX,GACA,MACG;CACH,IAAI,IAAyB,IACzB,IAAoC;CAGxC,IAAI,EAAkB,CAAK,GAAG;EAE5B,IAAM,IAAgB;EAMtB,AALA,AAGE,IAHE,EAAK,OAAO,CAAa,IACnB,EAAmB,GAAe,CAAC,CAAC,IAEpC,eAEV,IAAU,EAAM;CAClB,OAAO,AAAI,EAAc,CAAK,KAC5B,IAAQ,EAAoB,CAAK,GAEjC,IAAU,EAAsB,CAAK,KAAK,EAAiB,CAAK,KACvD,EAAmB,CAAK,KACjC,IAAQ,EAAyB,GAAO,CAAmB,GAG3D,AAOE,IAPE,EAAM,YAAY,SAAS,2BAE3B,kBAAC,GAAD,EACS,SACR,CAAA,IAID,EAAoC,GAAO,CAAmB,KAC9D,EAAsB,GAAO,CAAmB,KAChD,EAAsB,CAAK,KAEtB,EAAmB,CAAK,KAMjC,IAAQ,EAAmB,EAAuB,CAAK,GAAG,EAKxD,OAAO,EAA0B,CAAK,EACxC,CAAC,GACD,IAAU,EAAsB,CAAK,KAKrC,EAAM,WAAW,WACjB,YAAY,KACZ,EAAM,WAAW,QACjB,OAAO,EAAM,UAAW,YACxB,UAAU,EAAM,UAChB,OAAO,EAAM,OAAO,QAAS,aAE7B,IAAQ,OAAO,EAAM,OAAO,IAAI,EAAE,QAAQ,UAAU,EAAE,EAAE,YAAY;CAGtE,OAAO;EACL,OAAO,KAAS,EAAK,EAAE,EAAQ,mBAAmB;EAClD;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"get-event-content.js","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport React from \"react\";\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \"#/constants/canvas-ui\";\nimport { LAUNCH_CHILD_CONVERSATION_TOOL_NAME } from \"#/constants/child-conversation\";\nimport {\n OpenHandsEvent,\n ObservationEvent,\n ActionEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n isACPToolCallEvent,\n isCanvasUIActionEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { MonoComponent } from \"../../../features/chat/mono-component\";\nimport { PathComponent } from \"../../../features/chat/path-component\";\nimport { getActionContent } from \"./get-action-content\";\nimport { getObservationContent } from \"./get-observation-content\";\nimport {\n getACPToolCallContent,\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"./get-acp-tool-call-content\";\nimport { TaskTrackingObservationContent } from \"../task-tracking/task-tracking-observation-content\";\nimport { TaskTrackerObservation } from \"#/types/agent-server/core/base/observation\";\nimport { SkillReadyEvent, isSkillReadyEvent } from \"./create-skill-ready-event\";\nimport { resolveVisualizerBody } from \"../../../features/chat/tool-visualizers/dispatcher\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n trimEventTitleText,\n type EventTitleDescriptor,\n} from \"./get-action-event-title\";\n\n// Helper function to create title from translation key\nconst createTitleFromKey = (\n key: string,\n values: Readonly<Record<string, unknown>>,\n): React.ReactNode => {\n if (!i18n.exists(key)) {\n return key;\n }\n\n return (\n <Trans\n ns=\"openhands\"\n i18nKey={key}\n values={values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n );\n};\n\nconst renderTitleDescriptor = (\n descriptor: EventTitleDescriptor,\n): React.ReactNode =>\n descriptor.kind === \"text\"\n ? descriptor.text\n : createTitleFromKey(descriptor.key, descriptor.values);\n\nconst getNonEmptyString = (\n value: unknown,\n maxLength?: number,\n): string | null => {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n return maxLength ? trimEventTitleText(trimmed, maxLength) : trimmed;\n};\n\nconst getVisionInspectActionTitle = (\n event: ActionEvent,\n): React.ReactNode | null => {\n if (event.tool_name !== \"inspect_image_with_vision\") {\n return null;\n }\n\n const action = event.action as unknown as Record<string, unknown>;\n const profileName = getNonEmptyString(action.profile_name);\n\n return profileName\n ? `Describing image with ${profileName}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\nconst getVisionInspectObservationTitle = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode | null => {\n const actionToolName = correspondingAction?.tool_name;\n const observation = event.observation as unknown as Record<string, unknown>;\n const observationToolName = getNonEmptyString(observation.tool_name);\n\n if (\n actionToolName !== \"inspect_image_with_vision\" &&\n observationToolName !== \"inspect_image_with_vision\" &&\n String(event.observation.kind) !== \"VisionInspectObservation\"\n ) {\n return null;\n }\n\n const action = (correspondingAction?.action ?? {}) as unknown as Record<\n string,\n unknown\n >;\n const label =\n getNonEmptyString(action.profile_name) ??\n getNonEmptyString(observation.profile_name) ??\n getNonEmptyString(observation.base_url, 80) ??\n getNonEmptyString(observation.endpoint, 80) ??\n getNonEmptyString(observation.model, 80);\n\n return label\n ? `Describing image with ${label}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\n// Action Event Processing\nconst getActionEventTitle = (event: OpenHandsEvent): React.ReactNode => {\n // Early return if not an action event\n if (!isActionEvent(event)) {\n return \"\";\n }\n\n const visionInspectTitle = getVisionInspectActionTitle(event);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n return renderTitleDescriptor(getActionEventTitleDescriptor(event));\n};\n\n// Observation Event Processing\nconst getObservationEventTitle = (\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode => {\n // Early return if not an observation event\n if (!isObservationEvent(event)) {\n return \"\";\n }\n\n const visionInspectObservationTitle = getVisionInspectObservationTitle(\n event,\n correspondingAction,\n );\n if (visionInspectObservationTitle) {\n return visionInspectObservationTitle;\n }\n\n if (correspondingAction) {\n const visionInspectTitle = getVisionInspectActionTitle(correspondingAction);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getActionSummaryTitle(correspondingAction);\n if (summaryTitle) {\n return summaryTitle;\n }\n }\n\n const observationType = event.observation.kind;\n let observationKey = \"\";\n let observationValues: Record<string, unknown> = {};\n\n switch (observationType) {\n case \"ExecuteBashObservation\":\n case \"TerminalObservation\":\n observationKey = \"OBSERVATION_MESSAGE$RUN\";\n observationValues = {\n command: event.observation.command\n ? trimEventTitleText(event.observation.command, 80)\n : \"\",\n };\n break;\n case \"FileEditorObservation\":\n case \"StrReplaceEditorObservation\":\n if (event.observation.command === \"view\") {\n observationKey = \"OBSERVATION_MESSAGE$READ\";\n } else if (event.observation.command === \"create\") {\n observationKey = \"OBSERVATION_MESSAGE$WRITE\";\n } else {\n observationKey = \"OBSERVATION_MESSAGE$EDIT\";\n }\n observationValues = {\n path: event.observation.path || \"\",\n };\n break;\n case \"MCPToolObservation\":\n observationKey = \"OBSERVATION_MESSAGE$MCP\";\n observationValues = {\n mcp_tool_name: event.observation.tool_name,\n };\n break;\n case \"InvokeSkillObservation\":\n observationKey = \"OBSERVATION_MESSAGE$INVOKE_SKILL\";\n observationValues = {\n name: event.observation.skill_name,\n };\n break;\n case \"TaskObservation\":\n observationKey = \"OBSERVATION_MESSAGE$TASK\";\n observationValues = {\n name: event.observation.subagent,\n };\n break;\n case \"CanvasUIObservation\":\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n case \"ClientToolObservation\":\n if (event.tool_name === CANVAS_UI_CLIENT_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n }\n if (event.tool_name === LAUNCH_CHILD_CONVERSATION_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$LAUNCH_CHILD_CONVERSATION\";\n break;\n }\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n case \"SwitchLLMObservation\":\n observationKey = event.observation.is_error\n ? \"MODEL$SWITCH_FAILED\"\n : \"MODEL$SWITCHED_TO_PROFILE\";\n observationValues = {\n name: event.observation.profile_name,\n };\n break;\n case \"BrowserObservation\":\n observationKey = \"OBSERVATION_MESSAGE$BROWSE\";\n break;\n case \"TaskTrackerObservation\": {\n const { command } = event.observation;\n if (command === \"plan\") {\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_PLAN\";\n } else {\n // command === \"view\"\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_VIEW\";\n }\n break;\n }\n case \"ThinkObservation\":\n observationKey = \"OBSERVATION_MESSAGE$THINK\";\n break;\n case \"GlobObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GLOB\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n case \"GrepObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GREP\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n default:\n // For unknown observations, use the type name\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n }\n\n if (observationKey) {\n return createTitleFromKey(observationKey, observationValues);\n }\n\n return observationType;\n};\n\nconst getCanvasUIClientObservationContent = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): string | null => {\n if (\n event.observation.kind !== \"ClientToolObservation\" ||\n event.tool_name !== CANVAS_UI_CLIENT_TOOL_NAME ||\n !correspondingAction ||\n !isCanvasUIActionEvent(correspondingAction)\n ) {\n return null;\n }\n\n return `UI command '${correspondingAction.action.command}' dispatched to the Agent Canvas frontend.`;\n};\n\nexport const getEventContent = (\n event: OpenHandsEvent | SkillReadyEvent,\n correspondingAction?: ActionEvent,\n) => {\n let title: React.ReactNode = \"\";\n let details: string | React.ReactNode = \"\";\n\n // Handle Skill Ready events first\n if (isSkillReadyEvent(event)) {\n // Use translation key if available, otherwise use \"SKILL READY\"\n const skillReadyKey = \"OBSERVATION_MESSAGE$SKILL_READY\";\n if (i18n.exists(skillReadyKey)) {\n title = createTitleFromKey(skillReadyKey, {});\n } else {\n title = \"Skill Ready\";\n }\n details = event._skillReadyContent;\n } else if (isActionEvent(event)) {\n title = getActionEventTitle(event);\n // Per-tool React visualizer when one is registered; markdown otherwise.\n details = resolveVisualizerBody(event) ?? getActionContent(event);\n } else if (isObservationEvent(event)) {\n title = getObservationEventTitle(event, correspondingAction);\n\n // For TaskTrackerObservation, use React component instead of markdown\n if (event.observation.kind === \"TaskTrackerObservation\") {\n details = (\n <TaskTrackingObservationContent\n event={event as ObservationEvent<TaskTrackerObservation>}\n />\n );\n } else {\n details =\n getCanvasUIClientObservationContent(event, correspondingAction) ??\n resolveVisualizerBody(event, correspondingAction) ??\n getObservationContent(event);\n }\n } else if (isACPToolCallEvent(event)) {\n // ACP sub-agent tool calls reuse the same card shape as observations:\n // title is \"Running/Editing/Reading …\" via a translation key that\n // mirrors ACTION_MESSAGE$RUN etc.; details are markdown built from\n // raw_input + raw_output the same way getTerminalObservationContent\n // builds \"Command: / Output:\" blocks.\n title = createTitleFromKey(getACPToolCallTitleKey(event), {\n // Strip a redundant verb prefix the ACP server may have inlined\n // (Claude Code emits ``\"Read /path\"`` for a read tool; combined\n // with the ``\"Reading <cmd>{{title}}</cmd>\"`` template that lands\n // as ``\"Reading Read /path\"``). See ``stripRedundantTitlePrefix``.\n title: stripRedundantTitlePrefix(event),\n });\n details = getACPToolCallContent(event);\n } else if (\n // Lenient fallback for action-like events that fail the strict isActionEvent() guard\n // (e.g., missing tool_name or tool_call_id). Extract a title from the action kind\n // so the UI shows something meaningful instead of \"Unknown event\".\n event.source === \"agent\" &&\n \"action\" in event &&\n event.action !== null &&\n typeof event.action === \"object\" &&\n \"kind\" in event.action &&\n typeof event.action.kind === \"string\"\n ) {\n title = String(event.action.kind).replace(\"Action\", \"\").toUpperCase();\n }\n\n return {\n title: title || i18n.t(I18nKey.EVENT$UNKNOWN_EVENT),\n details,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsCA,IAAM,KACJ,GACA,MAEK,EAAK,OAAO,CAAG,IAKlB,kBAAC,GAAD;CACE,IAAG;CACH,SAAS;CACD;CACR,YAAY;EACV,MAAM,kBAAC,GAAD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
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../i18n/declaration.cjs"),t=require("../../../../types/agent-server/type-guards.cjs"),n=require("../../../features/chat/generic-event-message.cjs"),r=require("../../../../icons/skills.cjs"),i=require("../../../shared/buttons/conversation-confirmation-buttons.cjs"),a=require("../event-content-helpers/get-observation-result.cjs"),o=require("../event-content-helpers/create-skill-ready-event.cjs"),s=require("../event-content-helpers/get-event-content.cjs"),
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../i18n/declaration.cjs"),t=require("../../../../types/agent-server/type-guards.cjs"),n=require("../../../features/chat/generic-event-message.cjs"),r=require("../../../../icons/skills.cjs"),i=require("../../../shared/buttons/conversation-confirmation-buttons.cjs"),a=require("../event-content-helpers/get-observation-result.cjs"),o=require("../event-content-helpers/create-skill-ready-event.cjs"),s=require("../../../features/chat/tool-visualizers/primitives/markdown-file-preview.cjs"),c=require("../event-content-helpers/get-event-content.cjs"),l=require("../event-content-helpers/get-invoke-skill-items.cjs"),u=require("./skill-ready-content-list.cjs");let d=require("react/jsx-runtime");function f(n){if(o.isSkillReadyEvent(n))return n._skillReadyItems.length>0?{items:n._skillReadyItems,titleKey:e.I18nKey.SKILLS$TRIGGERED_SKILL_KNOWLEDGE}:null;if(t.isObservationEvent(n)&&n.observation.kind===`InvokeSkillObservation`){let t=l.getInvokeSkillItems(n);return t.length>0?{items:t,titleKey:e.I18nKey.SKILLS$INVOKED_SKILL_KNOWLEDGE}:null}return null}function p({event:e,isLastMessage:l,correspondingAction:p}){let{title:m,details:h}=c.getEventContent(e,p);if(!o.isSkillReadyEvent(e)&&t.isObservationEvent(e)&&e.observation.kind===`TaskTrackerObservation`)return(0,d.jsx)(`div`,{children:h});let g;o.isSkillReadyEvent(e)?g=`success`:t.isObservationEvent(e)?g=a.getObservationResult(e):t.isACPToolCallEvent(e)&&(g=a.getACPToolCallResult(e));let _=f(e),v=_?(0,d.jsx)(u.SkillReadyContentList,{items:_.items,titleKey:_.titleKey}):h,y=!o.isSkillReadyEvent(e)&&s.isMarkdownFileEditorEvent(e,p);return(0,d.jsxs)(`div`,{children:[(0,d.jsx)(n.GenericEventMessage,{title:m,details:v,success:g,initiallyExpanded:y,titleIcon:_?(0,d.jsx)(r.default,{className:`h-4 w-4 stroke-[var(--oh-muted)] flex-shrink-0 mr-2`}):void 0}),l&&(0,d.jsx)(i.ConversationConfirmationButtons,{})]})}exports.GenericEventMessageWrapper=p;
|
|
2
2
|
//# sourceMappingURL=generic-event-message-wrapper.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-event-message-wrapper.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.tsx"],"sourcesContent":["import {\n OpenHandsEvent,\n ActionEvent,\n ObservationEvent,\n} from \"#/types/agent-server/core\";\nimport { InvokeSkillObservation } from \"#/types/agent-server/core/base/observation\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { GenericEventMessage } from \"../../../features/chat/generic-event-message\";\nimport { getEventContent } from \"../event-content-helpers/get-event-content\";\nimport {\n getACPToolCallResult,\n getObservationResult,\n ObservationResultStatus,\n} from \"../event-content-helpers/get-observation-result\";\nimport {\n isACPToolCallEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport {\n SkillReadyEvent,\n SkillReadyItem,\n isSkillReadyEvent,\n} from \"../event-content-helpers/create-skill-ready-event\";\nimport { getInvokeSkillItems } from \"../event-content-helpers/get-invoke-skill-items\";\nimport { ConversationConfirmationButtons } from \"#/components/shared/buttons/conversation-confirmation-buttons\";\nimport { SkillReadyContentList } from \"./skill-ready-content-list\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\n\ninterface GenericEventMessageWrapperProps {\n event: OpenHandsEvent | SkillReadyEvent;\n isLastMessage: boolean;\n correspondingAction?: ActionEvent;\n}\n\n/**\n * Resolves the expandable skill-knowledge list shared by Skill Ready events and\n * invoke-skill tool observations. Returns the list items and their header\n * label, or null when the event carries no skill knowledge (so the caller keeps\n * the default details body). Additional skill-knowledge sources slot in as one\n * more branch here.\n */\nfunction getSkillKnowledge(\n event: OpenHandsEvent | SkillReadyEvent,\n): { items: SkillReadyItem[]; titleKey: I18nKey } | null {\n if (isSkillReadyEvent(event)) {\n return event._skillReadyItems.length > 0\n ? {\n items: event._skillReadyItems,\n titleKey: I18nKey.SKILLS$TRIGGERED_SKILL_KNOWLEDGE,\n }\n : null;\n }\n if (\n isObservationEvent(event) &&\n event.observation.kind === \"InvokeSkillObservation\"\n ) {\n const items = getInvokeSkillItems(\n event as ObservationEvent<InvokeSkillObservation>,\n );\n return items.length > 0\n ? { items, titleKey: I18nKey.SKILLS$INVOKED_SKILL_KNOWLEDGE }\n : null;\n }\n return null;\n}\n\nexport function GenericEventMessageWrapper({\n event,\n isLastMessage,\n correspondingAction,\n}: GenericEventMessageWrapperProps) {\n const { title, details } = getEventContent(event, correspondingAction);\n\n // TaskTrackerObservation has its own rendering\n if (\n !isSkillReadyEvent(event) &&\n isObservationEvent(event) &&\n event.observation.kind === \"TaskTrackerObservation\"\n ) {\n return <div>{details}</div>;\n }\n\n // Determine success status\n let success: ObservationResultStatus | undefined;\n if (isSkillReadyEvent(event)) {\n success = \"success\";\n } else if (isObservationEvent(event)) {\n success = getObservationResult(event);\n } else if (isACPToolCallEvent(event)) {\n success = getACPToolCallResult(event);\n }\n\n // Skill Ready events and invoke-skill tool observations both render the\n // expandable skill-knowledge list (with the skills icon); they differ only in\n // the header label.\n const skillKnowledge = getSkillKnowledge(event);\n const bodyDetails = skillKnowledge ? (\n <SkillReadyContentList\n items={skillKnowledge.items}\n titleKey={skillKnowledge.titleKey}\n />\n ) : (\n details\n );\n\n return (\n <div>\n <GenericEventMessage\n title={title}\n details={bodyDetails}\n success={success}\n initiallyExpanded={
|
|
1
|
+
{"version":3,"file":"generic-event-message-wrapper.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.tsx"],"sourcesContent":["import {\n OpenHandsEvent,\n ActionEvent,\n ObservationEvent,\n} from \"#/types/agent-server/core\";\nimport { InvokeSkillObservation } from \"#/types/agent-server/core/base/observation\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { GenericEventMessage } from \"../../../features/chat/generic-event-message\";\nimport { getEventContent } from \"../event-content-helpers/get-event-content\";\nimport {\n getACPToolCallResult,\n getObservationResult,\n ObservationResultStatus,\n} from \"../event-content-helpers/get-observation-result\";\nimport {\n isACPToolCallEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport {\n SkillReadyEvent,\n SkillReadyItem,\n isSkillReadyEvent,\n} from \"../event-content-helpers/create-skill-ready-event\";\nimport { getInvokeSkillItems } from \"../event-content-helpers/get-invoke-skill-items\";\nimport { ConversationConfirmationButtons } from \"#/components/shared/buttons/conversation-confirmation-buttons\";\nimport { SkillReadyContentList } from \"./skill-ready-content-list\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\nimport { isMarkdownFileEditorEvent } from \"#/components/features/chat/tool-visualizers/primitives/markdown-file-preview\";\n\ninterface GenericEventMessageWrapperProps {\n event: OpenHandsEvent | SkillReadyEvent;\n isLastMessage: boolean;\n correspondingAction?: ActionEvent;\n}\n\n/**\n * Resolves the expandable skill-knowledge list shared by Skill Ready events and\n * invoke-skill tool observations. Returns the list items and their header\n * label, or null when the event carries no skill knowledge (so the caller keeps\n * the default details body). Additional skill-knowledge sources slot in as one\n * more branch here.\n */\nfunction getSkillKnowledge(\n event: OpenHandsEvent | SkillReadyEvent,\n): { items: SkillReadyItem[]; titleKey: I18nKey } | null {\n if (isSkillReadyEvent(event)) {\n return event._skillReadyItems.length > 0\n ? {\n items: event._skillReadyItems,\n titleKey: I18nKey.SKILLS$TRIGGERED_SKILL_KNOWLEDGE,\n }\n : null;\n }\n if (\n isObservationEvent(event) &&\n event.observation.kind === \"InvokeSkillObservation\"\n ) {\n const items = getInvokeSkillItems(\n event as ObservationEvent<InvokeSkillObservation>,\n );\n return items.length > 0\n ? { items, titleKey: I18nKey.SKILLS$INVOKED_SKILL_KNOWLEDGE }\n : null;\n }\n return null;\n}\n\nexport function GenericEventMessageWrapper({\n event,\n isLastMessage,\n correspondingAction,\n}: GenericEventMessageWrapperProps) {\n const { title, details } = getEventContent(event, correspondingAction);\n\n // TaskTrackerObservation has its own rendering\n if (\n !isSkillReadyEvent(event) &&\n isObservationEvent(event) &&\n event.observation.kind === \"TaskTrackerObservation\"\n ) {\n return <div>{details}</div>;\n }\n\n // Determine success status\n let success: ObservationResultStatus | undefined;\n if (isSkillReadyEvent(event)) {\n success = \"success\";\n } else if (isObservationEvent(event)) {\n success = getObservationResult(event);\n } else if (isACPToolCallEvent(event)) {\n success = getACPToolCallResult(event);\n }\n\n // Skill Ready events and invoke-skill tool observations both render the\n // expandable skill-knowledge list (with the skills icon); they differ only in\n // the header label.\n const skillKnowledge = getSkillKnowledge(event);\n const bodyDetails = skillKnowledge ? (\n <SkillReadyContentList\n items={skillKnowledge.items}\n titleKey={skillKnowledge.titleKey}\n />\n ) : (\n details\n );\n\n // Markdown file-editor cards carry a clipped preview; expand them by\n // default so the artifact is visible without an extra chevron click.\n const initiallyExpanded =\n !isSkillReadyEvent(event) &&\n isMarkdownFileEditorEvent(event, correspondingAction);\n\n return (\n <div>\n <GenericEventMessage\n title={title}\n details={bodyDetails}\n success={success}\n initiallyExpanded={initiallyExpanded}\n titleIcon={\n skillKnowledge ? (\n <SkillsIcon className=\"h-4 w-4 stroke-[var(--oh-muted)] flex-shrink-0 mr-2\" />\n ) : undefined\n }\n />\n {isLastMessage && <ConversationConfirmationButtons />}\n </div>\n );\n}\n"],"mappings":"mwBA0CA,SAAS,EACP,EACuD,CACvD,GAAI,EAAA,kBAAkB,CAAK,EACzB,OAAO,EAAM,iBAAiB,OAAS,EACnC,CACE,MAAO,EAAM,iBACb,SAAU,EAAA,QAAQ,gCACpB,EACA,KAEN,GACE,EAAA,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