@openhands/agent-canvas 1.8.0 → 1.10.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-WUD4tfSq.js → acp-providers-DLe_gVDY.js} +1 -1
- package/build/assets/active-backend-context-B0wI7OzM.js +2 -0
- package/build/assets/agent-context-settings-CaQtdNA-.js +1 -0
- package/build/assets/agent-profiles-settings-CvuErjp6.js +1 -0
- package/build/assets/agent-server-conversation-service.api-km_8sOVf.js +41 -0
- package/build/assets/{agent-settings-BGTyoT6X.js → agent-settings-UE-U4Xii.js} +2 -2
- package/build/assets/agent-settings-nmO-KSXr.js +1 -0
- package/build/assets/alert-banner-BMaOtTCG.js +1 -0
- package/build/assets/{api-key-entry-screen-JOx3SH1-.js → api-key-entry-screen-Cy66vT4D.js} +1 -1
- package/build/assets/{app-settings-D53QZy5p.js → app-settings-9ok42bV6.js} +1 -1
- package/build/assets/automation-C_eCrGyP.js +1 -0
- package/build/assets/automation-detail-fuITm6i3.js +3 -0
- package/build/assets/automation-export-CRq40mux.js +2 -0
- package/build/assets/automation-setup-route-EXDazOHW.js +1 -0
- package/build/assets/automation-templates-BArZsaxP.js +1 -0
- package/build/assets/automations-list-CG4HKOTn.js +1 -0
- package/build/assets/{back-nav-button-C02hGa8t.js → back-nav-button-BZB6H7xz.js} +1 -1
- package/build/assets/backend-form-modal-B_lXjOGa.js +1 -0
- package/build/assets/{backend-synced-settings-badge-CQ9xtNWm.js → backend-synced-settings-badge-B_NXJ3u1.js} +1 -1
- package/build/assets/{badge-CzXbf7tR.js → badge-C64c-7PO.js} +1 -1
- package/build/assets/{base-modal-DkVyzFMt.js → base-modal-C0RQPug5.js} +1 -1
- package/build/assets/bot-DuN83i3p.js +1 -0
- package/build/assets/{brand-button-BUlDL-mz.js → brand-button-DJmFCyMK.js} +1 -1
- package/build/assets/browser-D3gd2n83.js +6 -0
- package/build/assets/{browser-tab-BijpUbdt.js → browser-tab-BicAWuJ1.js} +1 -1
- package/build/assets/{chat-send-button-BKsVjhtA.js → chat-send-button-CCrH1E8u.js} +1 -1
- package/build/assets/check-DLOKoFU9.js +1 -0
- package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
- package/build/assets/chevron-down-CnIbtM6i.js +1 -0
- package/build/assets/circle-check-CxCYJrpZ.js +1 -0
- package/build/assets/{circle-plus-check-toggle-DdjUiOo1.js → circle-plus-check-toggle-CB_sNERY.js} +1 -1
- package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
- package/build/assets/cloud-funnel-analytics-XynamQGU.js +1 -0
- package/build/assets/{combobox-caret-Dl9UtvD6.js → combobox-caret-Bwiifgjs.js} +1 -1
- package/build/assets/command-menu-CA3IjGNc.js +1 -0
- package/build/assets/condenser-settings-cNGy75gq.js +1 -0
- package/build/assets/{confirmation-modal-CRBJSllP.js → confirmation-modal-BATFmFyP.js} +1 -1
- package/build/assets/context-menu-list-item-DhJCcBA0.js +1 -0
- package/build/assets/conversation-B6t6EiVp.js +1 -0
- package/build/assets/conversation-Csdxh9Xt.js +90 -0
- package/build/assets/conversation-panel-B6t6EiVp.js +1 -0
- package/build/assets/conversation-state-store-C2QzhPaK.js +1 -0
- package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-CDjvNgpG.js → conversation-tab-empty-state-D3fb5xIA.js} +1 -1
- package/build/assets/{copy-Drwu97Gx.js → copy-DaHuDtG4.js} +1 -1
- package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-NbN1clVr.js → copy-to-clipboard-button-c4MQwKGj.js} +1 -1
- package/build/assets/{device-verify-CDm_WrVu.js → device-verify-oFpQoLgm.js} +1 -1
- package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
- package/build/assets/{dropdown-classes-CqA2BTCL.js → dropdown-classes-f91ARMV1.js} +1 -1
- package/build/assets/entry.client-BCzY2Bf3.js +2 -0
- package/build/assets/enum-filter-dropdown-HG3q3rkV.js +1 -0
- package/build/assets/{environment-switch-overlay-mGl2pqqx.js → environment-switch-overlay-CquZXolz.js} +1 -1
- package/build/assets/{extensions-hub-Br3Lgynp.js → extensions-hub-BeweE0PW.js} +1 -1
- package/build/assets/{extensions-navigation-BQmstKDZ.js → extensions-navigation-Dd58NlUF.js} +1 -1
- package/build/assets/{external-link-D9B2QMPf.js → external-link-zWbg5KXS.js} +1 -1
- package/build/assets/file-text-RecuaId_.js +1 -0
- package/build/assets/files-tab-CLLG55-q.js +1 -0
- package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
- package/build/assets/{form-control-classes-CtVAktAy.js → form-control-classes-pHtZUI6K.js} +1 -1
- package/build/assets/format-relative-time-6-3uvOXe.js +1 -0
- package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
- package/build/assets/git-provider-icon-wg7ShB98.js +1 -0
- package/build/assets/git-repo-dropdown-CWnaUyxL.js +1 -0
- package/build/assets/git-repo-dropdown-TzOuG5Ef.js +1 -0
- package/build/assets/{highlighted-source-view-KMsA9c4a.js → highlighted-source-view-DBtI3por.js} +1 -1
- package/build/assets/home-BpZQkDWM.js +1 -0
- package/build/assets/home-OEx0XtfP.js +1 -0
- package/build/assets/home-store-DM4qw1lF.js +1 -0
- package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
- package/build/assets/index-home-OEx0XtfP.js +1 -0
- package/build/assets/info-C9lpK5pw.js +1 -0
- package/build/assets/install-server-modal-DnjZrJUy.js +1 -0
- package/build/assets/kebab-menu-item-content-By16Tm_0.js +1 -0
- package/build/assets/{launch-DjkKw55l.js → launch-C9uijypN.js} +1 -1
- package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
- package/build/assets/list-filter-C86CBRDE.js +1 -0
- package/build/assets/{list-todo-BpAf7aOT.js → list-todo-CheUtB7F.js} +1 -1
- package/build/assets/llm-not-configured-banner-DrBrhfN0.js +27 -0
- package/build/assets/{llm-settings-D8zNkIlP.js → llm-settings-CRsLqxgu.js} +1 -1
- package/build/assets/llm-settings-RBm_3kNm.js +1 -0
- package/build/assets/{llm-subscription-service-COTgZc1C.js → llm-subscription-service-DwjJ8-_X.js} +1 -1
- package/build/assets/loader-circle-C5AnEN8r.js +1 -0
- package/build/assets/{loading-spinner-DRFyh6Iy.js → loading-spinner-6Yj-YyoS.js} +1 -1
- package/build/assets/{manage-backends-modal-DiRWE3tJ.js → manage-backends-modal-DrwErS0N.js} +1 -1
- package/build/assets/manifest-c352d453.js +1 -0
- package/build/assets/manifest-subpage-layout-CtqVwIvJ.js +1 -0
- package/build/assets/markdown-renderer-lsvsp7jn.js +8 -0
- package/build/assets/mcp-DD4hPTRE.js +9 -0
- package/build/assets/mcp-marketplace-utils-BMnYz0Gc.js +1 -0
- package/build/assets/messages-Dt77e0qi.js +40 -0
- package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
- package/build/assets/{modal-body-C3bGicn4.js → modal-body-BHGCSAtj.js} +1 -1
- package/build/assets/{modal-classes-DFFO6BMU.js → modal-classes-DSTLuxkA.js} +1 -1
- package/build/assets/{modal-close-button-vxkAIRyZ.js → modal-close-button-dheWZ2ys.js} +1 -1
- package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
- package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
- package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
- package/build/assets/onboarding-5CZvRBbh.js +1 -0
- package/build/assets/onboarding-modal-CD2ehuxt.js +1 -0
- package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
- package/build/assets/{organization-service.api-CQ73CB-S.js → organization-service.api-Dsuoep0g.js} +1 -1
- package/build/assets/{pencil-DzW2GB2M.js → pencil-Bl3GWhgq.js} +1 -1
- package/build/assets/{planner-tab-YG0bGxDY.js → planner-tab-DeO7Thb0.js} +1 -1
- package/build/assets/{plugins-management-service-ijhH8OSh.js → plugins-management-service-C9f75R6X.js} +1 -1
- package/build/assets/plus-CtzlyAoF.js +1 -0
- package/build/assets/{profiles-service.api-C32pPm70.js → profiles-service.api-Dl20_2IM.js} +1 -1
- package/build/assets/{providers-DuSn9s2i.js → providers-CeuhK46N.js} +1 -1
- package/build/assets/{proxy-BiyDhMBd.js → proxy-CIGI9zQC.js} +1 -1
- package/build/assets/{puzzle-DlqT0yvr.js → puzzle-B3v361yY.js} +1 -1
- package/build/assets/recommended-automations-launcher-6xmbf7lh.js +1 -0
- package/build/assets/{refresh-cw-Br5254f4.js → refresh-cw-B9GhC3QC.js} +1 -1
- package/build/assets/root-BQPNqNvD.js +2 -0
- package/build/assets/root-BeuHFY2s.css +1 -0
- package/build/assets/root-layout-Dl_2CDoq.js +3 -0
- package/build/assets/{schema-field-htfNouTG.js → schema-field-z2vSLuLo.js} +1 -1
- package/build/assets/{sdk-section-page-D0K1dBQY.js → sdk-section-page-BnCXAytf.js} +1 -1
- package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
- package/build/assets/search-CYaiKHRp.js +1 -0
- package/build/assets/{secrets-service-Dbv5Zb8G.js → secrets-service-DGUNlwQd.js} +1 -1
- package/build/assets/{secrets-settings-Da4SSaX9.js → secrets-settings-DUmML_dK.js} +1 -1
- package/build/assets/segmented-toggle-eSofF7gn.js +1 -0
- package/build/assets/settings-CWFxymAf.js +1 -0
- package/build/assets/{settings-F4a09IxY.js → settings-Co-M5bK9.js} +1 -1
- package/build/assets/{settings-dropdown-input-jOiv5Yrk.js → settings-dropdown-input-Cx4g7Xfl.js} +1 -1
- package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
- package/build/assets/{settings-index-CyJBf5NA.js → settings-index-BECdgecg.js} +1 -1
- package/build/assets/settings-input-BQY115xH.js +1 -0
- package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
- package/build/assets/{settings-list-classes-VqMzkYYt.js → settings-list-classes-C9cLrrcc.js} +1 -1
- package/build/assets/{settings-modal-C-S1NpbC.js → settings-modal-ChBJNTdd.js} +1 -1
- package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
- package/build/assets/settings-service.api-Dz9cZyvx.js +1 -0
- package/build/assets/{settings-switch-B405oU_v.js → settings-switch-BIodMVz9.js} +1 -1
- package/build/assets/shared-conversation-CSF0aTuE.js +1 -0
- package/build/assets/{sidebar-layout-BGMuyC86.js → sidebar-layout-DEycoFd_.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-DeRvTupV.js +1 -0
- package/build/assets/{sidebar-nav-link-DA4_ct9G.js → sidebar-nav-link-BjpQ-NVc.js} +1 -1
- package/build/assets/{sidebar-store-FRJ3rADB.js → sidebar-store-B04sX8aP.js} +1 -1
- package/build/assets/{skill-card-pill-row-BMdhr_sd.js → skill-card-pill-row-BH6fPGba.js} +1 -1
- package/build/assets/{skill-icon-badge-CGUkgcVH.js → skill-icon-badge-D4uznfjU.js} +1 -1
- package/build/assets/skill-scope-DH_AUUUP.js +1 -0
- package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
- package/build/assets/{skills-plugins-C5eJnyft.js → skills-plugins-vfvOk34h.js} +1 -1
- package/build/assets/skills-settings-DnbIu2eO.js +2 -0
- package/build/assets/sparkles-g7y3r-Ut.js +1 -0
- package/build/assets/{styled-tooltip-B3kIdVyH.js → styled-tooltip-CQ9JEFiO.js} +1 -1
- package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
- package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
- package/build/assets/{task-list-tab-B3k4W1cK.js → task-list-tab-DeF_uXdw.js} +1 -1
- package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
- package/build/assets/{terminal-CBI_41Zc.js → terminal-DRc4rup7.js} +1 -1
- package/build/assets/{toggle-switch-DYRr9CAR.js → toggle-switch--8n8NeV_.js} +1 -1
- package/build/assets/{trash-2-gZPlx23R.js → trash-2-CzDVN-Iw.js} +1 -1
- package/build/assets/{typography-B1UxuuEC.js → typography-BSbUhJPn.js} +1 -1
- package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
- package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
- package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
- package/build/assets/{use-acp-credential-form-CjSvKWFH.js → use-acp-credential-form-BGKFi1VL.js} +1 -1
- package/build/assets/{use-activate-agent-profile-DCRf47e-.js → use-activate-agent-profile-2nvALjC-.js} +1 -1
- package/build/assets/use-agent-profiles-BlQA67MW.js +1 -0
- package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-vBiP7rHF.js → use-can-manage-org-profiles-Clw5Dh1s.js} +1 -1
- package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BMq9gw93.js → use-cloud-current-user-id-B8AQSQFM.js} +1 -1
- package/build/assets/use-config-C3zGuUQI.js +1 -0
- package/build/assets/{use-create-conversation-CakhLF0X.js → use-create-conversation-FaP0kUpg.js} +1 -1
- package/build/assets/{use-create-secret-RT4QtSS9.js → use-create-secret-CgQ3pXd6.js} +1 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
- package/build/assets/{use-is-creating-conversation-CIAcnd8M.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
- package/build/assets/use-llm-profiles-C-tDO6UB.js +1 -0
- package/build/assets/use-manifest-capabilities-DLP5wCxp.js +1 -0
- package/build/assets/{use-onboarding-completion-CJU4MNAY.js → use-onboarding-completion-BiCdXvlU.js} +1 -1
- package/build/assets/{use-plugins-marketplace-D-93nqtJ.js → use-plugins-marketplace-DRFNLBlr.js} +1 -1
- package/build/assets/use-save-agent-profile-CaGVAudI.js +1 -0
- package/build/assets/{use-save-settings--C6LZXfI.js → use-save-settings-C9B8Y-h3.js} +1 -1
- package/build/assets/{use-settings-DIAo5KFk.js → use-settings-3RcgdUuZ.js} +1 -1
- package/build/assets/use-settings-nav-items-y-Oyc93G.js +16 -0
- package/build/assets/use-tracking-CTtkLAmx.js +3 -0
- package/build/assets/{use-user-conversation-DhcAEyJX.js → use-user-conversation-Bei82QsZ.js} +1 -1
- package/build/assets/useInfiniteQuery-DbCv0Jzd.js +1 -0
- package/build/assets/{useMutation-DHLpZ6J0.js → useMutation-ChpkYxI5.js} +1 -1
- package/build/assets/{useQueries-B3T1a7qt.js → useQueries-Cjv3E8_1.js} +1 -1
- package/build/assets/useQuery-BCnzy4LX.js +1 -0
- package/build/assets/utils-BX9XJ0IE.js +1 -0
- package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
- package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
- package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
- package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
- package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
- package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
- package/build/assets/{vendor~entry.client-Di4qO77Y.js → vendor~entry.client-zSIea5EO.js} +2 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
- package/build/assets/{vendor~files-tab-atebg0iG.js → vendor~files-tab-C87pjSpi.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-G9DMrR7m.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
- package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
- package/build/assets/vendor~module-DyG7x7JT.js +2 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEhW1h3I.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +175 -54
- package/build/assets/{verification-settings-Vr5cN4md.js → verification-settings-nD61Ijph.js} +1 -1
- package/build/assets/wrench-DRitTfwe.js +1 -0
- package/build/assets/x-RYDBg-e2.js +1 -0
- package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
- package/build/assets/zap-tbKDzCe3.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +106 -5
- package/build/locales/ca/openhands.json +106 -5
- package/build/locales/de/openhands.json +106 -5
- package/build/locales/en/openhands.json +107 -6
- package/build/locales/es/openhands.json +106 -5
- package/build/locales/fr/openhands.json +106 -5
- package/build/locales/it/openhands.json +106 -5
- package/build/locales/ja/openhands.json +106 -5
- package/build/locales/ko-KR/openhands.json +106 -5
- package/build/locales/no/openhands.json +106 -5
- package/build/locales/pt/openhands.json +106 -5
- package/build/locales/tr/openhands.json +106 -5
- package/build/locales/uk/openhands.json +106 -5
- package/build/locales/zh-CN/openhands.json +106 -5
- package/build/locales/zh-TW/openhands.json +106 -5
- package/build/mockServiceWorker.js +21 -9
- package/config/defaults.json +3 -3
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +46 -6
- package/dist/api/agent-server-adapter.js +187 -168
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.d.ts +4 -0
- package/dist/api/agent-server-compatibility.js +41 -38
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +25 -0
- package/dist/api/automation-service/automation-service.api.js +110 -62
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.js +36 -31
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/url-selection.cjs +2 -0
- package/dist/api/backend-registry/url-selection.cjs.map +1 -0
- package/dist/api/backend-registry/url-selection.d.ts +31 -0
- package/dist/api/backend-registry/url-selection.js +29 -0
- package/dist/api/backend-registry/url-selection.js.map +1 -0
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
- package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
- package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +10 -0
- package/dist/api/settings-service/settings-service.api.js +90 -100
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.js +1 -0
- package/dist/api/skills-service.js.map +1 -1
- package/dist/assets/chevron-left.d.ts +1 -1
- package/dist/assets/chevron-right.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +2 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.d.ts +12 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +94 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +31 -90
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/alerts/alert-banner.d.ts +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
- package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
- package/dist/components/features/automations/automation-card.d.ts +9 -1
- package/dist/components/features/automations/automation-group.d.ts +9 -1
- package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
- package/dist/components/features/automations/automation-list-row.d.ts +3 -1
- package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
- package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
- package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
- package/dist/components/features/automations/create-instructions.d.ts +2 -2
- package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
- package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
- package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
- package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
- package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
- package/dist/components/features/automations/detail/back-link.d.ts +1 -1
- package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/config-field.d.ts +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
- package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
- package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
- package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
- package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
- package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
- package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
- package/dist/components/features/automations/detail/section-card.d.ts +1 -1
- package/dist/components/features/automations/empty-state.d.ts +1 -1
- package/dist/components/features/automations/error-state.d.ts +1 -1
- package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu.d.ts +1 -1
- package/dist/components/features/automations/metadata-chip.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -8
- package/dist/components/features/automations/recommended-automations-section.d.ts +1 -7
- package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
- package/dist/components/features/automations/search-input.d.ts +1 -1
- package/dist/components/features/automations/status-badge.d.ts +1 -1
- package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
- package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
- package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
- package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
- package/dist/components/features/backends/backend-form-modal.js +568 -358
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-row.d.ts +1 -1
- package/dist/components/features/backends/backend-selector.d.ts +2 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
- package/dist/components/features/backends/backend-version.d.ts +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +9 -1
- package/dist/components/features/backends/device-flow-auth.js +56 -55
- package/dist/components/features/backends/device-flow-auth.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
- package/dist/components/features/backends/manage-backends-modal.js +1 -1
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
- package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
- package/dist/components/features/browser/browser.d.ts +1 -1
- package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
- package/dist/components/features/chat/btw-messages.d.ts +1 -1
- package/dist/components/features/chat/change-agent-button.d.ts +2 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
- package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
- package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.cjs +1 -1
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.js +105 -105
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/chat-message.cjs +1 -1
- package/dist/components/features/chat/chat-message.cjs.map +1 -1
- package/dist/components/features/chat/chat-message.d.ts +2 -1
- package/dist/components/features/chat/chat-message.js +59 -49
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
- package/dist/components/features/chat/chat-play-button.d.ts +1 -1
- package/dist/components/features/chat/chat-send-button.d.ts +1 -1
- package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
- package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
- package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
- package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
- package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
- package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
- package/dist/components/features/chat/drag-over.d.ts +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +2 -1
- package/dist/components/features/chat/error-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar.d.ts +1 -1
- package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
- package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
- package/dist/components/features/chat/goal-status-content.d.ts +1 -1
- package/dist/components/features/chat/got-it-button.d.ts +1 -1
- package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
- package/dist/components/features/chat/model-messages.d.ts +2 -1
- package/dist/components/features/chat/mono-component.d.ts +1 -1
- package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
- package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
- package/dist/components/features/chat/path-component.d.ts +1 -1
- package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
- package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
- package/dist/components/features/chat/pending-user-messages.js +4 -1
- package/dist/components/features/chat/pending-user-messages.js.map +1 -1
- package/dist/components/features/chat/plan-preview.d.ts +1 -1
- package/dist/components/features/chat/remove-file-button.d.ts +1 -1
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
- package/dist/components/features/chat/success-indicator.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
- package/dist/components/features/chat/typing-indicator.cjs +1 -1
- package/dist/components/features/chat/typing-indicator.cjs.map +1 -1
- package/dist/components/features/chat/typing-indicator.d.ts +8 -1
- package/dist/components/features/chat/typing-indicator.js +94 -10
- package/dist/components/features/chat/typing-indicator.js.map +1 -1
- package/dist/components/features/chat/uploaded-file.d.ts +1 -1
- package/dist/components/features/chat/uploaded-files.d.ts +1 -1
- package/dist/components/features/chat/uploaded-image.d.ts +2 -1
- package/dist/components/features/chat/user-message-body.d.ts +2 -2
- package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
- package/dist/components/features/command-menu/command-menu-items.d.ts +5 -1
- package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
- package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-loading.d.ts +1 -1
- package/dist/components/features/controls/agent-status.d.ts +1 -1
- package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
- package/dist/components/features/controls/macros-submenu.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
- package/dist/components/features/controls/server-status.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
- package/dist/components/features/controls/tools.d.ts +2 -1
- package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name.d.ts +2 -1
- package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
- package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
- package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
- package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
- package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +221 -220
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
- package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
- package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
- package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
- package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
- package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
- package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
- package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
- package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
- package/dist/components/features/files/file-item.d.ts +1 -1
- package/dist/components/features/files/file-list.d.ts +2 -1
- package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
- package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
- package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
- package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
- package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
- package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
- package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +3 -1
- package/dist/components/features/files-tab/segmented-toggle.js +17 -14
- package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
- package/dist/components/features/files-tab/tree-node.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
- package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
- package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
- package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
- package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
- package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
- package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
- package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
- package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header.d.ts +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
- package/dist/components/features/home/new-conversation.d.ts +1 -1
- package/dist/components/features/home/open-launcher-button.d.ts +1 -1
- package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
- package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
- package/dist/components/features/home/repo-selection-form.d.ts +2 -1
- package/dist/components/features/home/shared/clear-button.d.ts +2 -1
- package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
- package/dist/components/features/home/shared/empty-state.d.ts +2 -1
- package/dist/components/features/home/shared/error-message.d.ts +2 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
- package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
- package/dist/components/features/home/tasks/task-card.d.ts +1 -1
- package/dist/components/features/home/tasks/task-group.d.ts +1 -1
- package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
- package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
- package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
- package/dist/components/features/images/image-carousel.d.ts +2 -1
- package/dist/components/features/images/image-preview.d.ts +1 -1
- package/dist/components/features/images/thumbnail.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
- package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +27 -0
- package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
- package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
- package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +11 -0
- package/dist/components/features/manifest/manifest-review-step.d.ts +14 -0
- package/dist/components/features/manifest/manifest-setup-dialog.d.ts +14 -0
- package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
- package/dist/components/features/markdown/anchor.d.ts +1 -1
- package/dist/components/features/markdown/blockquote.d.ts +1 -1
- package/dist/components/features/markdown/code.d.ts +1 -1
- package/dist/components/features/markdown/headings.d.ts +6 -6
- package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
- package/dist/components/features/markdown/list.d.ts +3 -3
- package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
- package/dist/components/features/markdown/paragraph.d.ts +1 -1
- package/dist/components/features/markdown/plan-components.d.ts +36 -36
- package/dist/components/features/markdown/table.d.ts +3 -3
- package/dist/components/features/mcp-logo-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.d.ts +2 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.d.ts +2 -1
- package/dist/components/features/mcp-page/install-server-modal.js +117 -118
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
- package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
- package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
- package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
- package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
- package/dist/components/features/plugins/plugin-card.d.ts +2 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
- package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
- package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
- package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
- package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
- package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
- package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
- package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
- package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
- package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
- package/dist/components/features/settings/banner-message.d.ts +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
- package/dist/components/features/settings/input-skeleton.d.ts +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
- package/dist/components/features/settings/key-status-icon.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
- package/dist/components/features/settings/mobile-header.d.ts +1 -1
- package/dist/components/features/settings/optional-tag.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
- package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
- package/dist/components/features/settings/settings-desktop-sidebar.d.ts +1 -1
- package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
- package/dist/components/features/settings/settings-input.cjs +1 -1
- package/dist/components/features/settings/settings-input.cjs.map +1 -1
- package/dist/components/features/settings/settings-input.d.ts +6 -0
- package/dist/components/features/settings/settings-input.js +13 -8
- package/dist/components/features/settings/settings-input.js.map +1 -1
- package/dist/components/features/settings/settings-layout.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
- package/dist/components/features/settings/settings-navigation.d.ts +1 -1
- package/dist/components/features/settings/settings-switch.d.ts +1 -1
- package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
- package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
- package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
- package/dist/components/features/settings/upgrade-button.d.ts +1 -1
- package/dist/components/features/sidebar/avatar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +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 +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +124 -123
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.d.ts +2 -1
- package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
- package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
- package/dist/components/features/skills/extensions-mobile-hub.d.ts +1 -1
- package/dist/components/features/skills/extensions-navigation.d.ts +1 -1
- package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
- package/dist/components/features/skills/skill-card.d.ts +2 -1
- package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
- package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
- package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
- package/dist/components/features/skills/skill-filter.d.ts +34 -0
- package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
- package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
- package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
- package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
- package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.d.ts +1 -1
- package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
- package/dist/components/features/terminal/terminal.d.ts +1 -1
- package/dist/components/features/tips/random-tip.d.ts +2 -1
- package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
- package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
- package/dist/components/providers/telemetry-provider.d.ts +1 -1
- package/dist/components/shared/action-tooltip.d.ts +1 -1
- package/dist/components/shared/agent-brand-icon.d.ts +1 -1
- package/dist/components/shared/badge.d.ts +1 -1
- package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
- package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
- package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
- package/dist/components/shared/buttons/modal-button.d.ts +1 -1
- package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +1 -1
- package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
- package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/git-provider-icon.d.ts +1 -1
- package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
- package/dist/components/shared/loading-spinner.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
- package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
- package/dist/components/shared/modals/modal-body.d.ts +1 -1
- package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
- package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
- package/dist/components/shared/navigation-link.cjs +1 -1
- package/dist/components/shared/navigation-link.cjs.map +1 -1
- package/dist/components/shared/navigation-link.js +11 -7
- package/dist/components/shared/navigation-link.js.map +1 -1
- package/dist/components/shared/risk-alert.d.ts +1 -1
- package/dist/components/shared/text-shimmer.d.ts +1 -1
- package/dist/components/ui/resize-handle.d.ts +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/context/navigation-context.d.ts +1 -1
- package/dist/context/scroll-context.d.ts +1 -1
- package/dist/contexts/active-backend-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +1 -1
- package/dist/contexts/settings-section-header-context.d.ts +1 -1
- package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
- package/dist/fixtures/home-automations-demo.d.ts +19 -0
- package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
- package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.d.ts +2 -7
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.js +8 -4
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.d.ts +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +4 -0
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.d.ts +1 -1
- package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
- package/dist/hooks/query/use-app-installations.d.ts +1 -1
- package/dist/hooks/query/use-automation-detail.d.ts +2 -2
- package/dist/hooks/query/use-automation-health.d.ts +2 -0
- package/dist/hooks/query/use-automations.d.ts +5 -1
- package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
- package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
- package/dist/hooks/query/use-commit-changes.d.ts +1 -1
- package/dist/hooks/query/use-config.d.ts +1 -1
- package/dist/hooks/query/use-conversation-history.d.ts +1 -1
- package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
- package/dist/hooks/query/use-get-secrets.d.ts +1 -1
- package/dist/hooks/query/use-home-automations.d.ts +20 -0
- package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
- package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
- package/dist/hooks/query/use-local-git-info.d.ts +1 -1
- package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
- package/dist/hooks/query/use-manifest-capabilities.d.ts +23 -0
- package/dist/hooks/query/use-manifest-prerequisites.d.ts +24 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
- package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
- package/dist/hooks/query/use-provider-models.d.ts +1 -1
- package/dist/hooks/query/use-search-branches.d.ts +1 -1
- package/dist/hooks/query/use-search-providers.d.ts +1 -1
- package/dist/hooks/query/use-search-repositories.d.ts +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
- package/dist/hooks/query/use-settings.d.ts +2 -2
- package/dist/hooks/query/use-skills.d.ts +1 -1
- package/dist/hooks/query/use-start-tasks.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
- package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +2 -2
- package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
- package/dist/hooks/query/use-user-conversation.d.ts +1 -1
- package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
- package/dist/hooks/use-backend-scoped-path.cjs +2 -0
- package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
- package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
- package/dist/hooks/use-backend-scoped-path.js +13 -0
- package/dist/hooks/use-backend-scoped-path.js.map +1 -0
- package/dist/hooks/use-home-automation-actions.d.ts +23 -0
- package/dist/hooks/use-home-pinned-automations.d.ts +26 -0
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.cjs.map +1 -1
- package/dist/hooks/use-llm-configured.js +2 -1
- package/dist/hooks/use-llm-configured.js.map +1 -1
- package/dist/hooks/use-manifest-preflight.d.ts +18 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +18 -0
- package/dist/hooks/use-tracking.js +25 -1
- 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 +103 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1780 -63
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/code-pill.d.ts +1 -1
- package/dist/icons/external-link.cjs +2 -0
- package/dist/icons/external-link.cjs.map +1 -0
- package/dist/icons/external-link.js +22 -0
- package/dist/icons/external-link.js.map +1 -0
- package/dist/icons/server.cjs +2 -0
- package/dist/icons/server.cjs.map +1 -0
- package/dist/icons/server.js +17 -0
- package/dist/icons/server.js.map +1 -0
- package/dist/locales/ar/openhands.json +106 -5
- package/dist/locales/ca/openhands.json +106 -5
- package/dist/locales/de/openhands.json +106 -5
- package/dist/locales/en/openhands.json +107 -6
- package/dist/locales/es/openhands.json +106 -5
- package/dist/locales/fr/openhands.json +106 -5
- package/dist/locales/it/openhands.json +106 -5
- package/dist/locales/ja/openhands.json +106 -5
- package/dist/locales/ko-KR/openhands.json +106 -5
- package/dist/locales/no/openhands.json +106 -5
- package/dist/locales/pt/openhands.json +106 -5
- package/dist/locales/tr/openhands.json +106 -5
- package/dist/locales/uk/openhands.json +106 -5
- package/dist/locales/zh-CN/openhands.json +106 -5
- package/dist/locales/zh-TW/openhands.json +106 -5
- package/dist/manifests/automation-insights.d.ts +64 -0
- package/dist/manifests/automation-interface.cjs +2 -0
- package/dist/manifests/automation-interface.cjs.map +1 -0
- package/dist/manifests/automation-interface.d.ts +76 -0
- package/dist/manifests/automation-interface.js +82 -0
- package/dist/manifests/automation-interface.js.map +1 -0
- package/dist/manifests/automation-setup.cjs +2 -0
- package/dist/manifests/automation-setup.cjs.map +1 -0
- package/dist/manifests/automation-setup.d.ts +52 -0
- package/dist/manifests/automation-setup.js +8 -0
- package/dist/manifests/automation-setup.js.map +1 -0
- package/dist/manifests/interface-validation.cjs +2 -0
- package/dist/manifests/interface-validation.cjs.map +1 -0
- package/dist/manifests/interface-validation.d.ts +27 -0
- package/dist/manifests/interface-validation.js +360 -0
- package/dist/manifests/interface-validation.js.map +1 -0
- package/dist/manifests/manifest-actions.d.ts +15 -0
- package/dist/manifests/manifest-capabilities.d.ts +25 -0
- package/dist/manifests/manifest-error-map.d.ts +40 -0
- package/dist/manifests/manifest-local-validation.d.ts +56 -0
- package/dist/manifests/manifest-registry.cjs +2 -0
- package/dist/manifests/manifest-registry.cjs.map +1 -0
- package/dist/manifests/manifest-registry.d.ts +15 -0
- package/dist/manifests/manifest-registry.js +26 -0
- package/dist/manifests/manifest-registry.js.map +1 -0
- package/dist/manifests/manifest-sources.cjs +2 -0
- package/dist/manifests/manifest-sources.cjs.map +1 -0
- package/dist/manifests/manifest-sources.d.ts +15 -0
- package/dist/manifests/manifest-sources.js +8 -0
- package/dist/manifests/manifest-sources.js.map +1 -0
- package/dist/manifests/manifest-template.d.ts +20 -0
- package/dist/manifests/manifest-validation.cjs +2 -0
- package/dist/manifests/manifest-validation.cjs.map +1 -0
- package/dist/manifests/manifest-validation.d.ts +30 -0
- package/dist/manifests/manifest-validation.js +145 -0
- package/dist/manifests/manifest-validation.js.map +1 -0
- package/dist/manifests/types.cjs +2 -0
- package/dist/manifests/types.cjs.map +1 -0
- package/dist/manifests/types.d.ts +355 -0
- package/dist/manifests/types.js +39 -0
- package/dist/manifests/types.js.map +1 -0
- package/dist/mockServiceWorker.js +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +75 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +78 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs +17 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js +89 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +10 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +17 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js +15 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js +18 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js +14 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js +14 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +25 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/index.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/index.js +18 -0
- package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.js +210 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -0
- 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 +3 -3
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +174 -53
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +115 -53
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
- package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js +29 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js.map +1 -0
- package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
- package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
- package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +34 -33
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +3 -2
- package/dist/routes/app-settings.d.ts +2 -1
- package/dist/routes/browser-tab.d.ts +1 -1
- package/dist/routes/changes-tab.d.ts +2 -1
- package/dist/routes/commits-tab.d.ts +1 -1
- package/dist/routes/conversation.d.ts +2 -1
- package/dist/routes/files-tab.d.ts +1 -1
- package/dist/routes/llm-settings.d.ts +3 -2
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +2 -1
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/planner-tab.d.ts +2 -1
- package/dist/routes/secrets-settings.d.ts +2 -1
- package/dist/routes/task-list-tab.d.ts +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -7
- package/dist/services/settings.js.map +1 -1
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +2 -19
- package/dist/types/agent-server/core/events/observation-event.d.ts +2 -18
- package/dist/types/automation.d.ts +23 -4
- package/dist/types/mcp-auth.cjs.map +1 -1
- package/dist/types/mcp-auth.d.ts +5 -41
- package/dist/types/mcp-auth.js.map +1 -1
- package/dist/types/mcp-server.d.ts +17 -32
- package/dist/types/settings.d.ts +8 -28
- package/dist/ui/card-title.d.ts +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/combobox-caret.d.ts +3 -3
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.ts +3 -2
- package/dist/ui/context-menu.js +10 -9
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/divider.d.ts +1 -1
- package/dist/ui/dropdown/clear-button.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
- package/dist/ui/dropdown/toggle-button.d.ts +1 -1
- package/dist/ui/help-link.d.ts +1 -1
- package/dist/ui/pre.d.ts +1 -1
- package/dist/ui/toggle-switch.d.ts +2 -2
- package/dist/ui/typography.d.ts +7 -7
- package/dist/utils/api-error-message.d.ts +6 -2
- package/dist/utils/automation-activity-log-export.d.ts +17 -0
- package/dist/utils/automation-catalog.cjs +2 -0
- package/dist/utils/automation-catalog.cjs.map +1 -0
- package/dist/utils/automation-catalog.d.ts +28 -0
- package/dist/utils/automation-catalog.js +5 -0
- package/dist/utils/automation-catalog.js.map +1 -0
- package/dist/utils/automation-timeout.d.ts +5 -6
- package/dist/utils/custom-toast-handlers.d.ts +2 -2
- package/dist/utils/format-relative-time.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +12 -29
- package/dist/utils/mcp-config.js +161 -143
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.d.ts +2 -2
- package/dist/utils/mcp-installed-servers.js +21 -32
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs.map +1 -1
- package/dist/utils/mcp-server-health-key.d.ts +2 -4
- package/dist/utils/mcp-server-health-key.js.map +1 -1
- package/dist/utils/responder-deployment.d.ts +5 -1
- package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
- package/dist/utils/settings-like-page-layout-classes.js +1 -1
- package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
- package/dist/utils/skill-category.d.ts +12 -0
- package/dist/utils/transcript-export/index.cjs +5 -5
- package/dist/utils/transcript-export/index.js +12 -12
- package/package.json +36 -33
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +1 -0
- package/scripts/dev-safe.mjs +17 -12
- package/scripts/dev-static.mjs +17 -0
- package/scripts/dev-with-automation.mjs +15 -16
- package/scripts/ingress.mjs +22 -0
- package/scripts/proxy-utils.mjs +157 -2
- package/scripts/runtime-services-info.mjs +6 -6
- package/scripts/static-build.mjs +0 -7
- package/scripts/static-server.mjs +10 -0
- package/build/assets/Trans-B7lYw4uD.js +0 -1
- package/build/assets/active-backend-context-mY7Gff5c.js +0 -2
- package/build/assets/agent-context-settings-BTUmWEzL.js +0 -1
- package/build/assets/agent-profiles-settings-Ilqid_R5.js +0 -1
- package/build/assets/agent-server-conversation-service.api-C_7YnjzP.js +0 -41
- package/build/assets/agent-settings-CxfT4ksO.js +0 -1
- package/build/assets/alert-banner-eRyIwDyU.js +0 -1
- package/build/assets/automation-BGP_I1RR.js +0 -1
- package/build/assets/automation-detail-nEflClmc.js +0 -2
- package/build/assets/automation-export-BO_kfqC8.js +0 -2
- package/build/assets/automations-list-BYncC7gv.js +0 -1
- package/build/assets/backend-form-modal-CKrBF80P.js +0 -1
- package/build/assets/browser-3QjrEr1D.js +0 -6
- package/build/assets/check-CrxQfJZ2.js +0 -1
- package/build/assets/chevron-down-D_LsyTA7.js +0 -1
- package/build/assets/circle-check-DZn9HkLE.js +0 -1
- package/build/assets/cloud-funnel-analytics-NlmDoeo2.js +0 -1
- package/build/assets/command-menu-CvLPs7dg.js +0 -1
- package/build/assets/condenser-settings-C4Y9CzQV.js +0 -1
- package/build/assets/context-menu-list-item-FGaafXGh.js +0 -1
- package/build/assets/conversation-D_ORtpKC.js +0 -1
- package/build/assets/conversation-Dpc5nmGi.js +0 -90
- package/build/assets/conversation-panel-D_ORtpKC.js +0 -1
- package/build/assets/conversation-state-store-CGRQemtx.js +0 -1
- package/build/assets/entry.client-BO2KQj0y.js +0 -2
- package/build/assets/enum-filter-dropdown-DSqPZnsD.js +0 -1
- package/build/assets/files-tab-4c9HFSLo.js +0 -1
- package/build/assets/format-time-delta-DICE64sz.js +0 -1
- package/build/assets/git-provider-icon-0PqmIS_S.js +0 -1
- package/build/assets/home-D9JsyEmE.js +0 -1
- package/build/assets/home-TFhnmZLx.js +0 -1
- package/build/assets/index-home-D9JsyEmE.js +0 -1
- package/build/assets/install-server-modal-BgGRnqA0.js +0 -1
- package/build/assets/llm-not-configured-banner-Y4W9-sar.js +0 -27
- package/build/assets/llm-settings-nPwv7hKu.js +0 -1
- package/build/assets/loader-circle-CGD6-Vak.js +0 -1
- package/build/assets/manifest-1cf33a7b.js +0 -1
- package/build/assets/markdown-renderer-U40HF0Ak.js +0 -8
- package/build/assets/mcp-xDMaHzOw.js +0 -9
- package/build/assets/messages-CdNfZPgd.js +0 -40
- package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
- package/build/assets/onboarding-DWuFieEA.js +0 -1
- package/build/assets/onboarding-modal-C8m72Dpb.js +0 -1
- package/build/assets/plus-CTGLo3aa.js +0 -1
- package/build/assets/recommended-automations-launcher-Dru1yN46.js +0 -58
- package/build/assets/root-B5JXKp1P.css +0 -1
- package/build/assets/root-DOLLQteU.js +0 -2
- package/build/assets/root-layout-xmylWoew.js +0 -3
- package/build/assets/search-BrpWXWUi.js +0 -1
- package/build/assets/segmented-toggle-CZKOdIly.js +0 -1
- package/build/assets/settings-Chfn5xTD.js +0 -1
- package/build/assets/settings-input-BEaTCem1.js +0 -1
- package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
- package/build/assets/settings-service.api-CTJRrvMu.js +0 -1
- package/build/assets/shared-conversation-BvWtTwES.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-xiKoUfGa.js +0 -1
- package/build/assets/skills-settings-pUxMr6WZ.js +0 -2
- package/build/assets/use-agent-profiles-DmT9zxAN.js +0 -1
- package/build/assets/use-config-C959QcRC.js +0 -1
- package/build/assets/use-is-authed-BsS4XwSL.js +0 -1
- package/build/assets/use-llm-profiles-CdaxVpyY.js +0 -1
- package/build/assets/use-save-agent-profile-DGJ3-u0M.js +0 -1
- package/build/assets/use-settings-nav-items-DPK5sxvR.js +0 -16
- package/build/assets/use-skills-D_mLhYNa.js +0 -1
- package/build/assets/use-tracking-COqZLobY.js +0 -1
- package/build/assets/useQuery-B38jBavx.js +0 -1
- package/build/assets/utils-DsWhWn2F.js +0 -1
- package/build/assets/v4-DDdyfk2q.js +0 -1
- package/build/assets/vendor~browser-CIoZCqGs.js +0 -47
- package/build/assets/vendor~entry.client-BfviqoVc.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js +0 -26
- package/build/assets/vendor~module-BZXjBMvd.js +0 -2
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-Acmf1sKj.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CmzCY1BT.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C7Yh77RT.js +0 -1
- package/build/assets/x-Dx_JbpHA.js +0 -1
- package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
- package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
- package/dist/node_modules/void-elements/index.cjs +0 -2
- package/dist/node_modules/void-elements/index.cjs.map +0 -1
- package/dist/node_modules/void-elements/index.js +0 -25
- package/dist/node_modules/void-elements/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-service.api.js","names":[],"sources":["../../../src/api/settings-service/settings-service.api.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { Settings, SettingsSchema, SettingsValue } from \"#/types/settings\";\nimport {\n getSdkMcpServerMap,\n hasRedactedMcpSecretLeaf,\n stringRecord,\n} from \"#/utils/mcp-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n fetchCloudConversationSettingsSchema,\n fetchCloudSettings,\n fetchCloudSettingsSchema,\n saveCloudSettings,\n} from \"../cloud/settings-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\n\n/**\n * Fields the agent-server stores under `misc_settings.app_preferences` (see\n * SDK `openhands.sdk.settings.AppPreferences`). Mirrored here as a flat\n * partial of Settings so the rest of the frontend can keep treating them as\n * top-level keys (`settings.language`, `settings.disabled_skills`, …).\n */\nexport const APP_PREFERENCE_FIELDS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n \"title_llm_profile\",\n \"disabled_skills\",\n] as const;\n\nexport type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];\n\nexport type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;\n\n/**\n * Container for frontend-owned settings the agent doesn't interpret.\n * Mirrors the SDK `MiscSettings` model introduced in agent-server 1.27.\n *\n * Single nested category today (`app_preferences`). Adding a future\n * category (e.g. `ui_preferences`) is a non-breaking change for the wire\n * shape — it just adds another optional sibling here.\n */\nexport interface MiscSettings {\n app_preferences?: AppPreferences;\n}\n\n/**\n * Response from GET /api/settings\n * Mirrors the SettingsResponse model in the agent server.\n */\nexport interface SettingsApiResponse {\n agent_settings: Record<string, SettingsValue>;\n conversation_settings: Record<string, SettingsValue>;\n llm_api_key_is_set: boolean;\n /**\n * Frontend-owned settings the agent does not interpret (currently just\n * `app_preferences`). Added in agent-server 1.27; earlier servers omit\n * the field entirely, in which case the frontend falls back to defaults.\n */\n misc_settings?: MiscSettings;\n}\n\n/**\n * Request payload for PATCH /api/settings.\n *\n * `misc_settings_diff` is deep-merged into the persisted `misc_settings`\n * block, matching the semantics of `agent_settings_diff` /\n * `conversation_settings_diff`. A partial diff like\n * `{ app_preferences: { language: \"fr\" } }` updates only `language` and\n * leaves every other `app_preferences` field alone. Lists\n * (`disabled_skills`) are replaced wholesale rather than merged.\n */\nexport interface SettingsUpdateRequest {\n agent_settings_diff?: Record<string, SettingsValue>;\n conversation_settings_diff?: Record<string, SettingsValue>;\n misc_settings_diff?: MiscSettings;\n // Permit additional keys so this stays assignable to the underlying\n // typescript-client SDK type, which uses `[key: string]: unknown` for\n // forward compatibility.\n [key: string]: unknown;\n}\n\nconst APP_PREFERENCE_FIELD_SET: ReadonlySet<string> = new Set(\n APP_PREFERENCE_FIELDS,\n);\n\nconst isAppPreferenceField = (key: string): key is AppPreferenceField =>\n APP_PREFERENCE_FIELD_SET.has(key);\n\n/**\n * Split known app-preference keys out of a save payload so callers can\n * route them through `misc_settings_diff.app_preferences` (local) or as\n * flat top-level keys (cloud), while the remaining fields flow into the\n * `agent_settings_diff` / `conversation_settings_diff` branches.\n */\nconst extractAppPreferences = (\n input: Record<string, unknown>,\n): { extracted: AppPreferences; rest: Record<string, unknown> } => {\n const extracted: AppPreferences = {};\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (isAppPreferenceField(key)) {\n (extracted as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n return { extracted, rest };\n};\n\n/**\n * Secret exposure mode for X-Expose-Secrets header.\n *\n * - undefined: Returns redacted secrets (\"**********\")\n * - \"encrypted\": Returns cipher-encrypted values (safe for frontend to round-trip)\n * - \"plaintext\": Returns raw secret values (backend use only!)\n */\nexport type ExposeSecretsMode = \"encrypted\" | \"plaintext\" | undefined;\n\nconst deepClone = <T>(value: T): T => JSON.parse(JSON.stringify(value)) as T;\n\nconst mergeRecords = (\n base: Record<string, SettingsValue> | null | undefined,\n next: Record<string, SettingsValue> | null | undefined,\n) => ({ ...(base ?? {}), ...(next ?? {}) });\n\n/**\n * Retry helper for API calls with exponential backoff.\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n maxRetries: number = 3,\n baseDelayMs: number = 500,\n): Promise<T> {\n for (let attempt = 0; attempt < maxRetries; attempt += 1) {\n try {\n return await fn();\n } catch (error) {\n if (attempt >= maxRetries - 1) {\n throw error;\n }\n\n const delay = baseDelayMs * 2 ** attempt;\n\n await new Promise<void>((resolve) => {\n setTimeout(resolve, delay);\n });\n }\n }\n\n throw new Error(\"Retry attempts exhausted\");\n}\n\n/**\n * In-memory cache for settings to avoid repeated network calls.\n * The cache is invalidated on save operations.\n */\nlet settingsCache: {\n /** Settings with redacted secrets for display */\n redacted: SettingsApiResponse | null;\n /** Settings with encrypted secrets for conversation start */\n encrypted: SettingsApiResponse | null;\n /** Timestamp when the cache was last populated */\n timestamp: number;\n} = {\n redacted: null,\n encrypted: null,\n timestamp: 0,\n};\n\nconst CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\n\nconst isCacheValid = () => Date.now() - settingsCache.timestamp < CACHE_TTL_MS;\n\nconst clearCache = () => {\n settingsCache = { redacted: null, encrypted: null, timestamp: 0 };\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === \"object\" && !Array.isArray(value);\n\nconst basicAuthHeader = (username: string, password: string): string => {\n const token = btoa(`${username}:${password}`);\n return `Basic ${token}`;\n};\n\nconst headersFromMcpAuth = (\n auth: Record<string, unknown>,\n): Record<string, string> | null => {\n switch (auth.strategy) {\n case \"none\":\n return {};\n case \"api_key\": {\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n const header =\n typeof auth.header_name === \"string\" && auth.header_name\n ? auth.header_name\n : \"Authorization\";\n const value =\n header === \"Authorization\" ? `Bearer ${auth.value}` : auth.value;\n return { [header]: value };\n }\n case \"bearer\":\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n return { Authorization: `Bearer ${auth.value}` };\n case \"basic\":\n if (\n typeof auth.username !== \"string\" ||\n typeof auth.password !== \"string\"\n ) {\n return null;\n }\n return { Authorization: basicAuthHeader(auth.username, auth.password) };\n case \"header\":\n return stringRecord(auth.headers) ?? {};\n case \"oauth2\": {\n const tokens = isRecord(auth.state) ? auth.state.tokens : undefined;\n if (!isRecord(tokens) || typeof tokens.access_token !== \"string\") {\n return null;\n }\n return { Authorization: `Bearer ${tokens.access_token}` };\n }\n default:\n return null;\n }\n};\n\nconst cloudCompatibleMcpConfig = (value: unknown): unknown => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) => {\n if (!isRecord(server) || !isRecord(server.auth)) return [name, server];\n\n const authHeaders = headersFromMcpAuth(server.auth);\n if (authHeaders === null) return [name, server];\n\n const nextServer = { ...server };\n const existingHeaders = stringRecord(server.headers) ?? {};\n const mergedHeaders = { ...existingHeaders, ...authHeaders };\n delete nextServer.auth;\n if (Object.keys(mergedHeaders).length > 0) {\n nextServer.headers = mergedHeaders;\n } else {\n delete nextServer.headers;\n }\n return [name, nextServer];\n }),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\n/**\n * Spell out every server's `enabled` flag.\n *\n * `toSdkMcpConfig` omits the flag while a server is enabled and relies on the\n * pre-clear below to drop a previously persisted `enabled: false`. The one\n * write that skips the pre-clear — a cloud update carrying redacted secrets —\n * lands as an RFC 7386 merge instead, and a merge cannot clear a key by\n * omitting it. Without this, re-enabling a server on cloud would silently do\n * nothing.\n */\nconst withExplicitMcpEnabled = (value: unknown): unknown => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) =>\n isRecord(server)\n ? [name, { ...server, enabled: server.enabled !== false }]\n : [name, server],\n ),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\nconst hasRedactedMcpSecrets = (mcpConfig: unknown): boolean => {\n const servers = getSdkMcpServerMap(mcpConfig);\n if (!servers) return false;\n return Object.values(servers).some(\n (server) =>\n hasRedactedMcpSecretLeaf(isRecord(server) ? server.auth : undefined) ||\n hasRedactedMcpSecretLeaf(isRecord(server) ? server.headers : undefined) ||\n hasRedactedMcpSecretLeaf(isRecord(server) ? server.env : undefined),\n );\n};\n\nconst removesMcpServer = (previous: unknown, next: unknown): boolean => {\n const previousServers = getSdkMcpServerMap(previous);\n const nextServers = getSdkMcpServerMap(next);\n if (!previousServers || !nextServers) return false;\n return Object.keys(previousServers).some((name) => !(name in nextServers));\n};\n\n/**\n * Transform API response into Settings object with derived fields.\n */\nconst transformApiResponse = (\n response: SettingsApiResponse,\n): Partial<Settings> => {\n const agentSettings = response.agent_settings ?? {};\n const conversationSettings = response.conversation_settings ?? {};\n\n const partial: Partial<Settings> = {\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n llm_api_key_set: response.llm_api_key_is_set,\n };\n\n // App-level user preferences come back nested under\n // `misc_settings.app_preferences` from the local agent-server (added in\n // 1.27, restructured into the `misc_settings` container in the follow-up\n // refactor). Hoist them onto the flat Settings shape the rest of the\n // frontend already speaks. Older servers omit the `misc_settings` field\n // entirely; the migration helper invoked from `getSettings` promotes any\n // leftover localStorage values to the server on first run, so the omitted\n // case just falls back to defaults.\n const prefs = response.misc_settings?.app_preferences;\n if (prefs) {\n for (const key of APP_PREFERENCE_FIELDS) {\n const value = prefs[key];\n if (value !== undefined) {\n (partial as Record<string, unknown>)[key] = value;\n }\n }\n }\n\n return partial;\n};\n\n/**\n * Sync derived settings fields from agent_settings and conversation_settings.\n * This ensures backward compatibility with code that reads top-level fields.\n */\nconst syncDerivedSettings = (settings: Partial<Settings>): Settings => {\n const agentSettings = mergeRecords(\n DEFAULT_SETTINGS.agent_settings ?? {},\n settings.agent_settings ?? {},\n );\n const conversationSettings = mergeRecords(\n DEFAULT_SETTINGS.conversation_settings ?? {},\n settings.conversation_settings ?? {},\n );\n\n const merged = {\n ...deepClone(DEFAULT_SETTINGS),\n ...settings,\n provider_tokens_set: {\n ...(DEFAULT_SETTINGS.provider_tokens_set ?? {}),\n ...(settings.provider_tokens_set ?? {}),\n },\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n } as Settings;\n\n const llm = agentSettings.llm as Record<string, SettingsValue> | undefined;\n const condenser = agentSettings.condenser as\n | Record<string, SettingsValue>\n | undefined;\n\n if (typeof agentSettings.agent === \"string\") {\n merged.agent = agentSettings.agent;\n }\n if (typeof llm?.model === \"string\" && llm.model.length > 0) {\n merged.llm_model = llm.model;\n }\n if (typeof llm?.base_url === \"string\") {\n merged.llm_base_url = llm.base_url;\n }\n // Note: api_key may be redacted (\"**********\") when fetched without expose header\n // We don't sync it to top-level llm_api_key to avoid overwriting with redacted value\n if (typeof condenser?.enabled === \"boolean\") {\n merged.enable_default_condenser = condenser.enabled;\n }\n if (typeof condenser?.max_size === \"number\") {\n merged.condenser_max_size = condenser.max_size;\n }\n if (typeof conversationSettings.confirmation_mode === \"boolean\") {\n merged.confirmation_mode = conversationSettings.confirmation_mode;\n }\n if (\n typeof conversationSettings.security_analyzer === \"string\" ||\n conversationSettings.security_analyzer === null\n ) {\n merged.security_analyzer = conversationSettings.security_analyzer as\n | string\n | null;\n }\n if (typeof conversationSettings.max_iterations === \"number\") {\n merged.max_iterations = conversationSettings.max_iterations;\n }\n\n merged.search_api_key_set = !!merged.search_api_key;\n\n return merged;\n};\n\nclass SettingsService {\n /**\n * Fetch settings from the agent server API with retry logic.\n *\n * @param exposeSecrets - Controls how secrets are returned:\n * - undefined: Secrets are redacted (\"**********\") - safe for display\n * - \"encrypted\": Secrets are cipher-encrypted - safe for round-trip to start conversation\n * - \"plaintext\": Raw secrets - DO NOT USE from frontend\n */\n static async fetchSettingsFromApi(\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<SettingsApiResponse> {\n return withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).getSettings({\n exposeSecrets,\n }),\n ) as Promise<SettingsApiResponse>;\n }\n\n /**\n * Get settings for display (secrets are redacted).\n * Uses in-memory cache for performance.\n */\n static async getSettings(): Promise<Settings> {\n // Cloud uses a different settings shape (flat top-level fields\n // including provider_tokens_set, llm_model, etc.). Branch out before\n // touching the local-only cache: cloud responses bypass the local\n // SettingsApiResponse shape and feed straight into syncDerivedSettings\n // so cloud-native fields like provider_tokens_set reach the GUI's\n // useUserProviders → useAppInstallations → useGitRepositories chain.\n if (getActiveBackend().backend.kind === \"cloud\") {\n try {\n const cloud = await withRetry(() => fetchCloudSettings());\n return syncDerivedSettings(cloud);\n } catch (error) {\n console.warn(\"Failed to fetch cloud settings, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n // Check cache first\n if (isCacheValid() && settingsCache.redacted) {\n return syncDerivedSettings(transformApiResponse(settingsCache.redacted));\n }\n\n try {\n const response = await this.fetchSettingsFromApi();\n settingsCache.redacted = response;\n settingsCache.timestamp = Date.now();\n return syncDerivedSettings(transformApiResponse(response));\n } catch (error) {\n // If API fails, return defaults\n console.warn(\"Failed to fetch settings from API, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n /**\n * Get settings with encrypted secrets for starting conversations.\n * The encrypted secrets can be passed to the start conversation API\n * with secrets_encrypted=true for server-side decryption.\n *\n * @throws Error if encrypted settings cannot be fetched - conversations\n * should not start with broken/redacted credentials.\n */\n static async getSettingsForConversation(): Promise<{\n agentSettings: Record<string, SettingsValue>;\n conversationSettings: Record<string, SettingsValue>;\n secretsEncrypted: boolean;\n }> {\n // Check cache first\n if (isCacheValid() && settingsCache.encrypted) {\n return {\n agentSettings: settingsCache.encrypted.agent_settings,\n conversationSettings: settingsCache.encrypted.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n // Fetch encrypted settings - this MUST succeed for conversations to work.\n // Do not fall back to redacted settings as that would cause auth failures.\n const response = await this.fetchSettingsFromApi(\"encrypted\");\n settingsCache.encrypted = response;\n if (!settingsCache.timestamp) {\n settingsCache.timestamp = Date.now();\n }\n return {\n agentSettings: response.agent_settings,\n conversationSettings: response.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n static async getSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getAgentSchema()) as SettingsSchema;\n }\n\n static async getConversationSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudConversationSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getConversationSchema()) as SettingsSchema;\n }\n\n /**\n * Save settings to the agent server API.\n * Uses PATCH for incremental updates.\n */\n static async saveSettings(\n settings: Partial<Settings> & Record<string, unknown>,\n ): Promise<boolean> {\n // Split app-level user-preference fields (language, git identity, sound\n // notifications, analytics consent, disabled_skills) off and route them\n // through `misc_settings_diff.app_preferences` (local) or as flat\n // top-level keys (cloud). The local agent-server stores them under\n // `PersistedSettings.misc_settings.app_preferences`; the cloud accepts\n // them as flat keys on `POST /api/v1/settings`.\n const { extracted: appPreferences, rest } = extractAppPreferences(\n settings as Record<string, unknown>,\n );\n const hasAppPreferences = Object.keys(appPreferences).length > 0;\n\n const payload: SettingsUpdateRequest = {};\n\n // Extract agent_settings_diff\n const agentSettingsDiff = rest.agent_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (agentSettingsDiff && Object.keys(agentSettingsDiff).length > 0) {\n payload.agent_settings_diff = agentSettingsDiff;\n }\n\n // Extract conversation_settings_diff\n const conversationSettingsDiff = rest.conversation_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (\n conversationSettingsDiff &&\n Object.keys(conversationSettingsDiff).length > 0\n ) {\n payload.conversation_settings_diff = conversationSettingsDiff;\n }\n\n if (hasAppPreferences) {\n payload.misc_settings_diff = { app_preferences: appPreferences };\n }\n\n const isCloud = getActiveBackend().backend.kind === \"cloud\";\n\n // The backend applies ``agent_settings_diff`` by deep-merging it into the\n // existing ``agent_settings`` dict (see SDK\n // ``openhands.agent_server.persistence.models._deep_merge``). That works\n // for scalar fields but is wrong for ``mcp_config``, which is\n // a name-keyed map: a diff that omits a server cannot remove it (stale\n // key stays), and a diff whose key indices shift (e.g. after deleting\n // index 0, the second server is renumbered) leaves the original keys\n // behind as duplicates pointing to the wrong server config.\n //\n // The only way to make ``mcp_config`` behave like a replace through this\n // API is to first null it out — ``null`` is not a dict, so deep-merge\n // takes the else branch and sets the field to ``None`` outright — and\n // then send the new value in a follow-up call. We do this for every\n // ``mcp_config`` write, including adds (the wasted round-trip is\n // negligible for this user action and avoids divergent code paths).\n const agentDiff = payload.agent_settings_diff;\n // Send a pre-clear PATCH when the diff sets ``mcp_config`` to a non-null\n // value. A second PATCH below then writes the new value. Skipping the\n // pre-clear when the caller is already clearing (``mcp_config: null``)\n // avoids a pointless duplicate request.\n const needsMcpPreClear =\n !!agentDiff && \"mcp_config\" in agentDiff && agentDiff.mcp_config !== null;\n\n // The pre-clear is destructive: if the follow-up write fails after the\n // clear succeeds, the user's MCP config is left empty. Snapshot the\n // previous value (in raw SDK-native shape, NOT the GUI's parsed MCPConfig)\n // before pre-clearing so we can attempt a best-effort rollback. The\n // original write error is always re-thrown to the caller regardless\n // of rollback success — the GUI's react-query mutations surface that\n // as an error toast so the user knows to retry.\n //\n // Snapshot must be the SDK-native server map because that is what the\n // backend expects on the rollback PATCH.\n // ``SettingsService.getSettings`` returns a GUI Settings object whose\n // ``mcp_config`` is typed as the parsed frontend MCPConfig and\n // defaults to empty arrays when nothing is installed, so it is not\n // suitable for round-tripping back to the backend.\n let mcpConfigSnapshot: unknown = undefined;\n if (needsMcpPreClear) {\n try {\n if (isCloud) {\n const raw = (await fetchCloudSettings()) as {\n agent_settings?: { mcp_config?: unknown };\n };\n mcpConfigSnapshot = raw?.agent_settings?.mcp_config;\n } else {\n const raw = (await SettingsService.fetchSettingsFromApi()) as {\n agent_settings?: { mcp_config?: unknown };\n };\n mcpConfigSnapshot = raw?.agent_settings?.mcp_config;\n }\n } catch {\n // Snapshot failed (network blip, etc.). Continue without rollback\n // ability — the original write error will still surface.\n }\n }\n\n // Cloud settings may redact MCP env/header/auth secrets without an\n // encrypted exposure mode. A pre-clear before a non-delete update can\n // permanently erase unchanged secrets; for updates that keep all existing\n // server keys, rely on the backend deep-merge to preserve redacted leaves\n // while applying edited fields and newly typed credentials.\n const shouldUseCloudMergePatchForRedactedMcpSecrets =\n isCloud &&\n needsMcpPreClear &&\n hasRedactedMcpSecrets(mcpConfigSnapshot) &&\n !removesMcpServer(mcpConfigSnapshot, agentDiff?.mcp_config);\n const shouldPreClearMcpConfig =\n needsMcpPreClear && !shouldUseCloudMergePatchForRedactedMcpSecrets;\n\n if (isCloud) {\n const hasCloudWork =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n hasAppPreferences;\n if (!hasCloudWork) {\n return true;\n }\n if (shouldPreClearMcpConfig) {\n await withRetry(() =>\n saveCloudSettings({\n agent_settings_diff: { mcp_config: null },\n }),\n );\n }\n // Build the cloud payload from the same diffs, but as a separate\n // object so undefined keys don't appear in the call (saveCloudSettings\n // is called from tests with an exact-shape assertion).\n const cloudPayload: Parameters<typeof saveCloudSettings>[0] = {};\n if (payload.agent_settings_diff) {\n cloudPayload.agent_settings_diff = { ...payload.agent_settings_diff };\n if (\"mcp_config\" in cloudPayload.agent_settings_diff) {\n const mcpConfig = cloudCompatibleMcpConfig(\n cloudPayload.agent_settings_diff.mcp_config,\n );\n cloudPayload.agent_settings_diff.mcp_config = (\n shouldUseCloudMergePatchForRedactedMcpSecrets\n ? withExplicitMcpEnabled(mcpConfig)\n : mcpConfig\n ) as SettingsValue;\n }\n }\n if (payload.conversation_settings_diff) {\n cloudPayload.conversation_settings_diff =\n payload.conversation_settings_diff;\n }\n if (hasAppPreferences) {\n // The cloud `POST /api/v1/settings` takes app-preference fields as\n // flat top-level keys (not under `app_preferences_diff`).\n // `saveCloudSettings` re-flattens them onto the request body.\n cloudPayload.app_preferences = appPreferences;\n }\n try {\n await withRetry(() => saveCloudSettings(cloudPayload));\n } catch (err) {\n if (shouldPreClearMcpConfig && mcpConfigSnapshot) {\n // Best-effort rollback. We deliberately do not wrap in withRetry:\n // the user's session is already in a degraded state and we want\n // to surface the original error promptly. Swallowing the restore\n // error preserves the original failure context for the caller.\n try {\n await saveCloudSettings({\n agent_settings_diff: {\n mcp_config: mcpConfigSnapshot as SettingsValue,\n },\n });\n } catch {\n // Rollback failed; the original error takes precedence.\n }\n }\n throw err;\n }\n } else {\n // The local agent-server PATCH /api/settings requires at least one of\n // the three diff fields. Skip the request entirely if nothing changed.\n const hasLocalDiffs =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n !!payload.misc_settings_diff;\n if (!hasLocalDiffs) {\n return true;\n }\n if (shouldPreClearMcpConfig) {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings({\n agent_settings_diff: { mcp_config: null },\n }),\n );\n }\n try {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings(\n payload,\n ),\n );\n } catch (err) {\n if (shouldPreClearMcpConfig && mcpConfigSnapshot) {\n // See cloud branch above for rationale.\n try {\n await new SettingsClient(\n getAgentServerClientOptions(),\n ).updateSettings({\n agent_settings_diff: {\n mcp_config: mcpConfigSnapshot as SettingsValue,\n },\n });\n } catch {\n // Rollback failed; the original error takes precedence.\n }\n }\n throw err;\n }\n }\n\n // Invalidate cache after successful save\n clearCache();\n\n return true;\n }\n\n /**\n * Invalidate the settings cache.\n * Call this when settings may have changed externally.\n */\n static invalidateCache(): void {\n clearCache();\n }\n}\n\nexport default SettingsService;\n"],"mappings":";;;;;;;;AAuBA,IAAa,IAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAsDM,IAAgD,IAAI,IACxD,CACF,GAEM,KAAwB,MAC5B,EAAyB,IAAI,CAAG,GAQ5B,KACJ,MACiE;CACjE,IAAM,IAA4B,CAAC,GAC7B,IAAgC,CAAC;CACvC,KAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,CAAK,GAC7C,AAAI,EAAqB,CAAG,IAC1B,EAAuC,KAAO,IAE9C,EAAK,KAAO;CAGhB,OAAO;EAAE;EAAW;CAAK;AAC3B,GAWM,KAAgB,MAAgB,KAAK,MAAM,KAAK,UAAU,CAAK,CAAC,GAEhE,KACJ,GACA,OACI;CAAE,GAAI,KAAQ,CAAC;CAAI,GAAI,KAAQ,CAAC;AAAG;AAKzC,eAAe,EACb,GACA,IAAqB,GACrB,IAAsB,KACV;CACZ,KAAK,IAAI,IAAU,GAAG,IAAU,GAAY,KAAW,GACrD,IAAI;EACF,OAAO,MAAM,EAAG;CAClB,SAAS,GAAO;EACd,IAAI,KAAW,IAAa,GAC1B,MAAM;EAGR,IAAM,IAAQ,IAAc,KAAK;EAEjC,MAAM,IAAI,SAAe,MAAY;GACnC,WAAW,GAAS,CAAK;EAC3B,CAAC;CACH;CAGF,MAAU,MAAM,0BAA0B;AAC5C;AAMA,IAAI,IAOA;CACF,UAAU;CACV,WAAW;CACX,WAAW;AACb,GAEM,IAAe,MAAS,KAExB,UAAqB,KAAK,IAAI,IAAI,EAAc,YAAY,GAE5D,UAAmB;CACvB,IAAgB;EAAE,UAAU;EAAM,WAAW;EAAM,WAAW;CAAE;AAClE,GAEM,KAAY,MAChB,CAAC,CAAC,KAAS,OAAO,KAAU,YAAY,CAAC,MAAM,QAAQ,CAA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AI,KAA2B,GAK7B,IAAI;KACF,MAAM,EAAkB,EACtB,qBAAqB,EACnB,YAAY,EACd,EACF,CAAC;IACH,QAAQ,CAER;IAEF,MAAM;GACR;EACF,OAAO;GAOL,IAAI,EAHA,EAAQ,uBACR,EAAQ,8BACR,EAAQ,qBAEV,OAAO;GAET,AAAI,KACF,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,eAAe,EAC/D,qBAAqB,EAAE,YAAY,KAAK,EAC1C,CAAC,CACH;GAEF,IAAI;IACF,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,eAChD,CACF,CACF;GACF,SAAS,GAAK;IACZ,IAAI,KAA2B,GAE7B,IAAI;KACF,MAAM,IAAI,EACR,EAA4B,CAC9B,EAAE,eAAe,EACf,qBAAqB,EACnB,YAAY,EACd,EACF,CAAC;IACH,QAAQ,CAER;IAEF,MAAM;GACR;EACF;EAKA,OAFA,EAAW,GAEJ;CACT;CAMA,OAAO,kBAAwB;EAC7B,EAAW;CACb;AACF"}
|
|
1
|
+
{"version":3,"file":"settings-service.api.js","names":[],"sources":["../../../src/api/settings-service/settings-service.api.ts"],"sourcesContent":["import { SettingsClient } from \"@openhands/typescript-client/clients\";\nimport type {\n MCPConfigPatch,\n MCPServer,\n MCPServerPatch,\n} from \"@openhands/typescript-client\";\nimport { DEFAULT_SETTINGS } from \"#/services/settings\";\nimport { Settings, SettingsSchema, SettingsValue } from \"#/types/settings\";\nimport { stringRecord } from \"#/utils/mcp-config\";\nimport { getActiveBackend } from \"../backend-registry/active-store\";\nimport {\n fetchCloudConversationSettingsSchema,\n fetchCloudSettings,\n fetchCloudSettingsSchema,\n saveCloudSettings,\n} from \"../cloud/settings-service.api\";\nimport { getAgentServerClientOptions } from \"../agent-server-client-options\";\n\n/**\n * Fields the agent-server stores under `misc_settings.app_preferences` (see\n * SDK `openhands.sdk.settings.AppPreferences`). Mirrored here as a flat\n * partial of Settings so the rest of the frontend can keep treating them as\n * top-level keys (`settings.language`, `settings.disabled_skills`, …).\n */\nexport const APP_PREFERENCE_FIELDS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n \"title_llm_profile\",\n \"disabled_skills\",\n] as const;\n\nexport type AppPreferenceField = (typeof APP_PREFERENCE_FIELDS)[number];\n\nexport type AppPreferences = Partial<Pick<Settings, AppPreferenceField>>;\n\n/**\n * Container for frontend-owned settings the agent doesn't interpret.\n * Mirrors the SDK `MiscSettings` model introduced in agent-server 1.27.\n *\n * Single nested category today (`app_preferences`). Adding a future\n * category (e.g. `ui_preferences`) is a non-breaking change for the wire\n * shape — it just adds another optional sibling here.\n */\nexport interface MiscSettings {\n app_preferences?: AppPreferences;\n}\n\n/**\n * Response from GET /api/settings\n * Mirrors the SettingsResponse model in the agent server.\n */\nexport interface SettingsApiResponse {\n agent_settings: Record<string, SettingsValue>;\n conversation_settings: Record<string, SettingsValue>;\n llm_api_key_is_set: boolean;\n /**\n * Frontend-owned settings the agent does not interpret (currently just\n * `app_preferences`). Added in agent-server 1.27; earlier servers omit\n * the field entirely, in which case the frontend falls back to defaults.\n */\n misc_settings?: MiscSettings;\n}\n\n/**\n * Request payload for PATCH /api/settings.\n *\n * `misc_settings_diff` is deep-merged into the persisted `misc_settings`\n * block, matching the semantics of `agent_settings_diff` /\n * `conversation_settings_diff`. A partial diff like\n * `{ app_preferences: { language: \"fr\" } }` updates only `language` and\n * leaves every other `app_preferences` field alone. Lists\n * (`disabled_skills`) are replaced wholesale rather than merged.\n */\nexport interface SettingsUpdateRequest {\n agent_settings_diff?: Record<string, SettingsValue>;\n conversation_settings_diff?: Record<string, SettingsValue>;\n misc_settings_diff?: MiscSettings;\n // Permit additional keys so this stays assignable to the underlying\n // typescript-client SDK type, which uses `[key: string]: unknown` for\n // forward compatibility.\n [key: string]: unknown;\n}\n\nconst APP_PREFERENCE_FIELD_SET: ReadonlySet<string> = new Set(\n APP_PREFERENCE_FIELDS,\n);\n\nconst isAppPreferenceField = (key: string): key is AppPreferenceField =>\n APP_PREFERENCE_FIELD_SET.has(key);\n\n/**\n * Split known app-preference keys out of a save payload so callers can\n * route them through `misc_settings_diff.app_preferences` (local) or as\n * flat top-level keys (cloud), while the remaining fields flow into the\n * `agent_settings_diff` / `conversation_settings_diff` branches.\n */\nconst extractAppPreferences = (\n input: Record<string, unknown>,\n): { extracted: AppPreferences; rest: Record<string, unknown> } => {\n const extracted: AppPreferences = {};\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (isAppPreferenceField(key)) {\n (extracted as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n return { extracted, rest };\n};\n\n/**\n * Secret exposure mode for X-Expose-Secrets header.\n *\n * - undefined: Returns redacted secrets (\"**********\")\n * - \"encrypted\": Returns cipher-encrypted values (safe for frontend to round-trip)\n * - \"plaintext\": Returns raw secret values (backend use only!)\n */\nexport type ExposeSecretsMode = \"encrypted\" | \"plaintext\" | undefined;\n\nconst deepClone = <T>(value: T): T => JSON.parse(JSON.stringify(value)) as T;\n\nconst mergeRecords = (\n base: Record<string, SettingsValue> | null | undefined,\n next: Record<string, SettingsValue> | null | undefined,\n) => ({ ...(base ?? {}), ...(next ?? {}) });\n\n/**\n * Retry helper for API calls with exponential backoff.\n */\nasync function withRetry<T>(\n fn: () => Promise<T>,\n maxRetries: number = 3,\n baseDelayMs: number = 500,\n): Promise<T> {\n for (let attempt = 0; attempt < maxRetries; attempt += 1) {\n try {\n return await fn();\n } catch (error) {\n if (attempt >= maxRetries - 1) {\n throw error;\n }\n\n const delay = baseDelayMs * 2 ** attempt;\n\n await new Promise<void>((resolve) => {\n setTimeout(resolve, delay);\n });\n }\n }\n\n throw new Error(\"Retry attempts exhausted\");\n}\n\n/**\n * In-memory cache for settings to avoid repeated network calls.\n * The cache is invalidated on save operations.\n */\nlet settingsCache: {\n /** Settings with redacted secrets for display */\n redacted: SettingsApiResponse | null;\n /** Settings with encrypted secrets for conversation start */\n encrypted: SettingsApiResponse | null;\n /** Timestamp when the cache was last populated */\n timestamp: number;\n} = {\n redacted: null,\n encrypted: null,\n timestamp: 0,\n};\n\nconst CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes\n\nconst isCacheValid = () => Date.now() - settingsCache.timestamp < CACHE_TTL_MS;\n\nconst clearCache = () => {\n settingsCache = { redacted: null, encrypted: null, timestamp: 0 };\n};\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n !!value && typeof value === \"object\" && !Array.isArray(value);\n\nconst basicAuthHeader = (username: string, password: string): string => {\n const token = btoa(`${username}:${password}`);\n return `Basic ${token}`;\n};\n\nconst headersFromMcpAuth = (\n auth: Record<string, unknown>,\n): Record<string, string> | null => {\n switch (auth.strategy) {\n case \"none\":\n return {};\n case \"api_key\": {\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n const header =\n typeof auth.header_name === \"string\" && auth.header_name\n ? auth.header_name\n : \"Authorization\";\n const value =\n header === \"Authorization\" ? `Bearer ${auth.value}` : auth.value;\n return { [header]: value };\n }\n case \"bearer\":\n if (typeof auth.value !== \"string\" || !auth.value) return null;\n return { Authorization: `Bearer ${auth.value}` };\n case \"basic\":\n if (\n typeof auth.username !== \"string\" ||\n typeof auth.password !== \"string\"\n ) {\n return null;\n }\n return { Authorization: basicAuthHeader(auth.username, auth.password) };\n case \"header\":\n return stringRecord(auth.headers) ?? {};\n case \"oauth2\": {\n const tokens = isRecord(auth.state) ? auth.state.tokens : undefined;\n if (!isRecord(tokens) || typeof tokens.access_token !== \"string\") {\n return null;\n }\n return { Authorization: `Bearer ${tokens.access_token}` };\n }\n default:\n return null;\n }\n};\n\n/**\n * Convert SDK `auth` credentials to the cloud's header-only storage shape.\n *\n * The cloud settings endpoint applies `mcp_config` as a merge patch, so a\n * credential change must also tombstone the headers the previous credential\n * produced — otherwise stale secrets survive a strategy switch (e.g. an\n * api_key's custom header after moving to bearer). Stored headers that the\n * new credential still produces (via the patch's carried `headers` or the\n * converted auth) are left untouched; any other stored header is cleared.\n */\nconst cloudCompatibleMcpConfig = async (value: unknown): Promise<unknown> => {\n if (!isRecord(value)) return value;\n\n const hasWrapper = isRecord(value.mcpServers);\n const serverMap: Record<string, unknown> = hasWrapper\n ? (value.mcpServers as Record<string, unknown>)\n : value;\n\n const needsStoredCredential =\n Object.values(serverMap).some(\n (server) =>\n isRecord(server) && isRecord(server.auth) && server.auth !== null,\n ) && getActiveBackend().backend.kind === \"cloud\";\n\n const storedHeadersByServer = new Map<string, Record<string, string>>();\n if (needsStoredCredential) {\n try {\n const stored = await fetchCloudSettings();\n const storedMcp = isRecord(stored.mcp_config) ? stored.mcp_config : {};\n for (const [name, server] of Object.entries(storedMcp)) {\n if (isRecord(server)) {\n const headers = stringRecord(\n (server as Record<string, unknown>).headers,\n );\n if (headers) storedHeadersByServer.set(name, headers);\n }\n }\n } catch {\n // Fall back to the patch-only conversion; a transient fetch failure\n // must not block saving the user's explicit edits.\n }\n }\n\n const converted = Object.fromEntries(\n Object.entries(serverMap).map(([name, server]) => {\n if (!isRecord(server)) return [name, server];\n if (server.auth === null) {\n const nextServer: Record<string, unknown> = {\n ...server,\n headers: null,\n };\n delete nextServer.auth;\n return [name, nextServer];\n }\n if (!isRecord(server.auth)) return [name, server];\n\n const authHeaders = headersFromMcpAuth(server.auth);\n if (authHeaders === null) return [name, server];\n\n const nextServer = { ...server };\n const existingHeaders = stringRecord(server.headers) ?? {};\n const mergedHeaders: Record<string, string | null> = {\n ...existingHeaders,\n ...authHeaders,\n };\n\n const storedHeaders = storedHeadersByServer.get(name);\n if (storedHeaders) {\n for (const key of Object.keys(storedHeaders)) {\n if (!(key in mergedHeaders)) mergedHeaders[key] = null;\n }\n }\n\n delete nextServer.auth;\n if (Object.keys(mergedHeaders).length > 0) {\n nextServer.headers = mergedHeaders;\n } else {\n delete nextServer.headers;\n }\n return [name, nextServer];\n }),\n );\n\n return hasWrapper ? { ...value, mcpServers: converted } : converted;\n};\n\n/**\n * Transform API response into Settings object with derived fields.\n */\nconst transformApiResponse = (\n response: SettingsApiResponse,\n): Partial<Settings> => {\n const agentSettings = response.agent_settings ?? {};\n const conversationSettings = response.conversation_settings ?? {};\n\n const partial: Partial<Settings> = {\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n llm_api_key_set: response.llm_api_key_is_set,\n };\n\n // App-level user preferences come back nested under\n // `misc_settings.app_preferences` from the local agent-server (added in\n // 1.27, restructured into the `misc_settings` container in the follow-up\n // refactor). Hoist them onto the flat Settings shape the rest of the\n // frontend already speaks. Older servers omit the `misc_settings` field\n // entirely; the migration helper invoked from `getSettings` promotes any\n // leftover localStorage values to the server on first run, so the omitted\n // case just falls back to defaults.\n const prefs = response.misc_settings?.app_preferences;\n if (prefs) {\n for (const key of APP_PREFERENCE_FIELDS) {\n const value = prefs[key];\n if (value !== undefined) {\n (partial as Record<string, unknown>)[key] = value;\n }\n }\n }\n\n return partial;\n};\n\n/**\n * Sync derived settings fields from agent_settings and conversation_settings.\n * This ensures backward compatibility with code that reads top-level fields.\n */\nconst syncDerivedSettings = (settings: Partial<Settings>): Settings => {\n const agentSettings = mergeRecords(\n DEFAULT_SETTINGS.agent_settings ?? {},\n settings.agent_settings ?? {},\n );\n const conversationSettings = mergeRecords(\n DEFAULT_SETTINGS.conversation_settings ?? {},\n settings.conversation_settings ?? {},\n );\n\n const merged = {\n ...deepClone(DEFAULT_SETTINGS),\n ...settings,\n provider_tokens_set: {\n ...(DEFAULT_SETTINGS.provider_tokens_set ?? {}),\n ...(settings.provider_tokens_set ?? {}),\n },\n agent_settings: agentSettings,\n conversation_settings: conversationSettings,\n } as Settings;\n\n const llm = agentSettings.llm as Record<string, SettingsValue> | undefined;\n const condenser = agentSettings.condenser as\n | Record<string, SettingsValue>\n | undefined;\n\n if (typeof agentSettings.agent === \"string\") {\n merged.agent = agentSettings.agent;\n }\n if (typeof llm?.model === \"string\" && llm.model.length > 0) {\n merged.llm_model = llm.model;\n }\n if (typeof llm?.base_url === \"string\") {\n merged.llm_base_url = llm.base_url;\n }\n // Note: api_key may be redacted (\"**********\") when fetched without expose header\n // We don't sync it to top-level llm_api_key to avoid overwriting with redacted value\n if (typeof condenser?.enabled === \"boolean\") {\n merged.enable_default_condenser = condenser.enabled;\n }\n if (typeof condenser?.max_size === \"number\") {\n merged.condenser_max_size = condenser.max_size;\n }\n if (typeof conversationSettings.confirmation_mode === \"boolean\") {\n merged.confirmation_mode = conversationSettings.confirmation_mode;\n }\n if (\n typeof conversationSettings.security_analyzer === \"string\" ||\n conversationSettings.security_analyzer === null\n ) {\n merged.security_analyzer = conversationSettings.security_analyzer as\n | string\n | null;\n }\n if (typeof conversationSettings.max_iterations === \"number\") {\n merged.max_iterations = conversationSettings.max_iterations;\n }\n\n merged.search_api_key_set = !!merged.search_api_key;\n\n return merged;\n};\n\nclass SettingsService {\n /**\n * Fetch settings from the agent server API with retry logic.\n *\n * @param exposeSecrets - Controls how secrets are returned:\n * - undefined: Secrets are redacted (\"**********\") - safe for display\n * - \"encrypted\": Secrets are cipher-encrypted - safe for round-trip to start conversation\n * - \"plaintext\": Raw secrets - DO NOT USE from frontend\n */\n static async fetchSettingsFromApi(\n exposeSecrets?: ExposeSecretsMode,\n ): Promise<SettingsApiResponse> {\n return withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).getSettings({\n exposeSecrets,\n }),\n ) as Promise<SettingsApiResponse>;\n }\n\n /**\n * Get settings for display (secrets are redacted).\n * Uses in-memory cache for performance.\n */\n static async getSettings(): Promise<Settings> {\n // Cloud uses a different settings shape (flat top-level fields\n // including provider_tokens_set, llm_model, etc.). Branch out before\n // touching the local-only cache: cloud responses bypass the local\n // SettingsApiResponse shape and feed straight into syncDerivedSettings\n // so cloud-native fields like provider_tokens_set reach the GUI's\n // useUserProviders → useAppInstallations → useGitRepositories chain.\n if (getActiveBackend().backend.kind === \"cloud\") {\n try {\n const cloud = await withRetry(() => fetchCloudSettings());\n return syncDerivedSettings(cloud);\n } catch (error) {\n console.warn(\"Failed to fetch cloud settings, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n // Check cache first\n if (isCacheValid() && settingsCache.redacted) {\n return syncDerivedSettings(transformApiResponse(settingsCache.redacted));\n }\n\n try {\n const response = await this.fetchSettingsFromApi();\n settingsCache.redacted = response;\n settingsCache.timestamp = Date.now();\n return syncDerivedSettings(transformApiResponse(response));\n } catch (error) {\n // If API fails, return defaults\n console.warn(\"Failed to fetch settings from API, using defaults:\", error);\n return syncDerivedSettings({});\n }\n }\n\n /**\n * Get settings with encrypted secrets for starting conversations.\n * The encrypted secrets can be passed to the start conversation API\n * with secrets_encrypted=true for server-side decryption.\n *\n * @throws Error if encrypted settings cannot be fetched - conversations\n * should not start with broken/redacted credentials.\n */\n static async getSettingsForConversation(): Promise<{\n agentSettings: Record<string, SettingsValue>;\n conversationSettings: Record<string, SettingsValue>;\n secretsEncrypted: boolean;\n }> {\n // Check cache first\n if (isCacheValid() && settingsCache.encrypted) {\n return {\n agentSettings: settingsCache.encrypted.agent_settings,\n conversationSettings: settingsCache.encrypted.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n // Fetch encrypted settings - this MUST succeed for conversations to work.\n // Do not fall back to redacted settings as that would cause auth failures.\n const response = await this.fetchSettingsFromApi(\"encrypted\");\n settingsCache.encrypted = response;\n if (!settingsCache.timestamp) {\n settingsCache.timestamp = Date.now();\n }\n return {\n agentSettings: response.agent_settings,\n conversationSettings: response.conversation_settings,\n secretsEncrypted: true,\n };\n }\n\n static async getSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getAgentSchema()) as SettingsSchema;\n }\n\n static async getConversationSettingsSchema(): Promise<SettingsSchema> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return (await fetchCloudConversationSettingsSchema()) as SettingsSchema;\n }\n return (await new SettingsClient(\n getAgentServerClientOptions(),\n ).getConversationSchema()) as SettingsSchema;\n }\n\n /**\n * Apply one name-keyed MCP merge patch in exactly one request. The server\n * owns the stored catalog and secret preservation; Canvas never rebuilds\n * the catalog from redacted display settings.\n */\n static async patchMcpConfig(patch: MCPConfigPatch): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n const mcpConfig = await cloudCompatibleMcpConfig(patch);\n await withRetry(() =>\n saveCloudSettings({\n agent_settings_diff: { mcp_config: mcpConfig as SettingsValue },\n }),\n );\n } else {\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings({\n agent_settings_diff: { mcp_config: patch },\n }),\n );\n }\n clearCache();\n return true;\n }\n\n static async patchMcpServer(\n settingsKey: string,\n patch: MCPServerPatch,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: patch });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).patchMcpServer(\n settingsKey,\n patch,\n ),\n );\n clearCache();\n return true;\n }\n\n static async createMcpServer(\n settingsKey: string,\n server: MCPServer,\n ): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: server });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).createMcpServer(\n settingsKey,\n server,\n ),\n );\n clearCache();\n return true;\n }\n\n static async deleteMcpServer(settingsKey: string): Promise<boolean> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return SettingsService.patchMcpConfig({ [settingsKey]: null });\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).deleteMcpServer(\n settingsKey,\n ),\n );\n clearCache();\n return true;\n }\n\n /**\n * Save settings to the agent server API.\n * Uses PATCH for incremental updates.\n */\n static async saveSettings(\n settings: Partial<Settings> & Record<string, unknown>,\n ): Promise<boolean> {\n // Split app-level user-preference fields (language, git identity, sound\n // notifications, analytics consent, disabled_skills) off and route them\n // through `misc_settings_diff.app_preferences` (local) or as flat\n // top-level keys (cloud). The local agent-server stores them under\n // `PersistedSettings.misc_settings.app_preferences`; the cloud accepts\n // them as flat keys on `POST /api/v1/settings`.\n const { extracted: appPreferences, rest } = extractAppPreferences(\n settings as Record<string, unknown>,\n );\n const hasAppPreferences = Object.keys(appPreferences).length > 0;\n\n const payload: SettingsUpdateRequest = {};\n\n // Extract agent_settings_diff\n const agentSettingsDiff = rest.agent_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (agentSettingsDiff && Object.keys(agentSettingsDiff).length > 0) {\n payload.agent_settings_diff = agentSettingsDiff;\n }\n\n // Extract conversation_settings_diff\n const conversationSettingsDiff = rest.conversation_settings_diff as\n | Record<string, SettingsValue>\n | undefined;\n if (\n conversationSettingsDiff &&\n Object.keys(conversationSettingsDiff).length > 0\n ) {\n payload.conversation_settings_diff = conversationSettingsDiff;\n }\n\n if (hasAppPreferences) {\n payload.misc_settings_diff = { app_preferences: appPreferences };\n }\n\n const isCloud = getActiveBackend().backend.kind === \"cloud\";\n if (isCloud) {\n const hasCloudWork =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n hasAppPreferences;\n if (!hasCloudWork) {\n return true;\n }\n // Build the cloud payload from the same diffs, but as a separate\n // object so undefined keys don't appear in the call (saveCloudSettings\n // is called from tests with an exact-shape assertion).\n const cloudPayload: Parameters<typeof saveCloudSettings>[0] = {};\n if (payload.agent_settings_diff) {\n cloudPayload.agent_settings_diff = { ...payload.agent_settings_diff };\n if (\"mcp_config\" in cloudPayload.agent_settings_diff) {\n cloudPayload.agent_settings_diff.mcp_config =\n (await cloudCompatibleMcpConfig(\n cloudPayload.agent_settings_diff.mcp_config,\n )) as SettingsValue;\n }\n }\n if (payload.conversation_settings_diff) {\n cloudPayload.conversation_settings_diff =\n payload.conversation_settings_diff;\n }\n if (hasAppPreferences) {\n // The cloud `POST /api/v1/settings` takes app-preference fields as\n // flat top-level keys (not under `app_preferences_diff`).\n // `saveCloudSettings` re-flattens them onto the request body.\n cloudPayload.app_preferences = appPreferences;\n }\n await withRetry(() => saveCloudSettings(cloudPayload));\n } else {\n // The local agent-server PATCH /api/settings requires at least one of\n // the three diff fields. Skip the request entirely if nothing changed.\n const hasLocalDiffs =\n !!payload.agent_settings_diff ||\n !!payload.conversation_settings_diff ||\n !!payload.misc_settings_diff;\n if (!hasLocalDiffs) {\n return true;\n }\n await withRetry(() =>\n new SettingsClient(getAgentServerClientOptions()).updateSettings(\n payload,\n ),\n );\n }\n\n // Invalidate cache after successful save\n clearCache();\n\n return true;\n }\n\n /**\n * Invalidate the settings cache.\n * Call this when settings may have changed externally.\n */\n static invalidateCache(): void {\n clearCache();\n }\n}\n\nexport default SettingsService;\n"],"mappings":";;;;;;;;AAwBA,IAAa,IAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAsDM,IAAgD,IAAI,IACxD,CACF,GAEM,KAAwB,MAC5B,EAAyB,IAAI,CAAG,GAQ5B,KACJ,MACiE;CACjE,IAAM,IAA4B,CAAC,GAC7B,IAAgC,CAAC;CACvC,KAAK,IAAM,CAAC,GAAK,MAAU,OAAO,QAAQ,CAAK,GAC7C,AAAI,EAAqB,CAAG,IAC1B,EAAuC,KAAO,IAE9C,EAAK,KAAO;CAGhB,OAAO;EAAE;EAAW;CAAK;AAC3B,GAWM,KAAgB,MAAgB,KAAK,MAAM,KAAK,UAAU,CAAK,CAAC,GAEhE,KACJ,GACA,OACI;CAAE,GAAI,KAAQ,CAAC;CAAI,GAAI,KAAQ,CAAC;AAAG;AAKzC,eAAe,EACb,GACA,IAAqB,GACrB,IAAsB,KACV;CACZ,KAAK,IAAI,IAAU,GAAG,IAAU,GAAY,KAAW,GACrD,IAAI;EACF,OAAO,MAAM,EAAG;CAClB,SAAS,GAAO;EACd,IAAI,KAAW,IAAa,GAC1B,MAAM;EAGR,IAAM,IAAQ,IAAc,KAAK;EAEjC,MAAM,IAAI,SAAe,MAAY;GACnC,WAAW,GAAS,CAAK;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AiC,CAAC,GAGlC,IAAoB,EAAK;EAG/B,AAAI,KAAqB,OAAO,KAAK,CAAiB,EAAE,SAAS,MAC/D,EAAQ,sBAAsB;EAIhC,IAAM,IAA2B,EAAK;EAetC,IAXE,KACA,OAAO,KAAK,CAAwB,EAAE,SAAS,MAE/C,EAAQ,6BAA6B,IAGnC,MACF,EAAQ,qBAAqB,EAAE,iBAAiB,EAAe,IAGjD,EAAiB,EAAE,QAAQ,SAAS,SACvC;GAKX,IAAI,EAHA,EAAQ,uBACR,EAAQ,8BACV,IAEA,OAAO;GAKT,IAAM,IAAwD,CAAC;GAoB/D,AAnBI,EAAQ,wBACV,EAAa,sBAAsB,EAAE,GAAG,EAAQ,oBAAoB,GAChE,gBAAgB,EAAa,wBAC/B,EAAa,oBAAoB,aAC9B,MAAM,EACL,EAAa,oBAAoB,UACnC,KAGF,EAAQ,+BACV,EAAa,6BACX,EAAQ,6BAER,MAIF,EAAa,kBAAkB,IAEjC,MAAM,QAAgB,EAAkB,CAAY,CAAC;EACvD,OAAO;GAOL,IAAI,EAHA,EAAQ,uBACR,EAAQ,8BACR,EAAQ,qBAEV,OAAO;GAET,MAAM,QACJ,IAAI,EAAe,EAA4B,CAAC,EAAE,eAChD,CACF,CACF;EACF;EAKA,OAFA,EAAW,GAEJ;CACT;CAMA,OAAO,kBAAwB;EAC7B,EAAW;CACb;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/typescript-client/dist/client/skills-client.cjs");require("../node_modules/@openhands/typescript-client/dist/clients.cjs");const t=require("./agent-server-config.cjs"),n=require("./backend-registry/active-store.cjs"),r=require("./agent-server-client-options.cjs"),i=require("../node_modules/@openhands/extensions/skills/index.cjs"),a=require("./cloud/skills-service.api.cjs");function o(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var s=i.default.map(o),c=class{static async getSkills(i){if(n.getActiveBackend().backend.kind===`cloud`)return a.fetchCloudSkills();let o=[];try{o=(await new e.SkillsClient(r.getAgentServerClientOptions()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:i??t.getAgentServerWorkingDir()})).skills??[]}catch{}return[...o,...s]}};exports.default=c;
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@openhands/typescript-client/dist/client/skills-client.cjs");require("../node_modules/@openhands/typescript-client/dist/clients.cjs");const t=require("./agent-server-config.cjs"),n=require("./backend-registry/active-store.cjs"),r=require("./agent-server-client-options.cjs"),i=require("../node_modules/@openhands/extensions/skills/index.cjs"),a=require("./cloud/skills-service.api.cjs");function o(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,category:e.category,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var s=i.default.map(o),c=class{static async getSkills(i){if(n.getActiveBackend().backend.kind===`cloud`)return a.fetchCloudSkills();let o=[];try{o=(await new e.SkillsClient(r.getAgentServerClientOptions()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:i??t.getAgentServerWorkingDir()})).skills??[]}catch{}return[...o,...s]}};exports.default=c;
|
|
2
2
|
//# sourceMappingURL=skills-service.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills-service.cjs","names":[],"sources":["../../src/api/skills-service.ts"],"sourcesContent":["import { SkillsClient } from \"@openhands/typescript-client/clients\";\nimport {\n SKILLS_CATALOG,\n type SkillCatalogEntry,\n} from \"@openhands/extensions/skills\";\nimport { SkillInfo } from \"#/types/settings\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport { fetchCloudSkills } from \"./cloud/skills-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\n\nfunction catalogEntryToSkillInfo(entry: SkillCatalogEntry): SkillInfo {\n return {\n name: entry.name,\n type: \"knowledge\",\n source: \"public\",\n description: entry.description,\n triggers: entry.triggers,\n content: entry.content,\n license: entry.license ?? null,\n compatibility: entry.compatibility ?? null,\n };\n}\n\n/**\n * Public skills loaded from the `@openhands/extensions` npm package.\n *\n * This is an **immutable build-time snapshot**: the catalog is baked into the\n * bundle at `npm run build` / `vite build` time and does not change at\n * runtime. Updating the catalog requires bumping the `@openhands/extensions`\n * dependency and rebuilding.\n */\nconst PUBLIC_SKILLS: SkillInfo[] = SKILLS_CATALOG.map(catalogEntryToSkillInfo);\n\nclass SkillsService {\n static async getSkills(projectDir?: string): Promise<SkillInfo[]> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return fetchCloudSkills();\n }\n\n // Public skills come from the bundled @openhands/extensions npm package —\n // no agent-server round-trip or GitHub fetch needed. Only ask the agent-\n // server for user and project skills so local .agents/skills/ content is\n // still picked up.\n let localSkills: SkillInfo[] = [];\n try {\n const response = await new SkillsClient(\n getAgentServerClientOptions(),\n ).getSkills({\n load_public: false,\n load_user: true,\n load_project: true,\n load_org: false,\n project_dir: projectDir ?? getAgentServerWorkingDir(),\n });\n localSkills = (response.skills ?? []) as SkillInfo[];\n } catch {\n // Agent-server may not support the skills endpoint or may be\n // unreachable; fall back to the bundled public catalog alone.\n }\n\n return [...localSkills, ...PUBLIC_SKILLS];\n }\n}\n\nexport default SkillsService;\n"],"mappings":"idAWA,SAAS,EAAwB,EAAqC,CACpE,MAAO,CACL,KAAM,EAAM,KACZ,KAAM,YACN,OAAQ,SACR,YAAa,EAAM,YACnB,SAAU,EAAM,SAChB,QAAS,EAAM,QACf,QAAS,EAAM,SAAW,KAC1B,cAAe,EAAM,eAAiB,IACxC,CACF,CAUA,IAAM,EAA6B,EAAA,QAAe,IAAI,CAAuB,EAEvE,EAAN,KAAoB,CAClB,aAAa,UAAU,EAA2C,CAChE,GAAI,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QACtC,OAAO,EAAA,iBAAiB,EAO1B,IAAI,EAA2B,CAAC,EAChC,GAAI,CAUF,GAAe,MATQ,IAAI,EAAA,aACzB,EAAA,4BAA4B,CAC9B,EAAE,UAAU,CACV,YAAa,GACb,UAAW,GACX,aAAc,GACd,SAAU,GACV,YAAa,GAAc,EAAA,yBAAyB,CACtD,CAAC,GACuB,QAAU,CAAC,CACrC,MAAQ,CAGR,CAEA,MAAO,CAAC,GAAG,EAAa,GAAG,CAAa,CAC1C,CACF"}
|
|
1
|
+
{"version":3,"file":"skills-service.cjs","names":[],"sources":["../../src/api/skills-service.ts"],"sourcesContent":["import { SkillsClient } from \"@openhands/typescript-client/clients\";\nimport {\n SKILLS_CATALOG,\n type SkillCatalogEntry,\n} from \"@openhands/extensions/skills\";\nimport { SkillInfo } from \"#/types/settings\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport { fetchCloudSkills } from \"./cloud/skills-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\n\nfunction catalogEntryToSkillInfo(entry: SkillCatalogEntry): SkillInfo {\n return {\n name: entry.name,\n type: \"knowledge\",\n source: \"public\",\n description: entry.description,\n triggers: entry.triggers,\n category: entry.category,\n content: entry.content,\n license: entry.license ?? null,\n compatibility: entry.compatibility ?? null,\n };\n}\n\n/**\n * Public skills loaded from the `@openhands/extensions` npm package.\n *\n * This is an **immutable build-time snapshot**: the catalog is baked into the\n * bundle at `npm run build` / `vite build` time and does not change at\n * runtime. Updating the catalog requires bumping the `@openhands/extensions`\n * dependency and rebuilding.\n */\nconst PUBLIC_SKILLS: SkillInfo[] = SKILLS_CATALOG.map(catalogEntryToSkillInfo);\n\nclass SkillsService {\n static async getSkills(projectDir?: string): Promise<SkillInfo[]> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return fetchCloudSkills();\n }\n\n // Public skills come from the bundled @openhands/extensions npm package —\n // no agent-server round-trip or GitHub fetch needed. Only ask the agent-\n // server for user and project skills so local .agents/skills/ content is\n // still picked up.\n let localSkills: SkillInfo[] = [];\n try {\n const response = await new SkillsClient(\n getAgentServerClientOptions(),\n ).getSkills({\n load_public: false,\n load_user: true,\n load_project: true,\n load_org: false,\n project_dir: projectDir ?? getAgentServerWorkingDir(),\n });\n localSkills = (response.skills ?? []) as SkillInfo[];\n } catch {\n // Agent-server may not support the skills endpoint or may be\n // unreachable; fall back to the bundled public catalog alone.\n }\n\n return [...localSkills, ...PUBLIC_SKILLS];\n }\n}\n\nexport default SkillsService;\n"],"mappings":"idAWA,SAAS,EAAwB,EAAqC,CACpE,MAAO,CACL,KAAM,EAAM,KACZ,KAAM,YACN,OAAQ,SACR,YAAa,EAAM,YACnB,SAAU,EAAM,SAChB,SAAU,EAAM,SAChB,QAAS,EAAM,QACf,QAAS,EAAM,SAAW,KAC1B,cAAe,EAAM,eAAiB,IACxC,CACF,CAUA,IAAM,EAA6B,EAAA,QAAe,IAAI,CAAuB,EAEvE,EAAN,KAAoB,CAClB,aAAa,UAAU,EAA2C,CAChE,GAAI,EAAA,iBAAiB,EAAE,QAAQ,OAAS,QACtC,OAAO,EAAA,iBAAiB,EAO1B,IAAI,EAA2B,CAAC,EAChC,GAAI,CAUF,GAAe,MATQ,IAAI,EAAA,aACzB,EAAA,4BAA4B,CAC9B,EAAE,UAAU,CACV,YAAa,GACb,UAAW,GACX,aAAc,GACd,SAAU,GACV,YAAa,GAAc,EAAA,yBAAyB,CACtD,CAAC,GACuB,QAAU,CAAC,CACrC,MAAQ,CAGR,CAEA,MAAO,CAAC,GAAG,EAAa,GAAG,CAAa,CAC1C,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills-service.js","names":[],"sources":["../../src/api/skills-service.ts"],"sourcesContent":["import { SkillsClient } from \"@openhands/typescript-client/clients\";\nimport {\n SKILLS_CATALOG,\n type SkillCatalogEntry,\n} from \"@openhands/extensions/skills\";\nimport { SkillInfo } from \"#/types/settings\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport { fetchCloudSkills } from \"./cloud/skills-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\n\nfunction catalogEntryToSkillInfo(entry: SkillCatalogEntry): SkillInfo {\n return {\n name: entry.name,\n type: \"knowledge\",\n source: \"public\",\n description: entry.description,\n triggers: entry.triggers,\n content: entry.content,\n license: entry.license ?? null,\n compatibility: entry.compatibility ?? null,\n };\n}\n\n/**\n * Public skills loaded from the `@openhands/extensions` npm package.\n *\n * This is an **immutable build-time snapshot**: the catalog is baked into the\n * bundle at `npm run build` / `vite build` time and does not change at\n * runtime. Updating the catalog requires bumping the `@openhands/extensions`\n * dependency and rebuilding.\n */\nconst PUBLIC_SKILLS: SkillInfo[] = SKILLS_CATALOG.map(catalogEntryToSkillInfo);\n\nclass SkillsService {\n static async getSkills(projectDir?: string): Promise<SkillInfo[]> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return fetchCloudSkills();\n }\n\n // Public skills come from the bundled @openhands/extensions npm package —\n // no agent-server round-trip or GitHub fetch needed. Only ask the agent-\n // server for user and project skills so local .agents/skills/ content is\n // still picked up.\n let localSkills: SkillInfo[] = [];\n try {\n const response = await new SkillsClient(\n getAgentServerClientOptions(),\n ).getSkills({\n load_public: false,\n load_user: true,\n load_project: true,\n load_org: false,\n project_dir: projectDir ?? getAgentServerWorkingDir(),\n });\n localSkills = (response.skills ?? []) as SkillInfo[];\n } catch {\n // Agent-server may not support the skills endpoint or may be\n // unreachable; fall back to the bundled public catalog alone.\n }\n\n return [...localSkills, ...PUBLIC_SKILLS];\n }\n}\n\nexport default SkillsService;\n"],"mappings":";;;;;;;;AAWA,SAAS,EAAwB,GAAqC;CACpE,OAAO;EACL,MAAM,EAAM;EACZ,MAAM;EACN,QAAQ;EACR,aAAa,EAAM;EACnB,UAAU,EAAM;EAChB,SAAS,EAAM;EACf,SAAS,EAAM,WAAW;EAC1B,eAAe,EAAM,iBAAiB;CACxC;AACF;AAUA,IAAM,IAA6B,EAAe,IAAI,CAAuB,GAEvE,IAAN,MAAoB;CAClB,aAAa,UAAU,GAA2C;EAChE,IAAI,EAAiB,EAAE,QAAQ,SAAS,SACtC,OAAO,EAAiB;EAO1B,IAAI,IAA2B,CAAC;EAChC,IAAI;GAUF,KAAe,MATQ,IAAI,EACzB,EAA4B,CAC9B,EAAE,UAAU;IACV,aAAa;IACb,WAAW;IACX,cAAc;IACd,UAAU;IACV,aAAa,KAAc,EAAyB;GACtD,CAAC,GACuB,UAAU,CAAC;EACrC,QAAQ,CAGR;EAEA,OAAO,CAAC,GAAG,GAAa,GAAG,CAAa;CAC1C;AACF"}
|
|
1
|
+
{"version":3,"file":"skills-service.js","names":[],"sources":["../../src/api/skills-service.ts"],"sourcesContent":["import { SkillsClient } from \"@openhands/typescript-client/clients\";\nimport {\n SKILLS_CATALOG,\n type SkillCatalogEntry,\n} from \"@openhands/extensions/skills\";\nimport { SkillInfo } from \"#/types/settings\";\nimport { getAgentServerWorkingDir } from \"./agent-server-config\";\nimport { getActiveBackend } from \"./backend-registry/active-store\";\nimport { fetchCloudSkills } from \"./cloud/skills-service.api\";\nimport { getAgentServerClientOptions } from \"./agent-server-client-options\";\n\nfunction catalogEntryToSkillInfo(entry: SkillCatalogEntry): SkillInfo {\n return {\n name: entry.name,\n type: \"knowledge\",\n source: \"public\",\n description: entry.description,\n triggers: entry.triggers,\n category: entry.category,\n content: entry.content,\n license: entry.license ?? null,\n compatibility: entry.compatibility ?? null,\n };\n}\n\n/**\n * Public skills loaded from the `@openhands/extensions` npm package.\n *\n * This is an **immutable build-time snapshot**: the catalog is baked into the\n * bundle at `npm run build` / `vite build` time and does not change at\n * runtime. Updating the catalog requires bumping the `@openhands/extensions`\n * dependency and rebuilding.\n */\nconst PUBLIC_SKILLS: SkillInfo[] = SKILLS_CATALOG.map(catalogEntryToSkillInfo);\n\nclass SkillsService {\n static async getSkills(projectDir?: string): Promise<SkillInfo[]> {\n if (getActiveBackend().backend.kind === \"cloud\") {\n return fetchCloudSkills();\n }\n\n // Public skills come from the bundled @openhands/extensions npm package —\n // no agent-server round-trip or GitHub fetch needed. Only ask the agent-\n // server for user and project skills so local .agents/skills/ content is\n // still picked up.\n let localSkills: SkillInfo[] = [];\n try {\n const response = await new SkillsClient(\n getAgentServerClientOptions(),\n ).getSkills({\n load_public: false,\n load_user: true,\n load_project: true,\n load_org: false,\n project_dir: projectDir ?? getAgentServerWorkingDir(),\n });\n localSkills = (response.skills ?? []) as SkillInfo[];\n } catch {\n // Agent-server may not support the skills endpoint or may be\n // unreachable; fall back to the bundled public catalog alone.\n }\n\n return [...localSkills, ...PUBLIC_SKILLS];\n }\n}\n\nexport default SkillsService;\n"],"mappings":";;;;;;;;AAWA,SAAS,EAAwB,GAAqC;CACpE,OAAO;EACL,MAAM,EAAM;EACZ,MAAM;EACN,QAAQ;EACR,aAAa,EAAM;EACnB,UAAU,EAAM;EAChB,UAAU,EAAM;EAChB,SAAS,EAAM;EACf,SAAS,EAAM,WAAW;EAC1B,eAAe,EAAM,iBAAiB;CACxC;AACF;AAUA,IAAM,IAA6B,EAAe,IAAI,CAAuB,GAEvE,IAAN,MAAoB;CAClB,aAAa,UAAU,GAA2C;EAChE,IAAI,EAAiB,EAAE,QAAQ,SAAS,SACtC,OAAO,EAAiB;EAO1B,IAAI,IAA2B,CAAC;EAChC,IAAI;GAUF,KAAe,MATQ,IAAI,EACzB,EAA4B,CAC9B,EAAE,UAAU;IACV,aAAa;IACb,WAAW;IACX,cAAc;IACd,UAAU;IACV,aAAa,KAAc,EAAyB;GACtD,CAAC,GACuB,UAAU,CAAC;EACrC,QAAQ,CAGR;EAEA,OAAO,CAAC,GAAG,GAAa,GAAG,CAAa;CAC1C;AACF"}
|
|
@@ -3,5 +3,5 @@ interface ChevronLeftProps {
|
|
|
3
3
|
height?: number;
|
|
4
4
|
active?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare function ChevronLeft({ width, height, active, }: ChevronLeftProps): import("react
|
|
6
|
+
export declare function ChevronLeft({ width, height, active, }: ChevronLeftProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,5 +3,5 @@ interface ChevronRightProps {
|
|
|
3
3
|
height?: number;
|
|
4
4
|
active?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare function ChevronRight({ width, height, active, }: ChevronRightProps): import("react
|
|
6
|
+
export declare function ChevronRight({ width, height, active, }: ChevronRightProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../../constants/canvas-ui.cjs");var t=(e,t)=>e?e.length>t?`${e.substring(0,t)}...`:e:``,n=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),r=e=>{let t=e.summary?.trim().replace(/\s+/g,` `)||``;return!t||n(t)?null:t},i=n=>{let i=r(n);if(i)return{kind:`text`,text:i};let a=n.action.kind;switch(a){case`ExecuteBashAction`:case`TerminalAction`:return{kind:`translation`,key:`ACTION_MESSAGE$RUN`,values:{command:t(n.action.command,80)}};case`FileEditorAction`:case`StrReplaceEditorAction`:return{kind:`translation`,key:n.action.command===`view`?`ACTION_MESSAGE$READ`:n.action.command===`create`?`ACTION_MESSAGE$WRITE`:`ACTION_MESSAGE$EDIT`,values:{path:n.action.path}};case`MCPToolAction`:return{kind:`translation`,key:`ACTION_MESSAGE$CALL_TOOL_MCP`,values:{mcp_tool_name:n.tool_name}};case`InvokeSkillAction`:return{kind:`translation`,key:`ACTION_MESSAGE$INVOKE_SKILL`,values:{name:n.action.name}};case`TaskAction`:return{kind:`translation`,key:`ACTION_MESSAGE$TASK`,values:{name:n.action.subagent_type}};case`ThinkAction`:return{kind:`translation`,key:`ACTION_MESSAGE$THINK`,values:{}};case`FinishAction`:return{kind:`translation`,key:`ACTION_MESSAGE$FINISH`,values:{}};case`TaskTrackerAction`:return{kind:`translation`,key:`ACTION_MESSAGE$TASK_TRACKING`,values:{}};case`GrepAction`:return{kind:`translation`,key:`ACTION_MESSAGE$GREP`,values:{pattern:n.action.pattern?t(n.action.pattern,50):``}};case`GlobAction`:return{kind:`translation`,key:`ACTION_MESSAGE$GLOB`,values:{pattern:n.action.pattern?t(n.action.pattern,50):``}};case`BrowserNavigateAction`:case`BrowserClickAction`:case`BrowserTypeAction`:case`BrowserGetStateAction`:case`BrowserGetContentAction`:case`BrowserScrollAction`:case`BrowserGoBackAction`:case`BrowserListTabsAction`:case`BrowserSwitchTabAction`:case`BrowserCloseTabAction`:return{kind:`translation`,key:`ACTION_MESSAGE$BROWSE`,values:{}};case`CanvasUIAction`:case e.CANVAS_UI_CLIENT_ACTION_KIND:return{kind:`text`,text:`CANVASUI`};default:return{kind:`text`,text:String(a).replace(`Action`,``).toUpperCase()}}};exports.getActionEventTitleDescriptor=i,exports.getActionSummaryTitle=r,exports.trimEventTitleText=t;
|
|
2
|
+
//# sourceMappingURL=get-action-event-title.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-action-event-title.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-action-event-title.ts"],"sourcesContent":["import { CANVAS_UI_CLIENT_ACTION_KIND } from \"#/constants/canvas-ui\";\nimport type { ActionEvent } from \"#/types/agent-server/core\";\n\nexport type EventTitleDescriptor =\n | {\n readonly kind: \"translation\";\n readonly key: string;\n readonly values: Readonly<Record<string, unknown>>;\n }\n | {\n readonly kind: \"text\";\n readonly text: string;\n };\n\nexport const trimEventTitleText = (text: string, maxLength: number): string => {\n if (!text) return \"\";\n return text.length > maxLength ? `${text.substring(0, maxLength)}...` : text;\n};\n\nconst isServerFallbackSummary = (summary: string): boolean =>\n /^[a-z][a-z0-9_]*\\s*:\\s*[[{]/i.test(summary);\n\nexport const getActionSummaryTitle = (event: ActionEvent): string | null => {\n const summary = event.summary?.trim().replace(/\\s+/g, \" \") || \"\";\n return !summary || isServerFallbackSummary(summary) ? null : summary;\n};\n\nexport const getActionEventTitleDescriptor = (\n event: ActionEvent,\n): EventTitleDescriptor => {\n const summary = getActionSummaryTitle(event);\n if (summary) {\n return { kind: \"text\", text: summary };\n }\n\n const actionType = event.action.kind;\n\n switch (actionType) {\n case \"ExecuteBashAction\":\n case \"TerminalAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$RUN\",\n values: { command: trimEventTitleText(event.action.command, 80) },\n };\n case \"FileEditorAction\":\n case \"StrReplaceEditorAction\": {\n const key =\n event.action.command === \"view\"\n ? \"ACTION_MESSAGE$READ\"\n : event.action.command === \"create\"\n ? \"ACTION_MESSAGE$WRITE\"\n : \"ACTION_MESSAGE$EDIT\";\n return {\n kind: \"translation\",\n key,\n values: { path: event.action.path },\n };\n }\n case \"MCPToolAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$CALL_TOOL_MCP\",\n values: { mcp_tool_name: event.tool_name },\n };\n case \"InvokeSkillAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$INVOKE_SKILL\",\n values: { name: event.action.name },\n };\n case \"TaskAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$TASK\",\n values: { name: event.action.subagent_type },\n };\n case \"ThinkAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$THINK\",\n values: {},\n };\n case \"FinishAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$FINISH\",\n values: {},\n };\n case \"TaskTrackerAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$TASK_TRACKING\",\n values: {},\n };\n case \"GrepAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$GREP\",\n values: {\n pattern: event.action.pattern\n ? trimEventTitleText(event.action.pattern, 50)\n : \"\",\n },\n };\n case \"GlobAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$GLOB\",\n values: {\n pattern: event.action.pattern\n ? trimEventTitleText(event.action.pattern, 50)\n : \"\",\n },\n };\n case \"BrowserNavigateAction\":\n case \"BrowserClickAction\":\n case \"BrowserTypeAction\":\n case \"BrowserGetStateAction\":\n case \"BrowserGetContentAction\":\n case \"BrowserScrollAction\":\n case \"BrowserGoBackAction\":\n case \"BrowserListTabsAction\":\n case \"BrowserSwitchTabAction\":\n case \"BrowserCloseTabAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$BROWSE\",\n values: {},\n };\n case \"CanvasUIAction\":\n case CANVAS_UI_CLIENT_ACTION_KIND:\n return { kind: \"text\", text: \"CANVASUI\" };\n default:\n return {\n kind: \"text\",\n text: String(actionType).replace(\"Action\", \"\").toUpperCase(),\n };\n }\n};\n"],"mappings":"6GAcA,IAAa,GAAsB,EAAc,IAC1C,EACE,EAAK,OAAS,EAAY,GAAG,EAAK,UAAU,EAAG,CAAS,EAAE,KAAO,EADtD,GAId,EAA2B,GAC/B,+BAA+B,KAAK,CAAO,EAEhC,EAAyB,GAAsC,CAC1E,IAAM,EAAU,EAAM,SAAS,KAAK,EAAE,QAAQ,OAAQ,GAAG,GAAK,GAC9D,MAAO,CAAC,GAAW,EAAwB,CAAO,EAAI,KAAO,CAC/D,EAEa,EACX,GACyB,CACzB,IAAM,EAAU,EAAsB,CAAK,EAC3C,GAAI,EACF,MAAO,CAAE,KAAM,OAAQ,KAAM,CAAQ,EAGvC,IAAM,EAAa,EAAM,OAAO,KAEhC,OAAQ,EAAR,CACE,IAAK,oBACL,IAAK,iBACH,MAAO,CACL,KAAM,cACN,IAAK,qBACL,OAAQ,CAAE,QAAS,EAAmB,EAAM,OAAO,QAAS,EAAE,CAAE,CAClE,EACF,IAAK,mBACL,IAAK,yBAOH,MAAO,CACL,KAAM,cACN,IAPA,EAAM,OAAO,UAAY,OACrB,sBACA,EAAM,OAAO,UAAY,SACvB,uBACA,sBAIN,OAAQ,CAAE,KAAM,EAAM,OAAO,IAAK,CACpC,EAEF,IAAK,gBACH,MAAO,CACL,KAAM,cACN,IAAK,+BACL,OAAQ,CAAE,cAAe,EAAM,SAAU,CAC3C,EACF,IAAK,oBACH,MAAO,CACL,KAAM,cACN,IAAK,8BACL,OAAQ,CAAE,KAAM,EAAM,OAAO,IAAK,CACpC,EACF,IAAK,aACH,MAAO,CACL,KAAM,cACN,IAAK,sBACL,OAAQ,CAAE,KAAM,EAAM,OAAO,aAAc,CAC7C,EACF,IAAK,cACH,MAAO,CACL,KAAM,cACN,IAAK,uBACL,OAAQ,CAAC,CACX,EACF,IAAK,eACH,MAAO,CACL,KAAM,cACN,IAAK,wBACL,OAAQ,CAAC,CACX,EACF,IAAK,oBACH,MAAO,CACL,KAAM,cACN,IAAK,+BACL,OAAQ,CAAC,CACX,EACF,IAAK,aACH,MAAO,CACL,KAAM,cACN,IAAK,sBACL,OAAQ,CACN,QAAS,EAAM,OAAO,QAClB,EAAmB,EAAM,OAAO,QAAS,EAAE,EAC3C,EACN,CACF,EACF,IAAK,aACH,MAAO,CACL,KAAM,cACN,IAAK,sBACL,OAAQ,CACN,QAAS,EAAM,OAAO,QAClB,EAAmB,EAAM,OAAO,QAAS,EAAE,EAC3C,EACN,CACF,EACF,IAAK,wBACL,IAAK,qBACL,IAAK,oBACL,IAAK,wBACL,IAAK,0BACL,IAAK,sBACL,IAAK,sBACL,IAAK,wBACL,IAAK,yBACL,IAAK,wBACH,MAAO,CACL,KAAM,cACN,IAAK,wBACL,OAAQ,CAAC,CACX,EACF,IAAK,iBACL,KAAK,EAAA,6BACH,MAAO,CAAE,KAAM,OAAQ,KAAM,UAAW,EAC1C,QACE,MAAO,CACL,KAAM,OACN,KAAM,OAAO,CAAU,EAAE,QAAQ,SAAU,EAAE,EAAE,YAAY,CAC7D,CACJ,CACF"}
|
package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ActionEvent } from "#/types/agent-server/core";
|
|
2
|
+
export type EventTitleDescriptor = {
|
|
3
|
+
readonly kind: "translation";
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly values: Readonly<Record<string, unknown>>;
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: "text";
|
|
8
|
+
readonly text: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const trimEventTitleText: (text: string, maxLength: number) => string;
|
|
11
|
+
export declare const getActionSummaryTitle: (event: ActionEvent) => string | null;
|
|
12
|
+
export declare const getActionEventTitleDescriptor: (event: ActionEvent) => EventTitleDescriptor;
|
package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { CANVAS_UI_CLIENT_ACTION_KIND as e } from "../../../../constants/canvas-ui.js";
|
|
2
|
+
//#region src/components/conversation-events/chat/event-content-helpers/get-action-event-title.ts
|
|
3
|
+
var t = (e, t) => e ? e.length > t ? `${e.substring(0, t)}...` : e : "", n = (e) => /^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e), r = (e) => {
|
|
4
|
+
let t = e.summary?.trim().replace(/\s+/g, " ") || "";
|
|
5
|
+
return !t || n(t) ? null : t;
|
|
6
|
+
}, i = (n) => {
|
|
7
|
+
let i = r(n);
|
|
8
|
+
if (i) return {
|
|
9
|
+
kind: "text",
|
|
10
|
+
text: i
|
|
11
|
+
};
|
|
12
|
+
let a = n.action.kind;
|
|
13
|
+
switch (a) {
|
|
14
|
+
case "ExecuteBashAction":
|
|
15
|
+
case "TerminalAction": return {
|
|
16
|
+
kind: "translation",
|
|
17
|
+
key: "ACTION_MESSAGE$RUN",
|
|
18
|
+
values: { command: t(n.action.command, 80) }
|
|
19
|
+
};
|
|
20
|
+
case "FileEditorAction":
|
|
21
|
+
case "StrReplaceEditorAction": return {
|
|
22
|
+
kind: "translation",
|
|
23
|
+
key: n.action.command === "view" ? "ACTION_MESSAGE$READ" : n.action.command === "create" ? "ACTION_MESSAGE$WRITE" : "ACTION_MESSAGE$EDIT",
|
|
24
|
+
values: { path: n.action.path }
|
|
25
|
+
};
|
|
26
|
+
case "MCPToolAction": return {
|
|
27
|
+
kind: "translation",
|
|
28
|
+
key: "ACTION_MESSAGE$CALL_TOOL_MCP",
|
|
29
|
+
values: { mcp_tool_name: n.tool_name }
|
|
30
|
+
};
|
|
31
|
+
case "InvokeSkillAction": return {
|
|
32
|
+
kind: "translation",
|
|
33
|
+
key: "ACTION_MESSAGE$INVOKE_SKILL",
|
|
34
|
+
values: { name: n.action.name }
|
|
35
|
+
};
|
|
36
|
+
case "TaskAction": return {
|
|
37
|
+
kind: "translation",
|
|
38
|
+
key: "ACTION_MESSAGE$TASK",
|
|
39
|
+
values: { name: n.action.subagent_type }
|
|
40
|
+
};
|
|
41
|
+
case "ThinkAction": return {
|
|
42
|
+
kind: "translation",
|
|
43
|
+
key: "ACTION_MESSAGE$THINK",
|
|
44
|
+
values: {}
|
|
45
|
+
};
|
|
46
|
+
case "FinishAction": return {
|
|
47
|
+
kind: "translation",
|
|
48
|
+
key: "ACTION_MESSAGE$FINISH",
|
|
49
|
+
values: {}
|
|
50
|
+
};
|
|
51
|
+
case "TaskTrackerAction": return {
|
|
52
|
+
kind: "translation",
|
|
53
|
+
key: "ACTION_MESSAGE$TASK_TRACKING",
|
|
54
|
+
values: {}
|
|
55
|
+
};
|
|
56
|
+
case "GrepAction": return {
|
|
57
|
+
kind: "translation",
|
|
58
|
+
key: "ACTION_MESSAGE$GREP",
|
|
59
|
+
values: { pattern: n.action.pattern ? t(n.action.pattern, 50) : "" }
|
|
60
|
+
};
|
|
61
|
+
case "GlobAction": return {
|
|
62
|
+
kind: "translation",
|
|
63
|
+
key: "ACTION_MESSAGE$GLOB",
|
|
64
|
+
values: { pattern: n.action.pattern ? t(n.action.pattern, 50) : "" }
|
|
65
|
+
};
|
|
66
|
+
case "BrowserNavigateAction":
|
|
67
|
+
case "BrowserClickAction":
|
|
68
|
+
case "BrowserTypeAction":
|
|
69
|
+
case "BrowserGetStateAction":
|
|
70
|
+
case "BrowserGetContentAction":
|
|
71
|
+
case "BrowserScrollAction":
|
|
72
|
+
case "BrowserGoBackAction":
|
|
73
|
+
case "BrowserListTabsAction":
|
|
74
|
+
case "BrowserSwitchTabAction":
|
|
75
|
+
case "BrowserCloseTabAction": return {
|
|
76
|
+
kind: "translation",
|
|
77
|
+
key: "ACTION_MESSAGE$BROWSE",
|
|
78
|
+
values: {}
|
|
79
|
+
};
|
|
80
|
+
case "CanvasUIAction":
|
|
81
|
+
case e: return {
|
|
82
|
+
kind: "text",
|
|
83
|
+
text: "CANVASUI"
|
|
84
|
+
};
|
|
85
|
+
default: return {
|
|
86
|
+
kind: "text",
|
|
87
|
+
text: String(a).replace("Action", "").toUpperCase()
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { i as getActionEventTitleDescriptor, r as getActionSummaryTitle, t as trimEventTitleText };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=get-action-event-title.js.map
|
package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-action-event-title.js","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-action-event-title.ts"],"sourcesContent":["import { CANVAS_UI_CLIENT_ACTION_KIND } from \"#/constants/canvas-ui\";\nimport type { ActionEvent } from \"#/types/agent-server/core\";\n\nexport type EventTitleDescriptor =\n | {\n readonly kind: \"translation\";\n readonly key: string;\n readonly values: Readonly<Record<string, unknown>>;\n }\n | {\n readonly kind: \"text\";\n readonly text: string;\n };\n\nexport const trimEventTitleText = (text: string, maxLength: number): string => {\n if (!text) return \"\";\n return text.length > maxLength ? `${text.substring(0, maxLength)}...` : text;\n};\n\nconst isServerFallbackSummary = (summary: string): boolean =>\n /^[a-z][a-z0-9_]*\\s*:\\s*[[{]/i.test(summary);\n\nexport const getActionSummaryTitle = (event: ActionEvent): string | null => {\n const summary = event.summary?.trim().replace(/\\s+/g, \" \") || \"\";\n return !summary || isServerFallbackSummary(summary) ? null : summary;\n};\n\nexport const getActionEventTitleDescriptor = (\n event: ActionEvent,\n): EventTitleDescriptor => {\n const summary = getActionSummaryTitle(event);\n if (summary) {\n return { kind: \"text\", text: summary };\n }\n\n const actionType = event.action.kind;\n\n switch (actionType) {\n case \"ExecuteBashAction\":\n case \"TerminalAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$RUN\",\n values: { command: trimEventTitleText(event.action.command, 80) },\n };\n case \"FileEditorAction\":\n case \"StrReplaceEditorAction\": {\n const key =\n event.action.command === \"view\"\n ? \"ACTION_MESSAGE$READ\"\n : event.action.command === \"create\"\n ? \"ACTION_MESSAGE$WRITE\"\n : \"ACTION_MESSAGE$EDIT\";\n return {\n kind: \"translation\",\n key,\n values: { path: event.action.path },\n };\n }\n case \"MCPToolAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$CALL_TOOL_MCP\",\n values: { mcp_tool_name: event.tool_name },\n };\n case \"InvokeSkillAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$INVOKE_SKILL\",\n values: { name: event.action.name },\n };\n case \"TaskAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$TASK\",\n values: { name: event.action.subagent_type },\n };\n case \"ThinkAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$THINK\",\n values: {},\n };\n case \"FinishAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$FINISH\",\n values: {},\n };\n case \"TaskTrackerAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$TASK_TRACKING\",\n values: {},\n };\n case \"GrepAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$GREP\",\n values: {\n pattern: event.action.pattern\n ? trimEventTitleText(event.action.pattern, 50)\n : \"\",\n },\n };\n case \"GlobAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$GLOB\",\n values: {\n pattern: event.action.pattern\n ? trimEventTitleText(event.action.pattern, 50)\n : \"\",\n },\n };\n case \"BrowserNavigateAction\":\n case \"BrowserClickAction\":\n case \"BrowserTypeAction\":\n case \"BrowserGetStateAction\":\n case \"BrowserGetContentAction\":\n case \"BrowserScrollAction\":\n case \"BrowserGoBackAction\":\n case \"BrowserListTabsAction\":\n case \"BrowserSwitchTabAction\":\n case \"BrowserCloseTabAction\":\n return {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$BROWSE\",\n values: {},\n };\n case \"CanvasUIAction\":\n case CANVAS_UI_CLIENT_ACTION_KIND:\n return { kind: \"text\", text: \"CANVASUI\" };\n default:\n return {\n kind: \"text\",\n text: String(actionType).replace(\"Action\", \"\").toUpperCase(),\n };\n }\n};\n"],"mappings":";;AAcA,IAAa,KAAsB,GAAc,MAC1C,IACE,EAAK,SAAS,IAAY,GAAG,EAAK,UAAU,GAAG,CAAS,EAAE,OAAO,IADtD,IAId,KAA2B,MAC/B,+BAA+B,KAAK,CAAO,GAEhC,KAAyB,MAAsC;CAC1E,IAAM,IAAU,EAAM,SAAS,KAAK,EAAE,QAAQ,QAAQ,GAAG,KAAK;CAC9D,OAAO,CAAC,KAAW,EAAwB,CAAO,IAAI,OAAO;AAC/D,GAEa,KACX,MACyB;CACzB,IAAM,IAAU,EAAsB,CAAK;CAC3C,IAAI,GACF,OAAO;EAAE,MAAM;EAAQ,MAAM;CAAQ;CAGvC,IAAM,IAAa,EAAM,OAAO;CAEhC,QAAQ,GAAR;EACE,KAAK;EACL,KAAK,kBACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,EAAE,SAAS,EAAmB,EAAM,OAAO,SAAS,EAAE,EAAE;EAClE;EACF,KAAK;EACL,KAAK,0BAOH,OAAO;GACL,MAAM;GACN,KAPA,EAAM,OAAO,YAAY,SACrB,wBACA,EAAM,OAAO,YAAY,WACvB,yBACA;GAIN,QAAQ,EAAE,MAAM,EAAM,OAAO,KAAK;EACpC;EAEF,KAAK,iBACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,EAAE,eAAe,EAAM,UAAU;EAC3C;EACF,KAAK,qBACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,EAAE,MAAM,EAAM,OAAO,KAAK;EACpC;EACF,KAAK,cACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,EAAE,MAAM,EAAM,OAAO,cAAc;EAC7C;EACF,KAAK,eACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,CAAC;EACX;EACF,KAAK,gBACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,CAAC;EACX;EACF,KAAK,qBACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,CAAC;EACX;EACF,KAAK,cACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,EACN,SAAS,EAAM,OAAO,UAClB,EAAmB,EAAM,OAAO,SAAS,EAAE,IAC3C,GACN;EACF;EACF,KAAK,cACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,EACN,SAAS,EAAM,OAAO,UAClB,EAAmB,EAAM,OAAO,SAAS,EAAE,IAC3C,GACN;EACF;EACF,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,yBACH,OAAO;GACL,MAAM;GACN,KAAK;GACL,QAAQ,CAAC;EACX;EACF,KAAK;EACL,KAAK,GACH,OAAO;GAAE,MAAM;GAAQ,MAAM;EAAW;EAC1C,SACE,OAAO;GACL,MAAM;GACN,MAAM,OAAO,CAAU,EAAE,QAAQ,UAAU,EAAE,EAAE,YAAY;EAC7D;CACJ;AACF"}
|
package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../node_modules/react-i18next/dist/es/Trans.cjs"),n=require("../../../../i18n/declaration.cjs"),r=require("../../../../i18n/index.cjs")
|
|
1
|
+
const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../node_modules/react-i18next/dist/es/Trans.cjs"),n=require("../../../../i18n/declaration.cjs"),r=require("../../../../i18n/index.cjs");require("../../../../constants/canvas-ui.cjs");const i=require("../../../../types/agent-server/type-guards.cjs"),a=require("./get-acp-tool-call-content.cjs"),o=require("./get-action-event-title.cjs"),s=require("../../../features/chat/mono-component.cjs"),c=require("../../../features/chat/path-component.cjs"),l=require("./get-action-content.cjs"),u=require("./get-observation-content.cjs"),d=require("../task-tracking/task-tracking-observation-content.cjs"),f=require("./create-skill-ready-event.cjs"),p=require("../../../features/chat/tool-visualizers/dispatcher.cjs");let m=require("react");m=e.__toESM(m,1);let h=require("react/jsx-runtime");var g=(e,n)=>r.default.exists(e)?(0,h.jsx)(t.Trans,{ns:`openhands`,i18nKey:e,values:n,components:{path:(0,h.jsx)(c.PathComponent,{}),cmd:(0,h.jsx)(s.MonoComponent,{})}}):e,_=e=>e.kind===`text`?e.text:g(e.key,e.values),v=(e,t)=>{if(typeof e!=`string`)return null;let n=e.trim();return n?t?o.trimEventTitleText(n,t):n:null},y=e=>{if(e.tool_name!==`inspect_image_with_vision`)return null;let t=e.action,n=v(t.profile_name);return n?`Describing image with ${n}`:`Describing image with auxiliary vision LLM`},b=(e,t)=>{let n=t?.tool_name,r=e.observation,i=v(r.tool_name);if(n!==`inspect_image_with_vision`&&i!==`inspect_image_with_vision`&&String(e.observation.kind)!==`VisionInspectObservation`)return null;let a=v((t?.action??{}).profile_name)??v(r.profile_name)??v(r.base_url,80)??v(r.endpoint,80)??v(r.model,80);return a?`Describing image with ${a}`:`Describing image with auxiliary vision LLM`},x=e=>i.isActionEvent(e)?y(e)||_(o.getActionEventTitleDescriptor(e)):``,S=(e,t)=>{if(!i.isObservationEvent(e))return``;let n=b(e,t);if(n)return n;if(t){let e=y(t);if(e)return e;let n=o.getActionSummaryTitle(t);if(n)return n}let r=e.observation.kind,a=``,s={};switch(r){case`ExecuteBashObservation`:case`TerminalObservation`:a=`OBSERVATION_MESSAGE$RUN`,s={command:e.observation.command?o.trimEventTitleText(e.observation.command,80):``};break;case`FileEditorObservation`:case`StrReplaceEditorObservation`:a=e.observation.command===`view`?`OBSERVATION_MESSAGE$READ`:`OBSERVATION_MESSAGE$EDIT`,s={path:e.observation.path||``};break;case`MCPToolObservation`:a=`OBSERVATION_MESSAGE$MCP`,s={mcp_tool_name:e.observation.tool_name};break;case`InvokeSkillObservation`:a=`OBSERVATION_MESSAGE$INVOKE_SKILL`,s={name:e.observation.skill_name};break;case`TaskObservation`:a=`OBSERVATION_MESSAGE$TASK`,s={name:e.observation.subagent};break;case`CanvasUIObservation`:a=`OBSERVATION_MESSAGE$CANVAS_UI`;break;case`ClientToolObservation`:if(e.tool_name===`canvas_ui_control`){a=`OBSERVATION_MESSAGE$CANVAS_UI`;break}return r.replace(`Observation`,``).toUpperCase();case`SwitchLLMObservation`:a=e.observation.is_error?`MODEL$SWITCH_FAILED`:`MODEL$SWITCHED_TO_PROFILE`,s={name:e.observation.profile_name};break;case`BrowserObservation`:a=`OBSERVATION_MESSAGE$BROWSE`;break;case`TaskTrackerObservation`:{let{command:t}=e.observation;a=t===`plan`?`OBSERVATION_MESSAGE$TASK_TRACKING_PLAN`:`OBSERVATION_MESSAGE$TASK_TRACKING_VIEW`;break}case`ThinkObservation`:a=`OBSERVATION_MESSAGE$THINK`;break;case`GlobObservation`:a=`OBSERVATION_MESSAGE$GLOB`,s={pattern:e.observation.pattern?o.trimEventTitleText(e.observation.pattern,50):``};break;case`GrepObservation`:a=`OBSERVATION_MESSAGE$GREP`,s={pattern:e.observation.pattern?o.trimEventTitleText(e.observation.pattern,50):``};break;default:return r.replace(`Observation`,``).toUpperCase()}return a?g(a,s):r},C=(e,t)=>e.observation.kind!==`ClientToolObservation`||e.tool_name!==`canvas_ui_control`||!t||!i.isCanvasUIActionEvent(t)?null:`UI command '${t.action.command}' dispatched to the Agent Canvas frontend.`,w=(e,t)=>{let o=``,s=``;if(f.isSkillReadyEvent(e)){let t=`OBSERVATION_MESSAGE$SKILL_READY`;o=r.default.exists(t)?g(t,{}):`Skill Ready`,s=e._skillReadyContent}else i.isActionEvent(e)?(o=x(e),s=p.resolveVisualizerBody(e)??l.getActionContent(e)):i.isObservationEvent(e)?(o=S(e,t),s=e.observation.kind===`TaskTrackerObservation`?(0,h.jsx)(d.TaskTrackingObservationContent,{event:e}):C(e,t)??p.resolveVisualizerBody(e,t)??u.getObservationContent(e)):i.isACPToolCallEvent(e)?(o=g(a.getACPToolCallTitleKey(e),{title:a.stripRedundantTitlePrefix(e)}),s=a.getACPToolCallContent(e)):e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&typeof e.action.kind==`string`&&(o=String(e.action.kind).replace(`Action`,``).toUpperCase());return{title:o||r.default.t(n.I18nKey.EVENT$UNKNOWN_EVENT),details:s}};exports.getEventContent=w;
|
|
2
2
|
//# sourceMappingURL=get-event-content.cjs.map
|
package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-content.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport React from \"react\";\nimport {\n CANVAS_UI_CLIENT_ACTION_KIND,\n CANVAS_UI_CLIENT_TOOL_NAME,\n} from \"#/constants/canvas-ui\";\nimport {\n OpenHandsEvent,\n ObservationEvent,\n ActionEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n isACPToolCallEvent,\n isCanvasUIActionEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { MonoComponent } from \"../../../features/chat/mono-component\";\nimport { PathComponent } from \"../../../features/chat/path-component\";\nimport { getActionContent } from \"./get-action-content\";\nimport { getObservationContent } from \"./get-observation-content\";\nimport {\n getACPToolCallContent,\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"./get-acp-tool-call-content\";\nimport { TaskTrackingObservationContent } from \"../task-tracking/task-tracking-observation-content\";\nimport { TaskTrackerObservation } from \"#/types/agent-server/core/base/observation\";\nimport { SkillReadyEvent, isSkillReadyEvent } from \"./create-skill-ready-event\";\nimport { resolveVisualizerBody } from \"../../../features/chat/tool-visualizers/dispatcher\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"#/i18n/declaration\";\n\nconst trimText = (text: string, maxLength: number): string => {\n if (!text) return \"\";\n return text.length > maxLength ? `${text.substring(0, maxLength)}...` : text;\n};\n\n// Helper function to create title from translation key\nconst createTitleFromKey = (\n key: string,\n values: Record<string, unknown>,\n): React.ReactNode => {\n if (!i18n.exists(key)) {\n return key;\n }\n\n return (\n <Trans\n ns=\"openhands\"\n i18nKey={key}\n values={values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n );\n};\n\n/**\n * Detects the agent-server's default summary fallback, which has the shape\n * `{tool_name}: {json-args}` (see `_extract_summary` in\n * `openhands/sdk/agent/agent.py`). When the LLM omits a summary the server\n * dumps the raw arguments JSON, which renders as a huge unreadable blob in\n * the chat. Treat that case as \"no summary\" so the action-kind specific\n * title (e.g. \"Editing <path>\", \"Running <cmd>\") is used instead.\n */\nconst isServerFallbackSummary = (summary: string): boolean =>\n /^[a-z][a-z0-9_]*\\s*:\\s*[[{]/i.test(summary);\n\nconst getSummaryTitleForActionEvent = (\n event: ActionEvent,\n): React.ReactNode | null => {\n const summary = event.summary?.trim().replace(/\\s+/g, \" \") || \"\";\n if (!summary || isServerFallbackSummary(summary)) {\n return null;\n }\n return summary;\n};\n\nconst getNonEmptyString = (\n value: unknown,\n maxLength?: number,\n): string | null => {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n return maxLength ? trimText(trimmed, maxLength) : trimmed;\n};\n\nconst getVisionInspectActionTitle = (\n event: ActionEvent,\n): React.ReactNode | null => {\n if (event.tool_name !== \"inspect_image_with_vision\") {\n return null;\n }\n\n const action = event.action as unknown as Record<string, unknown>;\n const profileName = getNonEmptyString(action.profile_name);\n\n return profileName\n ? `Describing image with ${profileName}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\nconst getVisionInspectObservationTitle = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode | null => {\n const actionToolName = correspondingAction?.tool_name;\n const observation = event.observation as unknown as Record<string, unknown>;\n const observationToolName = getNonEmptyString(observation.tool_name);\n\n if (\n actionToolName !== \"inspect_image_with_vision\" &&\n observationToolName !== \"inspect_image_with_vision\" &&\n String(event.observation.kind) !== \"VisionInspectObservation\"\n ) {\n return null;\n }\n\n const action = (correspondingAction?.action ?? {}) as unknown as Record<\n string,\n unknown\n >;\n const label =\n getNonEmptyString(action.profile_name) ??\n getNonEmptyString(observation.profile_name) ??\n getNonEmptyString(observation.base_url, 80) ??\n getNonEmptyString(observation.endpoint, 80) ??\n getNonEmptyString(observation.model, 80);\n\n return label\n ? `Describing image with ${label}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\n// Action Event Processing\nconst getActionEventTitle = (event: OpenHandsEvent): React.ReactNode => {\n // Early return if not an action event\n if (!isActionEvent(event)) {\n return \"\";\n }\n\n const visionInspectTitle = getVisionInspectActionTitle(event);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getSummaryTitleForActionEvent(event);\n if (summaryTitle) {\n return summaryTitle;\n }\n\n const actionType = event.action.kind;\n let actionKey = \"\";\n let actionValues: Record<string, unknown> = {};\n\n switch (actionType) {\n case \"ExecuteBashAction\":\n case \"TerminalAction\":\n actionKey = \"ACTION_MESSAGE$RUN\";\n actionValues = {\n command: trimText(event.action.command, 80),\n };\n break;\n case \"FileEditorAction\":\n case \"StrReplaceEditorAction\":\n if (event.action.command === \"view\") {\n actionKey = \"ACTION_MESSAGE$READ\";\n } else if (event.action.command === \"create\") {\n actionKey = \"ACTION_MESSAGE$WRITE\";\n } else {\n actionKey = \"ACTION_MESSAGE$EDIT\";\n }\n actionValues = {\n path: event.action.path,\n };\n break;\n case \"MCPToolAction\":\n actionKey = \"ACTION_MESSAGE$CALL_TOOL_MCP\";\n actionValues = {\n mcp_tool_name: event.tool_name,\n };\n break;\n case \"InvokeSkillAction\":\n actionKey = \"ACTION_MESSAGE$INVOKE_SKILL\";\n actionValues = {\n name: event.action.name,\n };\n break;\n case \"TaskAction\":\n actionKey = \"ACTION_MESSAGE$TASK\";\n actionValues = {\n name: event.action.subagent_type,\n };\n break;\n case \"ThinkAction\":\n actionKey = \"ACTION_MESSAGE$THINK\";\n break;\n case \"FinishAction\":\n actionKey = \"ACTION_MESSAGE$FINISH\";\n break;\n case \"TaskTrackerAction\":\n actionKey = \"ACTION_MESSAGE$TASK_TRACKING\";\n break;\n case \"GrepAction\":\n actionKey = \"ACTION_MESSAGE$GREP\";\n actionValues = {\n pattern:\n \"pattern\" in event.action && event.action.pattern\n ? trimText(String(event.action.pattern), 50)\n : \"\",\n };\n break;\n case \"GlobAction\":\n actionKey = \"ACTION_MESSAGE$GLOB\";\n actionValues = {\n pattern:\n \"pattern\" in event.action && event.action.pattern\n ? trimText(String(event.action.pattern), 50)\n : \"\",\n };\n break;\n case \"BrowserNavigateAction\":\n case \"BrowserClickAction\":\n case \"BrowserTypeAction\":\n case \"BrowserGetStateAction\":\n case \"BrowserGetContentAction\":\n case \"BrowserScrollAction\":\n case \"BrowserGoBackAction\":\n case \"BrowserListTabsAction\":\n case \"BrowserSwitchTabAction\":\n case \"BrowserCloseTabAction\":\n actionKey = \"ACTION_MESSAGE$BROWSE\";\n break;\n case \"CanvasUIAction\":\n case CANVAS_UI_CLIENT_ACTION_KIND:\n return \"CANVASUI\";\n default:\n // For unknown actions, use the type name\n return String(actionType).replace(\"Action\", \"\").toUpperCase();\n }\n\n if (actionKey) {\n return createTitleFromKey(actionKey, actionValues);\n }\n\n return actionType;\n};\n\n// Observation Event Processing\nconst getObservationEventTitle = (\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode => {\n // Early return if not an observation event\n if (!isObservationEvent(event)) {\n return \"\";\n }\n\n const visionInspectObservationTitle = getVisionInspectObservationTitle(\n event,\n correspondingAction,\n );\n if (visionInspectObservationTitle) {\n return visionInspectObservationTitle;\n }\n\n if (correspondingAction) {\n const visionInspectTitle = getVisionInspectActionTitle(correspondingAction);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getSummaryTitleForActionEvent(correspondingAction);\n if (summaryTitle) {\n return summaryTitle;\n }\n }\n\n const observationType = event.observation.kind;\n let observationKey = \"\";\n let observationValues: Record<string, unknown> = {};\n\n switch (observationType) {\n case \"ExecuteBashObservation\":\n case \"TerminalObservation\":\n observationKey = \"OBSERVATION_MESSAGE$RUN\";\n observationValues = {\n command: event.observation.command\n ? trimText(event.observation.command, 80)\n : \"\",\n };\n break;\n case \"FileEditorObservation\":\n case \"StrReplaceEditorObservation\":\n if (event.observation.command === \"view\") {\n observationKey = \"OBSERVATION_MESSAGE$READ\";\n } else {\n observationKey = \"OBSERVATION_MESSAGE$EDIT\";\n }\n observationValues = {\n path: event.observation.path || \"\",\n };\n break;\n case \"MCPToolObservation\":\n observationKey = \"OBSERVATION_MESSAGE$MCP\";\n observationValues = {\n mcp_tool_name: event.observation.tool_name,\n };\n break;\n case \"InvokeSkillObservation\":\n observationKey = \"OBSERVATION_MESSAGE$INVOKE_SKILL\";\n observationValues = {\n name: event.observation.skill_name,\n };\n break;\n case \"TaskObservation\":\n observationKey = \"OBSERVATION_MESSAGE$TASK\";\n observationValues = {\n name: event.observation.subagent,\n };\n break;\n case \"CanvasUIObservation\":\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n case \"ClientToolObservation\":\n if (event.tool_name === CANVAS_UI_CLIENT_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n }\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n case \"SwitchLLMObservation\":\n observationKey = event.observation.is_error\n ? \"MODEL$SWITCH_FAILED\"\n : \"MODEL$SWITCHED_TO_PROFILE\";\n observationValues = {\n name: event.observation.profile_name,\n };\n break;\n case \"BrowserObservation\":\n observationKey = \"OBSERVATION_MESSAGE$BROWSE\";\n break;\n case \"TaskTrackerObservation\": {\n const { command } = event.observation;\n if (command === \"plan\") {\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_PLAN\";\n } else {\n // command === \"view\"\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_VIEW\";\n }\n break;\n }\n case \"ThinkObservation\":\n observationKey = \"OBSERVATION_MESSAGE$THINK\";\n break;\n case \"GlobObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GLOB\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n case \"GrepObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GREP\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n default:\n // For unknown observations, use the type name\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n }\n\n if (observationKey) {\n return createTitleFromKey(observationKey, observationValues);\n }\n\n return observationType;\n};\n\nconst getCanvasUIClientObservationContent = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): string | null => {\n if (\n event.observation.kind !== \"ClientToolObservation\" ||\n event.tool_name !== CANVAS_UI_CLIENT_TOOL_NAME ||\n !correspondingAction ||\n !isCanvasUIActionEvent(correspondingAction)\n ) {\n return null;\n }\n\n return `UI command '${correspondingAction.action.command}' dispatched to the Agent Canvas frontend.`;\n};\n\nexport const getEventContent = (\n event: OpenHandsEvent | SkillReadyEvent,\n correspondingAction?: ActionEvent,\n) => {\n let title: React.ReactNode = \"\";\n let details: string | React.ReactNode = \"\";\n\n // Handle Skill Ready events first\n if (isSkillReadyEvent(event)) {\n // Use translation key if available, otherwise use \"SKILL READY\"\n const skillReadyKey = \"OBSERVATION_MESSAGE$SKILL_READY\";\n if (i18n.exists(skillReadyKey)) {\n title = createTitleFromKey(skillReadyKey, {});\n } else {\n title = \"Skill Ready\";\n }\n details = event._skillReadyContent;\n } else if (isActionEvent(event)) {\n title = getActionEventTitle(event);\n // Per-tool React visualizer when one is registered; markdown otherwise.\n details = resolveVisualizerBody(event) ?? getActionContent(event);\n } else if (isObservationEvent(event)) {\n title = getObservationEventTitle(event, correspondingAction);\n\n // For TaskTrackerObservation, use React component instead of markdown\n if (event.observation.kind === \"TaskTrackerObservation\") {\n details = (\n <TaskTrackingObservationContent\n event={event as ObservationEvent<TaskTrackerObservation>}\n />\n );\n } else {\n details =\n getCanvasUIClientObservationContent(event, correspondingAction) ??\n resolveVisualizerBody(event, correspondingAction) ??\n getObservationContent(event);\n }\n } else if (isACPToolCallEvent(event)) {\n // ACP sub-agent tool calls reuse the same card shape as observations:\n // title is \"Running/Editing/Reading …\" via a translation key that\n // mirrors ACTION_MESSAGE$RUN etc.; details are markdown built from\n // raw_input + raw_output the same way getTerminalObservationContent\n // builds \"Command: / Output:\" blocks.\n title = createTitleFromKey(getACPToolCallTitleKey(event), {\n // Strip a redundant verb prefix the ACP server may have inlined\n // (Claude Code emits ``\"Read /path\"`` for a read tool; combined\n // with the ``\"Reading <cmd>{{title}}</cmd>\"`` template that lands\n // as ``\"Reading Read /path\"``). See ``stripRedundantTitlePrefix``.\n title: stripRedundantTitlePrefix(event),\n });\n details = getACPToolCallContent(event);\n } else if (\n // Lenient fallback for action-like events that fail the strict isActionEvent() guard\n // (e.g., missing tool_name or tool_call_id). Extract a title from the action kind\n // so the UI shows something meaningful instead of \"Unknown event\".\n event.source === \"agent\" &&\n \"action\" in event &&\n event.action !== null &&\n typeof event.action === \"object\" &&\n \"kind\" in event.action &&\n typeof event.action.kind === \"string\"\n ) {\n title = String(event.action.kind).replace(\"Action\", \"\").toUpperCase();\n }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AAoC,EAAO,CAAmB,GAC9D,EAAA,sBAAsB,EAAO,CAAmB,GAChD,EAAA,sBAAsB,CAAK,GAEtB,EAAA,mBAAmB,CAAK,GAMjC,EAAQ,EAAmB,EAAA,uBAAuB,CAAK,EAAG,CAKxD,MAAO,EAAA,0BAA0B,CAAK,CACxC,CAAC,EACD,EAAU,EAAA,sBAAsB,CAAK,GAKrC,EAAM,SAAW,SACjB,WAAY,GACZ,EAAM,SAAW,MACjB,OAAO,EAAM,QAAW,UACxB,SAAU,EAAM,QAChB,OAAO,EAAM,OAAO,MAAS,WAE7B,EAAQ,OAAO,EAAM,OAAO,IAAI,EAAE,QAAQ,SAAU,EAAE,EAAE,YAAY,GAGtE,MAAO,CACL,MAAO,GAAS,EAAA,QAAK,EAAE,EAAA,QAAQ,mBAAmB,EAClD,SACF,CACF"}
|
|
1
|
+
{"version":3,"file":"get-event-content.cjs","names":[],"sources":["../../../../../src/components/conversation-events/chat/event-content-helpers/get-event-content.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport React from \"react\";\nimport { CANVAS_UI_CLIENT_TOOL_NAME } from \"#/constants/canvas-ui\";\nimport {\n OpenHandsEvent,\n ObservationEvent,\n ActionEvent,\n} from \"#/types/agent-server/core\";\nimport {\n isActionEvent,\n isObservationEvent,\n isACPToolCallEvent,\n isCanvasUIActionEvent,\n} from \"#/types/agent-server/type-guards\";\nimport { MonoComponent } from \"../../../features/chat/mono-component\";\nimport { PathComponent } from \"../../../features/chat/path-component\";\nimport { getActionContent } from \"./get-action-content\";\nimport { getObservationContent } from \"./get-observation-content\";\nimport {\n getACPToolCallContent,\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"./get-acp-tool-call-content\";\nimport { TaskTrackingObservationContent } from \"../task-tracking/task-tracking-observation-content\";\nimport { TaskTrackerObservation } from \"#/types/agent-server/core/base/observation\";\nimport { SkillReadyEvent, isSkillReadyEvent } from \"./create-skill-ready-event\";\nimport { resolveVisualizerBody } from \"../../../features/chat/tool-visualizers/dispatcher\";\nimport i18n from \"#/i18n\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n trimEventTitleText,\n type EventTitleDescriptor,\n} from \"./get-action-event-title\";\n\n// Helper function to create title from translation key\nconst createTitleFromKey = (\n key: string,\n values: Readonly<Record<string, unknown>>,\n): React.ReactNode => {\n if (!i18n.exists(key)) {\n return key;\n }\n\n return (\n <Trans\n ns=\"openhands\"\n i18nKey={key}\n values={values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n );\n};\n\nconst renderTitleDescriptor = (\n descriptor: EventTitleDescriptor,\n): React.ReactNode =>\n descriptor.kind === \"text\"\n ? descriptor.text\n : createTitleFromKey(descriptor.key, descriptor.values);\n\nconst getNonEmptyString = (\n value: unknown,\n maxLength?: number,\n): string | null => {\n if (typeof value !== \"string\") {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n return maxLength ? trimEventTitleText(trimmed, maxLength) : trimmed;\n};\n\nconst getVisionInspectActionTitle = (\n event: ActionEvent,\n): React.ReactNode | null => {\n if (event.tool_name !== \"inspect_image_with_vision\") {\n return null;\n }\n\n const action = event.action as unknown as Record<string, unknown>;\n const profileName = getNonEmptyString(action.profile_name);\n\n return profileName\n ? `Describing image with ${profileName}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\nconst getVisionInspectObservationTitle = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode | null => {\n const actionToolName = correspondingAction?.tool_name;\n const observation = event.observation as unknown as Record<string, unknown>;\n const observationToolName = getNonEmptyString(observation.tool_name);\n\n if (\n actionToolName !== \"inspect_image_with_vision\" &&\n observationToolName !== \"inspect_image_with_vision\" &&\n String(event.observation.kind) !== \"VisionInspectObservation\"\n ) {\n return null;\n }\n\n const action = (correspondingAction?.action ?? {}) as unknown as Record<\n string,\n unknown\n >;\n const label =\n getNonEmptyString(action.profile_name) ??\n getNonEmptyString(observation.profile_name) ??\n getNonEmptyString(observation.base_url, 80) ??\n getNonEmptyString(observation.endpoint, 80) ??\n getNonEmptyString(observation.model, 80);\n\n return label\n ? `Describing image with ${label}`\n : \"Describing image with auxiliary vision LLM\";\n};\n\n// Action Event Processing\nconst getActionEventTitle = (event: OpenHandsEvent): React.ReactNode => {\n // Early return if not an action event\n if (!isActionEvent(event)) {\n return \"\";\n }\n\n const visionInspectTitle = getVisionInspectActionTitle(event);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n return renderTitleDescriptor(getActionEventTitleDescriptor(event));\n};\n\n// Observation Event Processing\nconst getObservationEventTitle = (\n event: OpenHandsEvent,\n correspondingAction?: ActionEvent,\n): React.ReactNode => {\n // Early return if not an observation event\n if (!isObservationEvent(event)) {\n return \"\";\n }\n\n const visionInspectObservationTitle = getVisionInspectObservationTitle(\n event,\n correspondingAction,\n );\n if (visionInspectObservationTitle) {\n return visionInspectObservationTitle;\n }\n\n if (correspondingAction) {\n const visionInspectTitle = getVisionInspectActionTitle(correspondingAction);\n if (visionInspectTitle) {\n return visionInspectTitle;\n }\n\n const summaryTitle = getActionSummaryTitle(correspondingAction);\n if (summaryTitle) {\n return summaryTitle;\n }\n }\n\n const observationType = event.observation.kind;\n let observationKey = \"\";\n let observationValues: Record<string, unknown> = {};\n\n switch (observationType) {\n case \"ExecuteBashObservation\":\n case \"TerminalObservation\":\n observationKey = \"OBSERVATION_MESSAGE$RUN\";\n observationValues = {\n command: event.observation.command\n ? trimEventTitleText(event.observation.command, 80)\n : \"\",\n };\n break;\n case \"FileEditorObservation\":\n case \"StrReplaceEditorObservation\":\n if (event.observation.command === \"view\") {\n observationKey = \"OBSERVATION_MESSAGE$READ\";\n } else {\n observationKey = \"OBSERVATION_MESSAGE$EDIT\";\n }\n observationValues = {\n path: event.observation.path || \"\",\n };\n break;\n case \"MCPToolObservation\":\n observationKey = \"OBSERVATION_MESSAGE$MCP\";\n observationValues = {\n mcp_tool_name: event.observation.tool_name,\n };\n break;\n case \"InvokeSkillObservation\":\n observationKey = \"OBSERVATION_MESSAGE$INVOKE_SKILL\";\n observationValues = {\n name: event.observation.skill_name,\n };\n break;\n case \"TaskObservation\":\n observationKey = \"OBSERVATION_MESSAGE$TASK\";\n observationValues = {\n name: event.observation.subagent,\n };\n break;\n case \"CanvasUIObservation\":\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n case \"ClientToolObservation\":\n if (event.tool_name === CANVAS_UI_CLIENT_TOOL_NAME) {\n observationKey = \"OBSERVATION_MESSAGE$CANVAS_UI\";\n break;\n }\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n case \"SwitchLLMObservation\":\n observationKey = event.observation.is_error\n ? \"MODEL$SWITCH_FAILED\"\n : \"MODEL$SWITCHED_TO_PROFILE\";\n observationValues = {\n name: event.observation.profile_name,\n };\n break;\n case \"BrowserObservation\":\n observationKey = \"OBSERVATION_MESSAGE$BROWSE\";\n break;\n case \"TaskTrackerObservation\": {\n const { command } = event.observation;\n if (command === \"plan\") {\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_PLAN\";\n } else {\n // command === \"view\"\n observationKey = \"OBSERVATION_MESSAGE$TASK_TRACKING_VIEW\";\n }\n break;\n }\n case \"ThinkObservation\":\n observationKey = \"OBSERVATION_MESSAGE$THINK\";\n break;\n case \"GlobObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GLOB\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n case \"GrepObservation\":\n observationKey = \"OBSERVATION_MESSAGE$GREP\";\n observationValues = {\n pattern: event.observation.pattern\n ? trimEventTitleText(event.observation.pattern, 50)\n : \"\",\n };\n break;\n default:\n // For unknown observations, use the type name\n return observationType.replace(\"Observation\", \"\").toUpperCase();\n }\n\n if (observationKey) {\n return createTitleFromKey(observationKey, observationValues);\n }\n\n return observationType;\n};\n\nconst getCanvasUIClientObservationContent = (\n event: ObservationEvent,\n correspondingAction?: ActionEvent,\n): string | null => {\n if (\n event.observation.kind !== \"ClientToolObservation\" ||\n event.tool_name !== CANVAS_UI_CLIENT_TOOL_NAME ||\n !correspondingAction ||\n !isCanvasUIActionEvent(correspondingAction)\n ) {\n return null;\n }\n\n return `UI command '${correspondingAction.action.command}' dispatched to the Agent Canvas frontend.`;\n};\n\nexport const getEventContent = (\n event: OpenHandsEvent | SkillReadyEvent,\n correspondingAction?: ActionEvent,\n) => {\n let title: React.ReactNode = \"\";\n let details: string | React.ReactNode = \"\";\n\n // Handle Skill Ready events first\n if (isSkillReadyEvent(event)) {\n // Use translation key if available, otherwise use \"SKILL READY\"\n const skillReadyKey = \"OBSERVATION_MESSAGE$SKILL_READY\";\n if (i18n.exists(skillReadyKey)) {\n title = createTitleFromKey(skillReadyKey, {});\n } else {\n title = \"Skill Ready\";\n }\n details = event._skillReadyContent;\n } else if (isActionEvent(event)) {\n title = getActionEventTitle(event);\n // Per-tool React visualizer when one is registered; markdown otherwise.\n details = resolveVisualizerBody(event) ?? getActionContent(event);\n } else if (isObservationEvent(event)) {\n title = getObservationEventTitle(event, correspondingAction);\n\n // For TaskTrackerObservation, use React component instead of markdown\n if (event.observation.kind === \"TaskTrackerObservation\") {\n details = (\n <TaskTrackingObservationContent\n event={event as ObservationEvent<TaskTrackerObservation>}\n />\n );\n } else {\n details =\n getCanvasUIClientObservationContent(event, correspondingAction) ??\n resolveVisualizerBody(event, correspondingAction) ??\n getObservationContent(event);\n }\n } else if (isACPToolCallEvent(event)) {\n // ACP sub-agent tool calls reuse the same card shape as observations:\n // title is \"Running/Editing/Reading …\" via a translation key that\n // mirrors ACTION_MESSAGE$RUN etc.; details are markdown built from\n // raw_input + raw_output the same way getTerminalObservationContent\n // builds \"Command: / Output:\" blocks.\n title = createTitleFromKey(getACPToolCallTitleKey(event), {\n // Strip a redundant verb prefix the ACP server may have inlined\n // (Claude Code emits ``\"Read /path\"`` for a read tool; combined\n // with the ``\"Reading <cmd>{{title}}</cmd>\"`` template that lands\n // as ``\"Reading Read /path\"``). See ``stripRedundantTitlePrefix``.\n title: stripRedundantTitlePrefix(event),\n });\n details = getACPToolCallContent(event);\n } else if (\n // Lenient fallback for action-like events that fail the strict isActionEvent() guard\n // (e.g., missing tool_name or tool_call_id). Extract a title from the action kind\n // so the UI shows something meaningful instead of \"Unknown event\".\n event.source === \"agent\" &&\n \"action\" in event &&\n event.action !== null &&\n typeof event.action === \"object\" &&\n \"kind\" in event.action &&\n typeof event.action.kind === \"string\"\n ) {\n title = String(event.action.kind).replace(\"Action\", \"\").toUpperCase();\n }\n\n return {\n title: title || i18n.t(I18nKey.EVENT$UNKNOWN_EVENT),\n details,\n };\n};\n"],"mappings":"g2BAqCA,IAAM,GACJ,EACA,IAEK,EAAA,QAAK,OAAO,CAAG,GAKlB,EAAA,EAAA,KAAC,EAAA,MAAD,CACE,GAAG,YACH,QAAS,EACD,SACR,WAAY,CACV,MAAM,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,EACtB,KAAK,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,CACvB,CACD,CAAA,EAZM,EAgBL,EACJ,GAEA,EAAW,OAAS,OAChB,EAAW,KACX,EAAmB,EAAW,IAAK,EAAW,MAAM,EAEpD,GACJ,EACA,IACkB,CAClB,GAAI,OAAO,GAAU,SACnB,OAAO,KAGT,IAAM,EAAU,EAAM,KAAK,EAK3B,OAJK,EAIE,EAAY,EAAA,mBAAmB,EAAS,CAAS,EAAI,EAHnD,IAIX,EAEM,EACJ,GAC2B,CAC3B,GAAI,EAAM,YAAc,4BACtB,OAAO,KAGT,IAAM,EAAS,EAAM,OACf,EAAc,EAAkB,EAAO,YAAY,EAEzD,OAAO,EACH,yBAAyB,IACzB,4CACN,EAEM,GACJ,EACA,IAC2B,CAC3B,IAAM,EAAiB,GAAqB,UACtC,EAAc,EAAM,YACpB,EAAsB,EAAkB,EAAY,SAAS,EAEnE,GACE,I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