@openhands/agent-canvas 1.2.0 → 1.3.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/{Trans-De9RwQhA.js → Trans-DY6toRDu.js} +1 -1
- package/build/assets/{acp-providers-D_D8VUpP.js → acp-providers-Djl6vNn-.js} +1 -1
- package/build/assets/active-backend-context-B3umL5R-.js +1 -0
- package/build/assets/{add-backend-modal-DzuB9zlG.js → add-backend-modal-DljoP9lc.js} +1 -1
- package/build/assets/{agent-profiles-settings-BfAwTshW.js → agent-profiles-settings-BJMmTZgv.js} +1 -1
- package/build/assets/{agent-server-conversation-service.api-DfH2k6Sx.js → agent-server-conversation-service.api-D_ZvtJjG.js} +3 -3
- package/build/assets/agent-settings-BVVFzBWS.js +1 -0
- package/build/assets/{agent-settings-DjVlKgaP.js → agent-settings-lUknCeaF.js} +1 -1
- package/build/assets/{alert-banner-BW0wRYw6.js → alert-banner-Bpf2NQJq.js} +1 -1
- package/build/assets/{api-key-entry-screen-O8gS-fnF.js → api-key-entry-screen-CWEHcPJA.js} +1 -1
- package/build/assets/{app-settings-SlZvaXlk.js → app-settings-Dj90qosy.js} +1 -1
- package/build/assets/automation-detail-CXJU0_gF.js +2 -0
- package/build/assets/automation-export-FWY9LPsG.js +2 -0
- package/build/assets/automations-list-DDGBkWLC.js +1 -0
- package/build/assets/{back-nav-button-BYmxFxGt.js → back-nav-button-CUS2mi-U.js} +1 -1
- package/build/assets/{backend-form-modal-D2EDGVAc.js → backend-form-modal-DSbrafX2.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-6OCwIuLY.js → backend-synced-settings-badge-CanzmG12.js} +1 -1
- package/build/assets/{base-modal-CC5Pp8CF.js → base-modal-BuF2f0YL.js} +1 -1
- package/build/assets/{brand-button-DKPMEKcW.js → brand-button-vMVuyDXu.js} +1 -1
- package/build/assets/{browser-B39N74jU.js → browser-BifzWIBd.js} +1 -1
- package/build/assets/{browser-tab-aiDg7aEn.js → browser-tab-CkkqJnqw.js} +1 -1
- package/build/assets/{chat-send-button-DxuZIoW8.js → chat-send-button-B_jc5z5C.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-T3eAIuPQ.js → circle-plus-check-toggle-C5YxjxvI.js} +1 -1
- package/build/assets/{color-themes-Dd1sO5U6.js → color-themes-DPBzNtVg.js} +3 -3
- package/build/assets/{combobox-caret-CLGvOs32.js → combobox-caret-DoObzqf4.js} +1 -1
- package/build/assets/{command-menu-DKrLCRla.js → command-menu-D-JV3Wqm.js} +1 -1
- package/build/assets/{condenser-settings-BhxvlfoY.js → condenser-settings-30cX9SK6.js} +1 -1
- package/build/assets/{confirmation-modal-BK1F0A68.js → confirmation-modal-BGLu6XJN.js} +1 -1
- package/build/assets/{context-menu-list-item-DBFzplWW.js → context-menu-list-item-BD5_EaKN.js} +1 -1
- package/build/assets/conversation-BltULtFA.js +89 -0
- package/build/assets/conversation-e0a0_X4S.js +1 -0
- package/build/assets/conversation-panel-Cr9_ZGI-.js +1 -0
- package/build/assets/{conversation-service.api-Ch9kR9aE.js → conversation-service.api-DQaKzIRj.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-m8IUkfMj.js → conversation-tab-empty-state-B2dDYEwf.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Aj9wFmt2.js → copy-to-clipboard-button-CaR52OnA.js} +1 -1
- package/build/assets/declaration-gq8V5eTU.js +1 -0
- package/build/assets/{device-verify-B5YCrvSu.js → device-verify-BsznkV-a.js} +1 -1
- package/build/assets/{dropdown-classes-CgQ45JmQ.js → dropdown-classes-DJSXeLqc.js} +1 -1
- package/build/assets/{ellipsis-button-1BV9Sga8.js → ellipsis-button-C5Z-tPFp.js} +1 -1
- package/build/assets/{entry.client-BgWj9jL_.js → entry.client-JixNvFrr.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DCITiYVi.js → enum-filter-dropdown-DXbVwiNZ.js} +1 -1
- package/build/assets/{environment-switch-overlay-DUnKILNH.js → environment-switch-overlay-DZQfRGTx.js} +1 -1
- package/build/assets/{extensions-hub-MtC8lK3A.js → extensions-hub-DfvgqzTc.js} +1 -1
- package/build/assets/{extensions-navigation-BtV14oQL.js → extensions-navigation-D9i0DL62.js} +1 -1
- package/build/assets/files-tab-DDtEJcGE.js +1 -0
- package/build/assets/{form-control-classes-9rkU4usZ.js → form-control-classes-ChpNBe9n.js} +1 -1
- package/build/assets/{git-provider-icon-CGU7_KiU.js → git-provider-icon-BjkecAuV.js} +1 -1
- package/build/assets/home-BCKWpKpf.js +1 -0
- package/build/assets/{install-server-modal-J_eQ6lhG.js → install-server-modal-BIugLhVB.js} +1 -1
- package/build/assets/{launch-DamfAY5L.js → launch-BgIlZLSX.js} +1 -1
- package/build/assets/lesson-plan-DgpP80mJ.js +4 -0
- package/build/assets/{llm-not-configured-banner-DTrLsVr_.js → llm-not-configured-banner-BlX8NifC.js} +4 -4
- package/build/assets/llm-settings-DJmbryaE.js +1 -0
- package/build/assets/{llm-settings-BgSFkbHC.js → llm-settings-kU5v0H1Z.js} +1 -1
- package/build/assets/{loading-spinner-DHAIPZkP.js → loading-spinner-BLdswi6q.js} +1 -1
- package/build/assets/{manage-backends-modal-BUzj5_Lq.js → manage-backends-modal-C8FJQIZR.js} +1 -1
- package/build/assets/manifest-56d40d7c.js +1 -0
- package/build/assets/{markdown-renderer-D8mayGjI.js → markdown-renderer-DMT7Zkpd.js} +1 -1
- package/build/assets/{mcp-DvqJYDbz.js → mcp-CHkklDMv.js} +1 -1
- package/build/assets/{messages-C4KEFkPk.js → messages-B3RugH7P.js} +11 -11
- package/build/assets/{modal-body-Dcu5McCa.js → modal-body-DouOE5KH.js} +1 -1
- package/build/assets/{modal-classes-DPqxSyuP.js → modal-classes-Cf-4tbHz.js} +1 -1
- package/build/assets/{modal-close-button-CTCX4nCH.js → modal-close-button-B6CfxxJj.js} +1 -1
- package/build/assets/{model-selector-VDHBytb6.js → model-selector-BOj1wBlq.js} +1 -1
- package/build/assets/onboarding-DYhDxmI9.js +1 -0
- package/build/assets/{onboarding-modal-CGHPoMp7.js → onboarding-modal-CP_WxDC9.js} +1 -1
- package/build/assets/{option-service.api-Dz7Eomnx.js → option-service.api-C0tYT4-r.js} +1 -1
- package/build/assets/{path-utils-CBaRYg35.js → path-utils-DWcgCGen.js} +1 -1
- package/build/assets/{plan-components-j9X4AxYM.js → plan-components-CcCBmCzW.js} +1 -1
- package/build/assets/{planner-tab-G4j36bJk.js → planner-tab-CCqdXxkL.js} +1 -1
- package/build/assets/providers-BxCuC9bZ.js +1 -0
- package/build/assets/recommended-automations-launcher-CVEF_1pc.js +58 -0
- package/build/assets/root-V8fkplMy.css +1 -0
- package/build/assets/root-layout-CttG_lQi.js +2 -0
- package/build/assets/{root-S6CfVoNm.js → root-uJ2t9rCQ.js} +2 -2
- package/build/assets/{runtime-waiting-state-DkzLgvMn.js → runtime-waiting-state-BsXLElvN.js} +1 -1
- package/build/assets/{schema-field-DwUzlw6b.js → schema-field-xUr6rDd6.js} +1 -1
- package/build/assets/{sdk-section-page-BUXONTx6.js → sdk-section-page-CbLrVUa3.js} +1 -1
- package/build/assets/{sdk-settings-schema-BjBkMHzZ.js → sdk-settings-schema-Cv7M9eSe.js} +1 -1
- package/build/assets/{secrets-settings-ZxyfRBgx.js → secrets-settings-DxTx9HgU.js} +1 -1
- package/build/assets/{segmented-toggle-Cen5AMUc.js → segmented-toggle-DyQqPhoD.js} +1 -1
- package/build/assets/{settings-Bx6vn-g8.js → settings-DnlfS09K.js} +1 -1
- package/build/assets/{settings-dropdown-input-xzoZwgUe.js → settings-dropdown-input-BjunGXJb.js} +1 -1
- package/build/assets/{settings-index-D4SM26d5.js → settings-index-BjeuYFFa.js} +1 -1
- package/build/assets/{settings-input-DYs7t3oK.js → settings-input-bD6npsDm.js} +1 -1
- package/build/assets/{settings-list-classes-DvQr5jVS.js → settings-list-classes-Dp_OgzN0.js} +1 -1
- package/build/assets/{settings-modal-BoC8oMlg.js → settings-modal-DfTcL-mV.js} +1 -1
- package/build/assets/settings-service.api-K4ncGlBv.js +1 -0
- package/build/assets/{settings-switch-C2N2xqEb.js → settings-switch-5cuxl8Dc.js} +1 -1
- package/build/assets/{shared-conversation-DMiaQFsj.js → shared-conversation-DWtBkJv7.js} +1 -1
- package/build/assets/{sidebar-layout-BtpUSN3j.js → sidebar-layout-DuzJMMw-.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CaV3tQFF.js → sidebar-mobile-menu-toggle-CMmAYkh8.js} +1 -1
- package/build/assets/{sidebar-nav-link-CIB3NBRW.js → sidebar-nav-link-5AlTT5-j.js} +1 -1
- package/build/assets/{skill-card-pill-row-D2bUe2kB.js → skill-card-pill-row-eTIkE4nz.js} +1 -1
- package/build/assets/{skills-plugins-D2WkrXkr.js → skills-plugins-BJ040luO.js} +1 -1
- package/build/assets/{skills-settings-CZGVOp_t.js → skills-settings-BYn4-AQQ.js} +1 -1
- package/build/assets/{styled-tooltip-DsKsFjuq.js → styled-tooltip-CgX2oRaK.js} +1 -1
- package/build/assets/{task-list-tab-BAThr9Ex.js → task-list-tab-0k9PhuqO.js} +1 -1
- package/build/assets/{terminal-B0aL_iDZ.js → terminal-BsGcSpRS.js} +1 -1
- package/build/assets/{toggle-switch-DBlOOzBr.js → toggle-switch-2j5wwR85.js} +1 -1
- package/build/assets/{typography-YGPBGzOG.js → typography-D8mHDeNG.js} +1 -1
- package/build/assets/{use-acp-credential-form-rzaqkJ1n.js → use-acp-credential-form-EtnbtYt0.js} +1 -1
- package/build/assets/{use-activate-agent-profile-DY0txItX.js → use-activate-agent-profile-WaAZYz4E.js} +1 -1
- package/build/assets/{use-active-agent-profile-Cp5AFONR.js → use-active-agent-profile-CYY3vGar.js} +1 -1
- package/build/assets/{use-active-conversation-DvcFBqFe.js → use-active-conversation-D-r929nx.js} +1 -1
- package/build/assets/{use-agent-profiles-DnH16_Vm.js → use-agent-profiles-DEAMFp-W.js} +1 -1
- package/build/assets/{use-agent-state-BvRcEzY4.js → use-agent-state-DijdVAQ0.js} +1 -1
- package/build/assets/{use-backends-health-e-Ull4wz.js → use-backends-health-DkC7tKkC.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-OIhplvQ0.js → use-can-manage-org-profiles-BEo0peGn.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-ekU7UXDT.js → use-cloud-current-user-id-Dm99wXp2.js} +1 -1
- package/build/assets/{use-config-Dwf5gla-.js → use-config-CHzNIHpv.js} +1 -1
- package/build/assets/{use-create-conversation-CvAXfA3T.js → use-create-conversation-CTsvZ96U.js} +1 -1
- package/build/assets/{use-create-secret-BKeXCo__.js → use-create-secret-D5O5qdWC.js} +1 -1
- package/build/assets/{use-event-store-YSOxy9FC.js → use-event-store-DjgU4wfO.js} +1 -1
- package/build/assets/{use-handle-plan-click-cAXS-Hft.js → use-handle-plan-click-Mn_SNTCh.js} +1 -1
- package/build/assets/{use-llm-profiles-BcLibtGb.js → use-llm-profiles-BMhPDlwQ.js} +1 -1
- package/build/assets/use-runtime-is-ready-CC-KrLKe.js +1 -0
- package/build/assets/{use-save-agent-profile-DFjxHhNx.js → use-save-agent-profile-CLMmbx_X.js} +1 -1
- package/build/assets/{use-save-settings-5xPYpSQM.js → use-save-settings-D1HoCDbn.js} +1 -1
- package/build/assets/{use-settings-B07msZ2Z.js → use-settings-BReAMxCG.js} +1 -1
- package/build/assets/{use-settings-nav-items-CswsOEyw.js → use-settings-nav-items-xe1YgLnE.js} +1 -1
- package/build/assets/{use-skills-Aoaoq_ei.js → use-skills-Dqo-pDDx.js} +1 -1
- package/build/assets/{use-task-list-CmWGElgb.js → use-task-list-AVBLbbcR.js} +1 -1
- package/build/assets/{use-tracking-CqODdfO4.js → use-tracking-2ZwQwpg_.js} +1 -1
- package/build/assets/{use-user-conversation-BPHQ-dm-.js → use-user-conversation-OAfenBRG.js} +1 -1
- package/build/assets/{useTranslation-Cgy4JA_g.js → useTranslation-CDRCKC9-.js} +1 -1
- package/build/assets/{utils-CE0lDWtb.js → utils-D3U3rlqr.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-DJHl5b-B.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js} +267 -27
- package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js +1 -0
- package/build/assets/{verification-settings-DZQ-JvKH.js → verification-settings-DnXS6VWv.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +24 -0
- package/build/locales/ca/openhands.json +24 -0
- package/build/locales/de/openhands.json +24 -0
- package/build/locales/en/openhands.json +24 -0
- package/build/locales/es/openhands.json +24 -0
- package/build/locales/fr/openhands.json +24 -0
- package/build/locales/it/openhands.json +24 -0
- package/build/locales/ja/openhands.json +24 -0
- package/build/locales/ko-KR/openhands.json +24 -0
- package/build/locales/no/openhands.json +24 -0
- package/build/locales/pt/openhands.json +24 -0
- package/build/locales/tr/openhands.json +24 -0
- package/build/locales/uk/openhands.json +24 -0
- package/build/locales/zh-CN/openhands.json +24 -0
- package/build/locales/zh-TW/openhands.json +24 -0
- package/config/defaults.json +4 -4
- package/dist/api/automation-service/automation-service.api.d.ts +2 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.cjs.map +1 -1
- package/dist/api/event-service/event-service.api.js +1 -1
- package/dist/api/event-service/event-service.api.js.map +1 -1
- package/dist/api/event-service/event-service.types.d.ts +6 -0
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.js +2 -2
- package/dist/api/git-service/agent-server-git-service.api.js.map +1 -1
- package/dist/api/git-service/git-service.api.cjs +1 -1
- package/dist/api/git-service/git-service.api.cjs.map +1 -1
- package/dist/api/git-service/git-service.api.js +2 -2
- package/dist/api/git-service/git-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-thought-helpers.cjs +1 -1
- package/dist/components/conversation-events/chat/event-thought-helpers.js +1 -1
- package/dist/components/features/automations/automation-card.d.ts +2 -1
- package/dist/components/features/automations/automation-group.d.ts +2 -1
- package/dist/components/features/automations/automation-list-row.d.ts +2 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +2 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +3 -1
- package/dist/components/features/automations/import-automation-modal.d.ts +10 -0
- package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name-context-menu.js +74 -63
- package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name.cjs +1 -1
- package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name.js +73 -61
- package/dist/components/features/conversation/conversation-name.js.map +1 -1
- package/dist/components/features/conversation/transcript-export-modal.cjs +2 -0
- package/dist/components/features/conversation/transcript-export-modal.cjs.map +1 -0
- package/dist/components/features/conversation/transcript-export-modal.d.ts +10 -0
- package/dist/components/features/conversation/transcript-export-modal.js +140 -0
- package/dist/components/features/conversation/transcript-export-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/home/shared/dropdown-item.cjs +1 -1
- package/dist/components/features/home/shared/dropdown-item.cjs.map +1 -1
- package/dist/components/features/home/shared/dropdown-item.d.ts +7 -1
- package/dist/components/features/home/shared/dropdown-item.js +2 -1
- package/dist/components/features/home/shared/dropdown-item.js.map +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.cjs +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.cjs.map +1 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +8 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.js +18 -10
- package/dist/components/features/home/shared/generic-dropdown-menu.js.map +1 -1
- package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +11 -2
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +4 -4
- package/dist/config/defaults.js.map +1 -1
- package/dist/hooks/query/use-automations.d.ts +2 -1
- package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
- package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
- package/dist/hooks/query/use-resolved-workspaces.d.ts +9 -1
- package/dist/hooks/query/use-resolved-workspaces.js +1 -0
- package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
- package/dist/hooks/query/use-workspace-file-content.cjs +1 -1
- package/dist/hooks/query/use-workspace-file-content.cjs.map +1 -1
- package/dist/hooks/query/use-workspace-file-content.js +61 -55
- package/dist/hooks/query/use-workspace-file-content.js.map +1 -1
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.cjs.map +1 -1
- package/dist/hooks/query/use-workspace-files.d.ts +11 -4
- package/dist/hooks/query/use-workspace-files.js +39 -18
- package/dist/hooks/query/use-workspace-files.js.map +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.cjs +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.cjs.map +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.d.ts +9 -0
- package/dist/hooks/use-auto-refresh-files-on-edit.js +15 -11
- package/dist/hooks/use-auto-refresh-files-on-edit.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +7 -0
- package/dist/hooks/use-tracking.js +9 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +24 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +1 -1
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +408 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +24 -0
- package/dist/locales/ca/openhands.json +24 -0
- package/dist/locales/de/openhands.json +24 -0
- package/dist/locales/en/openhands.json +24 -0
- package/dist/locales/es/openhands.json +24 -0
- package/dist/locales/fr/openhands.json +24 -0
- package/dist/locales/it/openhands.json +24 -0
- package/dist/locales/ja/openhands.json +24 -0
- package/dist/locales/ko-KR/openhands.json +24 -0
- package/dist/locales/no/openhands.json +24 -0
- package/dist/locales/pt/openhands.json +24 -0
- package/dist/locales/tr/openhands.json +24 -0
- package/dist/locales/uk/openhands.json +24 -0
- package/dist/locales/zh-CN/openhands.json +24 -0
- package/dist/locales/zh-TW/openhands.json +24 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +70 -3
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +27 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.js +33 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +48 -46
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +267 -27
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +36 -30
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.js +10 -10
- package/dist/themes/color-themes.cjs +3 -3
- package/dist/themes/color-themes.cjs.map +1 -1
- package/dist/themes/color-themes.d.ts +13 -2
- package/dist/themes/color-themes.js +2 -2
- package/dist/themes/color-themes.js.map +1 -1
- package/dist/types/automation.d.ts +8 -0
- package/dist/utils/custom-toast-handlers.cjs.map +1 -1
- package/dist/utils/custom-toast-handlers.d.ts +1 -0
- package/dist/utils/custom-toast-handlers.js.map +1 -1
- package/dist/utils/mcp-server-name.cjs +1 -1
- package/dist/utils/mcp-server-name.cjs.map +1 -1
- package/dist/utils/mcp-server-name.js +2 -2
- package/dist/utils/mcp-server-name.js.map +1 -1
- package/dist/utils/transcript-export/index.cjs +72 -0
- package/dist/utils/transcript-export/index.cjs.map +1 -0
- package/dist/utils/transcript-export/index.d.ts +10 -0
- package/dist/utils/transcript-export/index.js +302 -0
- package/dist/utils/transcript-export/index.js.map +1 -0
- package/dist/utils/transcript-export/load-complete-events.cjs +2 -0
- package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -0
- package/dist/utils/transcript-export/load-complete-events.d.ts +22 -0
- package/dist/utils/transcript-export/load-complete-events.js +39 -0
- package/dist/utils/transcript-export/load-complete-events.js.map +1 -0
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +2 -2
- package/build/assets/active-backend-context-DRFevVIj.js +0 -1
- package/build/assets/agent-settings-CMMms-0q.js +0 -1
- package/build/assets/automation-detail-CwsNJ9AM.js +0 -2
- package/build/assets/automations-list-B9cPtugh.js +0 -1
- package/build/assets/conversation-B8prFAZF.js +0 -19
- package/build/assets/conversation-DGVDwGn8.js +0 -1
- package/build/assets/conversation-panel-C7DC4Cxx.js +0 -1
- package/build/assets/declaration-B9kpCaYl.js +0 -1
- package/build/assets/edit-automation-modal-BoibW8cd.js +0 -1
- package/build/assets/files-tab-DHqtsKLy.js +0 -1
- package/build/assets/home-BgjWP_UN.js +0 -1
- package/build/assets/lesson-plan-HD886V64.js +0 -4
- package/build/assets/llm-settings-Bkc8C5Bi.js +0 -1
- package/build/assets/manifest-4d6a1552.js +0 -1
- package/build/assets/onboarding-gGIqoxvA.js +0 -1
- package/build/assets/providers-CPoq0VXm.js +0 -1
- package/build/assets/recommended-automations-launcher-CXaEK1rW.js +0 -50
- package/build/assets/root-CxWZUXTQ.css +0 -1
- package/build/assets/root-layout-CvxdHJ6j.js +0 -2
- package/build/assets/settings-service.api-DldkFI1x.js +0 -1
- package/build/assets/use-runtime-is-ready-CBFe69Ew.js +0 -1
- package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-L2sdihTY.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../backend-registry/active-store.cjs`),t=require(`../agent-server-client-options.cjs`),n=require(`../../node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs`),r=require(`../conversation-service/agent-server-conversation-service.api.cjs`),i=require(`../../utils/git-status-mapper.cjs`),a=require(`../cloud/git-service.api.cjs`);var o=e=>e,s=()=>e.getActiveBackend().backend.kind===`cloud`,c=e=>!e||e===`undefined`||e===`null`,l={items:[],next_page_id:null},u={items:[],next_page_id:null},d={items:[],next_page_id:null},f=class{static async searchGitRepositories(e,t,n=100,r,i){return c(t)||!s()?l:a.searchCloudRepositories({provider:o(t),query:e||void 0,limit:n,pageId:r,installationId:i})}static async retrieveUserGitRepositories(e,t,n=30,r){return c(e)||!s()?l:a.searchCloudRepositories({provider:o(e),limit:n,pageId:t,installationId:r})}static async retrieveInstallationRepositories(e,t,n,r,i=30){if(c(e)||!s())return l;let u=n[t];return u?a.searchCloudRepositories({provider:o(e),installationId:u,limit:i,pageId:r}):l}static async getRepositoryBranches(e,t,n=``,r,i=30){return c(t)||!s()?u:a.getCloudRepositoryBranches({provider:o(t),repository:e,query:n||void 0,pageId:r,limit:i})}static async searchRepositoryBranches(e,t,n,r,i=30){return c(t)||!s()?u:a.getCloudRepositoryBranches({provider:o(t),repository:e,query:n,pageId:r,limit:i})}static async getUserInstallations(e,t,n=100){return c(e)||!s()?d:a.getCloudInstallations({provider:o(e),pageId:t,limit:n})}static async getGitChanges(e){let a=await r.default.resolveConversationWorkingDir(e);return(await new n.RemoteWorkspace(t.getAgentServerClientOptions({workingDir:a})).gitChanges(a
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../backend-registry/active-store.cjs`),t=require(`../agent-server-client-options.cjs`),n=require(`../../node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs`),r=require(`../conversation-service/agent-server-conversation-service.api.cjs`),i=require(`../../utils/git-status-mapper.cjs`),a=require(`../cloud/git-service.api.cjs`);var o=e=>e,s=()=>e.getActiveBackend().backend.kind===`cloud`,c=e=>!e||e===`undefined`||e===`null`,l={items:[],next_page_id:null},u={items:[],next_page_id:null},d={items:[],next_page_id:null},f=class{static async searchGitRepositories(e,t,n=100,r,i){return c(t)||!s()?l:a.searchCloudRepositories({provider:o(t),query:e||void 0,limit:n,pageId:r,installationId:i})}static async retrieveUserGitRepositories(e,t,n=30,r){return c(e)||!s()?l:a.searchCloudRepositories({provider:o(e),limit:n,pageId:t,installationId:r})}static async retrieveInstallationRepositories(e,t,n,r,i=30){if(c(e)||!s())return l;let u=n[t];return u?a.searchCloudRepositories({provider:o(e),installationId:u,limit:i,pageId:r}):l}static async getRepositoryBranches(e,t,n=``,r,i=30){return c(t)||!s()?u:a.getCloudRepositoryBranches({provider:o(t),repository:e,query:n||void 0,pageId:r,limit:i})}static async searchRepositoryBranches(e,t,n,r,i=30){return c(t)||!s()?u:a.getCloudRepositoryBranches({provider:o(t),repository:e,query:n,pageId:r,limit:i})}static async getUserInstallations(e,t,n=100){return c(e)||!s()?d:a.getCloudInstallations({provider:o(e),pageId:t,limit:n})}static async getGitChanges(e){let a=await r.default.resolveConversationWorkingDir(e);return(await new n.RemoteWorkspace(t.getAgentServerClientOptions({workingDir:a})).gitChanges(a)).map(e=>({path:e.path,status:i.mapAnyGitStatusToClientStatus(String(e.status))}))}static async getGitChangeDiff(e,r){let i=await new n.RemoteWorkspace(t.getAgentServerClientOptions()).gitDiff(r);return{modified:i.modified??``,original:i.original??``}}};exports.default=f;
|
|
2
2
|
//# sourceMappingURL=git-service.api.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-service.api.cjs","names":[],"sources":["../../../src/api/git-service/git-service.api.ts"],"sourcesContent":["import { RemoteWorkspace } from \"@openhands/typescript-client/workspace/remote-workspace\";\nimport { RepositoryPage, BranchPage, InstallationPage } from \"#/types/git\";\nimport { Provider } from \"#/types/settings\";\nimport { GitChange, GitChangeDiff } from \"../open-hands.types\";\nimport AgentServerConversationService from \"../conversation-service/agent-server-conversation-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\nimport { mapAnyGitStatusToClientStatus } from \"#/utils/git-status-mapper\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n getCloudInstallations,\n getCloudRepositoryBranches,\n searchCloudRepositories,\n} from \"../cloud/git-service.api\";\n\nconst safeProvider = (value: string): Provider => value as Provider;\n\nconst isCloudActive = () => getActiveBackend().backend.kind === \"cloud\";\n\n/**\n * Guard against null/undefined provider values that would result in\n * invalid API requests (e.g., \"?provider=undefined\"). Returns true\n * if the provider is falsy and the request should be skipped.\n */\nconst isInvalidProvider = (provider: string | null | undefined): boolean =>\n !provider || provider === \"undefined\" || provider === \"null\";\n\nconst EMPTY_REPOSITORY_PAGE: RepositoryPage = { items: [], next_page_id: null };\nconst EMPTY_BRANCH_PAGE: BranchPage = { items: [], next_page_id: null };\nconst EMPTY_INSTALLATION_PAGE: InstallationPage = {\n items: [],\n next_page_id: null,\n};\n\nclass GitService {\n static async searchGitRepositories(\n query: string,\n provider: string,\n limit = 100,\n pageId?: string,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n query: query || undefined,\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveUserGitRepositories(\n provider: string,\n pageId?: string,\n limit = 30,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveInstallationRepositories(\n provider: string,\n installationIndex: number,\n installations: string[],\n pageId?: string,\n limit = 30,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n const installationId = installations[installationIndex];\n if (!installationId) return EMPTY_REPOSITORY_PAGE;\n return searchCloudRepositories({\n provider: safeProvider(provider),\n installationId,\n limit,\n pageId,\n });\n }\n\n static async getRepositoryBranches(\n repository: string,\n provider: string,\n query: string = \"\",\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query: query || undefined,\n pageId,\n limit,\n });\n }\n\n static async searchRepositoryBranches(\n repository: string,\n provider: string,\n query: string,\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query,\n pageId,\n limit,\n });\n }\n\n static async getUserInstallations(\n provider: string,\n pageId?: string,\n limit = 100,\n ): Promise<InstallationPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_INSTALLATION_PAGE;\n }\n return getCloudInstallations({\n provider: safeProvider(provider),\n pageId,\n limit,\n });\n }\n\n static async getGitChanges(conversationId: string): Promise<GitChange[]> {\n const workingDir =\n await AgentServerConversationService.resolveConversationWorkingDir(\n conversationId,\n );\n const changes = await new RemoteWorkspace(\n getAgentServerClientOptions({ workingDir }),\n ).gitChanges(workingDir
|
|
1
|
+
{"version":3,"file":"git-service.api.cjs","names":[],"sources":["../../../src/api/git-service/git-service.api.ts"],"sourcesContent":["import { RemoteWorkspace } from \"@openhands/typescript-client/workspace/remote-workspace\";\nimport { RepositoryPage, BranchPage, InstallationPage } from \"#/types/git\";\nimport { Provider } from \"#/types/settings\";\nimport { GitChange, GitChangeDiff } from \"../open-hands.types\";\nimport AgentServerConversationService from \"../conversation-service/agent-server-conversation-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\nimport { mapAnyGitStatusToClientStatus } from \"#/utils/git-status-mapper\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n getCloudInstallations,\n getCloudRepositoryBranches,\n searchCloudRepositories,\n} from \"../cloud/git-service.api\";\n\nconst safeProvider = (value: string): Provider => value as Provider;\n\nconst isCloudActive = () => getActiveBackend().backend.kind === \"cloud\";\n\n/**\n * Guard against null/undefined provider values that would result in\n * invalid API requests (e.g., \"?provider=undefined\"). Returns true\n * if the provider is falsy and the request should be skipped.\n */\nconst isInvalidProvider = (provider: string | null | undefined): boolean =>\n !provider || provider === \"undefined\" || provider === \"null\";\n\nconst EMPTY_REPOSITORY_PAGE: RepositoryPage = { items: [], next_page_id: null };\nconst EMPTY_BRANCH_PAGE: BranchPage = { items: [], next_page_id: null };\nconst EMPTY_INSTALLATION_PAGE: InstallationPage = {\n items: [],\n next_page_id: null,\n};\n\nclass GitService {\n static async searchGitRepositories(\n query: string,\n provider: string,\n limit = 100,\n pageId?: string,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n query: query || undefined,\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveUserGitRepositories(\n provider: string,\n pageId?: string,\n limit = 30,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveInstallationRepositories(\n provider: string,\n installationIndex: number,\n installations: string[],\n pageId?: string,\n limit = 30,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n const installationId = installations[installationIndex];\n if (!installationId) return EMPTY_REPOSITORY_PAGE;\n return searchCloudRepositories({\n provider: safeProvider(provider),\n installationId,\n limit,\n pageId,\n });\n }\n\n static async getRepositoryBranches(\n repository: string,\n provider: string,\n query: string = \"\",\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query: query || undefined,\n pageId,\n limit,\n });\n }\n\n static async searchRepositoryBranches(\n repository: string,\n provider: string,\n query: string,\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query,\n pageId,\n limit,\n });\n }\n\n static async getUserInstallations(\n provider: string,\n pageId?: string,\n limit = 100,\n ): Promise<InstallationPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_INSTALLATION_PAGE;\n }\n return getCloudInstallations({\n provider: safeProvider(provider),\n pageId,\n limit,\n });\n }\n\n static async getGitChanges(conversationId: string): Promise<GitChange[]> {\n const workingDir =\n await AgentServerConversationService.resolveConversationWorkingDir(\n conversationId,\n );\n const changes = await new RemoteWorkspace(\n getAgentServerClientOptions({ workingDir }),\n ).gitChanges(workingDir);\n\n return changes.map((change) => ({\n path: change.path,\n status: mapAnyGitStatusToClientStatus(\n String(change.status) as Parameters<\n typeof mapAnyGitStatusToClientStatus\n >[0],\n ),\n }));\n }\n\n static async getGitChangeDiff(\n _conversationId: string,\n path: string,\n ): Promise<GitChangeDiff> {\n const diff = await new RemoteWorkspace(\n getAgentServerClientOptions(),\n ).gitDiff(path);\n\n return {\n modified: diff.modified ?? \"\",\n original: diff.original ?? \"\",\n };\n }\n}\n\nexport default GitService;\n"],"mappings":"iaAcA,IAAM,EAAgB,GAA4B,EAE5C,MAAsB,EAAA,kBAAkB,CAAC,QAAQ,OAAS,QAO1D,EAAqB,GACzB,CAAC,GAAY,IAAa,aAAe,IAAa,OAElD,EAAwC,CAAE,MAAO,EAAE,CAAE,aAAc,KAAM,CACzE,EAAgC,CAAE,MAAO,EAAE,CAAE,aAAc,KAAM,CACjE,EAA4C,CAChD,MAAO,EAAE,CACT,aAAc,KACf,CAEK,EAAN,KAAiB,CACf,aAAa,sBACX,EACA,EACA,EAAQ,IACR,EACA,EACyB,CAIzB,OAHI,EAAkB,EAAS,EAA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,IAAK,IAAY,CAC9B,KAAM,EAAO,KACb,OAAQ,EAAA,8BACN,OAAO,EAAO,OAAO,CAGtB,CACF,EAAE,CAGL,aAAa,iBACX,EACA,EACwB,CACxB,IAAM,EAAO,MAAM,IAAI,EAAA,gBACrB,EAAA,6BAA6B,CAC9B,CAAC,QAAQ,EAAK,CAEf,MAAO,CACL,SAAU,EAAK,UAAY,GAC3B,SAAU,EAAK,UAAY,GAC5B"}
|
|
@@ -69,13 +69,13 @@ var c = (e) => e, l = () => e().backend.kind === "cloud", u = (e) => !e || e ===
|
|
|
69
69
|
}
|
|
70
70
|
static async getGitChanges(e) {
|
|
71
71
|
let a = await r.resolveConversationWorkingDir(e);
|
|
72
|
-
return (await new n(t({ workingDir: a })).gitChanges(a
|
|
72
|
+
return (await new n(t({ workingDir: a })).gitChanges(a)).map((e) => ({
|
|
73
73
|
path: e.path,
|
|
74
74
|
status: i(String(e.status))
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
static async getGitChangeDiff(e, r) {
|
|
78
|
-
let i = await new n(t()).gitDiff(r
|
|
78
|
+
let i = await new n(t()).gitDiff(r);
|
|
79
79
|
return {
|
|
80
80
|
modified: i.modified ?? "",
|
|
81
81
|
original: i.original ?? ""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-service.api.js","names":[],"sources":["../../../src/api/git-service/git-service.api.ts"],"sourcesContent":["import { RemoteWorkspace } from \"@openhands/typescript-client/workspace/remote-workspace\";\nimport { RepositoryPage, BranchPage, InstallationPage } from \"#/types/git\";\nimport { Provider } from \"#/types/settings\";\nimport { GitChange, GitChangeDiff } from \"../open-hands.types\";\nimport AgentServerConversationService from \"../conversation-service/agent-server-conversation-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\nimport { mapAnyGitStatusToClientStatus } from \"#/utils/git-status-mapper\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n getCloudInstallations,\n getCloudRepositoryBranches,\n searchCloudRepositories,\n} from \"../cloud/git-service.api\";\n\nconst safeProvider = (value: string): Provider => value as Provider;\n\nconst isCloudActive = () => getActiveBackend().backend.kind === \"cloud\";\n\n/**\n * Guard against null/undefined provider values that would result in\n * invalid API requests (e.g., \"?provider=undefined\"). Returns true\n * if the provider is falsy and the request should be skipped.\n */\nconst isInvalidProvider = (provider: string | null | undefined): boolean =>\n !provider || provider === \"undefined\" || provider === \"null\";\n\nconst EMPTY_REPOSITORY_PAGE: RepositoryPage = { items: [], next_page_id: null };\nconst EMPTY_BRANCH_PAGE: BranchPage = { items: [], next_page_id: null };\nconst EMPTY_INSTALLATION_PAGE: InstallationPage = {\n items: [],\n next_page_id: null,\n};\n\nclass GitService {\n static async searchGitRepositories(\n query: string,\n provider: string,\n limit = 100,\n pageId?: string,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n query: query || undefined,\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveUserGitRepositories(\n provider: string,\n pageId?: string,\n limit = 30,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveInstallationRepositories(\n provider: string,\n installationIndex: number,\n installations: string[],\n pageId?: string,\n limit = 30,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n const installationId = installations[installationIndex];\n if (!installationId) return EMPTY_REPOSITORY_PAGE;\n return searchCloudRepositories({\n provider: safeProvider(provider),\n installationId,\n limit,\n pageId,\n });\n }\n\n static async getRepositoryBranches(\n repository: string,\n provider: string,\n query: string = \"\",\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query: query || undefined,\n pageId,\n limit,\n });\n }\n\n static async searchRepositoryBranches(\n repository: string,\n provider: string,\n query: string,\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query,\n pageId,\n limit,\n });\n }\n\n static async getUserInstallations(\n provider: string,\n pageId?: string,\n limit = 100,\n ): Promise<InstallationPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_INSTALLATION_PAGE;\n }\n return getCloudInstallations({\n provider: safeProvider(provider),\n pageId,\n limit,\n });\n }\n\n static async getGitChanges(conversationId: string): Promise<GitChange[]> {\n const workingDir =\n await AgentServerConversationService.resolveConversationWorkingDir(\n conversationId,\n );\n const changes = await new RemoteWorkspace(\n getAgentServerClientOptions({ workingDir }),\n ).gitChanges(workingDir
|
|
1
|
+
{"version":3,"file":"git-service.api.js","names":[],"sources":["../../../src/api/git-service/git-service.api.ts"],"sourcesContent":["import { RemoteWorkspace } from \"@openhands/typescript-client/workspace/remote-workspace\";\nimport { RepositoryPage, BranchPage, InstallationPage } from \"#/types/git\";\nimport { Provider } from \"#/types/settings\";\nimport { GitChange, GitChangeDiff } from \"../open-hands.types\";\nimport AgentServerConversationService from \"../conversation-service/agent-server-conversation-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\nimport { mapAnyGitStatusToClientStatus } from \"#/utils/git-status-mapper\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n getCloudInstallations,\n getCloudRepositoryBranches,\n searchCloudRepositories,\n} from \"../cloud/git-service.api\";\n\nconst safeProvider = (value: string): Provider => value as Provider;\n\nconst isCloudActive = () => getActiveBackend().backend.kind === \"cloud\";\n\n/**\n * Guard against null/undefined provider values that would result in\n * invalid API requests (e.g., \"?provider=undefined\"). Returns true\n * if the provider is falsy and the request should be skipped.\n */\nconst isInvalidProvider = (provider: string | null | undefined): boolean =>\n !provider || provider === \"undefined\" || provider === \"null\";\n\nconst EMPTY_REPOSITORY_PAGE: RepositoryPage = { items: [], next_page_id: null };\nconst EMPTY_BRANCH_PAGE: BranchPage = { items: [], next_page_id: null };\nconst EMPTY_INSTALLATION_PAGE: InstallationPage = {\n items: [],\n next_page_id: null,\n};\n\nclass GitService {\n static async searchGitRepositories(\n query: string,\n provider: string,\n limit = 100,\n pageId?: string,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n query: query || undefined,\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveUserGitRepositories(\n provider: string,\n pageId?: string,\n limit = 30,\n installationId?: string,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n return searchCloudRepositories({\n provider: safeProvider(provider),\n limit,\n pageId,\n installationId,\n });\n }\n\n static async retrieveInstallationRepositories(\n provider: string,\n installationIndex: number,\n installations: string[],\n pageId?: string,\n limit = 30,\n ): Promise<RepositoryPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_REPOSITORY_PAGE;\n }\n const installationId = installations[installationIndex];\n if (!installationId) return EMPTY_REPOSITORY_PAGE;\n return searchCloudRepositories({\n provider: safeProvider(provider),\n installationId,\n limit,\n pageId,\n });\n }\n\n static async getRepositoryBranches(\n repository: string,\n provider: string,\n query: string = \"\",\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query: query || undefined,\n pageId,\n limit,\n });\n }\n\n static async searchRepositoryBranches(\n repository: string,\n provider: string,\n query: string,\n pageId?: string,\n limit = 30,\n ): Promise<BranchPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_BRANCH_PAGE;\n }\n return getCloudRepositoryBranches({\n provider: safeProvider(provider),\n repository,\n query,\n pageId,\n limit,\n });\n }\n\n static async getUserInstallations(\n provider: string,\n pageId?: string,\n limit = 100,\n ): Promise<InstallationPage> {\n if (isInvalidProvider(provider) || !isCloudActive()) {\n return EMPTY_INSTALLATION_PAGE;\n }\n return getCloudInstallations({\n provider: safeProvider(provider),\n pageId,\n limit,\n });\n }\n\n static async getGitChanges(conversationId: string): Promise<GitChange[]> {\n const workingDir =\n await AgentServerConversationService.resolveConversationWorkingDir(\n conversationId,\n );\n const changes = await new RemoteWorkspace(\n getAgentServerClientOptions({ workingDir }),\n ).gitChanges(workingDir);\n\n return changes.map((change) => ({\n path: change.path,\n status: mapAnyGitStatusToClientStatus(\n String(change.status) as Parameters<\n typeof mapAnyGitStatusToClientStatus\n >[0],\n ),\n }));\n }\n\n static async getGitChangeDiff(\n _conversationId: string,\n path: string,\n ): Promise<GitChangeDiff> {\n const diff = await new RemoteWorkspace(\n getAgentServerClientOptions(),\n ).gitDiff(path);\n\n return {\n modified: diff.modified ?? \"\",\n original: diff.original ?? \"\",\n };\n }\n}\n\nexport default GitService;\n"],"mappings":";;;;;;;AAcA,IAAM,KAAgB,MAA4B,GAE5C,UAAsB,GAAkB,CAAC,QAAQ,SAAS,SAO1D,KAAqB,MACzB,CAAC,KAAY,MAAa,eAAe,MAAa,QAElD,IAAwC;CAAE,OAAO,EAAE;CAAE,cAAc;CAAM,EACzE,IAAgC;CAAE,OAAO,EAAE;CAAE,cAAc;CAAM,EACjE,IAA4C;CAChD,OAAO,EAAE;CACT,cAAc;CACf,EAEK,IAAN,MAAiB;CACf,aAAa,sBACX,GACA,GACA,IAAQ,KACR,GACA,GACyB;AAIzB,SAHI,EAAkB,EAAS,IAAI,CAA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,CAGtB;GACF,EAAE;;CAGL,aAAa,iBACX,GACA,GACwB;EACxB,IAAM,IAAO,MAAM,IAAI,EACrB,GAA6B,CAC9B,CAAC,QAAQ,EAAK;AAEf,SAAO;GACL,UAAU,EAAK,YAAY;GAC3B,UAAU,EAAK,YAAY;GAC5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../types/agent-server/type-guards.cjs`);var t=e=>e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
2
|
`),n=e=>e.reasoning_content?e.reasoning_content:e.thinking_blocks?.length?e.thinking_blocks.filter(e=>e.type===`thinking`).map(e=>e.thinking).join(`
|
|
3
3
|
|
|
4
|
-
`):``,r=e=>t(e).trim().length>0,i=(e,t)=>{let n=e.replace(/^\s+/,``);if(!n.startsWith(`<think>`))return{reasoning:``,message:e};let r=n.slice(7),i=r.indexOf(`</think>`);return i===-1?t?.streaming?{reasoning:r.trim(),message:``}:{reasoning:``,message:e}:{reasoning:r.slice(0,i).trim(),message:r.slice(i+8).trim()}},a=(t,n)=>{if(e.isActionEvent(t))return t.action.kind===`ThinkAction`?null:r(t)?t:null;if(e.isObservationEvent(t)){let i=n.find(n=>e.isActionEvent(n)&&n.id===t.action_id);return!i||i.action.kind===`ThinkAction`?null:r(i)?i:null}return null};exports.getReasoningContent=n,exports.getThoughtSourceAction=a,exports.splitInlineThink=i;
|
|
4
|
+
`):``,r=e=>t(e).trim().length>0,i=(e,t)=>{let n=e.replace(/^\s+/,``);if(!n.startsWith(`<think>`))return{reasoning:``,message:e};let r=n.slice(7),i=r.indexOf(`</think>`);return i===-1?t?.streaming?{reasoning:r.trim(),message:``}:{reasoning:``,message:e}:{reasoning:r.slice(0,i).trim(),message:r.slice(i+8).trim()}},a=(t,n)=>{if(e.isActionEvent(t))return t.action.kind===`ThinkAction`?null:r(t)?t:null;if(e.isObservationEvent(t)){let i=n.find(n=>e.isActionEvent(n)&&n.id===t.action_id);return!i||i.action.kind===`ThinkAction`?null:r(i)?i:null}return null};exports.getActionThoughtText=t,exports.getReasoningContent=n,exports.getThoughtSourceAction=a,exports.splitInlineThink=i;
|
|
5
5
|
//# sourceMappingURL=event-thought-helpers.cjs.map
|
|
@@ -26,6 +26,6 @@ var n = (e) => e.thought.filter((e) => e.type === "text").map((e) => e.text).joi
|
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
|
-
export { r as getReasoningContent, o as getThoughtSourceAction, a as splitInlineThink };
|
|
29
|
+
export { n as getActionThoughtText, r as getReasoningContent, o as getThoughtSourceAction, a as splitInlineThink };
|
|
30
30
|
|
|
31
31
|
//# sourceMappingURL=event-thought-helpers.js.map
|
|
@@ -5,7 +5,8 @@ interface AutomationCardProps {
|
|
|
5
5
|
onRunNow: (id: string) => void;
|
|
6
6
|
isRunPending?: boolean;
|
|
7
7
|
onDelete: (id: string) => void;
|
|
8
|
+
onExport: (automation: Automation) => void;
|
|
8
9
|
onEdit?: (id: string) => void;
|
|
9
10
|
}
|
|
10
|
-
export declare function AutomationCard({ automation, onToggle, onRunNow, isRunPending, onDelete, onEdit, }: AutomationCardProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function AutomationCard({ automation, onToggle, onRunNow, isRunPending, onDelete, onExport, onEdit, }: AutomationCardProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -9,7 +9,8 @@ interface AutomationGroupProps {
|
|
|
9
9
|
onRunNow: (id: string) => void;
|
|
10
10
|
runPendingId?: string | null;
|
|
11
11
|
onDelete: (id: string) => void;
|
|
12
|
+
onExport: (automation: Automation) => void;
|
|
12
13
|
onEdit?: (id: string) => void;
|
|
13
14
|
}
|
|
14
|
-
export declare function AutomationGroup({ title, count, automations, view, onToggle, onRunNow, runPendingId, onDelete, onEdit, }: AutomationGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export declare function AutomationGroup({ title, count, automations, view, onToggle, onRunNow, runPendingId, onDelete, onExport, onEdit, }: AutomationGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
16
|
export {};
|
|
@@ -5,7 +5,8 @@ interface AutomationListRowProps {
|
|
|
5
5
|
onRunNow: (id: string) => void;
|
|
6
6
|
isRunPending?: boolean;
|
|
7
7
|
onDelete: (id: string) => void;
|
|
8
|
+
onExport: (automation: Automation) => void;
|
|
8
9
|
onEdit?: (id: string) => void;
|
|
9
10
|
}
|
|
10
|
-
export declare function AutomationListRow({ automation, onToggle, onRunNow, isRunPending, onDelete, onEdit, }: AutomationListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function AutomationListRow({ automation, onToggle, onRunNow, isRunPending, onDelete, onExport, onEdit, }: AutomationListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -8,9 +8,10 @@ interface BuildAutomationMenuItemsOptions {
|
|
|
8
8
|
onRunNow: (id: string) => void;
|
|
9
9
|
isRunPending: boolean;
|
|
10
10
|
onView: () => void;
|
|
11
|
+
onExport: (automation: Automation) => void;
|
|
11
12
|
onEdit?: (id: string) => void;
|
|
12
13
|
onToggle: (id: string, enabled: boolean) => void;
|
|
13
14
|
onDelete: (id: string) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare function buildAutomationMenuItems({ automation, t, canManage, onRunNow, isRunPending, onView, onEdit, onToggle, onDelete, }: BuildAutomationMenuItemsOptions): KebabMenuItem[];
|
|
16
|
+
export declare function buildAutomationMenuItems({ automation, t, canManage, onRunNow, isRunPending, onView, onExport, onEdit, onToggle, onDelete, }: BuildAutomationMenuItemsOptions): KebabMenuItem[];
|
|
16
17
|
export {};
|
|
@@ -8,8 +8,10 @@ interface DetailHeaderProps {
|
|
|
8
8
|
*/
|
|
9
9
|
onEdit?: () => void;
|
|
10
10
|
onDelete: () => void;
|
|
11
|
+
onExport: () => void;
|
|
12
|
+
onDownloadTarball: () => void;
|
|
11
13
|
onRunNow?: () => void;
|
|
12
14
|
isRunningNow?: boolean;
|
|
13
15
|
}
|
|
14
|
-
export declare function DetailHeader({ automation, onToggle, onEdit, onDelete, onRunNow, isRunningNow, }: DetailHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function DetailHeader({ automation, onToggle, onEdit, onDelete, onExport, onDownloadTarball, onRunNow, isRunningNow, }: DetailHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AutomationSpec } from "#/types/automation";
|
|
2
|
+
interface ImportAutomationModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
spec: AutomationSpec | null;
|
|
5
|
+
isImporting: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onImport: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function ImportAutomationModal({ isOpen, spec, isImporting, onClose, onImport, }: ImportAutomationModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),
|
|
1
|
+
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),ee=require(`../../../node_modules/lucide-react/dist/esm/icons/external-link.cjs`),r=require(`../../../node_modules/lucide-react/dist/esm/icons/share-2.cjs`),i=require(`../../../utils/utils.cjs`),a=require(`../../../contexts/active-backend-context.cjs`),o=require(`../../../hooks/query/use-active-conversation.cjs`),s=require(`../../../icons/copy.cjs`),c=require(`../../../icons/u-close.cjs`),l=require(`../../../ui/context-menu.cjs`),u=require(`../context-menu/context-menu-list-item.cjs`),d=require(`../../../hooks/use-click-outside-element.cjs`),f=require(`../../../ui/divider.cjs`),p=require(`../../../icons/skills.cjs`),m=require(`../../../icons/fishing-hook.cjs`),h=require(`../../../icons/u-tools.cjs`),g=require(`../context-menu/archived-disabled-tooltip.cjs`),_=require(`../../../hooks/use-is-archived-conversation.cjs`),v=require(`../../../hooks/use-breakpoint.cjs`),te=require(`../../../icons/u-edit.cjs`),y=require(`../../../icons/u-download.cjs`),ne=require(`../../../icons/u-credit-card.cjs`),b=require(`../../../icons/u-delete.cjs`),x=require(`./conversation-name-context-menu-icon-text.cjs`);let S=require(`react`);S=e.__toESM(S,1);let C=require(`react/jsx-runtime`),w=require(`react-dom`);w=e.__toESM(w,1);function T({isPublic:e,onToggle:t,ariaLabel:n}){return(0,C.jsxs)(`label`,{className:`relative inline-flex shrink-0 cursor-pointer items-center`,children:[(0,C.jsx)(`input`,{hidden:!0,type:`checkbox`,"data-testid":`share-publicly-button`,checked:e,"aria-label":n,onChange:e=>t(e.target.checked)}),(0,C.jsx)(`span`,{"aria-hidden":!0,className:i.cn(`inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out`,e?`bg-white`:`bg-base-secondary`),children:(0,C.jsx)(`span`,{className:i.cn(`block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out`,e?`translate-x-[calc(1rem-1px)] bg-base-secondary`:`translate-x-px bg-tertiary-light`)})})]})}function E({onClose:e,onRename:E,onDelete:D,onStop:O,onDisplayCost:k,onShowAgentTools:A,onShowSkills:j,onShowHooks:M,onTogglePublic:N,onCopyShareLink:P,onExportTranscript:F,onDownloadConversation:I,shareUrl:L,position:R=`bottom`,anchorRef:z}){let B=v.useBreakpoint(),{t:V}=t.useTranslation(`openhands`),{backend:H}=a.useActiveBackend(),{data:U}=o.useActiveConversation(),W=_.useIsArchivedConversation(),G=d.useClickOutsideElement(e),K=z?.current??null,[q,J]=S.default.useState();S.default.useLayoutEffect(()=>{if(!K)return;let e=()=>{let e=K.getBoundingClientRect();if(!e)return;let t={position:`fixed`,zIndex:9999};R===`top`?t.bottom=window.innerHeight-e.top+8:t.top=e.bottom+8,t.left=e.left,J(t)};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[K,R]);let Y=!!(A||j||M),X=!!k,re=!!(O||D),ie=H.kind===`cloud`?n.I18nKey.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:n.I18nKey.COMMON$STOP_CONVERSATION,ae=H.kind===`cloud`&&!!N,Z=U?.public||!1,Q=!!K,$=(0,C.jsxs)(l.ContextMenu,{ref:G,testId:`conversation-name-context-menu`,position:R,alignment:`left`,className:i.cn(B?`right-0 translate-x-[34%] left-auto`:``,Q?`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`:``),children:[E&&(0,C.jsx)(u.ContextMenuListItem,{testId:`rename-button`,onClick:E,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(te.default,{width:16,height:16}),text:V(n.I18nKey.BUTTON$RENAME)})}),Y&&(0,C.jsx)(f.Divider,{testId:`separator-tools`,inset:`menu`}),j&&(0,C.jsx)(g.ArchivedDisabledTooltip,{isDisabled:W,children:(0,C.jsx)(u.ContextMenuListItem,{testId:`show-skills-button`,onClick:j,isDisabled:W,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(p.default,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:V(n.I18nKey.CONVERSATION$SHOW_SKILLS)})})}),M&&(0,C.jsx)(g.ArchivedDisabledTooltip,{isDisabled:W,children:(0,C.jsx)(u.ContextMenuListItem,{testId:`show-hooks-button`,onClick:M,isDisabled:W,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(m.default,{width:16,height:16,"aria-hidden":!0}),text:V(n.I18nKey.CONVERSATION$SHOW_HOOKS)})})}),A&&(0,C.jsx)(g.ArchivedDisabledTooltip,{isDisabled:W,children:(0,C.jsx)(u.ContextMenuListItem,{testId:`show-agent-tools-button`,onClick:A,isDisabled:W,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(h.default,{width:16,height:16}),text:V(n.I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),F&&(0,C.jsx)(u.ContextMenuListItem,{testId:`export-transcript-button`,onClick:F,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(y.default,{width:16,height:16}),text:V(n.I18nKey.BUTTON$EXPORT_TRANSCRIPT)})}),I&&(0,C.jsx)(u.ContextMenuListItem,{testId:`download-trajectory-button`,onClick:I,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(y.default,{width:16,height:16}),text:V(n.I18nKey.BUTTON$DOWNLOAD_CONVERSATION_DATA)})}),(X||re)&&(0,C.jsx)(f.Divider,{testId:`separator-info-control`,inset:`menu`}),k&&(0,C.jsx)(u.ContextMenuListItem,{testId:`display-cost-button`,onClick:k,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(ne.default,{width:16,height:16}),text:V(n.I18nKey.BUTTON$DISPLAY_COST)})}),ae&&N&&(0,C.jsxs)(`li`,{className:`flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]`,children:[(0,C.jsx)(`span`,{className:`flex shrink-0 items-center text-[var(--oh-muted)]`,"aria-hidden":!0,children:(0,C.jsx)(r.Share2,{size:16})}),(0,C.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:V(n.I18nKey.CONVERSATION$SHARE_PUBLICLY)}),(0,C.jsxs)(`div`,{className:`flex shrink-0 items-center`,children:[Z&&L&&P&&(0,C.jsxs)(`div`,{className:`mr-2 flex items-center gap-0.5`,children:[(0,C.jsx)(`button`,{type:`button`,"data-testid":`copy-share-link-button`,onClick:P,className:`rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:V(n.I18nKey.BUTTON$COPY_TO_CLIPBOARD),children:(0,C.jsx)(s.default,{width:14,height:14})}),(0,C.jsx)(`a`,{"data-testid":`open-share-link-button`,href:L,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),className:`rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:V(n.I18nKey.BUTTON$OPEN_IN_NEW_TAB),children:(0,C.jsx)(ee.ExternalLink,{size:14,"aria-hidden":!0})})]}),(0,C.jsx)(T,{isPublic:Z,onToggle:N,ariaLabel:V(n.I18nKey.CONVERSATION$SHARE_PUBLICLY)})]})]}),O&&(0,C.jsx)(g.ArchivedDisabledTooltip,{isDisabled:W,children:(0,C.jsx)(u.ContextMenuListItem,{testId:`stop-button`,onClick:O,isDisabled:W,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(c.default,{width:16,height:16}),text:V(ie)})})}),D&&(0,C.jsx)(u.ContextMenuListItem,{testId:`delete-button`,onClick:D,children:(0,C.jsx)(x.ConversationNameContextMenuIconText,{icon:(0,C.jsx)(b.default,{width:16,height:16}),text:V(n.I18nKey.COMMON$DELETE_CONVERSATION)})})]});return Q?typeof document>`u`||!q?null:w.default.createPortal((0,C.jsx)(`div`,{style:q,children:$}),document.body):$}exports.ConversationNameContextMenu=E;
|
|
2
2
|
//# sourceMappingURL=conversation-name-context-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-name-context-menu.cjs","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ExternalLink, Share2 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { cn } from \"#/utils/utils\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nimport EditIcon from \"#/icons/u-edit.svg?react\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\nimport FishingHookIcon from \"#/icons/fishing-hook.svg?react\";\nimport ToolsIcon from \"#/icons/u-tools.svg?react\";\nimport DownloadIcon from \"#/icons/u-download.svg?react\";\nimport CreditCardIcon from \"#/icons/u-credit-card.svg?react\";\nimport CloseIcon from \"#/icons/u-close.svg?react\";\nimport DeleteIcon from \"#/icons/u-delete.svg?react\";\nimport CopyIcon from \"#/icons/copy.svg?react\";\nimport { ConversationNameContextMenuIconText } from \"./conversation-name-context-menu-icon-text\";\nimport { ArchivedDisabledTooltip } from \"../context-menu/archived-disabled-tooltip\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface ConversationNameContextMenuProps {\n onClose: () => void;\n onRename?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onStop?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDisplayCost?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowAgentTools?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowSkills?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowHooks?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onTogglePublic?: (nextIsPublic: boolean) => void;\n onCopyShareLink?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDownloadConversation?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n shareUrl?: string;\n position?: \"top\" | \"bottom\";\n /**\n * Element the menu should anchor against. When provided, the menu renders\n * into a portal at the document body using fixed positioning so it cannot be\n * clipped by ancestors with `overflow: hidden` (e.g. the chat panel that\n * sits next to the right-side tabs panel).\n */\n anchorRef?: React.RefObject<HTMLElement | null>;\n}\n\nfunction PublicShareToggle({\n isPublic,\n onToggle,\n ariaLabel,\n}: {\n isPublic: boolean;\n onToggle: (nextIsPublic: boolean) => void;\n ariaLabel: string;\n}) {\n return (\n <label className=\"relative inline-flex shrink-0 cursor-pointer items-center\">\n <input\n hidden\n type=\"checkbox\"\n data-testid=\"share-publicly-button\"\n checked={isPublic}\n aria-label={ariaLabel}\n onChange={(event) => onToggle(event.target.checked)}\n />\n <span\n aria-hidden\n className={cn(\n \"inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out\",\n isPublic ? \"bg-white\" : \"bg-base-secondary\",\n )}\n >\n <span\n className={cn(\n \"block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out\",\n isPublic\n ? \"translate-x-[calc(1rem-1px)] bg-base-secondary\"\n : \"translate-x-px bg-tertiary-light\",\n )}\n />\n </span>\n </label>\n );\n}\n\nexport function ConversationNameContextMenu({\n onClose,\n onRename,\n onDelete,\n onStop,\n onDisplayCost,\n onShowAgentTools,\n onShowSkills,\n onShowHooks,\n onTogglePublic,\n onCopyShareLink,\n onDownloadConversation,\n shareUrl,\n position = \"bottom\",\n anchorRef,\n}: ConversationNameContextMenuProps) {\n const isMobile = useBreakpoint();\n\n const { t } = useTranslation(\"openhands\");\n const { backend } = useActiveBackend();\n const { data: conversation } = useActiveConversation();\n const isArchivedConversation = useIsArchivedConversation();\n const ref = useClickOutsideElement<HTMLUListElement>(onClose);\n\n const anchorElement = anchorRef?.current ?? null;\n const [portalStyle, setPortalStyle] = React.useState<React.CSSProperties>();\n React.useLayoutEffect(() => {\n if (!anchorElement) return undefined;\n\n const updatePosition = () => {\n const rect = anchorElement.getBoundingClientRect();\n if (!rect) return;\n const gap = 8;\n const style: React.CSSProperties = {\n position: \"fixed\",\n zIndex: 9999,\n };\n if (position === \"top\") {\n style.bottom = window.innerHeight - rect.top + gap;\n } else {\n style.top = rect.bottom + gap;\n }\n style.left = rect.left;\n setPortalStyle(style);\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [anchorElement, position]);\n const hasTools = Boolean(onShowAgentTools || onShowSkills || onShowHooks);\n const hasInfo = Boolean(onDisplayCost);\n const hasControl = Boolean(onStop || onDelete);\n const stopLabelKey =\n backend.kind === \"cloud\"\n ? I18nKey.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME\n : I18nKey.COMMON$STOP_CONVERSATION;\n const shouldShowPublicSharing =\n backend.kind === \"cloud\" && Boolean(onTogglePublic);\n const isPublic = conversation?.public || false;\n\n const isPortaled = Boolean(anchorElement);\n const portalClassName = isPortaled\n ? \"!static !top-auto !bottom-auto !left-auto !right-auto !mt-0\"\n : \"\";\n\n const menu = (\n <ContextMenu\n ref={ref}\n testId=\"conversation-name-context-menu\"\n position={position}\n alignment=\"left\"\n className={cn(\n isMobile ? \"right-0 translate-x-[34%] left-auto\" : \"\",\n portalClassName,\n )}\n >\n {onRename && (\n <ContextMenuListItem testId=\"rename-button\" onClick={onRename}>\n <ConversationNameContextMenuIconText\n icon={<EditIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$RENAME)}\n />\n </ContextMenuListItem>\n )}\n\n {hasTools && <Divider testId=\"separator-tools\" inset=\"menu\" />}\n\n {onShowSkills && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-skills-button\"\n onClick={onShowSkills}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={\n <SkillsIcon\n width={16}\n height={16}\n className=\"stroke-[1.75]\"\n aria-hidden\n />\n }\n text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowHooks && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-hooks-button\"\n onClick={onShowHooks}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<FishingHookIcon width={16} height={16} aria-hidden />}\n text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowAgentTools && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-agent-tools-button\"\n onClick={onShowAgentTools}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<ToolsIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onDownloadConversation && (\n <ContextMenuListItem\n testId=\"download-trajectory-button\"\n onClick={onDownloadConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$EXPORT_CONVERSATION)}\n />\n </ContextMenuListItem>\n )}\n\n {(hasInfo || hasControl) && (\n <Divider testId=\"separator-info-control\" inset=\"menu\" />\n )}\n\n {onDisplayCost && (\n <ContextMenuListItem\n testId=\"display-cost-button\"\n onClick={onDisplayCost}\n >\n <ConversationNameContextMenuIconText\n icon={<CreditCardIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$DISPLAY_COST)}\n />\n </ContextMenuListItem>\n )}\n\n {shouldShowPublicSharing && onTogglePublic && (\n <li className=\"flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]\">\n <span\n className=\"flex shrink-0 items-center text-[var(--oh-muted)]\"\n aria-hidden\n >\n <Share2 size={16} />\n </span>\n <span className=\"min-w-0 flex-1 truncate text-sm\">\n {t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n </span>\n <div className=\"flex shrink-0 items-center\">\n {isPublic && shareUrl && onCopyShareLink && (\n <div className=\"mr-2 flex items-center gap-0.5\">\n <button\n type=\"button\"\n data-testid=\"copy-share-link-button\"\n onClick={onCopyShareLink}\n className=\"rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$COPY_TO_CLIPBOARD)}\n >\n <CopyIcon width={14} height={14} />\n </button>\n <a\n data-testid=\"open-share-link-button\"\n href={shareUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={(event) => event.stopPropagation()}\n className=\"rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}\n >\n <ExternalLink size={14} aria-hidden />\n </a>\n </div>\n )}\n <PublicShareToggle\n isPublic={isPublic}\n onToggle={onTogglePublic}\n ariaLabel={t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n />\n </div>\n </li>\n )}\n\n {onStop && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"stop-button\"\n onClick={onStop}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<CloseIcon width={16} height={16} />}\n text={t(stopLabelKey)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onDelete && (\n <ContextMenuListItem testId=\"delete-button\" onClick={onDelete}>\n <ConversationNameContextMenuIconText\n icon={<DeleteIcon width={16} height={16} />}\n text={t(I18nKey.COMMON$DELETE_CONVERSATION)}\n />\n </ContextMenuListItem>\n )}\n </ContextMenu>\n );\n\n if (isPortaled) {\n if (typeof document === \"undefined\" || !portalStyle) {\n return null;\n }\n return ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n );\n }\n\n return menu;\n}\n"],"mappings":"w3CAkDA,SAAS,EAAkB,CACzB,WACA,WACA,aAKC,CACD,OACE,EAAA,EAAA,MAAC,QAAD,CAAO,UAAU,qEAAjB,EACE,EAAA,EAAA,KAAC,QAAD,CACE,OAAA,GACA,KAAK,WACL,cAAY,wBACZ,QAAS,EACT,aAAY,EACZ,SAAW,GAAU,EAAS,EAAM,OAAO,QAAQ,CACnD,CAAA,EACF,EAAA,EAAA,KAAC,OAAD,CACE,cAAA,GACA,UAAW,EAAA,GACT,0GACA,EAAW,WAAa,oBACzB,WAED,EAAA,EAAA,KAAC,OAAD,CACE,UAAW,EAAA,GACT,oFACA,EACI,iDACA,mCACL,CACD,CAAA,CACG,CAAA,CACD,GAIZ,SAAgB,EAA4B,CAC1C,UACA,WACA,WACA,SACA,gBACA,mBACA,eACA,cACA,iBACA,kBACA,yBACA,WACA,WAAW,SACX,aACmC,CACnC,IAAM,EAAW,EAAA,eAAe,CAE1B,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,CAAE,WAAY,EAAA,kBAAkB,CAChC,CAAE,KAAM,GAAiB,GAAA,uBAAuB,CAChD,EAAyB,EAAA,2BAA2B,CACpD,EAAM,GAAA,uBAAyC,EAAQ,CAEvD,EAAgB,GAAW,SAAW,KACtC,CAAC,EAAa,GAAkB,EAAA,QAAM,UAA+B,CAC3E,EAAA,QAAM,oBAAsB,CAC1B,GAAI,CAAC,EAAe,OAEpB,IAAM,MAAuB,CAC3B,IAAM,EAAO,EAAc,uBAAuB,CAClD,GAAI,CAAC,EAAM,OACX,IACM,EAA6B,CACjC,SAAU,QACV,OAAQ,KACT,CACG,IAAa,MACf,EAAM,OAAS,OAAO,YAAc,EAAK,IAAM,EAE/C,EAAM,IAAM,EAAK,OAAS,EAE5B,EAAM,KAAO,EAAK,KAClB,EAAe,EAAM,EAMvB,OAHA,GAAg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,CACE,CAAA,CAG3B,IACC,EAAA,EAAA,KAAC,EAAA,oBAAD,CAAqB,OAAO,gBAAgB,QAAS,YACnD,EAAA,EAAA,KAAC,EAAA,oCAAD,CACE,MAAM,EAAA,EAAA,KAAC,EAAA,QAAD,CAAY,MAAO,GAAI,OAAQ,GAAM,CAAA,CAC3C,KAAM,EAAE,EAAA,QAAQ,2BAA2B,CAC3C,CAAA,CACkB,CAAA,CAEZ,GAahB,OAVI,EACE,OAAO,SAAa,KAAe,CAAC,EAC/B,KAEF,EAAA,QAAS,cACd,EAAA,EAAA,KAAC,MAAD,CAAK,MAAO,WAAc,EAAW,CAAA,CACrC,SAAS,KACV,CAGI"}
|
|
1
|
+
{"version":3,"file":"conversation-name-context-menu.cjs","names":[],"sources":["../../../../src/components/features/conversation/conversation-name-context-menu.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ExternalLink, Share2 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useClickOutsideElement } from \"#/hooks/use-click-outside-element\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { cn } from \"#/utils/utils\";\nimport { ContextMenu } from \"#/ui/context-menu\";\nimport { ContextMenuListItem } from \"../context-menu/context-menu-list-item\";\nimport { Divider } from \"#/ui/divider\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nimport EditIcon from \"#/icons/u-edit.svg?react\";\nimport SkillsIcon from \"#/icons/skills.svg?react\";\nimport FishingHookIcon from \"#/icons/fishing-hook.svg?react\";\nimport ToolsIcon from \"#/icons/u-tools.svg?react\";\nimport DownloadIcon from \"#/icons/u-download.svg?react\";\nimport CreditCardIcon from \"#/icons/u-credit-card.svg?react\";\nimport CloseIcon from \"#/icons/u-close.svg?react\";\nimport DeleteIcon from \"#/icons/u-delete.svg?react\";\nimport CopyIcon from \"#/icons/copy.svg?react\";\nimport { ConversationNameContextMenuIconText } from \"./conversation-name-context-menu-icon-text\";\nimport { ArchivedDisabledTooltip } from \"../context-menu/archived-disabled-tooltip\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface ConversationNameContextMenuProps {\n onClose: () => void;\n onRename?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onStop?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDisplayCost?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowAgentTools?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowSkills?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onShowHooks?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onTogglePublic?: (nextIsPublic: boolean) => void;\n onCopyShareLink?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onExportTranscript?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n onDownloadConversation?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n shareUrl?: string;\n position?: \"top\" | \"bottom\";\n /**\n * Element the menu should anchor against. When provided, the menu renders\n * into a portal at the document body using fixed positioning so it cannot be\n * clipped by ancestors with `overflow: hidden` (e.g. the chat panel that\n * sits next to the right-side tabs panel).\n */\n anchorRef?: React.RefObject<HTMLElement | null>;\n}\n\nfunction PublicShareToggle({\n isPublic,\n onToggle,\n ariaLabel,\n}: {\n isPublic: boolean;\n onToggle: (nextIsPublic: boolean) => void;\n ariaLabel: string;\n}) {\n return (\n <label className=\"relative inline-flex shrink-0 cursor-pointer items-center\">\n <input\n hidden\n type=\"checkbox\"\n data-testid=\"share-publicly-button\"\n checked={isPublic}\n aria-label={ariaLabel}\n onChange={(event) => onToggle(event.target.checked)}\n />\n <span\n aria-hidden\n className={cn(\n \"inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out\",\n isPublic ? \"bg-white\" : \"bg-base-secondary\",\n )}\n >\n <span\n className={cn(\n \"block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out\",\n isPublic\n ? \"translate-x-[calc(1rem-1px)] bg-base-secondary\"\n : \"translate-x-px bg-tertiary-light\",\n )}\n />\n </span>\n </label>\n );\n}\n\nexport function ConversationNameContextMenu({\n onClose,\n onRename,\n onDelete,\n onStop,\n onDisplayCost,\n onShowAgentTools,\n onShowSkills,\n onShowHooks,\n onTogglePublic,\n onCopyShareLink,\n onExportTranscript,\n onDownloadConversation,\n shareUrl,\n position = \"bottom\",\n anchorRef,\n}: ConversationNameContextMenuProps) {\n const isMobile = useBreakpoint();\n\n const { t } = useTranslation(\"openhands\");\n const { backend } = useActiveBackend();\n const { data: conversation } = useActiveConversation();\n const isArchivedConversation = useIsArchivedConversation();\n const ref = useClickOutsideElement<HTMLUListElement>(onClose);\n\n const anchorElement = anchorRef?.current ?? null;\n const [portalStyle, setPortalStyle] = React.useState<React.CSSProperties>();\n React.useLayoutEffect(() => {\n if (!anchorElement) return undefined;\n\n const updatePosition = () => {\n const rect = anchorElement.getBoundingClientRect();\n if (!rect) return;\n const gap = 8;\n const style: React.CSSProperties = {\n position: \"fixed\",\n zIndex: 9999,\n };\n if (position === \"top\") {\n style.bottom = window.innerHeight - rect.top + gap;\n } else {\n style.top = rect.bottom + gap;\n }\n style.left = rect.left;\n setPortalStyle(style);\n };\n\n updatePosition();\n window.addEventListener(\"resize\", updatePosition);\n window.addEventListener(\"scroll\", updatePosition, true);\n return () => {\n window.removeEventListener(\"resize\", updatePosition);\n window.removeEventListener(\"scroll\", updatePosition, true);\n };\n }, [anchorElement, position]);\n const hasTools = Boolean(onShowAgentTools || onShowSkills || onShowHooks);\n const hasInfo = Boolean(onDisplayCost);\n const hasControl = Boolean(onStop || onDelete);\n const stopLabelKey =\n backend.kind === \"cloud\"\n ? I18nKey.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME\n : I18nKey.COMMON$STOP_CONVERSATION;\n const shouldShowPublicSharing =\n backend.kind === \"cloud\" && Boolean(onTogglePublic);\n const isPublic = conversation?.public || false;\n\n const isPortaled = Boolean(anchorElement);\n const portalClassName = isPortaled\n ? \"!static !top-auto !bottom-auto !left-auto !right-auto !mt-0\"\n : \"\";\n\n const menu = (\n <ContextMenu\n ref={ref}\n testId=\"conversation-name-context-menu\"\n position={position}\n alignment=\"left\"\n className={cn(\n isMobile ? \"right-0 translate-x-[34%] left-auto\" : \"\",\n portalClassName,\n )}\n >\n {onRename && (\n <ContextMenuListItem testId=\"rename-button\" onClick={onRename}>\n <ConversationNameContextMenuIconText\n icon={<EditIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$RENAME)}\n />\n </ContextMenuListItem>\n )}\n\n {hasTools && <Divider testId=\"separator-tools\" inset=\"menu\" />}\n\n {onShowSkills && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-skills-button\"\n onClick={onShowSkills}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={\n <SkillsIcon\n width={16}\n height={16}\n className=\"stroke-[1.75]\"\n aria-hidden\n />\n }\n text={t(I18nKey.CONVERSATION$SHOW_SKILLS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowHooks && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-hooks-button\"\n onClick={onShowHooks}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<FishingHookIcon width={16} height={16} aria-hidden />}\n text={t(I18nKey.CONVERSATION$SHOW_HOOKS)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onShowAgentTools && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"show-agent-tools-button\"\n onClick={onShowAgentTools}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<ToolsIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onExportTranscript && (\n <ContextMenuListItem\n testId=\"export-transcript-button\"\n onClick={onExportTranscript}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$EXPORT_TRANSCRIPT)}\n />\n </ContextMenuListItem>\n )}\n\n {onDownloadConversation && (\n <ContextMenuListItem\n testId=\"download-trajectory-button\"\n onClick={onDownloadConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<DownloadIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$DOWNLOAD_CONVERSATION_DATA)}\n />\n </ContextMenuListItem>\n )}\n\n {(hasInfo || hasControl) && (\n <Divider testId=\"separator-info-control\" inset=\"menu\" />\n )}\n\n {onDisplayCost && (\n <ContextMenuListItem\n testId=\"display-cost-button\"\n onClick={onDisplayCost}\n >\n <ConversationNameContextMenuIconText\n icon={<CreditCardIcon width={16} height={16} />}\n text={t(I18nKey.BUTTON$DISPLAY_COST)}\n />\n </ContextMenuListItem>\n )}\n\n {shouldShowPublicSharing && onTogglePublic && (\n <li className=\"flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]\">\n <span\n className=\"flex shrink-0 items-center text-[var(--oh-muted)]\"\n aria-hidden\n >\n <Share2 size={16} />\n </span>\n <span className=\"min-w-0 flex-1 truncate text-sm\">\n {t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n </span>\n <div className=\"flex shrink-0 items-center\">\n {isPublic && shareUrl && onCopyShareLink && (\n <div className=\"mr-2 flex items-center gap-0.5\">\n <button\n type=\"button\"\n data-testid=\"copy-share-link-button\"\n onClick={onCopyShareLink}\n className=\"rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$COPY_TO_CLIPBOARD)}\n >\n <CopyIcon width={14} height={14} />\n </button>\n <a\n data-testid=\"open-share-link-button\"\n href={shareUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={(event) => event.stopPropagation()}\n className=\"rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current\"\n title={t(I18nKey.BUTTON$OPEN_IN_NEW_TAB)}\n >\n <ExternalLink size={14} aria-hidden />\n </a>\n </div>\n )}\n <PublicShareToggle\n isPublic={isPublic}\n onToggle={onTogglePublic}\n ariaLabel={t(I18nKey.CONVERSATION$SHARE_PUBLICLY)}\n />\n </div>\n </li>\n )}\n\n {onStop && (\n <ArchivedDisabledTooltip isDisabled={isArchivedConversation}>\n <ContextMenuListItem\n testId=\"stop-button\"\n onClick={onStop}\n isDisabled={isArchivedConversation}\n >\n <ConversationNameContextMenuIconText\n icon={<CloseIcon width={16} height={16} />}\n text={t(stopLabelKey)}\n />\n </ContextMenuListItem>\n </ArchivedDisabledTooltip>\n )}\n\n {onDelete && (\n <ContextMenuListItem testId=\"delete-button\" onClick={onDelete}>\n <ConversationNameContextMenuIconText\n icon={<DeleteIcon width={16} height={16} />}\n text={t(I18nKey.COMMON$DELETE_CONVERSATION)}\n />\n </ContextMenuListItem>\n )}\n </ContextMenu>\n );\n\n if (isPortaled) {\n if (typeof document === \"undefined\" || !portalStyle) {\n return null;\n }\n return ReactDOM.createPortal(\n <div style={portalStyle}>{menu}</div>,\n document.body,\n );\n }\n\n return menu;\n}\n"],"mappings":"w3CAmDA,SAAS,EAAkB,CACzB,WACA,WACA,aAKC,CACD,OACE,EAAA,EAAA,MAAC,QAAD,CAAO,UAAU,qEAAjB,EACE,EAAA,EAAA,KAAC,QAAD,CACE,OAAA,GACA,KAAK,WACL,cAAY,wBACZ,QAAS,EACT,aAAY,EACZ,SAAW,GAAU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,CAAqB,OAAO,gBAAgB,QAAS,YACnD,EAAA,EAAA,KAAC,EAAA,oCAAD,CACE,MAAM,EAAA,EAAA,KAAC,EAAA,QAAD,CAAY,MAAO,GAAI,OAAQ,GAAM,CAAA,CAC3C,KAAM,EAAE,EAAA,QAAQ,2BAA2B,CAC3C,CAAA,CACkB,CAAA,CAEZ,GAahB,OAVI,EACE,OAAO,SAAa,KAAe,CAAC,EAC/B,KAEF,EAAA,QAAS,cACd,EAAA,EAAA,KAAC,MAAD,CAAK,MAAO,WAAc,EAAW,CAAA,CACrC,SAAS,KACV,CAGI"}
|
|
@@ -10,6 +10,7 @@ interface ConversationNameContextMenuProps {
|
|
|
10
10
|
onShowHooks?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
11
|
onTogglePublic?: (nextIsPublic: boolean) => void;
|
|
12
12
|
onCopyShareLink?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
onExportTranscript?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
14
|
onDownloadConversation?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
15
|
shareUrl?: string;
|
|
15
16
|
position?: "top" | "bottom";
|
|
@@ -21,5 +22,5 @@ interface ConversationNameContextMenuProps {
|
|
|
21
22
|
*/
|
|
22
23
|
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
23
24
|
}
|
|
24
|
-
export declare function ConversationNameContextMenu({ onClose, onRename, onDelete, onStop, onDisplayCost, onShowAgentTools, onShowSkills, onShowHooks, onTogglePublic, onCopyShareLink, onDownloadConversation, shareUrl, position, anchorRef, }: ConversationNameContextMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
export declare function ConversationNameContextMenu({ onClose, onRename, onDelete, onStop, onDisplayCost, onShowAgentTools, onShowSkills, onShowHooks, onTogglePublic, onCopyShareLink, onExportTranscript, onDownloadConversation, shareUrl, position, anchorRef, }: ConversationNameContextMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
26
|
export {};
|