@openhands/agent-canvas 1.17.0 → 1.19.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-BQ4o4vqy.js +1 -0
- package/build/assets/active-backend-context-BsLfwrXB.js +2 -0
- package/build/assets/{agent-context-settings-CJUrcBut.js → agent-context-settings-D9i6ezoJ.js} +1 -1
- package/build/assets/{agent-profiles-service.api-Biieml2L.js → agent-profiles-service.api-U-9YzDFU.js} +1 -1
- package/build/assets/agent-profiles-settings-D-bUV2PX.js +1 -0
- package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
- package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
- package/build/assets/agent-server-conversation-service.api-BaVQ6NpE.js +88 -0
- package/build/assets/agent-settings-BZJHtaIK.js +2 -0
- package/build/assets/agent-settings-D4snDd6u.js +1 -0
- package/build/assets/alert-banner-BkVt_8Or.js +1 -0
- package/build/assets/{api-error-message-Ve79qDcN.js → api-error-message-BXo0lCI5.js} +1 -1
- package/build/assets/api-key-entry-screen-fAIld-n7.js +1 -0
- package/build/assets/app-settings-DITbrM2u.js +1 -0
- package/build/assets/automation-detail-DawHmaOl.js +3 -0
- package/build/assets/automation-disabled-reason-DtgC8Ppt.js +1 -0
- package/build/assets/{automation-export-DxY47m3T.js → automation-export-Kv6e0bHx.js} +1 -1
- package/build/assets/automation-git-sync-Dd98G_Oz.js +1 -0
- package/build/assets/automation-setup-route-Cdc109ZD.js +3 -0
- package/build/assets/{automation-templates-4C4PM8K7.js → automation-templates-Xhr-FDAB.js} +1 -1
- package/build/assets/automations-list-BeP1LuzQ.js +1 -0
- package/build/assets/{back-nav-button-B8tH0BEp.js → back-nav-button-DWNiN277.js} +1 -1
- package/build/assets/backend-form-modal-DeaUJIik.js +1 -0
- package/build/assets/backend-synced-settings-badge-Br85iWIY.js +1 -0
- package/build/assets/badge-Cdnei7Ly.js +1 -0
- package/build/assets/{base-modal-DTULovNc.js → base-modal-Ds7grR67.js} +1 -1
- package/build/assets/{bot-CLMxGFaq.js → bot-ByolqPEr.js} +1 -1
- package/build/assets/{brand-button-DxPO4Lf8.js → brand-button-mQq2Ld1I.js} +1 -1
- package/build/assets/browser-Bfum8fkE.js +46 -0
- package/build/assets/browser-tab-CmYT4j_r.js +1 -0
- package/build/assets/canvas-extension-page-CokKSVRG.js +1 -0
- package/build/assets/canvas-extensions-BoQEYG-2.js +1 -0
- package/build/assets/{canvas-extensions-runtime-DdnkgJXV.js → canvas-extensions-runtime-Du2M5iEX.js} +1 -1
- package/build/assets/{chat-send-button-B3SFSIg5.js → chat-send-button-DM3JgMc2.js} +1 -1
- package/build/assets/check-Bo8s5Ylg.js +1 -0
- package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
- package/build/assets/chevron-right-CfdfRn-8.js +1 -0
- package/build/assets/circle-check-5pH3qCji.js +1 -0
- package/build/assets/circle-plus-check-toggle-BbYBiUwv.js +1 -0
- package/build/assets/{cloud-funnel-analytics-BQanUEEC.js → cloud-funnel-analytics-D02kgq1s.js} +1 -1
- package/build/assets/{cog-VBlRo6iw.js → cog-Dy1eWbSZ.js} +1 -1
- package/build/assets/command-menu-mehU3Evb.js +1 -0
- package/build/assets/commits-tab-DhQW8CXi.js +1 -0
- package/build/assets/{condenser-settings-eVKFMvap.js → condenser-settings-eRk6Fkx6.js} +1 -1
- package/build/assets/confirmation-modal-BmVt_c0I.js +1 -0
- package/build/assets/{context-menu-list-item-DDROe12Z.js → context-menu-list-item-lx2zk9G7.js} +1 -1
- package/build/assets/{conversation-BnjJSFf5.js → conversation-BOj0ENI6.js} +8 -8
- package/build/assets/conversation-SouWlGvs.js +1 -0
- package/build/assets/conversation-panel-SouWlGvs.js +1 -0
- package/build/assets/conversation-state-store-C6YncQNo.js +1 -0
- package/build/assets/conversation-store-DC-JlJuq.js +6 -0
- package/build/assets/{conversation-tab-empty-state-DKlzAz5c.js → conversation-tab-empty-state-DIhwCC2J.js} +1 -1
- package/build/assets/copy-to-clipboard-button-DVNXLylP.js +1 -0
- package/build/assets/device-verify-LP-x7nra.js +1 -0
- package/build/assets/{dropdown-classes-B9kJVDIk.js → dropdown-classes-goDldkiu.js} +1 -1
- package/build/assets/edit-automation-modal-BJJR9wSW.js +1 -0
- package/build/assets/empty-state-Cd-TFe7i.js +1 -0
- package/build/assets/{entry.client-Ds8LVp-E.js → entry.client-CJdjIvMZ.js} +2 -2
- package/build/assets/enum-filter-dropdown-pocrz9AL.js +1 -0
- package/build/assets/environment-switch-overlay-Dwe78wRl.js +1 -0
- package/build/assets/error-state-SuWwztxV.js +1 -0
- package/build/assets/extensions-hub-O0esK3Er.js +1 -0
- package/build/assets/extensions-navigation-CgCVSXje.js +1 -0
- package/build/assets/{external-link-DQtv7eTh.js → external-link-Bd7Tga-1.js} +1 -1
- package/build/assets/files-tab-B_6t8ljw.js +1 -0
- package/build/assets/{form-control-classes-B-z85REi.js → form-control-classes-lQfLxzH4.js} +1 -1
- package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
- package/build/assets/get-git-path-Bp5rsUkl.js +1 -0
- package/build/assets/git-repo-dropdown-CbD0_LPN.js +1 -0
- package/build/assets/git-repo-dropdown-DPQVumZg.js +1 -0
- package/build/assets/highlighted-source-view-Bp0sgK-f.js +1 -0
- package/build/assets/home-BghzJd-D.js +1 -0
- package/build/assets/home-CXZ8zawS.js +1 -0
- package/build/assets/home-automation-run-tooltip-BdpCckKO.js +1 -0
- package/build/assets/home-store-DNQpfIEO.js +1 -0
- package/build/assets/hooks-service-DkxnQa4N.js +1 -0
- package/build/assets/index-home-Ca6Q5CtT.js +1 -0
- package/build/assets/info-BcajzHn1.js +1 -0
- package/build/assets/install-server-modal-DvxxYKia.js +1 -0
- package/build/assets/{key-CfXbJa8w.js → key-CwTE6XJj.js} +1 -1
- package/build/assets/launch-jsRGPRBx.js +1 -0
- package/build/assets/link-external-B4gx3EeM.js +1 -0
- package/build/assets/list-filter-B8PQk3RA.js +1 -0
- package/build/assets/{list-todo-ByXMdY4W.js → list-todo-Caa8E1X_.js} +1 -1
- package/build/assets/llm-not-configured-banner-DMdL1vaX.js +27 -0
- package/build/assets/llm-settings-dkQ5Oq7W.js +1 -0
- package/build/assets/llm-settings-lNDerSlu.js +1 -0
- package/build/assets/{llm-subscription-service-aDNBQ7Gq.js → llm-subscription-service-BiQaZbvv.js} +1 -1
- package/build/assets/loader-circle-BxJgk73D.js +1 -0
- package/build/assets/{loading-spinner-DfHI77BA.js → loading-spinner-DK1sAwVg.js} +1 -1
- package/build/assets/manage-backends-modal-DqCJohsX.js +1 -0
- package/build/assets/manifest-ff93dc8c.js +1 -0
- package/build/assets/manifest-subpage-layout-sxuPqfUr.js +1 -0
- package/build/assets/{map-provider-DXvssjw9.js → map-provider-iRs80q_6.js} +1 -1
- package/build/assets/markdown-renderer-BH5pqDuJ.js +8 -0
- package/build/assets/mcp-BtaJDXnP.js +1 -0
- package/build/assets/mcp-installed-servers-Br4ZLsjr.js +1 -0
- package/build/assets/mcp-marketplace-utils-BwEnDYqm.js +1 -0
- package/build/assets/mcp-page-DwbnQpVs.js +9 -0
- package/build/assets/messages-DmFJlW6c.js +41 -0
- package/build/assets/{modal-body-DJw4xBki.js → modal-body-DBweM2EN.js} +1 -1
- package/build/assets/{modal-classes-Dg0ngBPO.js → modal-classes-jvG85nkU.js} +1 -1
- package/build/assets/modal-close-button-BrM5fNnn.js +1 -0
- package/build/assets/{mouse-pointer-click-DEhsSUpu.js → mouse-pointer-click-BXlRN92t.js} +1 -1
- package/build/assets/onboarding-CQ8T6T0U.js +1 -0
- package/build/assets/onboarding-modal-CnliiaSN.js +1 -0
- package/build/assets/{organization-service.api-Cyg1Tn03.js → organization-service.api-DmFUEmu5.js} +1 -1
- package/build/assets/parse-git-remote-url-BG8pcKL8.js +1 -0
- package/build/assets/{pencil-D5c47kyN.js → pencil-q-ihqDYv.js} +1 -1
- package/build/assets/{pin-C7vMagvf.js → pin-BdroVQdN.js} +1 -1
- package/build/assets/planner-tab-CXph_C9F.js +1 -0
- package/build/assets/{plug-CeaqeF6u.js → plug-7ACOEbMs.js} +1 -1
- package/build/assets/{plugins-management-service-Bh_pBuf-.js → plugins-management-service-CcEpfNKz.js} +1 -1
- package/build/assets/plus-C2e21TFC.js +1 -0
- package/build/assets/{profiles-service.api-BbOK0EkF.js → profiles-service.api-DdF_4Zhe.js} +1 -1
- package/build/assets/providers-BWRnl31s.js +1 -0
- package/build/assets/proxy-DbEf3Nqr.js +1 -0
- package/build/assets/{puzzle-DdAqbUrb.js → puzzle-LJYnuxKe.js} +1 -1
- package/build/assets/react-BX7IV650.js +1 -0
- package/build/assets/recommended-automations-launcher-r0oI91HN.js +1 -0
- package/build/assets/{refresh-cw-DEQdPCpH.js → refresh-cw-BtdC3T8P.js} +1 -1
- package/build/assets/root-j2fFRlWS.js +2 -0
- package/build/assets/root-layout-CfGgm2lo.js +2 -0
- package/build/assets/root-sEWn3ha1.css +1 -0
- package/build/assets/schema-field-c3Ncgm4x.js +1 -0
- package/build/assets/sdk-section-page-DFEiuiFQ.js +1 -0
- package/build/assets/secret-form-WXXNFqTM.js +1 -0
- package/build/assets/{secrets-service-Cr8g8xuv.js → secrets-service-DU6wh3wX.js} +1 -1
- package/build/assets/secrets-settings-BEqbPvjy.js +1 -0
- package/build/assets/settings-DjaSQwFh.js +1 -0
- package/build/assets/settings-dropdown-input-BRR2OZwi.js +1 -0
- package/build/assets/settings-index-DHv4XFcM.js +1 -0
- package/build/assets/settings-input-Cm4VxUon.js +1 -0
- package/build/assets/{settings-list-classes-Ds4jPBHK.js → settings-list-classes-CaUfKZ33.js} +1 -1
- package/build/assets/settings-modal-djXuAnBO.js +1 -0
- package/build/assets/settings-nav-DFb3hBMr.js +16 -0
- package/build/assets/{settings-service.api-9_xdv_mh.js → settings-service.api-Q9lKW1TX.js} +1 -1
- package/build/assets/settings-switch-seaSJc7t.js +1 -0
- package/build/assets/{settings-utils-8GIIgOQL.js → settings-utils-BTaaRhLZ.js} +1 -1
- package/build/assets/shared-conversation-x3rxVCon.js +1 -0
- package/build/assets/{shield-check-DO7wa_eu.js → shield-check-C3Rl0NF8.js} +1 -1
- package/build/assets/{sidebar-layout-EPfWxk11.js → sidebar-layout-B6mcvvdV.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-CEqS8KnA.js +1 -0
- package/build/assets/{sidebar-nav-link-_t4_Ef-9.js → sidebar-nav-link-BTHX11LG.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-DbDX-Wvj.js → sidebar-onboarding-checklist-storage-BP1kzn6p.js} +1 -1
- package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
- package/build/assets/skill-card-pill-row-TD39nfP3.js +1 -0
- package/build/assets/{skill-filter-BBeZ4JEP.js → skill-filter-CdBbbwjm.js} +2 -2
- package/build/assets/{skill-icon-badge-BDhQ-tQ0.js → skill-icon-badge-vUEp7gsC.js} +1 -1
- package/build/assets/skill-scope-BTRBQt0-.js +1 -0
- package/build/assets/skills-plugins-k1tUNAw4.js +1 -0
- package/build/assets/skills-settings-CENviPT7.js +1 -0
- package/build/assets/{styled-tooltip-Pd22BIvr.js → styled-tooltip-DVAlWYnL.js} +1 -1
- package/build/assets/task-list-tab-BLKF_x9f.js +1 -0
- package/build/assets/{terminal-onXx0_Qz.js → terminal-Ckbnqb23.js} +1 -1
- package/build/assets/{toggle-switch-lwQtxDcm.js → toggle-switch-DeiG9Mf6.js} +1 -1
- package/build/assets/{trash-2-ZhKuTLiz.js → trash-2-Bb40zQzs.js} +1 -1
- package/build/assets/trash-CXN2R54L.js +1 -0
- package/build/assets/{triangle-alert-BajLPpQg.js → triangle-alert-DEdu-b_L.js} +1 -1
- package/build/assets/{typography-HLLg_FAn.js → typography-NarNyelM.js} +1 -1
- package/build/assets/usage-tab-Drd3O006.js +1 -0
- package/build/assets/use-acp-credential-form-CJ5wPsQm.js +1 -0
- package/build/assets/{use-activate-agent-profile-BLKML6vQ.js → use-activate-agent-profile-iQZ0U3qV.js} +1 -1
- package/build/assets/use-agent-profiles-LCvb5OXT.js +1 -0
- package/build/assets/{use-automation-health-BZkQNEA8.js → use-automation-health-DdgSa8sA.js} +1 -1
- package/build/assets/{use-automation-permissions-B_RpvL-s.js → use-automation-permissions-D3kEeieu.js} +1 -1
- package/build/assets/{use-automations-Cg0PDIZr.js → use-automations-CEubcYTD.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BbN6KfDr.js → use-can-manage-org-profiles-CB8ybxFK.js} +1 -1
- package/build/assets/{use-canvas-extensions-CFUpHat6.js → use-canvas-extensions-BMacwi2v.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Dk0rjr63.js → use-cloud-current-user-id-BEKRd6XZ.js} +1 -1
- package/build/assets/{use-config-DpafU_QP.js → use-config-3WYcJsgC.js} +1 -1
- package/build/assets/{use-create-conversation-1YgmAHt-.js → use-create-conversation-Be-eVpFp.js} +1 -1
- package/build/assets/use-create-secret-Bk9ZxTjl.js +1 -0
- package/build/assets/use-free-models-Ci3FkKEm.js +1 -0
- package/build/assets/{use-get-secrets-CQ4b0qK8.js → use-get-secrets-fqS0kxt6.js} +1 -1
- package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-DeYa1tFM.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
- package/build/assets/use-llm-configured-B71ZEVg2.js +1 -0
- package/build/assets/use-llm-profiles-xtCBMbef.js +1 -0
- package/build/assets/{use-manifest-capabilities-AOWGcu0j.js → use-manifest-capabilities-Bso6A_-A.js} +1 -1
- package/build/assets/{use-onboarding-completion-CoINurkm.js → use-onboarding-completion-CEgjL02y.js} +1 -1
- package/build/assets/{use-pinned-home-route-D6krwXjy.js → use-pinned-home-route-pK4IlJ-p.js} +1 -1
- package/build/assets/{use-plugins-marketplace-mLsIDhBv.js → use-plugins-marketplace-B8-ZEB34.js} +1 -1
- package/build/assets/use-save-agent-profile-D7hJuW_u.js +1 -0
- package/build/assets/{use-save-settings-3U5K9-8x.js → use-save-settings-CikTu5xV.js} +1 -1
- package/build/assets/{use-settings-Dn00UISA.js → use-settings-BWIH5EuN.js} +1 -1
- package/build/assets/use-settings-nav-items-DSKwLDnd.js +1 -0
- package/build/assets/use-tracking-ChnSFChv.js +3 -0
- package/build/assets/{use-user-conversation-ZWlXtbZb.js → use-user-conversation-C_l65DqW.js} +1 -1
- package/build/assets/{useInfiniteQuery-BzrRqjLg.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
- package/build/assets/{useMutation-CJuK90oc.js → useMutation-Cszf8mKy.js} +1 -1
- package/build/assets/useQueries-pUohFMSP.js +1 -0
- package/build/assets/useQuery-DAAacS7O.js +1 -0
- package/build/assets/useTranslation-CCgUjPJF.js +1 -0
- package/build/assets/utils-D-gOfhmN.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-4eJ0tml3.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
- package/build/assets/{vendor~root-layout-n8XCEXG8.js → vendor~root-layout-CcdIqs-C.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js +48 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +1 -1
- package/build/assets/{verification-settings-u2POabjH.js → verification-settings-PKtoIUUY.js} +1 -1
- package/build/assets/{wrench-CkgI4rxA.js → wrench-B8Wg_nbp.js} +1 -1
- package/build/assets/{x-By6qCmtY.js → x-CX8lVGwm.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +16 -2
- package/build/locales/ca/openhands.json +16 -2
- package/build/locales/de/openhands.json +16 -2
- package/build/locales/en/openhands.json +16 -2
- package/build/locales/es/openhands.json +16 -2
- package/build/locales/fr/openhands.json +16 -2
- package/build/locales/it/openhands.json +16 -2
- package/build/locales/ja/openhands.json +16 -2
- package/build/locales/ko-KR/openhands.json +16 -2
- package/build/locales/no/openhands.json +16 -2
- package/build/locales/pt/openhands.json +16 -2
- package/build/locales/tr/openhands.json +16 -2
- package/build/locales/uk/openhands.json +16 -2
- package/build/locales/zh-CN/openhands.json +16 -2
- package/build/locales/zh-TW/openhands.json +16 -2
- package/config/defaults.json +3 -3
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +9 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +6 -2
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.types.d.ts +13 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js +12 -16
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +39 -38
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +73 -72
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
- package/dist/components/features/automations/build-automation-menu-items.js +12 -11
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +8 -5
- package/dist/components/features/automations/detail/disabled-reason-banner.d.ts +16 -0
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +112 -112
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +27 -26
- package/dist/components/features/chat/model-messages.js.map +1 -1
- 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.d.ts +1 -2
- package/dist/components/features/conversation-panel/budget-display.js +12 -19
- package/dist/components/features/conversation-panel/budget-display.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.js +45 -44
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +38 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/images/image-lightbox.cjs +2 -0
- package/dist/components/features/images/image-lightbox.cjs.map +1 -0
- package/dist/components/features/images/image-lightbox.d.ts +11 -0
- package/dist/components/features/images/image-lightbox.js +37 -0
- package/dist/components/features/images/image-lightbox.js.map +1 -0
- package/dist/components/features/images/image-preview.cjs +1 -1
- package/dist/components/features/images/image-preview.cjs.map +1 -1
- package/dist/components/features/images/image-preview.d.ts +2 -1
- package/dist/components/features/images/image-preview.js +33 -13
- package/dist/components/features/images/image-preview.js.map +1 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
- package/dist/components/features/settings/agent-profiles/profile-scope-list.d.ts +20 -0
- package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
- package/dist/components/features/settings/cloud-settings-link.js +22 -21
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -1
- package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +2 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +143 -142
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +28 -27
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.js +33 -29
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/shared/buttons/remove-button.cjs +1 -1
- package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +2 -1
- package/dist/components/shared/buttons/remove-button.js +2 -1
- package/dist/components/shared/buttons/remove-button.js.map +1 -1
- package/dist/components/shared/free-models-note.cjs +2 -0
- package/dist/components/shared/free-models-note.cjs.map +1 -0
- package/dist/components/shared/free-models-note.d.ts +3 -0
- package/dist/components/shared/free-models-note.js +20 -0
- package/dist/components/shared/free-models-note.js.map +1 -0
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +102 -112
- package/dist/components/shared/modals/settings/model-selector.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/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +7 -0
- package/dist/constants/acp-providers.js +20 -16
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/profile-scope.d.ts +21 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +63 -62
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.js +3 -1
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/query/use-free-models.cjs +2 -0
- package/dist/hooks/query/use-free-models.cjs.map +1 -0
- package/dist/hooks/query/use-free-models.d.ts +23 -0
- package/dist/hooks/query/use-free-models.js +67 -0
- package/dist/hooks/query/use-free-models.js.map +1 -0
- package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
- package/dist/hooks/query/use-local-git-info.js.map +1 -1
- package/dist/hooks/query/use-provider-models.cjs +1 -1
- package/dist/hooks/query/use-provider-models.cjs.map +1 -1
- package/dist/hooks/query/use-provider-models.js +34 -25
- package/dist/hooks/query/use-provider-models.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +31 -19
- package/dist/hooks/query/use-search-providers.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.js +8 -9
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.d.ts +1 -2
- package/dist/hooks/use-home-automation-actions.js +0 -1
- package/dist/hooks/use-home-automation-actions.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 +16 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +255 -17
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +16 -2
- package/dist/locales/ca/openhands.json +16 -2
- package/dist/locales/de/openhands.json +16 -2
- package/dist/locales/en/openhands.json +16 -2
- package/dist/locales/es/openhands.json +16 -2
- package/dist/locales/fr/openhands.json +16 -2
- package/dist/locales/it/openhands.json +16 -2
- package/dist/locales/ja/openhands.json +16 -2
- package/dist/locales/ko-KR/openhands.json +16 -2
- package/dist/locales/no/openhands.json +16 -2
- package/dist/locales/pt/openhands.json +16 -2
- package/dist/locales/tr/openhands.json +16 -2
- package/dist/locales/uk/openhands.json +16 -2
- package/dist/locales/zh-CN/openhands.json +16 -2
- package/dist/locales/zh-TW/openhands.json +16 -2
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +2 -2
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +15 -8
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +11 -13
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +6 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js +9 -12
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js +41 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +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 +199 -61
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js +9 -8
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +5 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +52 -47
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +137 -145
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/stores/free-models-store.cjs +2 -0
- package/dist/stores/free-models-store.cjs.map +1 -0
- package/dist/stores/free-models-store.d.ts +30 -0
- package/dist/stores/free-models-store.js +22 -0
- package/dist/stores/free-models-store.js.map +1 -0
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +23 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/utils/automation-disabled-reason.cjs +2 -0
- package/dist/utils/automation-disabled-reason.cjs.map +1 -0
- package/dist/utils/automation-disabled-reason.d.ts +32 -0
- package/dist/utils/automation-disabled-reason.js +19 -0
- package/dist/utils/automation-disabled-reason.js.map +1 -0
- 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 +27 -6
- package/dist/utils/format-model-name.js +14 -6
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/parse-git-remote-url.cjs +1 -1
- package/dist/utils/parse-git-remote-url.cjs.map +1 -1
- package/dist/utils/parse-git-remote-url.d.ts +5 -1
- package/dist/utils/parse-git-remote-url.js +20 -13
- package/dist/utils/parse-git-remote-url.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +79 -8
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/static-server.mjs +24 -7
- package/build/assets/acp-providers-DrjNsPOH.js +0 -1
- package/build/assets/active-backend-context-rZiLJRUc.js +0 -2
- package/build/assets/agent-profiles-settings-x6RvPsq7.js +0 -1
- package/build/assets/agent-server-client-options-BikiNwTa.js +0 -1
- package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +0 -88
- package/build/assets/agent-settings-BJyovpJ_.js +0 -1
- package/build/assets/agent-settings-CpY3zObk.js +0 -2
- package/build/assets/alert-banner-vARz1idS.js +0 -1
- package/build/assets/api-key-entry-screen-CsMuBhoP.js +0 -1
- package/build/assets/app-settings-BaJ7nfHt.js +0 -1
- package/build/assets/automation-detail-CVoGDrKq.js +0 -3
- package/build/assets/automation-git-sync-CRMP9Bbm.js +0 -1
- package/build/assets/automation-setup-route-072beLz1.js +0 -3
- package/build/assets/automations-list-xuqTSQL4.js +0 -1
- package/build/assets/backend-form-modal-0aJmWdsa.js +0 -1
- package/build/assets/backend-synced-settings-badge-B7rKWBir.js +0 -1
- package/build/assets/badge-CcGx2TaV.js +0 -1
- package/build/assets/browser-C-_qBasq.js +0 -46
- package/build/assets/browser-tab-DZanIw5m.js +0 -1
- package/build/assets/canvas-extension-page-o_cWgE9B.js +0 -1
- package/build/assets/canvas-extensions-DSgNlCha.js +0 -1
- package/build/assets/check-fDEfgSzj.js +0 -1
- package/build/assets/chevron-down-CFrWHqu8.js +0 -1
- package/build/assets/chevron-right-C5roOrJu.js +0 -1
- package/build/assets/circle-check-ClTzJTdb.js +0 -1
- package/build/assets/circle-plus-check-toggle-Fr-h-mbL.js +0 -1
- package/build/assets/command-menu-BT3Ia5Ru.js +0 -1
- package/build/assets/commits-tab-2jhtaohl.js +0 -1
- package/build/assets/confirmation-modal-gIFHeZt6.js +0 -1
- package/build/assets/conversation-DZ578rOX.js +0 -1
- package/build/assets/conversation-panel-DZ578rOX.js +0 -1
- package/build/assets/conversation-state-store-D1_G_9I-.js +0 -1
- package/build/assets/conversation-store-DVVfkCsk.js +0 -6
- package/build/assets/copy-to-clipboard-button-B3w0X7WH.js +0 -1
- package/build/assets/device-verify-BfkCzyFB.js +0 -1
- package/build/assets/edit-automation-modal-BwhJ39JT.js +0 -1
- package/build/assets/empty-state-RZz0OfnY.js +0 -1
- package/build/assets/enum-filter-dropdown-C4pW0ORd.js +0 -1
- package/build/assets/environment-switch-overlay-P2ZAuzov.js +0 -1
- package/build/assets/error-state-B_5cgNPJ.js +0 -1
- package/build/assets/extensions-hub-DsaUr4ca.js +0 -1
- package/build/assets/extensions-navigation-CRMZd-FE.js +0 -1
- package/build/assets/files-tab-CCgAcVdc.js +0 -1
- package/build/assets/format-model-name-CasAP3nd.js +0 -1
- package/build/assets/get-git-path-EHrSDxTM.js +0 -1
- package/build/assets/git-repo-dropdown-D2WEQ97X.js +0 -1
- package/build/assets/git-repo-dropdown-DVeCUUXG.js +0 -1
- package/build/assets/highlighted-source-view-DjHO3SdW.js +0 -1
- package/build/assets/home-BorS_vdS.js +0 -1
- package/build/assets/home-aIMbHw5M.js +0 -1
- package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +0 -1
- package/build/assets/home-store-DyXz0w6d.js +0 -1
- package/build/assets/hooks-service-C6dpRtZM.js +0 -1
- package/build/assets/index-home-zKFuKK2B.js +0 -1
- package/build/assets/info-CTIdjttz.js +0 -1
- package/build/assets/install-server-modal-DUiZMc8u.js +0 -1
- package/build/assets/kebab-menu-item-content-mm04SBD3.js +0 -1
- package/build/assets/launch-BSIf9KEg.js +0 -1
- package/build/assets/link-external-BNZzCM1I.js +0 -1
- package/build/assets/list-filter-CNpqTWVY.js +0 -1
- package/build/assets/llm-not-configured-banner-z_QRSeV0.js +0 -27
- package/build/assets/llm-settings-B-5AHMiX.js +0 -1
- package/build/assets/llm-settings-B3SjHDmA.js +0 -1
- package/build/assets/loader-circle-Dex47vVW.js +0 -1
- package/build/assets/manage-backends-modal-q1NdFisr.js +0 -1
- package/build/assets/manifest-8920b615.js +0 -1
- package/build/assets/manifest-subpage-layout-BQQy5ipR.js +0 -1
- package/build/assets/markdown-renderer-rivLvYh-.js +0 -8
- package/build/assets/mcp-CEXDhQWn.js +0 -1
- package/build/assets/mcp-marketplace-utils-Cn_NIMWM.js +0 -1
- package/build/assets/mcp-page-LGYIICMG.js +0 -9
- package/build/assets/messages-DUSeANAh.js +0 -41
- package/build/assets/modal-close-button-B9j4nasm.js +0 -1
- package/build/assets/onboarding-BjFebfs5.js +0 -1
- package/build/assets/onboarding-modal-DDTjOpyd.js +0 -1
- package/build/assets/parse-git-remote-url-DpDM9bK6.js +0 -1
- package/build/assets/planner-tab-D8f2Y3rn.js +0 -1
- package/build/assets/plus-B3wvU06-.js +0 -1
- package/build/assets/providers-2gIIkz2N.js +0 -1
- package/build/assets/proxy-CBgMd2zf.js +0 -1
- package/build/assets/recommended-automations-launcher-YLAQTp4s.js +0 -1
- package/build/assets/root-Bye_XmEL.js +0 -2
- package/build/assets/root-Cnwwzgo0.css +0 -1
- package/build/assets/root-layout-CSAwxBGM.js +0 -2
- package/build/assets/schema-field-CK0xYNbO.js +0 -1
- package/build/assets/sdk-section-page-Da73Rs_o.js +0 -1
- package/build/assets/secret-form-CB2VwYYg.js +0 -1
- package/build/assets/secrets-settings-Bh0udeKv.js +0 -1
- package/build/assets/settings-DmyIgRxO.js +0 -1
- package/build/assets/settings-dropdown-input-DVpyD87C.js +0 -1
- package/build/assets/settings-index-BSJUFmjE.js +0 -1
- package/build/assets/settings-input-C0dd8Utu.js +0 -1
- package/build/assets/settings-modal-yStgEh2o.js +0 -1
- package/build/assets/settings-switch-B78Khmyz.js +0 -1
- package/build/assets/shared-conversation-DM96X4KV.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +0 -1
- package/build/assets/sidebar-store-CSDFK0W5.js +0 -1
- package/build/assets/skill-card-pill-row-989y15jV.js +0 -1
- package/build/assets/skill-scope-Dz3kPH3P.js +0 -1
- package/build/assets/skills-plugins-e3CYGdUJ.js +0 -1
- package/build/assets/skills-settings-3e-FuHw_.js +0 -1
- package/build/assets/task-list-tab-3Jg8ywch.js +0 -1
- package/build/assets/trash-B6OIe4yX.js +0 -1
- package/build/assets/usage-tab-Cm-9j3UK.js +0 -1
- package/build/assets/use-acp-credential-form-BARcvjYE.js +0 -1
- package/build/assets/use-agent-profiles-1P91KSXz.js +0 -1
- package/build/assets/use-create-secret-D8p9ybQj.js +0 -1
- package/build/assets/use-is-authed-BRPjCRKM.js +0 -1
- package/build/assets/use-llm-configured-DGm8FiRR.js +0 -1
- package/build/assets/use-llm-profiles-BTTtpW4z.js +0 -1
- package/build/assets/use-save-agent-profile-CxyO9YG-.js +0 -1
- package/build/assets/use-settings-nav-items-vrjxTqcu.js +0 -16
- package/build/assets/use-tracking-B9prBsrq.js +0 -3
- package/build/assets/useQueries-CykmpT-a.js +0 -1
- package/build/assets/useQuery-S6j94er1.js +0 -1
- package/build/assets/utils-BOco8mxR.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +0 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +0 -185
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js +0 -48
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +0 -1
package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../../i18n/declaration.cjs"),n=require("../../../../utils/status.cjs"),r=require("../../../../utils/utils.cjs"),i=require("../../../../constants/acp-providers.cjs"),a=require("../../../../api/agent-server-adapter.cjs"),o=require("../../../../utils/format-model-name.cjs"),
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../../i18n/declaration.cjs"),n=require("../../../../utils/status.cjs"),r=require("../../../../utils/utils.cjs"),i=require("../../../../constants/acp-providers.cjs"),a=require("../../../../api/agent-server-adapter.cjs"),o=require("../../../../hooks/query/use-free-models.cjs"),s=require("../../../../utils/format-model-name.cjs"),c=require("../../../../utils/format-time-delta.cjs"),l=require("../../../shared/agent-brand-icon.cjs"),u=require("./conversation-card-meta-chip.cjs"),d=require("./conversation-repo-link.cjs"),f=require("./no-repository.cjs"),p=require("./conversation-tag-chips.cjs");let m=require("react/jsx-runtime");function h({selectedRepository:h,lastUpdatedAt:g,createdAt:_,executionStatus:v,workspaceWorkingDir:y,showRepositoryMetadata:b=!0,showTimestamp:x=!0,llmModel:S,showAgentChip:C=!1,agentKind:w=null,acpServer:T=null,tags:E=null,showTags:D=!1,isArchived:O=!1}){let{t:k}=e.useTranslation(`openhands`),A=o.useFreeModels(),j=n.isExecutionPaused(v),M=null;if(C)if(w===`acp`){let e=i.getAcpProviderDisplayName(T)??k(t.I18nKey.CONVERSATION$ACP_AGENT_GENERIC),n=i.labelForAcpModel(T,S),r=n??e;M={kind:i.resolveAcpProviderIcon(T),text:r,tooltip:n?`${e} · ${n}`:e}}else S&&(M={kind:`openhands`,text:s.formatNativeModelName(S,A)??S,tooltip:S});let N=v===void 0?void 0:`pl-[26px]`,P=D?a.getDisplayConversationTags(E):[];return(0,m.jsxs)(`div`,{className:r.cn(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,j&&`opacity-60`),children:[(0,m.jsxs)(`div`,{className:r.cn(`flex flex-row items-center gap-2 w-full min-w-0`,b&&N),children:[b&&(h?.selected_repository?(0,m.jsx)(d.ConversationRepoLink,{selectedRepository:h}):(0,m.jsx)(f.NoRepository,{workspaceWorkingDir:y})),(0,m.jsx)(`div`,{className:`flex items-center gap-2 shrink-0 ml-auto`,children:x&&(_??g)&&(0,m.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] text-right`,children:(0,m.jsx)(`time`,{children:`${c.formatTimeDelta(g??_)} ${k(t.I18nKey.CONVERSATION$AGO)}`})})})]}),M?(0,m.jsx)(`div`,{className:N,children:(0,m.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:u.CONVERSATION_CARD_META_CHIP_CLASSNAME,title:M.tooltip,children:[(0,m.jsx)(`span`,{className:`inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block`,"aria-hidden":!0,children:(0,m.jsx)(l.AgentBrandIcon,{kind:M.kind,size:12})}),(0,m.jsx)(`span`,{className:`truncate leading-4`,children:M.text})]})}):null,O?(0,m.jsx)(`div`,{className:N,children:(0,m.jsx)(`span`,{"data-testid":`conversation-card-archived-chip`,className:u.CONVERSATION_CARD_META_CHIP_CLASSNAME,children:k(t.I18nKey.COMMON$ARCHIVED)})}):null,P.length>0?(0,m.jsx)(`div`,{className:N,children:(0,m.jsx)(p.ConversationTagChips,{tags:P})}):null]})}exports.ConversationCardFooter=h;
|
|
2
2
|
//# sourceMappingURL=conversation-card-footer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-card-footer.cjs","names":[],"sources":["../../../../../src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { formatTimeDelta } from \"#/utils/format-time-delta\";\nimport { cn } from \"#/utils/utils\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { RepositorySelection } from \"#/api/open-hands.types\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionPaused } from \"#/utils/status\";\nimport {\n getAcpProviderDisplayName,\n labelForAcpModel,\n resolveAcpProviderIcon,\n} from \"#/constants/acp-providers\";\nimport { formatNativeModelName } from \"#/utils/format-model-name\";\nimport {\n AgentBrandIcon,\n type AgentBrandIconKind,\n} from \"#/components/shared/agent-brand-icon\";\nimport { getDisplayConversationTags } from \"#/api/agent-server-adapter\";\nimport { ConversationRepoLink } from \"./conversation-repo-link\";\nimport { NoRepository } from \"./no-repository\";\nimport { ConversationTagChips } from \"./conversation-tag-chips\";\nimport { CONVERSATION_CARD_META_CHIP_CLASSNAME } from \"./conversation-card-meta-chip\";\n\ninterface ConversationCardFooterProps {\n selectedRepository: RepositorySelection | null;\n lastUpdatedAt: string;\n createdAt?: string;\n executionStatus?: ExecutionStatus | null;\n workspaceWorkingDir?: string | null;\n showRepositoryMetadata?: boolean;\n showTimestamp?: boolean;\n llmModel?: string | null;\n /**\n * Whether to render the agent/model chip. Wired to the conversation\n * panel's \"LLM model\" toggle; gates the chip uniformly\n * for both ACP and OpenHands cards.\n */\n showAgentChip?: boolean;\n /**\n * High-level kind of the conversation's agent. Drives the chip's icon:\n * the OpenHands logo for native conversations and the resolved ACP brand\n * mark for ACP conversations. Defensive against stray ``acpServer``\n * values reaching an OpenHands card.\n */\n agentKind?: \"openhands\" | \"acp\" | null;\n /**\n * Registry key of the ACP CLI server (``\"claude-code\"`` / ``\"codex\"`` /\n * ``\"gemini-cli\"`` / unknown / null). Resolved to a human display name\n * via {@link getAcpProviderDisplayName}; unknown / null falls back to\n * a generic \"ACP\" label so a Custom-command preset still produces a\n * useful chip.\n */\n acpServer?: string | null;\n /**\n * Server-side conversation tags (``AppConversation.tags``). Non-reserved\n * entries render as value-only chips so API-/automation-born\n * conversations can surface attribution (e.g. ``origin: slack`` → ``slack``).\n */\n tags?: Record<string, string> | null;\n /**\n * Whether to render the tag-chip row. Wired to the conversation panel's\n * \"Tags\" toggle.\n */\n showTags?: boolean;\n /**\n * Marks the conversation as archived. Archived rows are hidden from the list\n * unless the panel's \"Show archived\" toggle is on, so the chip is what tells\n * the user why an otherwise ordinary row is visible.\n */\n isArchived?: boolean;\n}\n\nexport function ConversationCardFooter({\n selectedRepository,\n lastUpdatedAt,\n createdAt,\n executionStatus,\n workspaceWorkingDir,\n showRepositoryMetadata = true,\n showTimestamp = true,\n llmModel,\n showAgentChip = false,\n agentKind = null,\n acpServer = null,\n tags = null,\n showTags = false,\n isArchived = false,\n}: ConversationCardFooterProps) {\n const { t } = useTranslation(\"openhands\");\n\n const isPaused = isExecutionPaused(executionStatus);\n\n // Single inline chip per conversation: [brand mark] {model text}. Gated by\n // the conversation panel's \"LLM model\" toggle and applied\n // uniformly to both kinds — OpenHands shows the logo + ``agent.llm.model``;\n // ACP shows the provider brand mark + model resolved through PR 730's\n // adapter chain, falling back to the provider display name when no model is\n // available so the chip never collapses to icon-only.\n let chip: {\n kind: AgentBrandIconKind;\n text: string;\n tooltip: string;\n } | null = null;\n if (showAgentChip) {\n if (agentKind === \"acp\") {\n const providerName =\n getAcpProviderDisplayName(acpServer) ??\n t(I18nKey.CONVERSATION$ACP_AGENT_GENERIC);\n // Prefer the provider's picker label (e.g. \"Claude Opus 4.7\") over the\n // raw ``acp_model`` ID; falls back to the raw ID for custom overrides\n // and to the provider name when there's no model at all.\n const modelLabel = labelForAcpModel(acpServer, llmModel);\n const text = modelLabel ?? providerName;\n chip = {\n kind: resolveAcpProviderIcon(acpServer),\n text,\n tooltip: modelLabel ? `${providerName} · ${modelLabel}` : providerName,\n };\n } else if (llmModel) {\n // Strip the routing prefix (e.g. \"anthropic/claude-…\" → \"claude-…\") for\n // the chip text; keep the full routing string in the tooltip.\n chip = {\n kind: \"openhands\",\n text: formatNativeModelName(llmModel) ?? llmModel,\n tooltip: llmModel,\n };\n }\n }\n\n // Match title text start: 18px status column + gap-2 (8px).\n const metadataIndentClass =\n executionStatus !== undefined ? \"pl-[26px]\" : undefined;\n\n const displayTags = showTags ? getDisplayConversationTags(tags) : [];\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-0.5 mt-0.5 w-full min-w-0\",\n isPaused && \"opacity-60\",\n )}\n >\n <div\n className={cn(\n \"flex flex-row items-center gap-2 w-full min-w-0\",\n showRepositoryMetadata && metadataIndentClass,\n )}\n >\n {showRepositoryMetadata &&\n (selectedRepository?.selected_repository ? (\n <ConversationRepoLink selectedRepository={selectedRepository} />\n ) : (\n <NoRepository workspaceWorkingDir={workspaceWorkingDir} />\n ))}\n <div className=\"flex items-center gap-2 shrink-0 ml-auto\">\n {showTimestamp && (createdAt ?? lastUpdatedAt) && (\n <p className=\"text-xs text-[var(--oh-muted)] text-right\">\n <time>\n {`${formatTimeDelta(lastUpdatedAt ?? createdAt)} ${t(I18nKey.CONVERSATION$AGO)}`}\n </time>\n </p>\n )}\n </div>\n </div>\n {chip ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-agent-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n title={chip.tooltip}\n >\n {/* Same line-height slot as tag chips; width flexes for the wider OpenHands mark. */}\n <span\n className=\"inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block\"\n aria-hidden\n >\n <AgentBrandIcon kind={chip.kind} size={12} />\n </span>\n <span className=\"truncate leading-4\">{chip.text}</span>\n </span>\n </div>\n ) : null}\n {isArchived ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-archived-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n >\n {t(I18nKey.COMMON$ARCHIVED)}\n </span>\n </div>\n ) : null}\n {displayTags.length > 0 ? (\n <div className={metadataIndentClass}>\n <ConversationTagChips tags={displayTags} />\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation-card-footer.cjs","names":[],"sources":["../../../../../src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { formatTimeDelta } from \"#/utils/format-time-delta\";\nimport { cn } from \"#/utils/utils\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { RepositorySelection } from \"#/api/open-hands.types\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionPaused } from \"#/utils/status\";\nimport {\n getAcpProviderDisplayName,\n labelForAcpModel,\n resolveAcpProviderIcon,\n} from \"#/constants/acp-providers\";\nimport { useFreeModels } from \"#/hooks/query/use-free-models\";\nimport { formatNativeModelName } from \"#/utils/format-model-name\";\nimport {\n AgentBrandIcon,\n type AgentBrandIconKind,\n} from \"#/components/shared/agent-brand-icon\";\nimport { getDisplayConversationTags } from \"#/api/agent-server-adapter\";\nimport { ConversationRepoLink } from \"./conversation-repo-link\";\nimport { NoRepository } from \"./no-repository\";\nimport { ConversationTagChips } from \"./conversation-tag-chips\";\nimport { CONVERSATION_CARD_META_CHIP_CLASSNAME } from \"./conversation-card-meta-chip\";\n\ninterface ConversationCardFooterProps {\n selectedRepository: RepositorySelection | null;\n lastUpdatedAt: string;\n createdAt?: string;\n executionStatus?: ExecutionStatus | null;\n workspaceWorkingDir?: string | null;\n showRepositoryMetadata?: boolean;\n showTimestamp?: boolean;\n llmModel?: string | null;\n /**\n * Whether to render the agent/model chip. Wired to the conversation\n * panel's \"LLM model\" toggle; gates the chip uniformly\n * for both ACP and OpenHands cards.\n */\n showAgentChip?: boolean;\n /**\n * High-level kind of the conversation's agent. Drives the chip's icon:\n * the OpenHands logo for native conversations and the resolved ACP brand\n * mark for ACP conversations. Defensive against stray ``acpServer``\n * values reaching an OpenHands card.\n */\n agentKind?: \"openhands\" | \"acp\" | null;\n /**\n * Registry key of the ACP CLI server (``\"claude-code\"`` / ``\"codex\"`` /\n * ``\"gemini-cli\"`` / unknown / null). Resolved to a human display name\n * via {@link getAcpProviderDisplayName}; unknown / null falls back to\n * a generic \"ACP\" label so a Custom-command preset still produces a\n * useful chip.\n */\n acpServer?: string | null;\n /**\n * Server-side conversation tags (``AppConversation.tags``). Non-reserved\n * entries render as value-only chips so API-/automation-born\n * conversations can surface attribution (e.g. ``origin: slack`` → ``slack``).\n */\n tags?: Record<string, string> | null;\n /**\n * Whether to render the tag-chip row. Wired to the conversation panel's\n * \"Tags\" toggle.\n */\n showTags?: boolean;\n /**\n * Marks the conversation as archived. Archived rows are hidden from the list\n * unless the panel's \"Show archived\" toggle is on, so the chip is what tells\n * the user why an otherwise ordinary row is visible.\n */\n isArchived?: boolean;\n}\n\nexport function ConversationCardFooter({\n selectedRepository,\n lastUpdatedAt,\n createdAt,\n executionStatus,\n workspaceWorkingDir,\n showRepositoryMetadata = true,\n showTimestamp = true,\n llmModel,\n showAgentChip = false,\n agentKind = null,\n acpServer = null,\n tags = null,\n showTags = false,\n isArchived = false,\n}: ConversationCardFooterProps) {\n const { t } = useTranslation(\"openhands\");\n const freeModels = useFreeModels();\n\n const isPaused = isExecutionPaused(executionStatus);\n\n // Single inline chip per conversation: [brand mark] {model text}. Gated by\n // the conversation panel's \"LLM model\" toggle and applied\n // uniformly to both kinds — OpenHands shows the logo + ``agent.llm.model``;\n // ACP shows the provider brand mark + model resolved through PR 730's\n // adapter chain, falling back to the provider display name when no model is\n // available so the chip never collapses to icon-only.\n let chip: {\n kind: AgentBrandIconKind;\n text: string;\n tooltip: string;\n } | null = null;\n if (showAgentChip) {\n if (agentKind === \"acp\") {\n const providerName =\n getAcpProviderDisplayName(acpServer) ??\n t(I18nKey.CONVERSATION$ACP_AGENT_GENERIC);\n // Prefer the provider's picker label (e.g. \"Claude Opus 4.7\") over the\n // raw ``acp_model`` ID; falls back to the raw ID for custom overrides\n // and to the provider name when there's no model at all.\n const modelLabel = labelForAcpModel(acpServer, llmModel);\n const text = modelLabel ?? providerName;\n chip = {\n kind: resolveAcpProviderIcon(acpServer),\n text,\n tooltip: modelLabel ? `${providerName} · ${modelLabel}` : providerName,\n };\n } else if (llmModel) {\n // Strip the routing prefix (e.g. \"anthropic/claude-…\" → \"claude-…\") for\n // the chip text; keep the full routing string in the tooltip.\n chip = {\n kind: \"openhands\",\n text: formatNativeModelName(llmModel, freeModels) ?? llmModel,\n tooltip: llmModel,\n };\n }\n }\n\n // Match title text start: 18px status column + gap-2 (8px).\n const metadataIndentClass =\n executionStatus !== undefined ? \"pl-[26px]\" : undefined;\n\n const displayTags = showTags ? getDisplayConversationTags(tags) : [];\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-0.5 mt-0.5 w-full min-w-0\",\n isPaused && \"opacity-60\",\n )}\n >\n <div\n className={cn(\n \"flex flex-row items-center gap-2 w-full min-w-0\",\n showRepositoryMetadata && metadataIndentClass,\n )}\n >\n {showRepositoryMetadata &&\n (selectedRepository?.selected_repository ? (\n <ConversationRepoLink selectedRepository={selectedRepository} />\n ) : (\n <NoRepository workspaceWorkingDir={workspaceWorkingDir} />\n ))}\n <div className=\"flex items-center gap-2 shrink-0 ml-auto\">\n {showTimestamp && (createdAt ?? lastUpdatedAt) && (\n <p className=\"text-xs text-[var(--oh-muted)] text-right\">\n <time>\n {`${formatTimeDelta(lastUpdatedAt ?? createdAt)} ${t(I18nKey.CONVERSATION$AGO)}`}\n </time>\n </p>\n )}\n </div>\n </div>\n {chip ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-agent-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n title={chip.tooltip}\n >\n {/* Same line-height slot as tag chips; width flexes for the wider OpenHands mark. */}\n <span\n className=\"inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block\"\n aria-hidden\n >\n <AgentBrandIcon kind={chip.kind} size={12} />\n </span>\n <span className=\"truncate leading-4\">{chip.text}</span>\n </span>\n </div>\n ) : null}\n {isArchived ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-archived-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n >\n {t(I18nKey.COMMON$ARCHIVED)}\n </span>\n </div>\n ) : null}\n {displayTags.length > 0 ? (\n <div className={metadataIndentClass}>\n <ConversationTagChips tags={displayTags} />\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":"mxBAyEA,SAAgB,EAAuB,CACrC,qBACA,gBACA,YACA,kBACA,sBACA,yBAAyB,GACzB,gBAAgB,GAChB,WACA,gBAAgB,GAChB,YAAY,KACZ,YAAY,KACZ,OAAO,KACP,WAAW,GACX,aAAa,IACiB,CAC9B,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAa,EAAA,cAAc,EAE3B,EAAW,EAAA,kBAAkB,CAAe,EAQ9C,EAIO,KACX,GAAI,KACE,IAAc,MAAO,CACvB,IAAM,EACJ,EAAA,0BAA0B,CAAS,GACnC,EAAE,EAAA,QAAQ,8BAA8B,EAIpC,EAAa,EAAA,iBAAiB,EAAW,CAAQ,EACjD,EAAO,GAAc,EAC3B,EAAO,CACL,KAAM,EAAA,uBAAuB,CAAS,EACtC,OACA,QAAS,EAAa,GAAG,EAAa,KAAK,IAAe,CAC5D,CACF,MAAW,IAGT,EAAO,CACL,KAAM,YACN,KAAM,EAAA,sBAAsB,EAAU,CAAU,GAAK,EACrD,QAAS,CACX,GAKJ,IAAM,EACJ,IAAoB,IAAA,GAA0B,IAAA,GAAd,YAE5B,EAAc,EAAW,EAAA,2BAA2B,CAAI,EAAI,CAAC,EAEnE,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,EAAA,GACT,8CACA,GAAY,YACd,WAJF,EAME,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,EAAA,GACT,kDACA,GAA0B,CAC5B,WAJF,CAMG,IACE,GAAoB,qBACnB,EAAA,EAAA,KAAC,EAAA,qBAAD,CAA0C,oBAAqB,CAAA,GAE/D,EAAA,EAAA,KAAC,EAAA,aAAD,CAAmC,qBAAsB,CAAA,IAE7D,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,oDACZ,IAAkB,GAAa,KAC9B,EAAA,EAAA,KAAC,IAAD,CAAG,UAAU,sDACX,EAAA,EAAA,KAAC,OAAD,CAAA,SACG,GAAG,EAAA,gBAAgB,GAAiB,CAAS,EAAE,GAAG,EAAE,EAAA,QAAQ,gBAAgB,GACzE,CAAA,CACL,CAAA,CAEF,CAAA,CACF,IACJ,GACC,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,YACd,EAAA,EAAA,MAAC,OAAD,CACE,cAAY,+BACZ,UAAW,EAAA,sCACX,MAAO,EAAK,iBAHd,EAME,EAAA,EAAA,KAAC,OAAD,CACE,UAAU,qEACV,cAAA,aAEA,EAAA,EAAA,KAAC,EAAA,eAAD,CAAgB,KAAM,EAAK,KAAM,KAAM,EAAK,CAAA,CACxC,CAAA,GACN,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,8BAAsB,EAAK,IAAW,CAAA,CAClD,GACH,CAAA,EACH,KACH,GACC,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,YACd,EAAA,EAAA,KAAC,OAAD,CACE,cAAY,kCACZ,UAAW,EAAA,+CAEV,EAAE,EAAA,QAAQ,eAAe,CACtB,CAAA,CACH,CAAA,EACH,KACH,EAAY,OAAS,GACpB,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,YACd,EAAA,EAAA,KAAC,EAAA,qBAAD,CAAsB,KAAM,CAAc,CAAA,CACvC,CAAA,EACH,IACD,GAET"}
|
package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js
CHANGED
|
@@ -4,78 +4,79 @@ import { isExecutionPaused as n } from "../../../../utils/status.js";
|
|
|
4
4
|
import { cn as r } from "../../../../utils/utils.js";
|
|
5
5
|
import { getAcpProviderDisplayName as i, labelForAcpModel as a, resolveAcpProviderIcon as o } from "../../../../constants/acp-providers.js";
|
|
6
6
|
import { getDisplayConversationTags as s } from "../../../../api/agent-server-adapter.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { useFreeModels as c } from "../../../../hooks/query/use-free-models.js";
|
|
8
|
+
import { formatNativeModelName as l } from "../../../../utils/format-model-name.js";
|
|
9
|
+
import { formatTimeDelta as u } from "../../../../utils/format-time-delta.js";
|
|
10
|
+
import { AgentBrandIcon as d } from "../../../shared/agent-brand-icon.js";
|
|
11
|
+
import { CONVERSATION_CARD_META_CHIP_CLASSNAME as f } from "./conversation-card-meta-chip.js";
|
|
12
|
+
import { ConversationRepoLink as p } from "./conversation-repo-link.js";
|
|
13
|
+
import { NoRepository as m } from "./no-repository.js";
|
|
14
|
+
import { ConversationTagChips as h } from "./conversation-tag-chips.js";
|
|
15
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
16
|
//#region src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx
|
|
16
|
-
function
|
|
17
|
-
let { t:
|
|
18
|
-
if (
|
|
19
|
-
let e = i(
|
|
20
|
-
|
|
21
|
-
kind: o(
|
|
17
|
+
function v({ selectedRepository: v, lastUpdatedAt: y, createdAt: b, executionStatus: x, workspaceWorkingDir: S, showRepositoryMetadata: C = !0, showTimestamp: w = !0, llmModel: T, showAgentChip: E = !1, agentKind: D = null, acpServer: O = null, tags: k = null, showTags: A = !1, isArchived: j = !1 }) {
|
|
18
|
+
let { t: M } = e("openhands"), N = c(), P = n(x), F = null;
|
|
19
|
+
if (E) if (D === "acp") {
|
|
20
|
+
let e = i(O) ?? M(t.CONVERSATION$ACP_AGENT_GENERIC), n = a(O, T), r = n ?? e;
|
|
21
|
+
F = {
|
|
22
|
+
kind: o(O),
|
|
22
23
|
text: r,
|
|
23
24
|
tooltip: n ? `${e} · ${n}` : e
|
|
24
25
|
};
|
|
25
|
-
} else
|
|
26
|
+
} else T && (F = {
|
|
26
27
|
kind: "openhands",
|
|
27
|
-
text:
|
|
28
|
-
tooltip:
|
|
28
|
+
text: l(T, N) ?? T,
|
|
29
|
+
tooltip: T
|
|
29
30
|
});
|
|
30
|
-
let
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
className: r("flex flex-col gap-0.5 mt-0.5 w-full min-w-0",
|
|
31
|
+
let I = x === void 0 ? void 0 : "pl-[26px]", L = A ? s(k) : [];
|
|
32
|
+
return /* @__PURE__ */ _("div", {
|
|
33
|
+
className: r("flex flex-col gap-0.5 mt-0.5 w-full min-w-0", P && "opacity-60"),
|
|
33
34
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
className: r("flex flex-row items-center gap-2 w-full min-w-0",
|
|
36
|
-
children: [
|
|
35
|
+
/* @__PURE__ */ _("div", {
|
|
36
|
+
className: r("flex flex-row items-center gap-2 w-full min-w-0", C && I),
|
|
37
|
+
children: [C && (v?.selected_repository ? /* @__PURE__ */ g(p, { selectedRepository: v }) : /* @__PURE__ */ g(m, { workspaceWorkingDir: S })), /* @__PURE__ */ g("div", {
|
|
37
38
|
className: "flex items-center gap-2 shrink-0 ml-auto",
|
|
38
|
-
children:
|
|
39
|
+
children: w && (b ?? y) && /* @__PURE__ */ g("p", {
|
|
39
40
|
className: "text-xs text-[var(--oh-muted)] text-right",
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ g("time", { children: `${u(y ?? b)} ${M(t.CONVERSATION$AGO)}` })
|
|
41
42
|
})
|
|
42
43
|
})]
|
|
43
44
|
}),
|
|
44
|
-
|
|
45
|
-
className:
|
|
46
|
-
children: /* @__PURE__ */
|
|
45
|
+
F ? /* @__PURE__ */ g("div", {
|
|
46
|
+
className: I,
|
|
47
|
+
children: /* @__PURE__ */ _("span", {
|
|
47
48
|
"data-testid": "conversation-card-agent-chip",
|
|
48
|
-
className:
|
|
49
|
-
title:
|
|
50
|
-
children: [/* @__PURE__ */
|
|
49
|
+
className: f,
|
|
50
|
+
title: F.tooltip,
|
|
51
|
+
children: [/* @__PURE__ */ g("span", {
|
|
51
52
|
className: "inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block",
|
|
52
53
|
"aria-hidden": !0,
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
-
kind:
|
|
54
|
+
children: /* @__PURE__ */ g(d, {
|
|
55
|
+
kind: F.kind,
|
|
55
56
|
size: 12
|
|
56
57
|
})
|
|
57
|
-
}), /* @__PURE__ */
|
|
58
|
+
}), /* @__PURE__ */ g("span", {
|
|
58
59
|
className: "truncate leading-4",
|
|
59
|
-
children:
|
|
60
|
+
children: F.text
|
|
60
61
|
})]
|
|
61
62
|
})
|
|
62
63
|
}) : null,
|
|
63
|
-
|
|
64
|
-
className:
|
|
65
|
-
children: /* @__PURE__ */
|
|
64
|
+
j ? /* @__PURE__ */ g("div", {
|
|
65
|
+
className: I,
|
|
66
|
+
children: /* @__PURE__ */ g("span", {
|
|
66
67
|
"data-testid": "conversation-card-archived-chip",
|
|
67
|
-
className:
|
|
68
|
-
children:
|
|
68
|
+
className: f,
|
|
69
|
+
children: M(t.COMMON$ARCHIVED)
|
|
69
70
|
})
|
|
70
71
|
}) : null,
|
|
71
|
-
|
|
72
|
-
className:
|
|
73
|
-
children: /* @__PURE__ */ h
|
|
72
|
+
L.length > 0 ? /* @__PURE__ */ g("div", {
|
|
73
|
+
className: I,
|
|
74
|
+
children: /* @__PURE__ */ g(h, { tags: L })
|
|
74
75
|
}) : null
|
|
75
76
|
]
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
//#endregion
|
|
79
|
-
export {
|
|
80
|
+
export { v as ConversationCardFooter };
|
|
80
81
|
|
|
81
82
|
//# sourceMappingURL=conversation-card-footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-card-footer.js","names":[],"sources":["../../../../../src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { formatTimeDelta } from \"#/utils/format-time-delta\";\nimport { cn } from \"#/utils/utils\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { RepositorySelection } from \"#/api/open-hands.types\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionPaused } from \"#/utils/status\";\nimport {\n getAcpProviderDisplayName,\n labelForAcpModel,\n resolveAcpProviderIcon,\n} from \"#/constants/acp-providers\";\nimport { formatNativeModelName } from \"#/utils/format-model-name\";\nimport {\n AgentBrandIcon,\n type AgentBrandIconKind,\n} from \"#/components/shared/agent-brand-icon\";\nimport { getDisplayConversationTags } from \"#/api/agent-server-adapter\";\nimport { ConversationRepoLink } from \"./conversation-repo-link\";\nimport { NoRepository } from \"./no-repository\";\nimport { ConversationTagChips } from \"./conversation-tag-chips\";\nimport { CONVERSATION_CARD_META_CHIP_CLASSNAME } from \"./conversation-card-meta-chip\";\n\ninterface ConversationCardFooterProps {\n selectedRepository: RepositorySelection | null;\n lastUpdatedAt: string;\n createdAt?: string;\n executionStatus?: ExecutionStatus | null;\n workspaceWorkingDir?: string | null;\n showRepositoryMetadata?: boolean;\n showTimestamp?: boolean;\n llmModel?: string | null;\n /**\n * Whether to render the agent/model chip. Wired to the conversation\n * panel's \"LLM model\" toggle; gates the chip uniformly\n * for both ACP and OpenHands cards.\n */\n showAgentChip?: boolean;\n /**\n * High-level kind of the conversation's agent. Drives the chip's icon:\n * the OpenHands logo for native conversations and the resolved ACP brand\n * mark for ACP conversations. Defensive against stray ``acpServer``\n * values reaching an OpenHands card.\n */\n agentKind?: \"openhands\" | \"acp\" | null;\n /**\n * Registry key of the ACP CLI server (``\"claude-code\"`` / ``\"codex\"`` /\n * ``\"gemini-cli\"`` / unknown / null). Resolved to a human display name\n * via {@link getAcpProviderDisplayName}; unknown / null falls back to\n * a generic \"ACP\" label so a Custom-command preset still produces a\n * useful chip.\n */\n acpServer?: string | null;\n /**\n * Server-side conversation tags (``AppConversation.tags``). Non-reserved\n * entries render as value-only chips so API-/automation-born\n * conversations can surface attribution (e.g. ``origin: slack`` → ``slack``).\n */\n tags?: Record<string, string> | null;\n /**\n * Whether to render the tag-chip row. Wired to the conversation panel's\n * \"Tags\" toggle.\n */\n showTags?: boolean;\n /**\n * Marks the conversation as archived. Archived rows are hidden from the list\n * unless the panel's \"Show archived\" toggle is on, so the chip is what tells\n * the user why an otherwise ordinary row is visible.\n */\n isArchived?: boolean;\n}\n\nexport function ConversationCardFooter({\n selectedRepository,\n lastUpdatedAt,\n createdAt,\n executionStatus,\n workspaceWorkingDir,\n showRepositoryMetadata = true,\n showTimestamp = true,\n llmModel,\n showAgentChip = false,\n agentKind = null,\n acpServer = null,\n tags = null,\n showTags = false,\n isArchived = false,\n}: ConversationCardFooterProps) {\n const { t } = useTranslation(\"openhands\");\n\n const isPaused = isExecutionPaused(executionStatus);\n\n // Single inline chip per conversation: [brand mark] {model text}. Gated by\n // the conversation panel's \"LLM model\" toggle and applied\n // uniformly to both kinds — OpenHands shows the logo + ``agent.llm.model``;\n // ACP shows the provider brand mark + model resolved through PR 730's\n // adapter chain, falling back to the provider display name when no model is\n // available so the chip never collapses to icon-only.\n let chip: {\n kind: AgentBrandIconKind;\n text: string;\n tooltip: string;\n } | null = null;\n if (showAgentChip) {\n if (agentKind === \"acp\") {\n const providerName =\n getAcpProviderDisplayName(acpServer) ??\n t(I18nKey.CONVERSATION$ACP_AGENT_GENERIC);\n // Prefer the provider's picker label (e.g. \"Claude Opus 4.7\") over the\n // raw ``acp_model`` ID; falls back to the raw ID for custom overrides\n // and to the provider name when there's no model at all.\n const modelLabel = labelForAcpModel(acpServer, llmModel);\n const text = modelLabel ?? providerName;\n chip = {\n kind: resolveAcpProviderIcon(acpServer),\n text,\n tooltip: modelLabel ? `${providerName} · ${modelLabel}` : providerName,\n };\n } else if (llmModel) {\n // Strip the routing prefix (e.g. \"anthropic/claude-…\" → \"claude-…\") for\n // the chip text; keep the full routing string in the tooltip.\n chip = {\n kind: \"openhands\",\n text: formatNativeModelName(llmModel) ?? llmModel,\n tooltip: llmModel,\n };\n }\n }\n\n // Match title text start: 18px status column + gap-2 (8px).\n const metadataIndentClass =\n executionStatus !== undefined ? \"pl-[26px]\" : undefined;\n\n const displayTags = showTags ? getDisplayConversationTags(tags) : [];\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-0.5 mt-0.5 w-full min-w-0\",\n isPaused && \"opacity-60\",\n )}\n >\n <div\n className={cn(\n \"flex flex-row items-center gap-2 w-full min-w-0\",\n showRepositoryMetadata && metadataIndentClass,\n )}\n >\n {showRepositoryMetadata &&\n (selectedRepository?.selected_repository ? (\n <ConversationRepoLink selectedRepository={selectedRepository} />\n ) : (\n <NoRepository workspaceWorkingDir={workspaceWorkingDir} />\n ))}\n <div className=\"flex items-center gap-2 shrink-0 ml-auto\">\n {showTimestamp && (createdAt ?? lastUpdatedAt) && (\n <p className=\"text-xs text-[var(--oh-muted)] text-right\">\n <time>\n {`${formatTimeDelta(lastUpdatedAt ?? createdAt)} ${t(I18nKey.CONVERSATION$AGO)}`}\n </time>\n </p>\n )}\n </div>\n </div>\n {chip ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-agent-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n title={chip.tooltip}\n >\n {/* Same line-height slot as tag chips; width flexes for the wider OpenHands mark. */}\n <span\n className=\"inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block\"\n aria-hidden\n >\n <AgentBrandIcon kind={chip.kind} size={12} />\n </span>\n <span className=\"truncate leading-4\">{chip.text}</span>\n </span>\n </div>\n ) : null}\n {isArchived ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-archived-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n >\n {t(I18nKey.COMMON$ARCHIVED)}\n </span>\n </div>\n ) : null}\n {displayTags.length > 0 ? (\n <div className={metadataIndentClass}>\n <ConversationTagChips tags={displayTags} />\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation-card-footer.js","names":[],"sources":["../../../../../src/components/features/conversation-panel/conversation-card/conversation-card-footer.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { formatTimeDelta } from \"#/utils/format-time-delta\";\nimport { cn } from \"#/utils/utils\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { RepositorySelection } from \"#/api/open-hands.types\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\nimport { isExecutionPaused } from \"#/utils/status\";\nimport {\n getAcpProviderDisplayName,\n labelForAcpModel,\n resolveAcpProviderIcon,\n} from \"#/constants/acp-providers\";\nimport { useFreeModels } from \"#/hooks/query/use-free-models\";\nimport { formatNativeModelName } from \"#/utils/format-model-name\";\nimport {\n AgentBrandIcon,\n type AgentBrandIconKind,\n} from \"#/components/shared/agent-brand-icon\";\nimport { getDisplayConversationTags } from \"#/api/agent-server-adapter\";\nimport { ConversationRepoLink } from \"./conversation-repo-link\";\nimport { NoRepository } from \"./no-repository\";\nimport { ConversationTagChips } from \"./conversation-tag-chips\";\nimport { CONVERSATION_CARD_META_CHIP_CLASSNAME } from \"./conversation-card-meta-chip\";\n\ninterface ConversationCardFooterProps {\n selectedRepository: RepositorySelection | null;\n lastUpdatedAt: string;\n createdAt?: string;\n executionStatus?: ExecutionStatus | null;\n workspaceWorkingDir?: string | null;\n showRepositoryMetadata?: boolean;\n showTimestamp?: boolean;\n llmModel?: string | null;\n /**\n * Whether to render the agent/model chip. Wired to the conversation\n * panel's \"LLM model\" toggle; gates the chip uniformly\n * for both ACP and OpenHands cards.\n */\n showAgentChip?: boolean;\n /**\n * High-level kind of the conversation's agent. Drives the chip's icon:\n * the OpenHands logo for native conversations and the resolved ACP brand\n * mark for ACP conversations. Defensive against stray ``acpServer``\n * values reaching an OpenHands card.\n */\n agentKind?: \"openhands\" | \"acp\" | null;\n /**\n * Registry key of the ACP CLI server (``\"claude-code\"`` / ``\"codex\"`` /\n * ``\"gemini-cli\"`` / unknown / null). Resolved to a human display name\n * via {@link getAcpProviderDisplayName}; unknown / null falls back to\n * a generic \"ACP\" label so a Custom-command preset still produces a\n * useful chip.\n */\n acpServer?: string | null;\n /**\n * Server-side conversation tags (``AppConversation.tags``). Non-reserved\n * entries render as value-only chips so API-/automation-born\n * conversations can surface attribution (e.g. ``origin: slack`` → ``slack``).\n */\n tags?: Record<string, string> | null;\n /**\n * Whether to render the tag-chip row. Wired to the conversation panel's\n * \"Tags\" toggle.\n */\n showTags?: boolean;\n /**\n * Marks the conversation as archived. Archived rows are hidden from the list\n * unless the panel's \"Show archived\" toggle is on, so the chip is what tells\n * the user why an otherwise ordinary row is visible.\n */\n isArchived?: boolean;\n}\n\nexport function ConversationCardFooter({\n selectedRepository,\n lastUpdatedAt,\n createdAt,\n executionStatus,\n workspaceWorkingDir,\n showRepositoryMetadata = true,\n showTimestamp = true,\n llmModel,\n showAgentChip = false,\n agentKind = null,\n acpServer = null,\n tags = null,\n showTags = false,\n isArchived = false,\n}: ConversationCardFooterProps) {\n const { t } = useTranslation(\"openhands\");\n const freeModels = useFreeModels();\n\n const isPaused = isExecutionPaused(executionStatus);\n\n // Single inline chip per conversation: [brand mark] {model text}. Gated by\n // the conversation panel's \"LLM model\" toggle and applied\n // uniformly to both kinds — OpenHands shows the logo + ``agent.llm.model``;\n // ACP shows the provider brand mark + model resolved through PR 730's\n // adapter chain, falling back to the provider display name when no model is\n // available so the chip never collapses to icon-only.\n let chip: {\n kind: AgentBrandIconKind;\n text: string;\n tooltip: string;\n } | null = null;\n if (showAgentChip) {\n if (agentKind === \"acp\") {\n const providerName =\n getAcpProviderDisplayName(acpServer) ??\n t(I18nKey.CONVERSATION$ACP_AGENT_GENERIC);\n // Prefer the provider's picker label (e.g. \"Claude Opus 4.7\") over the\n // raw ``acp_model`` ID; falls back to the raw ID for custom overrides\n // and to the provider name when there's no model at all.\n const modelLabel = labelForAcpModel(acpServer, llmModel);\n const text = modelLabel ?? providerName;\n chip = {\n kind: resolveAcpProviderIcon(acpServer),\n text,\n tooltip: modelLabel ? `${providerName} · ${modelLabel}` : providerName,\n };\n } else if (llmModel) {\n // Strip the routing prefix (e.g. \"anthropic/claude-…\" → \"claude-…\") for\n // the chip text; keep the full routing string in the tooltip.\n chip = {\n kind: \"openhands\",\n text: formatNativeModelName(llmModel, freeModels) ?? llmModel,\n tooltip: llmModel,\n };\n }\n }\n\n // Match title text start: 18px status column + gap-2 (8px).\n const metadataIndentClass =\n executionStatus !== undefined ? \"pl-[26px]\" : undefined;\n\n const displayTags = showTags ? getDisplayConversationTags(tags) : [];\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-0.5 mt-0.5 w-full min-w-0\",\n isPaused && \"opacity-60\",\n )}\n >\n <div\n className={cn(\n \"flex flex-row items-center gap-2 w-full min-w-0\",\n showRepositoryMetadata && metadataIndentClass,\n )}\n >\n {showRepositoryMetadata &&\n (selectedRepository?.selected_repository ? (\n <ConversationRepoLink selectedRepository={selectedRepository} />\n ) : (\n <NoRepository workspaceWorkingDir={workspaceWorkingDir} />\n ))}\n <div className=\"flex items-center gap-2 shrink-0 ml-auto\">\n {showTimestamp && (createdAt ?? lastUpdatedAt) && (\n <p className=\"text-xs text-[var(--oh-muted)] text-right\">\n <time>\n {`${formatTimeDelta(lastUpdatedAt ?? createdAt)} ${t(I18nKey.CONVERSATION$AGO)}`}\n </time>\n </p>\n )}\n </div>\n </div>\n {chip ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-agent-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n title={chip.tooltip}\n >\n {/* Same line-height slot as tag chips; width flexes for the wider OpenHands mark. */}\n <span\n className=\"inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block\"\n aria-hidden\n >\n <AgentBrandIcon kind={chip.kind} size={12} />\n </span>\n <span className=\"truncate leading-4\">{chip.text}</span>\n </span>\n </div>\n ) : null}\n {isArchived ? (\n <div className={metadataIndentClass}>\n <span\n data-testid=\"conversation-card-archived-chip\"\n className={CONVERSATION_CARD_META_CHIP_CLASSNAME}\n >\n {t(I18nKey.COMMON$ARCHIVED)}\n </span>\n </div>\n ) : null}\n {displayTags.length > 0 ? (\n <div className={metadataIndentClass}>\n <ConversationTagChips tags={displayTags} />\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAyEA,SAAgB,EAAuB,EACrC,uBACA,kBACA,cACA,oBACA,wBACA,4BAAyB,IACzB,mBAAgB,IAChB,aACA,mBAAgB,IAChB,eAAY,MACZ,eAAY,MACZ,UAAO,MACP,cAAW,IACX,gBAAa,MACiB;CAC9B,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,IAAa,EAAc,GAE3B,IAAW,EAAkB,CAAe,GAQ9C,IAIO;CACX,IAAI,OACE,MAAc,OAAO;EACvB,IAAM,IACJ,EAA0B,CAAS,KACnC,EAAE,EAAQ,8BAA8B,GAIpC,IAAa,EAAiB,GAAW,CAAQ,GACjD,IAAO,KAAc;EAC3B,IAAO;GACL,MAAM,EAAuB,CAAS;GACtC;GACA,SAAS,IAAa,GAAG,EAAa,KAAK,MAAe;EAC5D;CACF,OAAO,AAAI,MAGT,IAAO;EACL,MAAM;EACN,MAAM,EAAsB,GAAU,CAAU,KAAK;EACrD,SAAS;CACX;CAKJ,IAAM,IACJ,MAAoB,KAAA,IAA0B,KAAA,IAAd,aAE5B,IAAc,IAAW,EAA2B,CAAI,IAAI,CAAC;CAEnE,OACE,kBAAC,OAAD;EACE,WAAW,EACT,+CACA,KAAY,YACd;YAJF;GAME,kBAAC,OAAD;IACE,WAAW,EACT,mDACA,KAA0B,CAC5B;cAJF,CAMG,MACE,GAAoB,sBACnB,kBAAC,GAAD,EAA0C,sBAAqB,CAAA,IAE/D,kBAAC,GAAD,EAAmC,uBAAsB,CAAA,IAE7D,kBAAC,OAAD;KAAK,WAAU;eACZ,MAAkB,KAAa,MAC9B,kBAAC,KAAD;MAAG,WAAU;gBACX,kBAAC,QAAD,EAAA,UACG,GAAG,EAAgB,KAAiB,CAAS,EAAE,GAAG,EAAE,EAAQ,gBAAgB,IACzE,CAAA;KACL,CAAA;IAEF,CAAA,CACF;;GACJ,IACC,kBAAC,OAAD;IAAK,WAAW;cACd,kBAAC,QAAD;KACE,eAAY;KACZ,WAAW;KACX,OAAO,EAAK;eAHd,CAME,kBAAC,QAAD;MACE,WAAU;MACV,eAAA;gBAEA,kBAAC,GAAD;OAAgB,MAAM,EAAK;OAAM,MAAM;MAAK,CAAA;KACxC,CAAA,GACN,kBAAC,QAAD;MAAM,WAAU;gBAAsB,EAAK;KAAW,CAAA,CAClD;;GACH,CAAA,IACH;GACH,IACC,kBAAC,OAAD;IAAK,WAAW;cACd,kBAAC,QAAD;KACE,eAAY;KACZ,WAAW;eAEV,EAAE,EAAQ,eAAe;IACtB,CAAA;GACH,CAAA,IACH;GACH,EAAY,SAAS,IACpB,kBAAC,OAAD;IAAK,WAAW;cACd,kBAAC,GAAD,EAAsB,MAAM,EAAc,CAAA;GACvC,CAAA,IACH;EACD;;AAET"}
|
package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ interface BuildHomeAutomationMenuItemsOptions {
|
|
|
17
17
|
automation: Automation;
|
|
18
18
|
t: (key: I18nKey) => string;
|
|
19
19
|
canManage: boolean;
|
|
20
|
-
canEdit: boolean;
|
|
21
20
|
isRunPending: boolean;
|
|
22
21
|
isCancelPending: boolean;
|
|
23
22
|
canCancel: boolean;
|
|
@@ -35,5 +34,5 @@ interface BuildHomeAutomationMenuItemsOptions {
|
|
|
35
34
|
* Home featured-automation kebab (pinned cards + activity rows):
|
|
36
35
|
* quick actions first, separator, then pin/unpin.
|
|
37
36
|
*/
|
|
38
|
-
export declare function buildHomeAutomationMenuItems({ automation, t, canManage,
|
|
37
|
+
export declare function buildHomeAutomationMenuItems({ automation, t, canManage, isRunPending, isCancelPending, canCancel, testIdPrefix, pinTestId, isPinned, onRunNow, onCancelRun, onView, onEdit, onTurnOff, onTogglePin, }: BuildHomeAutomationMenuItemsOptions): HomeAutomationMenuEntry[];
|
|
39
38
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../../i18n/declaration.cjs"),n=require("../../../../node_modules/lucide-react/dist/esm/icons/zap.cjs"),r=require("../../../../utils/automation-run-display.cjs"),i=require("../../../../utils/format-relative-time.cjs"),a=require("../../../../icons/clock.cjs"),o=require("./automation-run-health.cjs"),s=require("../../automations/detail/run-phase.cjs"),c=require("./automation-health-indicator.cjs");let
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../../i18n/declaration.cjs"),n=require("../../../../node_modules/lucide-react/dist/esm/icons/zap.cjs"),r=require("../../../../utils/automation-run-display.cjs"),i=require("../../../../utils/format-relative-time.cjs"),a=require("../../../../icons/clock.cjs"),o=require("./automation-run-health.cjs"),s=require("../../automations/detail/run-phase.cjs"),c=require("./automation-health-indicator.cjs"),l=require("../../../../utils/automation-disabled-reason.cjs");let u=require("react/jsx-runtime");function d(e){return e.isError?t.I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE:e.latestRun?r.getAutomationRunBadgeLabelKey(r.getAutomationRunDisplay(e.latestRun).badgeStatus):o.getRunHealthLabelKey(o.deriveRunHealth(e))}function f({label:e,children:t}){return(0,u.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,u.jsx)(`span`,{className:`w-20 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,u.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-[var(--oh-foreground)]`,children:t})]})}function p({run:n}){let{t:r}=e.useTranslation(`openhands`),i=s.useRunPhase({status:n?.status,code:n?.phase_code,label:n?.phase_label,updatedAt:n?.phase_updated_at});if(!n||!s.shouldShowRunPhase(n.status)||!i)return null;let{text:a,age:o}=i;return(0,u.jsx)(f,{label:r(t.I18nKey.AUTOMATIONS$DETAIL$PHASE),children:(0,u.jsxs)(`span`,{"data-testid":`run-phase-row`,children:[a,o?(0,u.jsxs)(`span`,{className:`text-muted`,children:[` · `,o]}):null]})})}function m({automation:s,runState:m}){let{t:h,i18n:g}=e.useTranslation(`openhands`),{latestRun:_}=m,v=_?o.getLastRunTimestamp(_):null,y=s.trigger.type===`event`?n.Zap:a.default,b=o.deriveRunHealth(m),x=_?r.getAutomationRunDisplay(_):null,S=l.hasDisablementReason(s)?l.getDisablementReasonDisplay(s,h):null;return(0,u.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-3 p-3`,children:[(0,u.jsx)(`span`,{className:`break-words text-sm font-medium text-white`,children:s.name}),(0,u.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$TRIGGER),children:(0,u.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,u.jsx)(y,{className:`mt-0.5 size-3 shrink-0`,"aria-hidden":`true`}),(0,u.jsx)(`span`,{className:`break-all`,children:o.getTriggerSummary(s)})]})}),(0,u.jsx)(f,{label:h(t.I18nKey.COMMON$STATUS),children:(0,u.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,u.jsx)(c.AutomationHealthIndicator,{health:b}),(0,u.jsx)(`span`,{children:h(d(m))})]})}),S?(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING),children:(0,u.jsx)(`span`,{"data-testid":`automation-tooltip-disabled-reason`,className:`line-clamp-3 text-[var(--oh-text-secondary)]`,children:S.text})}):null,(0,u.jsx)(p,{run:_}),v?(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$LAST_RUN),children:i.formatRelativeTime(v,g.language,h)}):null,x?.summary?(0,u.jsx)(f,{label:h(t.I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL),children:(0,u.jsx)(`span`,{className:`line-clamp-3 text-[var(--oh-text-secondary)]`,children:x.summary})}):null]})]})}exports.HomeAutomationRunTooltip=m,exports.getRunStatusLabelKey=d;
|
|
2
2
|
//# sourceMappingURL=home-automation-run-tooltip.cjs.map
|
package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-automation-run-tooltip.cjs","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"home-automation-run-tooltip.cjs","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\nimport {\n getDisablementReasonDisplay,\n hasDisablementReason,\n} from \"#/utils/automation-disabled-reason\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n const disabledReason = hasDisablementReason(automation)\n ? getDisablementReasonDisplay(automation, t)\n : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n {disabledReason ? (\n <PreviewRow\n label={t(I18nKey.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING)}\n >\n <span\n data-testid=\"automation-tooltip-disabled-reason\"\n className=\"line-clamp-3 text-[var(--oh-text-secondary)]\"\n >\n {disabledReason.text}\n </span>\n </PreviewRow>\n ) : null}\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":"2oBA4BA,SAAgB,EACd,EACS,CAOT,OANI,EAAS,QAAgB,EAAA,QAAQ,wCACjC,EAAS,UACJ,EAAA,8BACL,EAAA,wBAAwB,EAAS,SAAS,EAAE,WAC9C,EAEK,EAAA,qBAAqB,EAAA,gBAAgB,CAAQ,CAAC,CACvD,CAEA,SAAS,EAAW,CAClB,QACA,YAIC,CACD,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,0CAAf,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,gDAAwC,CAAY,CAAA,GACpE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,yDACb,UACG,CAAA,CACH,GAET,CAUA,SAAS,EAAS,CAAE,OAAsC,CACxD,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAQ,EAAA,YAAY,CACxB,OAAQ,GAAK,OACb,KAAM,GAAK,WACX,MAAO,GAAK,YACZ,UAAW,GAAK,gBAClB,CAAC,EAED,GAAI,CAAC,GAAO,CAAC,EAAA,mBAAmB,EAAI,MAAM,GAAK,CAAC,EAAO,OAAO,KAE9D,GAAM,CAAE,OAAM,OAAQ,EAEtB,OACE,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,wBAAwB,YACnD,EAAA,EAAA,MAAC,OAAD,CAAM,cAAY,yBAAlB,CACG,EACA,GAAM,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,sBAAhB,CAA6B,MAAI,CAAU,IAAI,IAClD,GACI,CAAA,CAEhB,CAMA,SAAgB,EAAyB,CACvC,aACA,YAIC,CACD,GAAM,CAAE,IAAG,QAAS,EAAA,eAAe,WAAW,EACxC,CAAE,aAAc,EAChB,EAAY,EAAY,EAAA,oBAAoB,CAAS,EAAI,KACzD,EAAc,EAAW,QAAQ,OAAS,QAAU,EAAA,IAAM,EAAA,QAC1D,EAAS,EAAA,gBAAgB,CAAQ,EACjC,EAAU,EAAY,EAAA,wBAAwB,CAAS,EAAI,KAC3D,EAAiB,EAAA,qBAAqB,CAAU,EAClD,EAAA,4BAA4B,EAAY,CAAC,EACzC,KAEJ,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,6CAAf,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sDACb,EAAW,IACR,CAAA,GAEN,EAAA,EAAA,MAAC,KAAD,CAAI,UAAU,iCAAd,EACE,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,0BAA0B,YACrD,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,mDAAhB,EACE,EAAA,EAAA,KAAC,EAAD,CACE,UAAU,yBACV,cAAY,MACb,CAAA,GACD,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,qBAAa,EAAA,kBAAkB,CAAU,CAAQ,CAAA,CAC7D,GACI,CAAA,GAEZ,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,aAAa,YACxC,EAAA,EAAA,MAAC,OAAD,CAAM,UAAU,oDAAhB,EACE,EAAA,EAAA,KAAC,EAAA,0BAAD,CAAmC,QAAS,CAAA,GAC5C,EAAA,EAAA,KAAC,OAAD,CAAA,SAAO,EAAE,EAAqB,CAAQ,CAAC,CAAQ,CAAA,CAC3C,GACI,CAAA,EAEX,GACC,EAAA,EAAA,KAAC,EAAD,CACE,MAAO,EAAE,EAAA,QAAQ,0CAA0C,YAE3D,EAAA,EAAA,KAAC,OAAD,CACE,cAAY,qCACZ,UAAU,wDAET,EAAe,IACZ,CAAA,CACI,CAAA,EACV,MAEJ,EAAA,EAAA,KAAC,EAAD,CAAU,IAAK,CAAY,CAAA,EAE1B,GACC,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,2BAA2B,WACrD,EAAA,mBAAmB,EAAW,EAAK,SAAU,CAAC,CACrC,CAAA,EACV,KAEH,GAAS,SACR,EAAA,EAAA,KAAC,EAAD,CAAY,MAAO,EAAE,EAAA,QAAQ,6BAA6B,YACxD,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,wDACb,EAAQ,OACL,CAAA,CACI,CAAA,EACV,IACF,GACD,GAET"}
|
|
@@ -7,24 +7,25 @@ import o from "../../../../icons/clock.js";
|
|
|
7
7
|
import { deriveRunHealth as s, getLastRunTimestamp as c, getRunHealthLabelKey as l, getTriggerSummary as u } from "./automation-run-health.js";
|
|
8
8
|
import { shouldShowRunPhase as d, useRunPhase as f } from "../../automations/detail/run-phase.js";
|
|
9
9
|
import { AutomationHealthIndicator as p } from "./automation-health-indicator.js";
|
|
10
|
-
import {
|
|
10
|
+
import { getDisablementReasonDisplay as m, hasDisablementReason as h } from "../../../../utils/automation-disabled-reason.js";
|
|
11
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
12
|
//#region src/components/features/home/featured-automations/home-automation-run-tooltip.tsx
|
|
12
|
-
function
|
|
13
|
+
function v(e) {
|
|
13
14
|
return e.isError ? t.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE : e.latestRun ? r(i(e.latestRun).badgeStatus) : l(s(e));
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
function y({ label: e, children: t }) {
|
|
17
|
+
return /* @__PURE__ */ _("div", {
|
|
17
18
|
className: "flex items-start gap-2 text-xs",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ g("span", {
|
|
19
20
|
className: "w-20 shrink-0 text-[var(--oh-muted)]",
|
|
20
21
|
children: e
|
|
21
|
-
}), /* @__PURE__ */
|
|
22
|
+
}), /* @__PURE__ */ g("span", {
|
|
22
23
|
className: "min-w-0 flex-1 break-words text-[var(--oh-foreground)]",
|
|
23
24
|
children: t
|
|
24
25
|
})]
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function b({ run: n }) {
|
|
28
29
|
let { t: r } = e("openhands"), i = f({
|
|
29
30
|
status: n?.status,
|
|
30
31
|
code: n?.phase_code,
|
|
@@ -33,57 +34,65 @@ function v({ run: n }) {
|
|
|
33
34
|
});
|
|
34
35
|
if (!n || !d(n.status) || !i) return null;
|
|
35
36
|
let { text: a, age: o } = i;
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ g(y, {
|
|
37
38
|
label: r(t.AUTOMATIONS$DETAIL$PHASE),
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ _("span", {
|
|
39
40
|
"data-testid": "run-phase-row",
|
|
40
|
-
children: [a, o ? /* @__PURE__ */
|
|
41
|
+
children: [a, o ? /* @__PURE__ */ _("span", {
|
|
41
42
|
className: "text-muted",
|
|
42
43
|
children: [" · ", o]
|
|
43
44
|
}) : null]
|
|
44
45
|
})
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
let { t: d, i18n: f } = e("openhands"), { latestRun:
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
function x({ automation: r, runState: l }) {
|
|
49
|
+
let { t: d, i18n: f } = e("openhands"), { latestRun: x } = l, S = x ? c(x) : null, C = r.trigger.type === "event" ? n : o, w = s(l), T = x ? i(x) : null, E = h(r) ? m(r, d) : null;
|
|
50
|
+
return /* @__PURE__ */ _("div", {
|
|
50
51
|
className: "flex w-[280px] flex-col gap-3 p-3",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ g("span", {
|
|
52
53
|
className: "break-words text-sm font-medium text-white",
|
|
53
54
|
children: r.name
|
|
54
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ _("dl", {
|
|
55
56
|
className: "flex flex-col gap-1.5",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ g(y, {
|
|
58
59
|
label: d(t.AUTOMATIONS$DETAIL$TRIGGER),
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ _("span", {
|
|
60
61
|
className: "inline-flex min-w-0 items-start gap-1.5",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ g(C, {
|
|
62
63
|
className: "mt-0.5 size-3 shrink-0",
|
|
63
64
|
"aria-hidden": "true"
|
|
64
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ g("span", {
|
|
65
66
|
className: "break-all",
|
|
66
67
|
children: u(r)
|
|
67
68
|
})]
|
|
68
69
|
})
|
|
69
70
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ g(y, {
|
|
71
72
|
label: d(t.COMMON$STATUS),
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ _("span", {
|
|
73
74
|
className: "inline-flex min-w-0 items-center gap-1.5",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ g(p, { health: w }), /* @__PURE__ */ g("span", { children: d(v(l)) })]
|
|
75
76
|
})
|
|
76
77
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
78
|
+
E ? /* @__PURE__ */ g(y, {
|
|
79
|
+
label: d(t.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING),
|
|
80
|
+
children: /* @__PURE__ */ g("span", {
|
|
81
|
+
"data-testid": "automation-tooltip-disabled-reason",
|
|
82
|
+
className: "line-clamp-3 text-[var(--oh-text-secondary)]",
|
|
83
|
+
children: E.text
|
|
84
|
+
})
|
|
85
|
+
}) : null,
|
|
86
|
+
/* @__PURE__ */ g(b, { run: x }),
|
|
87
|
+
S ? /* @__PURE__ */ g(y, {
|
|
79
88
|
label: d(t.AUTOMATIONS$DETAIL$LAST_RUN),
|
|
80
|
-
children: a(
|
|
89
|
+
children: a(S, f.language, d)
|
|
81
90
|
}) : null,
|
|
82
|
-
|
|
91
|
+
T?.summary ? /* @__PURE__ */ g(y, {
|
|
83
92
|
label: d(t.AUTOMATIONS$DETAIL$TASK_LABEL),
|
|
84
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ g("span", {
|
|
85
94
|
className: "line-clamp-3 text-[var(--oh-text-secondary)]",
|
|
86
|
-
children:
|
|
95
|
+
children: T.summary
|
|
87
96
|
})
|
|
88
97
|
}) : null
|
|
89
98
|
]
|
|
@@ -91,6 +100,6 @@ function y({ automation: r, runState: l }) {
|
|
|
91
100
|
});
|
|
92
101
|
}
|
|
93
102
|
//#endregion
|
|
94
|
-
export {
|
|
103
|
+
export { x as HomeAutomationRunTooltip, v as getRunStatusLabelKey };
|
|
95
104
|
|
|
96
105
|
//# sourceMappingURL=home-automation-run-tooltip.js.map
|
package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-automation-run-tooltip.js","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"home-automation-run-tooltip.js","names":[],"sources":["../../../../../src/components/features/home/featured-automations/home-automation-run-tooltip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Zap } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { LatestAutomationRunState } from \"#/hooks/query/use-latest-automation-runs\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport ClockIcon from \"#/icons/clock.svg?react\";\nimport {\n shouldShowRunPhase,\n useRunPhase,\n} from \"#/components/features/automations/detail/run-phase\";\nimport type { Automation, AutomationRun } from \"#/types/automation\";\nimport {\n getAutomationRunBadgeLabelKey,\n getAutomationRunDisplay,\n} from \"#/utils/automation-run-display\";\nimport { formatRelativeTime } from \"#/utils/format-relative-time\";\nimport { AutomationHealthIndicator } from \"./automation-health-indicator\";\nimport {\n deriveRunHealth,\n getLastRunTimestamp,\n getRunHealthLabelKey,\n getTriggerSummary,\n} from \"./automation-run-health\";\nimport {\n getDisablementReasonDisplay,\n hasDisablementReason,\n} from \"#/utils/automation-disabled-reason\";\n\nexport function getRunStatusLabelKey(\n runState: LatestAutomationRunState,\n): I18nKey {\n if (runState.isError) return I18nKey.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE;\n if (runState.latestRun) {\n return getAutomationRunBadgeLabelKey(\n getAutomationRunDisplay(runState.latestRun).badgeStatus,\n );\n }\n return getRunHealthLabelKey(deriveRunHealth(runState));\n}\n\nfunction PreviewRow({\n label,\n children,\n}: {\n label: string;\n children: ReactNode;\n}) {\n return (\n <div className=\"flex items-start gap-2 text-xs\">\n <span className=\"w-20 shrink-0 text-[var(--oh-muted)]\">{label}</span>\n <span className=\"min-w-0 flex-1 break-words text-[var(--oh-foreground)]\">\n {children}\n </span>\n </div>\n );\n}\n\n/**\n * The run's phase and how long it has held it. The row that opens this\n * hovercard has to clip a long phase; here there is room to wrap, so this is\n * where the whole thing is readable — and the age is what says whether the\n * run is moving through phases or sitting in one. Only the layout differs\n * from the row's: what the phase says, and whether its age is meaningful,\n * comes from the same hook the row uses.\n */\nfunction PhaseRow({ run }: { run: AutomationRun | null }) {\n const { t } = useTranslation(\"openhands\");\n const phase = useRunPhase({\n status: run?.status,\n code: run?.phase_code,\n label: run?.phase_label,\n updatedAt: run?.phase_updated_at,\n });\n\n if (!run || !shouldShowRunPhase(run.status) || !phase) return null;\n\n const { text, age } = phase;\n\n return (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$PHASE)}>\n <span data-testid=\"run-phase-row\">\n {text}\n {age ? <span className=\"text-muted\"> · {age}</span> : null}\n </span>\n </PreviewRow>\n );\n}\n\n/**\n * Left-nav-style hovercard body for an automation's latest-run health.\n * Matches `ConversationCardPreview` layout: title + label/value rows.\n */\nexport function HomeAutomationRunTooltip({\n automation,\n runState,\n}: {\n automation: Automation;\n runState: LatestAutomationRunState;\n}) {\n const { t, i18n } = useTranslation(\"openhands\");\n const { latestRun } = runState;\n const timestamp = latestRun ? getLastRunTimestamp(latestRun) : null;\n const TriggerIcon = automation.trigger.type === \"event\" ? Zap : ClockIcon;\n const health = deriveRunHealth(runState);\n const display = latestRun ? getAutomationRunDisplay(latestRun) : null;\n const disabledReason = hasDisablementReason(automation)\n ? getDisablementReasonDisplay(automation, t)\n : null;\n\n return (\n <div className=\"flex w-[280px] flex-col gap-3 p-3\">\n <span className=\"break-words text-sm font-medium text-white\">\n {automation.name}\n </span>\n\n <dl className=\"flex flex-col gap-1.5\">\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}>\n <span className=\"inline-flex min-w-0 items-start gap-1.5\">\n <TriggerIcon\n className=\"mt-0.5 size-3 shrink-0\"\n aria-hidden=\"true\"\n />\n <span className=\"break-all\">{getTriggerSummary(automation)}</span>\n </span>\n </PreviewRow>\n\n <PreviewRow label={t(I18nKey.COMMON$STATUS)}>\n <span className=\"inline-flex min-w-0 items-center gap-1.5\">\n <AutomationHealthIndicator health={health} />\n <span>{t(getRunStatusLabelKey(runState))}</span>\n </span>\n </PreviewRow>\n\n {disabledReason ? (\n <PreviewRow\n label={t(I18nKey.AUTOMATIONS$DETAIL$DISABLED_REASON_HEADING)}\n >\n <span\n data-testid=\"automation-tooltip-disabled-reason\"\n className=\"line-clamp-3 text-[var(--oh-text-secondary)]\"\n >\n {disabledReason.text}\n </span>\n </PreviewRow>\n ) : null}\n\n <PhaseRow run={latestRun} />\n\n {timestamp ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$LAST_RUN)}>\n {formatRelativeTime(timestamp, i18n.language, t)}\n </PreviewRow>\n ) : null}\n\n {display?.summary ? (\n <PreviewRow label={t(I18nKey.AUTOMATIONS$DETAIL$TASK_LABEL)}>\n <span className=\"line-clamp-3 text-[var(--oh-text-secondary)]\">\n {display.summary}\n </span>\n </PreviewRow>\n ) : null}\n </dl>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAAgB,EACd,GACS;CAOT,OANI,EAAS,UAAgB,EAAQ,0CACjC,EAAS,YACJ,EACL,EAAwB,EAAS,SAAS,EAAE,WAC9C,IAEK,EAAqB,EAAgB,CAAQ,CAAC;AACvD;AAEA,SAAS,EAAW,EAClB,UACA,eAIC;CACD,OACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GAAM,WAAU;aAAwC;EAAY,CAAA,GACpE,kBAAC,QAAD;GAAM,WAAU;GACb;EACG,CAAA,CACH;;AAET;AAUA,SAAS,EAAS,EAAE,UAAsC;CACxD,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,IAAQ,EAAY;EACxB,QAAQ,GAAK;EACb,MAAM,GAAK;EACX,OAAO,GAAK;EACZ,WAAW,GAAK;CAClB,CAAC;CAED,IAAI,CAAC,KAAO,CAAC,EAAmB,EAAI,MAAM,KAAK,CAAC,GAAO,OAAO;CAE9D,IAAM,EAAE,SAAM,WAAQ;CAEtB,OACE,kBAAC,GAAD;EAAY,OAAO,EAAE,EAAQ,wBAAwB;YACnD,kBAAC,QAAD;GAAM,eAAY;aAAlB,CACG,GACA,IAAM,kBAAC,QAAD;IAAM,WAAU;cAAhB,CAA6B,OAAI,CAAU;QAAI,IAClD;;CACI,CAAA;AAEhB;AAMA,SAAgB,EAAyB,EACvC,eACA,eAIC;CACD,IAAM,EAAE,MAAG,YAAS,EAAe,WAAW,GACxC,EAAE,iBAAc,GAChB,IAAY,IAAY,EAAoB,CAAS,IAAI,MACzD,IAAc,EAAW,QAAQ,SAAS,UAAU,IAAM,GAC1D,IAAS,EAAgB,CAAQ,GACjC,IAAU,IAAY,EAAwB,CAAS,IAAI,MAC3D,IAAiB,EAAqB,CAAU,IAClD,EAA4B,GAAY,CAAC,IACzC;CAEJ,OACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GAAM,WAAU;aACb,EAAW;EACR,CAAA,GAEN,kBAAC,MAAD;GAAI,WAAU;aAAd;IACE,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,0BAA0B;eACrD,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,GAAD;OACE,WAAU;OACV,eAAY;MACb,CAAA,GACD,kBAAC,QAAD;OAAM,WAAU;iBAAa,EAAkB,CAAU;MAAQ,CAAA,CAC7D;;IACI,CAAA;IAEZ,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,aAAa;eACxC,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,GAAD,EAAmC,UAAS,CAAA,GAC5C,kBAAC,QAAD,EAAA,UAAO,EAAE,EAAqB,CAAQ,CAAC,EAAQ,CAAA,CAC3C;;IACI,CAAA;IAEX,IACC,kBAAC,GAAD;KACE,OAAO,EAAE,EAAQ,0CAA0C;eAE3D,kBAAC,QAAD;MACE,eAAY;MACZ,WAAU;gBAET,EAAe;KACZ,CAAA;IACI,CAAA,IACV;IAEJ,kBAAC,GAAD,EAAU,KAAK,EAAY,CAAA;IAE1B,IACC,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,2BAA2B;eACrD,EAAmB,GAAW,EAAK,UAAU,CAAC;IACrC,CAAA,IACV;IAEH,GAAS,UACR,kBAAC,GAAD;KAAY,OAAO,EAAE,EAAQ,6BAA6B;eACxD,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAQ;KACL,CAAA;IACI,CAAA,IACV;GACF;IACD;;AAET"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../shared/modals/modal-backdrop.cjs"),i=require("../../shared/modals/modal-close-button.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");function s({src:e,onClose:s}){let{t:c}=t.useTranslation(`openhands`);return a.default.useEffect(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),s())};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},[s]),(0,o.jsx)(r.ModalBackdrop,{onClose:s,closeOnEscape:!1,"aria-label":c(n.I18nKey.IMAGE$FULL_SIZE_PREVIEW),children:(0,o.jsxs)(`div`,{"data-testid":`image-lightbox`,className:`relative`,children:[(0,o.jsx)(i.ModalCloseButton,{onClose:s,testId:`image-lightbox-close`,className:`bg-black/60 text-white hover:bg-black/80`}),(0,o.jsx)(`img`,{src:e,alt:c(n.I18nKey.IMAGE$FULL_SIZE_PREVIEW),className:`max-h-[90vh] max-w-[90vw] rounded-lg object-contain`})]})})}exports.ImageLightbox=s;
|
|
2
|
+
//# sourceMappingURL=image-lightbox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-lightbox.cjs","names":[],"sources":["../../../../src/components/features/images/image-lightbox.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ModalBackdrop } from \"#/components/shared/modals/modal-backdrop\";\nimport { ModalCloseButton } from \"#/components/shared/modals/modal-close-button\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\ninterface ImageLightboxProps {\n src: string;\n onClose: () => void;\n}\n\n/**\n * Full-size overlay for an image attachment. The thumbnail is a CSS downscale\n * of the same source, so no refetch is needed.\n */\nexport function ImageLightbox({ src, onClose }: ImageLightboxProps) {\n const { t } = useTranslation(\"openhands\");\n\n // HeroUI consumes Escape on a document capture listener, so it never reaches\n // ModalBackdrop's window listener. Capture it here instead.\n React.useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n event.stopPropagation();\n onClose();\n };\n\n document.addEventListener(\"keydown\", handleEscape, true);\n return () => document.removeEventListener(\"keydown\", handleEscape, true);\n }, [onClose]);\n\n return (\n <ModalBackdrop\n onClose={onClose}\n closeOnEscape={false}\n aria-label={t(I18nKey.IMAGE$FULL_SIZE_PREVIEW)}\n >\n <div data-testid=\"image-lightbox\" className=\"relative\">\n <ModalCloseButton\n onClose={onClose}\n testId=\"image-lightbox-close\"\n className=\"bg-black/60 text-white hover:bg-black/80\"\n />\n <img\n src={src}\n alt={t(I18nKey.IMAGE$FULL_SIZE_PREVIEW)}\n className=\"max-h-[90vh] max-w-[90vw] rounded-lg object-contain\"\n />\n </div>\n </ModalBackdrop>\n );\n}\n"],"mappings":"yWAeA,SAAgB,EAAc,CAAE,MAAK,WAA+B,CAClE,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAexC,OAXA,EAAA,QAAM,cAAgB,CACpB,IAAM,EAAgB,GAAyB,CACzC,EAAM,MAAQ,WAClB,EAAM,gBAAgB,EACtB,EAAQ,EACV,EAGA,OADA,SAAS,iBAAiB,UAAW,EAAc,EAAI,MAC1C,SAAS,oBAAoB,UAAW,EAAc,EAAI,CACzE,EAAG,CAAC,CAAO,CAAC,GAGV,EAAA,EAAA,KAAC,EAAA,cAAD,CACW,UACT,cAAe,GACf,aAAY,EAAE,EAAA,QAAQ,uBAAuB,YAE7C,EAAA,EAAA,MAAC,MAAD,CAAK,cAAY,iBAAiB,UAAU,oBAA5C,EACE,EAAA,EAAA,KAAC,EAAA,iBAAD,CACW,UACT,OAAO,uBACP,UAAU,0CACX,CAAA,GACD,EAAA,EAAA,KAAC,MAAD,CACO,MACL,IAAK,EAAE,EAAA,QAAQ,uBAAuB,EACtC,UAAU,qDACX,CAAA,CACE,GACQ,CAAA,CAEnB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ImageLightboxProps {
|
|
3
|
+
src: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Full-size overlay for an image attachment. The thumbnail is a CSS downscale
|
|
8
|
+
* of the same source, so no refetch is needed.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ImageLightbox({ src, onClose }: ImageLightboxProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
|
+
import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
3
|
+
import { ModalBackdrop as n } from "../../shared/modals/modal-backdrop.js";
|
|
4
|
+
import { ModalCloseButton as r } from "../../shared/modals/modal-close-button.js";
|
|
5
|
+
import i from "react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/features/images/image-lightbox.tsx
|
|
8
|
+
function s({ src: s, onClose: c }) {
|
|
9
|
+
let { t: l } = e("openhands");
|
|
10
|
+
return i.useEffect(() => {
|
|
11
|
+
let e = (e) => {
|
|
12
|
+
e.key === "Escape" && (e.stopPropagation(), c());
|
|
13
|
+
};
|
|
14
|
+
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
15
|
+
}, [c]), /* @__PURE__ */ a(n, {
|
|
16
|
+
onClose: c,
|
|
17
|
+
closeOnEscape: !1,
|
|
18
|
+
"aria-label": l(t.IMAGE$FULL_SIZE_PREVIEW),
|
|
19
|
+
children: /* @__PURE__ */ o("div", {
|
|
20
|
+
"data-testid": "image-lightbox",
|
|
21
|
+
className: "relative",
|
|
22
|
+
children: [/* @__PURE__ */ a(r, {
|
|
23
|
+
onClose: c,
|
|
24
|
+
testId: "image-lightbox-close",
|
|
25
|
+
className: "bg-black/60 text-white hover:bg-black/80"
|
|
26
|
+
}), /* @__PURE__ */ a("img", {
|
|
27
|
+
src: s,
|
|
28
|
+
alt: l(t.IMAGE$FULL_SIZE_PREVIEW),
|
|
29
|
+
className: "max-h-[90vh] max-w-[90vw] rounded-lg object-contain"
|
|
30
|
+
})]
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { s as ImageLightbox };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=image-lightbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-lightbox.js","names":[],"sources":["../../../../src/components/features/images/image-lightbox.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ModalBackdrop } from \"#/components/shared/modals/modal-backdrop\";\nimport { ModalCloseButton } from \"#/components/shared/modals/modal-close-button\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\ninterface ImageLightboxProps {\n src: string;\n onClose: () => void;\n}\n\n/**\n * Full-size overlay for an image attachment. The thumbnail is a CSS downscale\n * of the same source, so no refetch is needed.\n */\nexport function ImageLightbox({ src, onClose }: ImageLightboxProps) {\n const { t } = useTranslation(\"openhands\");\n\n // HeroUI consumes Escape on a document capture listener, so it never reaches\n // ModalBackdrop's window listener. Capture it here instead.\n React.useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n event.stopPropagation();\n onClose();\n };\n\n document.addEventListener(\"keydown\", handleEscape, true);\n return () => document.removeEventListener(\"keydown\", handleEscape, true);\n }, [onClose]);\n\n return (\n <ModalBackdrop\n onClose={onClose}\n closeOnEscape={false}\n aria-label={t(I18nKey.IMAGE$FULL_SIZE_PREVIEW)}\n >\n <div data-testid=\"image-lightbox\" className=\"relative\">\n <ModalCloseButton\n onClose={onClose}\n testId=\"image-lightbox-close\"\n className=\"bg-black/60 text-white hover:bg-black/80\"\n />\n <img\n src={src}\n alt={t(I18nKey.IMAGE$FULL_SIZE_PREVIEW)}\n className=\"max-h-[90vh] max-w-[90vw] rounded-lg object-contain\"\n />\n </div>\n </ModalBackdrop>\n );\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,EAAc,EAAE,QAAK,cAA+B;CAClE,IAAM,EAAE,SAAM,EAAe,WAAW;CAexC,OAXA,EAAM,gBAAgB;EACpB,IAAM,KAAgB,MAAyB;GACzC,EAAM,QAAQ,aAClB,EAAM,gBAAgB,GACtB,EAAQ;EACV;EAGA,OADA,SAAS,iBAAiB,WAAW,GAAc,EAAI,SAC1C,SAAS,oBAAoB,WAAW,GAAc,EAAI;CACzE,GAAG,CAAC,CAAO,CAAC,GAGV,kBAAC,GAAD;EACW;EACT,eAAe;EACf,cAAY,EAAE,EAAQ,uBAAuB;YAE7C,kBAAC,OAAD;GAAK,eAAY;GAAiB,WAAU;aAA5C,CACE,kBAAC,GAAD;IACW;IACT,QAAO;IACP,WAAU;GACX,CAAA,GACD,kBAAC,OAAD;IACO;IACL,KAAK,EAAE,EAAQ,uBAAuB;IACtC,WAAU;GACX,CAAA,CACE;;CACQ,CAAA;AAEnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs")
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),n=require("../../../i18n/declaration.cjs"),r=require("../../shared/buttons/remove-button.cjs"),i=require("./image-lightbox.cjs"),a=require("./thumbnail.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("react/jsx-runtime");function c({src:e,onRemove:c,size:l=`small`}){let{t:u}=t.useTranslation(`openhands`),[d,f]=o.default.useState(!1);return(0,s.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,s.jsx)(`button`,{type:`button`,"data-testid":`expand-image-button`,"aria-label":u(n.I18nKey.BUTTON$VIEW_FULL_SIZE_IMAGE),onClick:()=>f(!0),className:`block cursor-zoom-in rounded-sm transition-opacity hover:opacity-80`,children:(0,s.jsx)(a.Thumbnail,{src:e,size:l})}),c&&(0,s.jsx)(r.RemoveButton,{onClick:c,"aria-label":u(n.I18nKey.BUTTON$REMOVE_IMAGE),className:`absolute right-[3px] top-[3px] cursor-pointer`}),d&&(0,s.jsx)(i.ImageLightbox,{src:e,onClose:()=>f(!1)})]})}exports.ImagePreview=c;
|
|
2
2
|
//# sourceMappingURL=image-preview.cjs.map
|