@openhands/agent-canvas 1.16.0 → 1.18.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-CX3Lh9gj.js → acp-providers-DcY_mKYa.js} +1 -1
- package/build/assets/active-backend-context-BnH4-L8h.js +2 -0
- package/build/assets/{agent-context-settings-DSZlXrLj.js → agent-context-settings-D3peZkjX.js} +1 -1
- package/build/assets/agent-profiles-service.api-DkeZaqIl.js +1 -0
- package/build/assets/agent-profiles-settings-7yMWYjGF.js +1 -0
- package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
- package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
- package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +88 -0
- package/build/assets/agent-settings-BF8hM6wb.js +2 -0
- package/build/assets/agent-settings-YPutBAeR.js +1 -0
- package/build/assets/alert-banner-eYyqvHL3.js +1 -0
- package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-BXo0lCI5.js} +1 -1
- package/build/assets/api-key-entry-screen-CCBvBD8u.js +1 -0
- package/build/assets/app-settings-BtYDs-Be.js +1 -0
- package/build/assets/automation-detail-BxXhb_m2.js +3 -0
- package/build/assets/{automation-export-D3a3of4G.js → automation-export-BJsfi7n2.js} +1 -1
- package/build/assets/automation-git-sync-B7o_Nbl-.js +1 -0
- package/build/assets/automation-setup-route-qaJ6lLCf.js +3 -0
- package/build/assets/{automation-templates-BRppNh99.js → automation-templates-Bb98r-kx.js} +1 -1
- package/build/assets/automations-list-DEPVNud3.js +1 -0
- package/build/assets/{back-nav-button-Cjl_hoxq.js → back-nav-button-B2yBiVMB.js} +1 -1
- package/build/assets/backend-form-modal-DxisQV_6.js +1 -0
- package/build/assets/backend-synced-settings-badge-DLEp6cq7.js +1 -0
- package/build/assets/badge-ehL-kgeO.js +1 -0
- package/build/assets/{base-modal-D_L0oEbG.js → base-modal-C1a0TsSx.js} +1 -1
- package/build/assets/bot-ByolqPEr.js +1 -0
- package/build/assets/{brand-button-BAfk4wGP.js → brand-button-CUMfjb99.js} +1 -1
- package/build/assets/browser-SE24Tk8g.js +46 -0
- package/build/assets/browser-tab-HjJxHA0V.js +1 -0
- package/build/assets/canvas-extension-page-BsUGBb1T.js +1 -0
- package/build/assets/canvas-extensions-C9Tm6s_E.js +1 -0
- package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-B8kxM4rO.js} +1 -1
- package/build/assets/{chat-send-button-MUQqCZCS.js → chat-send-button-CGvc2wpE.js} +1 -1
- package/build/assets/check-Bo8s5Ylg.js +1 -0
- package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
- package/build/assets/chevron-right-CfdfRn-8.js +1 -0
- package/build/assets/circle-check-5pH3qCji.js +1 -0
- package/build/assets/circle-plus-check-toggle-BDX_ctNs.js +1 -0
- package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-D5uJ_4JE.js} +1 -1
- package/build/assets/{cog-D-MPQW6G.js → cog-CAEugqtV.js} +1 -1
- package/build/assets/command-menu-CQxs4mtX.js +1 -0
- package/build/assets/commits-tab-D0xgjipP.js +1 -0
- package/build/assets/{condenser-settings-DmEOje-7.js → condenser-settings-D63NJRBT.js} +1 -1
- package/build/assets/confirmation-modal-78sd9Vny.js +1 -0
- package/build/assets/{context-menu-list-item-I86vKcmM.js → context-menu-list-item-Cm7-7Y-7.js} +1 -1
- package/build/assets/conversation-B_nweu5p.js +93 -0
- package/build/assets/conversation-edjzrv5w.js +1 -0
- package/build/assets/conversation-panel-edjzrv5w.js +1 -0
- package/build/assets/conversation-state-store-9D_3P7q4.js +1 -0
- package/build/assets/conversation-store-DC-JlJuq.js +6 -0
- package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-B3dpJXX0.js} +1 -1
- package/build/assets/copy-to-clipboard-button-B1ljgNxO.js +1 -0
- package/build/assets/device-verify-D5QRIS_x.js +1 -0
- package/build/assets/{dropdown-classes-Bc1djN0-.js → dropdown-classes-BGvOvW2_.js} +1 -1
- package/build/assets/edit-automation-modal-D_JWSmxT.js +1 -0
- package/build/assets/empty-state-FK_s1B60.js +1 -0
- package/build/assets/{entry.client-CqyPPjOq.js → entry.client-BMafTpjO.js} +2 -2
- package/build/assets/enum-filter-dropdown-UNaom12H.js +1 -0
- package/build/assets/environment-switch-overlay-COibRUA-.js +1 -0
- package/build/assets/error-state-Cf8LRuuY.js +1 -0
- package/build/assets/extensions-hub-C_6ahIua.js +1 -0
- package/build/assets/extensions-navigation-C5GfpzFe.js +1 -0
- package/build/assets/external-link-Bd7Tga-1.js +1 -0
- package/build/assets/files-tab-D5PPIWI1.js +1 -0
- package/build/assets/{form-control-classes-Bkh5FGrD.js → form-control-classes-Dbq-7YP_.js} +1 -1
- package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
- package/build/assets/get-git-path-jU2zjqIB.js +1 -0
- package/build/assets/git-repo-dropdown-BoDDWXfX.js +1 -0
- package/build/assets/git-repo-dropdown-uxlFw2gn.js +1 -0
- package/build/assets/highlighted-source-view-C7pAXrT0.js +1 -0
- package/build/assets/home-BM5_Wz_R.js +1 -0
- package/build/assets/home-Ivfm7KC4.js +1 -0
- package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +1 -0
- package/build/assets/home-store-DCbei3DX.js +1 -0
- package/build/assets/hooks-service-Dnmhqc0Z.js +1 -0
- package/build/assets/index-home-td9BN2T3.js +1 -0
- package/build/assets/info-BcajzHn1.js +1 -0
- package/build/assets/install-server-modal-B81I-5OE.js +1 -0
- package/build/assets/kebab-menu-item-content-SCJBwZnp.js +1 -0
- package/build/assets/{key-BmVyxs-2.js → key-O84CMFHb.js} +1 -1
- package/build/assets/launch-ZLxI4opd.js +1 -0
- package/build/assets/list-filter-B8PQk3RA.js +1 -0
- package/build/assets/{list-todo-apgLVjMw.js → list-todo-Caa8E1X_.js} +1 -1
- package/build/assets/llm-not-configured-banner-Dh_ajcM8.js +27 -0
- package/build/assets/llm-settings-CODhjQzy.js +1 -0
- package/build/assets/llm-settings-CZaXYgtw.js +1 -0
- package/build/assets/llm-subscription-service-CgIDc38n.js +1 -0
- package/build/assets/loader-circle-BxJgk73D.js +1 -0
- package/build/assets/{loading-spinner-BY9N3pOe.js → loading-spinner-BeLV0IXf.js} +1 -1
- package/build/assets/manage-backends-modal-cMXqCb-B.js +1 -0
- package/build/assets/manifest-bfeccb98.js +1 -0
- package/build/assets/manifest-subpage-layout-CVZgVKoY.js +1 -0
- package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-iRs80q_6.js} +1 -1
- package/build/assets/markdown-renderer-DyFl9-mL.js +8 -0
- package/build/assets/mcp-CraxoXQv.js +1 -0
- package/build/assets/{mcp-marketplace-utils-AIBzzHTO.js → mcp-marketplace-utils-C7PYr293.js} +1 -1
- package/build/assets/mcp-page-CteH_K0N.js +9 -0
- package/build/assets/messages-Bk1xhbU2.js +41 -0
- package/build/assets/{modal-body-BxZjsju9.js → modal-body-C24WsdFb.js} +1 -1
- package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-B0b9eiL8.js} +1 -1
- package/build/assets/modal-close-button-DfqfB2Nj.js +1 -0
- package/build/assets/{mouse-pointer-click-Co2uyaPA.js → mouse-pointer-click-BXlRN92t.js} +1 -1
- package/build/assets/onboarding-DXFBRqEy.js +1 -0
- package/build/assets/onboarding-modal-BT3Gx_sZ.js +1 -0
- package/build/assets/organization-service.api-B5CvmnYQ.js +1 -0
- package/build/assets/pencil-q-ihqDYv.js +1 -0
- package/build/assets/pin-BdroVQdN.js +1 -0
- package/build/assets/planner-tab-CstoOlAB.js +1 -0
- package/build/assets/plug-7ACOEbMs.js +1 -0
- package/build/assets/plugins-management-service-5rqVPEGN.js +1 -0
- package/build/assets/plus-C2e21TFC.js +1 -0
- package/build/assets/profiles-service.api-D1XKMgr0.js +1 -0
- package/build/assets/providers-XmZ9HM4Q.js +1 -0
- package/build/assets/proxy-XP6U1Dhv.js +1 -0
- package/build/assets/{puzzle-JM_QaRm0.js → puzzle-LJYnuxKe.js} +1 -1
- package/build/assets/react-BX7IV650.js +1 -0
- package/build/assets/recommended-automations-launcher-DEHRKIAg.js +1 -0
- package/build/assets/refresh-cw-BtdC3T8P.js +1 -0
- package/build/assets/root-CM6IZHlg.css +1 -0
- package/build/assets/root-DdFkodKW.js +2 -0
- package/build/assets/root-layout-DUquNZTU.js +2 -0
- package/build/assets/schema-field-Y3F8JvXd.js +1 -0
- package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
- package/build/assets/sdk-section-page-CNZTLwH9.js +1 -0
- package/build/assets/secret-form-9-BoGA40.js +1 -0
- package/build/assets/secrets-service-BOIsfD9j.js +1 -0
- package/build/assets/secrets-settings-CBJgFr42.js +1 -0
- package/build/assets/settings-D4hdToD4.js +1 -0
- package/build/assets/settings-dropdown-input-DBvsZ7-Q.js +1 -0
- package/build/assets/settings-index-DeQphyBK.js +1 -0
- package/build/assets/settings-input-dVuzapBA.js +1 -0
- package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-DhAPuXm6.js} +1 -1
- package/build/assets/settings-modal-tHiJ8iYV.js +1 -0
- package/build/assets/settings-nav-GAQjW1a-.js +16 -0
- package/build/assets/settings-service.api-C1vZH9Vh.js +1 -0
- package/build/assets/settings-switch-DDd1cQ8t.js +1 -0
- package/build/assets/{settings-utils-UYpEdPuD.js → settings-utils-BTaaRhLZ.js} +1 -1
- package/build/assets/shared-conversation-Cyg7m7ns.js +1 -0
- package/build/assets/shield-check-C3Rl0NF8.js +1 -0
- package/build/assets/{sidebar-layout-D6fS8-Gl.js → sidebar-layout-DH0E-5KW.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-CQ4iky__.js +1 -0
- package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-oLQiKUBu.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-TfvNNnnr.js} +1 -1
- package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
- package/build/assets/skill-card-pill-row-DfjIfj0K.js +1 -0
- package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-DsNLmn76.js} +2 -2
- package/build/assets/{skill-icon-badge-RQkq8wvl.js → skill-icon-badge-0MK_68Nc.js} +1 -1
- package/build/assets/skill-scope-BE-H9TSZ.js +1 -0
- package/build/assets/skills-plugins-vzSdxSk_.js +1 -0
- package/build/assets/skills-settings-BiPOH9H9.js +1 -0
- package/build/assets/styled-tooltip-CejG0rqv.js +1 -0
- package/build/assets/task-list-tab-OkZSqnTp.js +1 -0
- package/build/assets/{terminal-CNElN42a.js → terminal-Dph60VFZ.js} +2 -2
- package/build/assets/toggle-switch-B2uXaAUS.js +1 -0
- package/build/assets/trash-2-Bb40zQzs.js +1 -0
- package/build/assets/trash-Ckh7yCaB.js +1 -0
- package/build/assets/triangle-alert-DEdu-b_L.js +1 -0
- package/build/assets/{typography-v1KN0tzi.js → typography-DgcLGdHk.js} +1 -1
- package/build/assets/usage-tab-MCmNRAnR.js +1 -0
- package/build/assets/use-acp-credential-form-ychoGqjC.js +1 -0
- package/build/assets/use-activate-agent-profile-8L8Xdghy.js +1 -0
- package/build/assets/use-agent-profiles-Bi8hSkze.js +1 -0
- package/build/assets/{use-automation-health-E6NZi9rb.js → use-automation-health-U99vvHxx.js} +1 -1
- package/build/assets/use-automation-permissions-Buus0R6h.js +1 -0
- package/build/assets/{use-automations-xijQKIl9.js → use-automations-Bq5hVuv0.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-CrJP5262.js → use-can-manage-org-profiles-MzIeEV8F.js} +1 -1
- package/build/assets/use-canvas-extensions-Ca9KoVEm.js +1 -0
- package/build/assets/{use-cloud-current-user-id-CDfAHpPX.js → use-cloud-current-user-id-B4ZLUZSa.js} +1 -1
- package/build/assets/use-config-l5tkDHyD.js +1 -0
- package/build/assets/use-create-conversation-i_PdFdIs.js +1 -0
- package/build/assets/use-create-secret-CjWq0J4O.js +1 -0
- package/build/assets/use-free-models-gCsJ5BV0.js +1 -0
- package/build/assets/{use-get-secrets-K3jmk-LH.js → use-get-secrets-CMTuWEp_.js} +1 -1
- package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
- package/build/assets/use-llm-configured-Dl4zg8ht.js +1 -0
- package/build/assets/use-llm-profiles-SWsuFmFu.js +1 -0
- package/build/assets/use-manifest-capabilities-CdqYfUAC.js +1 -0
- package/build/assets/use-onboarding-completion-Xl63ZvzQ.js +1 -0
- package/build/assets/use-pinned-home-route-BXDIUaxQ.js +1 -0
- package/build/assets/use-plugins-marketplace-BIIaPiaB.js +1 -0
- package/build/assets/use-save-agent-profile-D-ZHHE94.js +1 -0
- package/build/assets/{use-save-settings-DYqkKv7T.js → use-save-settings-Dapkf4cC.js} +1 -1
- package/build/assets/use-settings-C2KKQKVC.js +1 -0
- package/build/assets/use-settings-nav-items-TOc0Rsfd.js +1 -0
- package/build/assets/use-tracking-j4uo9VEW.js +3 -0
- package/build/assets/{use-user-conversation-B9Gebw_g.js → use-user-conversation-5UFqMoO4.js} +1 -1
- package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
- package/build/assets/{useMutation-B-qc391N.js → useMutation-Cszf8mKy.js} +1 -1
- package/build/assets/useQueries-pUohFMSP.js +1 -0
- package/build/assets/useQuery-DAAacS7O.js +1 -0
- package/build/assets/useTranslation-CCgUjPJF.js +1 -0
- package/build/assets/utils-BgLSZdyy.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
- package/build/assets/vendor~root-layout-CcdIqs-C.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +12 -6
- package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-DdBpaVPz.js} +1 -1
- package/build/assets/{wrench-CUEI1krB.js → wrench-B8Wg_nbp.js} +1 -1
- package/build/assets/x-CX8lVGwm.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +79 -22
- package/build/locales/ca/openhands.json +79 -22
- package/build/locales/de/openhands.json +79 -22
- package/build/locales/en/openhands.json +79 -22
- package/build/locales/es/openhands.json +79 -22
- package/build/locales/fr/openhands.json +79 -22
- package/build/locales/it/openhands.json +79 -22
- package/build/locales/ja/openhands.json +79 -22
- package/build/locales/ko-KR/openhands.json +79 -22
- package/build/locales/no/openhands.json +79 -22
- package/build/locales/pt/openhands.json +79 -22
- package/build/locales/tr/openhands.json +79 -22
- package/build/locales/uk/openhands.json +79 -22
- package/build/locales/zh-CN/openhands.json +79 -22
- package/build/locales/zh-TW/openhands.json +79 -22
- 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 +72 -12
- package/dist/api/agent-server-adapter.js +234 -132
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +6 -0
- package/dist/api/agent-server-config.js +6 -3
- package/dist/api/agent-server-config.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 +2 -2
- package/dist/api/automation-service/automation-service.api.js +7 -7
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +9 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
- package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
- package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
- package/dist/api/cloud/provider-connections-service.api.js +50 -0
- package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
- package/dist/api/cloud/skills-service.api.cjs +1 -1
- package/dist/api/cloud/skills-service.api.cjs.map +1 -1
- package/dist/api/cloud/skills-service.api.d.ts +10 -0
- package/dist/api/cloud/skills-service.api.js +11 -1
- package/dist/api/cloud/skills-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +6 -2
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.types.d.ts +13 -0
- package/dist/api/conversation-metadata-store.cjs +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +24 -0
- package/dist/api/conversation-metadata-store.js +10 -2
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/hooks-service.cjs +2 -0
- package/dist/api/hooks-service.cjs.map +1 -0
- package/dist/api/hooks-service.d.ts +13 -0
- package/dist/api/hooks-service.js +20 -0
- package/dist/api/hooks-service.js.map +1 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
- package/dist/api/provider-connections-service/provider-connections-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 +2 -0
- package/dist/api/settings-service/settings-service.api.js +18 -10
- 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.d.ts +7 -0
- package/dist/api/skills-service.js +11 -8
- package/dist/api/skills-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +2 -2
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +79 -70
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/messages.cjs +1 -1
- package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
- package/dist/components/conversation-events/chat/messages.js +28 -27
- package/dist/components/conversation-events/chat/messages.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +104 -97
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +89 -77
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
- package/dist/components/features/automations/build-automation-menu-items.js +12 -11
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +10 -5
- package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
- package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
- package/dist/components/features/automations/detail/run-status-badge.js +82 -53
- package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
- package/dist/components/features/automations/kebab-menu.cjs +1 -1
- package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
- package/dist/components/features/automations/kebab-menu.js +9 -5
- package/dist/components/features/automations/kebab-menu.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
- package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-section.js +9 -9
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +123 -112
- package/dist/components/features/backends/backend-selector.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.js +29 -29
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/change-agent-button.cjs +1 -1
- package/dist/components/features/chat/change-agent-button.js +4 -4
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +137 -137
- 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 +88 -79
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
- package/dist/components/features/chat/components/context-window-meter.js +4 -4
- package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
- package/dist/components/features/chat/generic-event-message.cjs +1 -1
- package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
- package/dist/components/features/chat/generic-event-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.js +41 -22
- package/dist/components/features/chat/generic-event-message.js.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.js +20 -19
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- package/dist/components/features/chat/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +27 -26
- package/dist/components/features/chat/model-messages.js.map +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.js +4 -4
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +88 -88
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
- package/dist/components/features/conversation-panel/budget-display.js +12 -19
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
- package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
- package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
- package/dist/components/features/conversation-panel/menu-row.js +27 -16
- package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
- package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
- package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +42 -42
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/images/image-lightbox.cjs +2 -0
- package/dist/components/features/images/image-lightbox.cjs.map +1 -0
- package/dist/components/features/images/image-lightbox.d.ts +11 -0
- package/dist/components/features/images/image-lightbox.js +37 -0
- package/dist/components/features/images/image-lightbox.js.map +1 -0
- package/dist/components/features/images/image-preview.cjs +1 -1
- package/dist/components/features/images/image-preview.cjs.map +1 -1
- package/dist/components/features/images/image-preview.d.ts +2 -1
- package/dist/components/features/images/image-preview.js +33 -13
- package/dist/components/features/images/image-preview.js.map +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
- package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
- package/dist/components/features/settings/cloud-settings-link.js +22 -19
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
- package/dist/components/features/settings/integrations-settings-link.js +20 -17
- package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +3 -2
- package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
- package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
- package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
- package/dist/components/features/settings/settings-dropdown-input.js +6 -6
- 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 +4 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +157 -139
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +28 -26
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +3 -3
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.js +33 -29
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/shared/buttons/remove-button.cjs +1 -1
- package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +2 -1
- package/dist/components/shared/buttons/remove-button.js +2 -1
- package/dist/components/shared/buttons/remove-button.js.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js.map +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 +5 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/free-models-note.cjs +2 -0
- package/dist/components/shared/free-models-note.cjs.map +1 -0
- package/dist/components/shared/free-models-note.d.ts +3 -0
- package/dist/components/shared/free-models-note.js +20 -0
- package/dist/components/shared/free-models-note.js.map +1 -0
- package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
- package/dist/components/shared/modals/confirmation-modal.js +8 -8
- package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +102 -112
- package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +12 -0
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/settings-nav.d.ts +8 -0
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +5 -0
- package/dist/contexts/conversation-websocket-context.js +194 -198
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.js +31 -15
- package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
- package/dist/hooks/chat/record-model-switch-message.js +25 -12
- package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +63 -62
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +5 -1
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
- package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.js +3 -3
- package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
- package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
- package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
- package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
- package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +6 -0
- package/dist/hooks/query/query-keys.js +2 -2
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
- package/dist/hooks/query/use-automation-sdk-version.js +30 -55
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
- package/dist/hooks/query/use-conversation-skills.js +20 -4
- package/dist/hooks/query/use-conversation-skills.js.map +1 -1
- package/dist/hooks/query/use-free-models.cjs +2 -0
- package/dist/hooks/query/use-free-models.cjs.map +1 -0
- package/dist/hooks/query/use-free-models.d.ts +23 -0
- package/dist/hooks/query/use-free-models.js +67 -0
- package/dist/hooks/query/use-free-models.js.map +1 -0
- package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
- package/dist/hooks/query/use-local-git-info.js.map +1 -1
- package/dist/hooks/query/use-provider-connections.cjs +1 -1
- package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
- package/dist/hooks/query/use-provider-connections.d.ts +6 -3
- package/dist/hooks/query/use-provider-connections.js +7 -3
- package/dist/hooks/query/use-provider-connections.js.map +1 -1
- package/dist/hooks/query/use-provider-models.cjs +1 -1
- package/dist/hooks/query/use-provider-models.cjs.map +1 -1
- package/dist/hooks/query/use-provider-models.js +34 -25
- package/dist/hooks/query/use-provider-models.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +31 -19
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-sub-conversations.js +16 -16
- package/dist/hooks/query/use-sub-conversations.js.map +1 -1
- package/dist/hooks/use-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.js +3 -3
- package/dist/hooks/use-agent-state.cjs +1 -1
- package/dist/hooks/use-agent-state.cjs.map +1 -1
- package/dist/hooks/use-agent-state.d.ts +17 -1
- package/dist/hooks/use-agent-state.js +19 -9
- package/dist/hooks/use-agent-state.js.map +1 -1
- package/dist/hooks/use-automation-permissions.cjs +2 -0
- package/dist/hooks/use-automation-permissions.cjs.map +1 -0
- package/dist/hooks/use-automation-permissions.d.ts +43 -0
- package/dist/hooks/use-automation-permissions.js +52 -0
- package/dist/hooks/use-automation-permissions.js.map +1 -0
- package/dist/hooks/use-chat-input-model-state.cjs +1 -1
- package/dist/hooks/use-chat-input-model-state.js +3 -3
- package/dist/hooks/use-handle-plan-click.cjs +1 -1
- package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
- package/dist/hooks/use-handle-plan-click.d.ts +3 -1
- package/dist/hooks/use-handle-plan-click.js +85 -26
- package/dist/hooks/use-handle-plan-click.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.d.ts +1 -2
- package/dist/hooks/use-home-automation-actions.js +1 -1
- package/dist/hooks/use-home-automation-actions.js.map +1 -1
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.js +3 -3
- package/dist/hooks/use-manifest-preflight.d.ts +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
- package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
- package/dist/hooks/use-unified-websocket-status.js +5 -1
- package/dist/hooks/use-unified-websocket-status.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 +71 -14
- 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 +1281 -312
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +79 -22
- package/dist/locales/ca/openhands.json +79 -22
- package/dist/locales/de/openhands.json +79 -22
- package/dist/locales/en/openhands.json +79 -22
- package/dist/locales/es/openhands.json +79 -22
- package/dist/locales/fr/openhands.json +79 -22
- package/dist/locales/it/openhands.json +79 -22
- package/dist/locales/ja/openhands.json +79 -22
- package/dist/locales/ko-KR/openhands.json +79 -22
- package/dist/locales/no/openhands.json +79 -22
- package/dist/locales/pt/openhands.json +79 -22
- package/dist/locales/tr/openhands.json +79 -22
- package/dist/locales/uk/openhands.json +79 -22
- package/dist/locales/zh-CN/openhands.json +79 -22
- package/dist/locales/zh-TW/openhands.json +79 -22
- package/dist/manifests/automation-insights.cjs.map +1 -1
- package/dist/manifests/automation-insights.d.ts +10 -2
- package/dist/manifests/automation-insights.js.map +1 -1
- package/dist/manifests/automation-setup.cjs +1 -1
- package/dist/manifests/automation-setup.cjs.map +1 -1
- package/dist/manifests/automation-setup.d.ts +9 -16
- package/dist/manifests/automation-setup.js +17 -7
- package/dist/manifests/automation-setup.js.map +1 -1
- package/dist/manifests/manifest-actions.d.ts +1 -1
- package/dist/manifests/manifest-capabilities.d.ts +3 -1
- package/dist/manifests/manifest-local-validation.cjs +2 -0
- package/dist/manifests/manifest-local-validation.cjs.map +1 -0
- package/dist/manifests/manifest-local-validation.d.ts +15 -11
- package/dist/manifests/manifest-local-validation.js +8 -0
- package/dist/manifests/manifest-local-validation.js.map +1 -0
- package/dist/manifests/manifest-template.cjs +2 -0
- package/dist/manifests/manifest-template.cjs.map +1 -0
- package/dist/manifests/manifest-template.d.ts +4 -4
- package/dist/manifests/manifest-template.js +12 -0
- package/dist/manifests/manifest-template.js.map +1 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +106 -28
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +39 -4
- package/dist/manifests/types.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +22 -20
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +4 -4
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +2 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +53 -48
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.d.ts +3 -1
- package/dist/routes/llm-settings.js +120 -127
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/planner-tab.cjs +1 -1
- package/dist/routes/planner-tab.cjs.map +1 -1
- package/dist/routes/planner-tab.js +44 -28
- package/dist/routes/planner-tab.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +5 -0
- package/dist/services/telemetry.js +122 -115
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
- package/dist/stores/conversation-panel-preferences-store.js +29 -12
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-state-store.cjs +1 -1
- package/dist/stores/conversation-state-store.cjs.map +1 -1
- package/dist/stores/conversation-state-store.d.ts +9 -3
- package/dist/stores/conversation-state-store.js +6 -3
- package/dist/stores/conversation-state-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +2 -0
- package/dist/stores/conversation-store.js +3 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/free-models-store.cjs +2 -0
- package/dist/stores/free-models-store.cjs.map +1 -0
- package/dist/stores/free-models-store.d.ts +30 -0
- package/dist/stores/free-models-store.js +22 -0
- package/dist/stores/free-models-store.js.map +1 -0
- package/dist/stores/model-store.cjs +1 -1
- package/dist/stores/model-store.cjs.map +1 -1
- package/dist/stores/model-store.d.ts +7 -0
- package/dist/stores/model-store.js +4 -0
- package/dist/stores/model-store.js.map +1 -1
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +46 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/ui/context-menu.d.ts +1 -1
- package/dist/ui/toggle-switch.cjs +1 -1
- package/dist/ui/toggle-switch.cjs.map +1 -1
- package/dist/ui/toggle-switch.d.ts +4 -1
- package/dist/ui/toggle-switch.js +4 -3
- package/dist/ui/toggle-switch.js.map +1 -1
- package/dist/utils/automation-catalog.cjs +1 -1
- package/dist/utils/automation-catalog.cjs.map +1 -1
- package/dist/utils/automation-catalog.d.ts +12 -1
- package/dist/utils/automation-catalog.js +42 -12
- package/dist/utils/automation-catalog.js.map +1 -1
- package/dist/utils/automation-run-display.cjs +2 -0
- package/dist/utils/automation-run-display.cjs.map +1 -0
- package/dist/utils/automation-run-display.d.ts +20 -0
- package/dist/utils/automation-run-display.js +85 -0
- package/dist/utils/automation-run-display.js.map +1 -0
- package/dist/utils/automation-schedule.cjs +1 -1
- package/dist/utils/automation-schedule.cjs.map +1 -1
- package/dist/utils/automation-schedule.d.ts +16 -0
- package/dist/utils/automation-schedule.js +2 -0
- package/dist/utils/automation-schedule.js.map +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.cjs.map +1 -1
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.js +23 -3
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/format-event-timestamp.cjs +2 -0
- package/dist/utils/format-event-timestamp.cjs.map +1 -0
- package/dist/utils/format-event-timestamp.d.ts +1 -0
- package/dist/utils/format-event-timestamp.js +13 -0
- package/dist/utils/format-event-timestamp.js.map +1 -0
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +27 -6
- package/dist/utils/format-model-name.js +14 -6
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/git-diff-stats.cjs +2 -2
- package/dist/utils/git-diff-stats.cjs.map +1 -1
- package/dist/utils/git-diff-stats.d.ts +4 -0
- package/dist/utils/git-diff-stats.js +12 -2
- package/dist/utils/git-diff-stats.js.map +1 -1
- package/dist/utils/plan-file.cjs +4 -0
- package/dist/utils/plan-file.cjs.map +1 -0
- package/dist/utils/plan-file.d.ts +18 -0
- package/dist/utils/plan-file.js +58 -0
- package/dist/utils/plan-file.js.map +1 -0
- package/dist/utils/recommended-automation-rail.cjs +1 -1
- package/dist/utils/recommended-automation-rail.cjs.map +1 -1
- package/dist/utils/recommended-automation-rail.js +1 -0
- package/dist/utils/recommended-automation-rail.js.map +1 -1
- package/dist/utils/scroll-fade-state.cjs +1 -1
- package/dist/utils/scroll-fade-state.cjs.map +1 -1
- package/dist/utils/scroll-fade-state.d.ts +6 -0
- package/dist/utils/scroll-fade-state.js +8 -1
- package/dist/utils/scroll-fade-state.js.map +1 -1
- package/dist/utils/sdk-settings-schema.cjs +1 -1
- package/dist/utils/sdk-settings-schema.cjs.map +1 -1
- package/dist/utils/sdk-settings-schema.d.ts +1 -0
- package/dist/utils/sdk-settings-schema.js +25 -22
- package/dist/utils/sdk-settings-schema.js.map +1 -1
- package/dist/utils/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.js +11 -11
- package/dist/utils/utils.js.map +1 -1
- package/package.json +4 -4
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/dev-with-automation.mjs +1 -1
- package/scripts/static-server.mjs +33 -1
- package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
- package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
- package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
- package/build/assets/agent-settings-DLtsqaOs.js +0 -2
- package/build/assets/agent-settings-fFvR-XC2.js +0 -1
- package/build/assets/alert-banner-HP6mX-Vr.js +0 -1
- package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
- package/build/assets/app-settings-dbnneVaV.js +0 -1
- package/build/assets/automation-detail-BmwlCUAB.js +0 -3
- package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
- package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
- package/build/assets/automations-list-DuNcRawl.js +0 -1
- package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
- package/build/assets/backend-synced-settings-badge-DPkz30BE.js +0 -1
- package/build/assets/badge-BU3S0VtE.js +0 -1
- package/build/assets/bot-dMYHVfYM.js +0 -1
- package/build/assets/browser-DSAo0tz1.js +0 -46
- package/build/assets/browser-tab-C9vy56R5.js +0 -1
- package/build/assets/canvas-extension-page-dx1gFrfW.js +0 -1
- package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
- package/build/assets/check-CS0vmpQQ.js +0 -1
- package/build/assets/chevron-down-e1QBpjVy.js +0 -1
- package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
- package/build/assets/circle-check-DzWLNsbE.js +0 -1
- package/build/assets/circle-plus-check-toggle-BO_kFZt3.js +0 -1
- package/build/assets/command-menu--UIlGL72.js +0 -1
- package/build/assets/commits-tab-AnZwLvh-.js +0 -1
- package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
- package/build/assets/conversation-BbGrAO4Z.js +0 -93
- package/build/assets/conversation-mYT6NAoj.js +0 -1
- package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
- package/build/assets/conversation-state-store-B0ImPLHO.js +0 -1
- package/build/assets/conversation-store-Ca3ghXap.js +0 -6
- package/build/assets/copy-to-clipboard-button-Ca8iSkkA.js +0 -1
- package/build/assets/device-verify-Bhn2e_Ye.js +0 -1
- package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
- package/build/assets/empty-state-BoGVDecT.js +0 -1
- package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
- package/build/assets/environment-switch-overlay-BmBRT7gv.js +0 -1
- package/build/assets/error-state-Body8Ngd.js +0 -1
- package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
- package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
- package/build/assets/external-link-DKUlnCQV.js +0 -1
- package/build/assets/files-tab-D4o2VyE_.js +0 -1
- package/build/assets/format-model-name-CasAP3nd.js +0 -1
- package/build/assets/get-git-path-ChKDVHZp.js +0 -1
- package/build/assets/git-repo-dropdown-4ROKl2cB.js +0 -1
- package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
- package/build/assets/highlighted-source-view-BFRxGT_Q.js +0 -1
- package/build/assets/home-ChpSuepX.js +0 -1
- package/build/assets/home-DIsB440S.js +0 -1
- package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
- package/build/assets/home-store-CY9Ej0ux.js +0 -1
- package/build/assets/index-home-BdlrFIif.js +0 -1
- package/build/assets/info-B6RQawoW.js +0 -1
- package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
- package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
- package/build/assets/launch-IrTDEFCs.js +0 -1
- package/build/assets/list-filter-DsEK7NFC.js +0 -1
- package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
- package/build/assets/llm-settings-B9juXhIa.js +0 -1
- package/build/assets/llm-settings-De1d5dfr.js +0 -1
- package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
- package/build/assets/loader-circle-CC1au6hc.js +0 -1
- package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
- package/build/assets/manifest-80fb1c29.js +0 -1
- package/build/assets/manifest-subpage-layout-CAOYzrYp.js +0 -1
- package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
- package/build/assets/mcp-BTs_SXfZ.js +0 -1
- package/build/assets/mcp-page-BEBYqH_K.js +0 -9
- package/build/assets/messages-DKV9cRc2.js +0 -41
- package/build/assets/modal-close-button-DDzdRvCs.js +0 -1
- package/build/assets/onboarding-DV_OXoeP.js +0 -1
- package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
- package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
- package/build/assets/pencil-47jAZH_V.js +0 -1
- package/build/assets/pin-By41Vl5J.js +0 -1
- package/build/assets/planner-tab-C9uZmhme.js +0 -1
- package/build/assets/plug-CG5HFcNG.js +0 -1
- package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
- package/build/assets/plus-C7Slq-0I.js +0 -1
- package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
- package/build/assets/providers-BhMcY5nv.js +0 -1
- package/build/assets/proxy-9Fe1v5na.js +0 -1
- package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
- package/build/assets/refresh-cw-3q3Frrii.js +0 -1
- package/build/assets/root-Dc8YmC9F.js +0 -2
- package/build/assets/root-VDaypvK4.css +0 -1
- package/build/assets/root-layout-CXkhSPYh.js +0 -2
- package/build/assets/schema-field-D-y9-LDb.js +0 -1
- package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
- package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
- package/build/assets/secret-form-BB7the8W.js +0 -1
- package/build/assets/secrets-service-ByZVENbp.js +0 -1
- package/build/assets/secrets-settings-B_GpxKW2.js +0 -1
- package/build/assets/settings-C0EWuBtA.js +0 -1
- package/build/assets/settings-dropdown-input-BcwylHs2.js +0 -1
- package/build/assets/settings-index-5w5UW2K3.js +0 -1
- package/build/assets/settings-input-Db-1g8Ql.js +0 -1
- package/build/assets/settings-modal-DfJ3tcJQ.js +0 -1
- package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
- package/build/assets/settings-switch-CS-dJDmA.js +0 -1
- package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
- package/build/assets/shield-check-D2aCRd16.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
- package/build/assets/sidebar-store-DGqHkVLw.js +0 -1
- package/build/assets/skill-card-pill-row-B27-xyig.js +0 -1
- package/build/assets/skill-scope-B42H-XOc.js +0 -1
- package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
- package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
- package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
- package/build/assets/task-list-tab-C5zcaktH.js +0 -1
- package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
- package/build/assets/trash-2-D7K26eDO.js +0 -1
- package/build/assets/trash-D-HYiVYM.js +0 -1
- package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
- package/build/assets/usage-tab-CVDffLPt.js +0 -1
- package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
- package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
- package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
- package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
- package/build/assets/use-config-A9QovgXO.js +0 -1
- package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
- package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
- package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
- package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
- package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
- package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
- package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
- package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
- package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
- package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
- package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
- package/build/assets/use-settings-DSXLbvBl.js +0 -1
- package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
- package/build/assets/use-tracking-D53y3TH9.js +0 -3
- package/build/assets/useQueries-DlbhlH9I.js +0 -1
- package/build/assets/useQuery-BSTgq1rl.js +0 -1
- package/build/assets/utils-CN5ZfZy1.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js +0 -1
- package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
- package/build/assets/x-DJdhbdmt.js +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
- package/dist/hooks/query/use-skills.cjs +0 -2
- package/dist/hooks/query/use-skills.cjs.map +0 -1
- package/dist/hooks/query/use-skills.d.ts +0 -7
- package/dist/hooks/query/use-skills.js +0 -13
- package/dist/hooks/query/use-skills.js.map +0 -1
- package/dist/hooks/use-has-permission.cjs +0 -2
- package/dist/hooks/use-has-permission.cjs.map +0 -1
- package/dist/hooks/use-has-permission.d.ts +0 -1
- package/dist/hooks/use-has-permission.js +0 -8
- package/dist/hooks/use-has-permission.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
|
@@ -2,24 +2,24 @@ import { useTranslation as e } from "../../../../node_modules/react-i18next/dist
|
|
|
2
2
|
import { I18nKey as t } from "../../../../i18n/declaration.js";
|
|
3
3
|
import { AxiosError as n } from "../../../../node_modules/axios/index.js";
|
|
4
4
|
import { retrieveAxiosErrorMessage as r } from "../../../../utils/retrieve-axios-error-message.js";
|
|
5
|
-
import { displayErrorToast as i, displaySuccessToast as
|
|
6
|
-
import { useSettings as
|
|
7
|
-
import { useSaveSettings as
|
|
8
|
-
import { BrandButton as
|
|
9
|
-
import { extensionModuleEmptyStateClassName as
|
|
10
|
-
import { useAgentSettingsSchema as
|
|
11
|
-
import { LlmSettingsInputsSkeleton as
|
|
12
|
-
import { buildInitialSettingsFormValues as
|
|
13
|
-
import { FIELD_FULL_WIDTH_KEYS as
|
|
14
|
-
import { ViewToggle as
|
|
15
|
-
import
|
|
16
|
-
import { jsx as
|
|
5
|
+
import { displayErrorToast as i, displaySuccessToast as a } from "../../../../utils/custom-toast-handlers.js";
|
|
6
|
+
import { useSettings as o } from "../../../../hooks/query/use-settings.js";
|
|
7
|
+
import { useSaveSettings as ee } from "../../../../hooks/mutation/use-save-settings.js";
|
|
8
|
+
import { BrandButton as te } from "../brand-button.js";
|
|
9
|
+
import { extensionModuleEmptyStateClassName as ne } from "../../../../utils/extension-module-card-classes.js";
|
|
10
|
+
import { useAgentSettingsSchema as re, useConversationSettingsSchema as ie } from "../../../../hooks/query/use-agent-settings-schema.js";
|
|
11
|
+
import { LlmSettingsInputsSkeleton as s } from "../llm-settings/llm-settings-inputs-skeleton.js";
|
|
12
|
+
import { buildInitialSettingsFormValues as ae, buildSdkSettingsPayload as oe, buildSdkSettingsPayloadForView as se, getVisibleSettingsSections as ce, hasAdvancedSettings as le, hasCriticalSettings as ue, hasMinorSettings as de, inferInitialView as fe, isValidSettingsSchema as pe, normalizeComparableValue as me } from "../../../../utils/sdk-settings-schema.js";
|
|
13
|
+
import { FIELD_FULL_WIDTH_KEYS as he, SchemaField as ge } from "./schema-field.js";
|
|
14
|
+
import { ViewToggle as _e } from "./view-toggle.js";
|
|
15
|
+
import c from "react";
|
|
16
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/features/settings/sdk-settings/sdk-section-page.tsx
|
|
18
|
-
var
|
|
18
|
+
var ve = /* @__PURE__ */ new Set(), d = {
|
|
19
19
|
basic: 0,
|
|
20
20
|
advanced: 1,
|
|
21
21
|
all: 2
|
|
22
|
-
},
|
|
22
|
+
}, ye = (e, t) => d[t] < d[e] ? t : e, be = (e, t) => d[t] > d[e] ? t : e, xe = (e, { showBasic: t, showAdvanced: n, showAll: r }) => {
|
|
23
23
|
if (e === "all") return r ? "all" : n ? "advanced" : "basic";
|
|
24
24
|
if (e === "advanced") return n ? "advanced" : r ? "all" : "basic";
|
|
25
25
|
if (!t) {
|
|
@@ -27,22 +27,22 @@ var ge = /* @__PURE__ */ new Set(), f = {
|
|
|
27
27
|
if (r) return "all";
|
|
28
28
|
}
|
|
29
29
|
return "basic";
|
|
30
|
-
},
|
|
30
|
+
}, Se = {
|
|
31
31
|
agent_settings: "agent_settings_diff",
|
|
32
32
|
conversation_settings: "conversation_settings_diff"
|
|
33
|
-
},
|
|
34
|
-
function
|
|
35
|
-
let { t: b } = e("openhands"), { mutate:
|
|
33
|
+
}, Ce = (e, t) => e instanceof n ? e.response?.status === 401 ? `${t} This agent server requires X-Session-API-Key. Set VITE_SESSION_API_KEY in the frontend to the same value used by the backend SESSION_API_KEY or OH_SESSION_API_KEYS_0.` : e.response?.status === 404 ? `${t} This backend does not expose /api/settings/* schema endpoints. Upgrade to a recent openhands-agent-server release.` : t : t;
|
|
34
|
+
function f({ settingsSources: n, scope: d = "personal", header: f, extraDirty: p = !1, buildPayload: m, onSaveSuccess: we, getInitialView: h, forceShowAdvancedView: Te = !1, allowAllView: Ee = !0, initialValueOverrides: g, markInitialOverridesDirty: _ = !0, embedded: De = !1, hideSaveButton: v = !1, suppressSuccessToast: Oe = !1, onSaveControlChange: y, testId: ke = "sdk-section-settings-screen" }) {
|
|
35
|
+
let { t: b } = e("openhands"), { mutate: Ae, isPending: x } = ee(d), { data: S, isLoading: je, isFetching: Me } = o(d), C = re(S?.agent_settings_schema), w = ie(S?.conversation_settings_schema), T = c.useMemo(() => JSON.stringify(n.map((e) => ({
|
|
36
36
|
source: e.settingsSource,
|
|
37
37
|
sectionKeys: e.sectionKeys,
|
|
38
38
|
excludeKeys: e.excludeKeys ? Array.from(e.excludeKeys).sort() : null
|
|
39
|
-
}))), [n]),
|
|
39
|
+
}))), [n]), E = c.useMemo(() => JSON.parse(T).map((e) => ({
|
|
40
40
|
settingsSource: e.source,
|
|
41
41
|
sectionKeys: e.sectionKeys,
|
|
42
42
|
excludeKeys: e.excludeKeys ? new Set(e.excludeKeys) : void 0
|
|
43
|
-
})), [
|
|
44
|
-
let t =
|
|
45
|
-
if (!
|
|
43
|
+
})), [T]), D = c.useCallback((e) => e === "conversation_settings" ? w.data : C.data, [C.data, w.data]), Ne = E.some((e) => e.settingsSource === "conversation_settings" ? w.isLoading : C.isLoading), O = c.useMemo(() => E.map((e) => {
|
|
44
|
+
let t = D(e.settingsSource);
|
|
45
|
+
if (!pe(t)) return {
|
|
46
46
|
...e,
|
|
47
47
|
filteredSchema: null
|
|
48
48
|
};
|
|
@@ -54,218 +54,248 @@ function m({ settingsSources: n, scope: f = "personal", header: m, extraDirty: h
|
|
|
54
54
|
...e,
|
|
55
55
|
filteredSchema: i
|
|
56
56
|
};
|
|
57
|
-
}), [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
}), [E, D]), k = O.some((e) => ue(e.filteredSchema)), A = Te || O.some((e) => le(e.filteredSchema)), j = Ee && O.some((e) => de(e.filteredSchema)), Pe = c.useMemo(() => Ce(E.reduce((e, t) => e ?? (t.settingsSource === "conversation_settings" ? w.error : C.error), null), b(t.SETTINGS$SDK_SCHEMA_UNAVAILABLE)), [
|
|
58
|
+
E,
|
|
59
|
+
C.error,
|
|
60
|
+
w.error,
|
|
61
61
|
b
|
|
62
|
-
]),
|
|
63
|
-
if (!
|
|
62
|
+
]), M = c.useMemo(() => g ? JSON.stringify(g) : "", [g]), N = O[0]?.settingsSource, [P, F] = c.useState("basic"), [I, L] = c.useState({}), [R, z] = c.useState({}), B = c.useRef(!1), V = c.useMemo(() => {
|
|
63
|
+
if (!S) return null;
|
|
64
64
|
let e = {};
|
|
65
|
-
for (let t of
|
|
65
|
+
for (let t of O) {
|
|
66
66
|
if (!t.filteredSchema) return null;
|
|
67
67
|
e[t.settingsSource] = {
|
|
68
68
|
...e[t.settingsSource] ?? {},
|
|
69
|
-
...
|
|
69
|
+
...ae(S, t.filteredSchema, t.settingsSource)
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
let t =
|
|
72
|
+
if (g) {
|
|
73
|
+
let t = O[0]?.settingsSource;
|
|
74
74
|
t && e[t] && (e[t] = {
|
|
75
75
|
...e[t],
|
|
76
|
-
...
|
|
76
|
+
...g
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
return e;
|
|
80
80
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]),
|
|
85
|
-
if (!
|
|
81
|
+
S,
|
|
82
|
+
O,
|
|
83
|
+
M
|
|
84
|
+
]), H = c.useMemo(() => {
|
|
85
|
+
if (!S) return null;
|
|
86
86
|
let e = null;
|
|
87
|
-
for (let t of
|
|
87
|
+
for (let t of O) {
|
|
88
88
|
if (!t.filteredSchema) return null;
|
|
89
|
-
let n =
|
|
90
|
-
e = e ?
|
|
89
|
+
let n = h ? h(S, t.filteredSchema) : fe(S, t.filteredSchema, t.settingsSource);
|
|
90
|
+
e = e ? be(e, n) : n;
|
|
91
91
|
}
|
|
92
|
-
return e ?
|
|
93
|
-
showBasic:
|
|
94
|
-
showAdvanced:
|
|
95
|
-
showAll:
|
|
92
|
+
return e ? xe(e, {
|
|
93
|
+
showBasic: k,
|
|
94
|
+
showAdvanced: A,
|
|
95
|
+
showAll: j
|
|
96
96
|
}) : null;
|
|
97
97
|
}, [
|
|
98
|
-
|
|
98
|
+
S,
|
|
99
|
+
O,
|
|
100
|
+
h,
|
|
101
|
+
k,
|
|
102
|
+
A,
|
|
103
|
+
j
|
|
104
|
+
]);
|
|
105
|
+
c.useEffect(() => {
|
|
106
|
+
B.current = !1, F("basic"), L({}), z({});
|
|
107
|
+
}, [d, T]), c.useEffect(() => {
|
|
108
|
+
if (!(!V || !H) && !(v && B.current)) {
|
|
109
|
+
if (L(V), g && _) {
|
|
110
|
+
let e = N;
|
|
111
|
+
if (e) {
|
|
112
|
+
let t = Object.fromEntries(Object.keys(g).map((e) => [e, !0]));
|
|
113
|
+
z({ [e]: t });
|
|
114
|
+
} else z({});
|
|
115
|
+
} else z({});
|
|
116
|
+
B.current ? F((e) => ye(e, H)) : (B.current = !0, F(H));
|
|
117
|
+
}
|
|
118
|
+
}, [
|
|
119
|
+
V,
|
|
120
|
+
H,
|
|
99
121
|
M,
|
|
100
122
|
_,
|
|
101
123
|
N,
|
|
102
|
-
|
|
103
|
-
F
|
|
124
|
+
v
|
|
104
125
|
]);
|
|
105
|
-
|
|
106
|
-
H.current = !1, L("basic"), z({}), V({});
|
|
107
|
-
}, [f, O]), l.useEffect(() => {
|
|
108
|
-
if (!(!U || !W)) {
|
|
109
|
-
if (z(U), v) {
|
|
110
|
-
let e = M[0]?.settingsSource;
|
|
111
|
-
if (e) {
|
|
112
|
-
let t = Object.fromEntries(Object.keys(v).map((e) => [e, !0]));
|
|
113
|
-
V({ [e]: t });
|
|
114
|
-
} else V({});
|
|
115
|
-
} else V({});
|
|
116
|
-
H.current ? L((e) => _e(e, W)) : (H.current = !0, L(W));
|
|
117
|
-
}
|
|
118
|
-
}, [U, W]);
|
|
119
|
-
let G = l.useMemo(() => {
|
|
126
|
+
let U = c.useMemo(() => {
|
|
120
127
|
let e = /* @__PURE__ */ new Map();
|
|
121
|
-
for (let t of
|
|
128
|
+
for (let t of O) if (t.filteredSchema) for (let n of t.filteredSchema.sections) for (let r of n.fields) e.has(r.key) || e.set(r.key, t.settingsSource);
|
|
122
129
|
return e;
|
|
123
|
-
}, [
|
|
130
|
+
}, [O]), W = c.useMemo(() => {
|
|
124
131
|
let e = {};
|
|
125
|
-
for (let t of
|
|
132
|
+
for (let t of O) Object.assign(e, I[t.settingsSource] ?? {});
|
|
126
133
|
return e;
|
|
127
|
-
}, [
|
|
134
|
+
}, [O, I]), G = c.useMemo(() => {
|
|
128
135
|
let e = {};
|
|
129
|
-
for (let t of
|
|
136
|
+
for (let t of O) Object.assign(e, R[t.settingsSource] ?? {});
|
|
130
137
|
return e;
|
|
131
|
-
}, [
|
|
132
|
-
let
|
|
133
|
-
|
|
138
|
+
}, [O, R]), K = c.useMemo(() => {
|
|
139
|
+
let e = /* @__PURE__ */ new Map();
|
|
140
|
+
for (let t of O) if (t.filteredSchema) for (let n of t.filteredSchema.sections) for (let t of n.fields) e.has(t.key) || e.set(t.key, t);
|
|
141
|
+
return e;
|
|
142
|
+
}, [O]), q = c.useRef(V);
|
|
143
|
+
q.current = V;
|
|
144
|
+
let J = c.useRef(g);
|
|
145
|
+
J.current = g;
|
|
146
|
+
let Y = c.useRef(_);
|
|
147
|
+
Y.current = _;
|
|
148
|
+
let X = c.useRef(K);
|
|
149
|
+
X.current = K;
|
|
150
|
+
let Z = c.useCallback((e, t) => {
|
|
151
|
+
let n = U.get(e) ?? O[0]?.settingsSource;
|
|
152
|
+
n && (L((r) => ({
|
|
134
153
|
...r,
|
|
135
154
|
[n]: {
|
|
136
155
|
...r[n] ?? {},
|
|
137
156
|
[e]: t
|
|
138
157
|
}
|
|
139
|
-
})),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
[
|
|
158
|
+
})), z((r) => {
|
|
159
|
+
let i = q.current?.[n]?.[e], a = Y.current && !!J.current && e in J.current, o = X.current.get(e);
|
|
160
|
+
if ((o ? me(o, t) === me(o, i) : t === i) && !a) {
|
|
161
|
+
if (!r[n]?.[e]) return r;
|
|
162
|
+
let t = { ...r[n] ?? {} };
|
|
163
|
+
return delete t[e], {
|
|
164
|
+
...r,
|
|
165
|
+
[n]: t
|
|
166
|
+
};
|
|
144
167
|
}
|
|
145
|
-
|
|
146
|
-
|
|
168
|
+
return r[n]?.[e] ? r : {
|
|
169
|
+
...r,
|
|
170
|
+
[n]: {
|
|
171
|
+
...r[n] ?? {},
|
|
172
|
+
[e]: !0
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}));
|
|
176
|
+
}, [U, O]), Fe = c.useCallback((e) => {
|
|
147
177
|
i(r(e) || b(t.ERROR$GENERIC));
|
|
148
|
-
}, [b]),
|
|
149
|
-
|
|
150
|
-
}, []),
|
|
151
|
-
if (
|
|
178
|
+
}, [b]), Q = c.useRef(() => {}), Ie = c.useCallback(() => {
|
|
179
|
+
Q.current();
|
|
180
|
+
}, []), $ = c.useRef(() => ({})), Le = c.useCallback(() => $.current(), []), Re = () => {
|
|
181
|
+
if (O.some((e) => !e.filteredSchema)) return;
|
|
152
182
|
let e;
|
|
153
183
|
try {
|
|
154
184
|
let t = {};
|
|
155
|
-
for (let e of
|
|
156
|
-
let n = e.filteredSchema, r =
|
|
185
|
+
for (let e of O) {
|
|
186
|
+
let n = e.filteredSchema, r = se(n, I[e.settingsSource] ?? {}, R[e.settingsSource] ?? {}, P);
|
|
157
187
|
if (Object.keys(r).length > 0) {
|
|
158
|
-
let n =
|
|
188
|
+
let n = Se[e.settingsSource];
|
|
159
189
|
t[n] = {
|
|
160
190
|
...t[n] ?? {},
|
|
161
191
|
...r
|
|
162
192
|
};
|
|
163
193
|
}
|
|
164
194
|
}
|
|
165
|
-
e =
|
|
166
|
-
values:
|
|
167
|
-
dirty:
|
|
168
|
-
view:
|
|
195
|
+
e = m ? m(t, {
|
|
196
|
+
values: W,
|
|
197
|
+
dirty: G,
|
|
198
|
+
view: P
|
|
169
199
|
}) : t;
|
|
170
200
|
} catch (e) {
|
|
171
201
|
i(e instanceof Error ? e.message : b(t.ERROR$GENERIC));
|
|
172
202
|
return;
|
|
173
203
|
}
|
|
174
|
-
Object.keys(e).length !== 0 &&
|
|
175
|
-
onError:
|
|
204
|
+
Object.keys(e).length !== 0 && Ae(e, {
|
|
205
|
+
onError: Fe,
|
|
176
206
|
onSuccess: () => {
|
|
177
|
-
|
|
207
|
+
Oe || a(b(t.SETTINGS$SAVED_WARNING)), z({}), we?.();
|
|
178
208
|
}
|
|
179
209
|
});
|
|
180
210
|
};
|
|
181
|
-
|
|
211
|
+
Q.current = Re, $.current = () => {
|
|
182
212
|
let e = {};
|
|
183
|
-
for (let t of
|
|
213
|
+
for (let t of O) {
|
|
184
214
|
if (!t.filteredSchema) continue;
|
|
185
|
-
let n =
|
|
186
|
-
Object.assign(e,
|
|
215
|
+
let n = I[t.settingsSource] ?? {}, r = R[t.settingsSource] ?? {};
|
|
216
|
+
Object.assign(e, oe(t.filteredSchema, n, r));
|
|
187
217
|
}
|
|
188
218
|
return e;
|
|
189
219
|
};
|
|
190
|
-
let
|
|
191
|
-
return
|
|
220
|
+
let ze = Object.keys(G).length > 0, Be = ze || p;
|
|
221
|
+
return c.useEffect(() => {
|
|
192
222
|
y && y({
|
|
193
|
-
save:
|
|
194
|
-
isSaving:
|
|
195
|
-
isDirty:
|
|
196
|
-
values:
|
|
197
|
-
view:
|
|
198
|
-
getDirtyPayload:
|
|
223
|
+
save: Ie,
|
|
224
|
+
isSaving: x,
|
|
225
|
+
isDirty: Be,
|
|
226
|
+
values: W,
|
|
227
|
+
view: P,
|
|
228
|
+
getDirtyPayload: Le
|
|
199
229
|
});
|
|
200
230
|
}, [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
]), (
|
|
206
|
-
"data-testid":
|
|
207
|
-
className:
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
-
view:
|
|
210
|
-
setView:
|
|
211
|
-
showBasic:
|
|
212
|
-
showAdvanced:
|
|
213
|
-
showAll:
|
|
231
|
+
x,
|
|
232
|
+
Be,
|
|
233
|
+
W,
|
|
234
|
+
P
|
|
235
|
+
]), (je || Me) && !S || Ne ? /* @__PURE__ */ l(s, {}) : O.some((e) => e.filteredSchema && e.filteredSchema.sections.length > 0) ? Object.keys(W).length === 0 ? /* @__PURE__ */ l(s, {}) : /* @__PURE__ */ u("div", {
|
|
236
|
+
"data-testid": ke,
|
|
237
|
+
className: De ? "relative flex min-h-0 w-full flex-1 flex-col" : "relative w-full min-h-0",
|
|
238
|
+
children: [/* @__PURE__ */ l(_e, {
|
|
239
|
+
view: P,
|
|
240
|
+
setView: F,
|
|
241
|
+
showBasic: k,
|
|
242
|
+
showAdvanced: A,
|
|
243
|
+
showAll: j,
|
|
214
244
|
isDisabled: !1
|
|
215
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ u("div", {
|
|
216
246
|
className: "flex flex-col gap-8",
|
|
217
247
|
children: [
|
|
218
|
-
|
|
219
|
-
values:
|
|
248
|
+
f?.({
|
|
249
|
+
values: W,
|
|
220
250
|
isDisabled: !1,
|
|
221
|
-
view:
|
|
222
|
-
onChange:
|
|
251
|
+
view: P,
|
|
252
|
+
onChange: Z
|
|
223
253
|
}),
|
|
224
|
-
|
|
254
|
+
O.map((e) => {
|
|
225
255
|
if (!e.filteredSchema) return null;
|
|
226
|
-
let t =
|
|
227
|
-
return
|
|
228
|
-
...
|
|
256
|
+
let t = I[e.settingsSource] ?? {};
|
|
257
|
+
return ce(e.filteredSchema, {
|
|
258
|
+
...W,
|
|
229
259
|
...t
|
|
230
|
-
},
|
|
260
|
+
}, P, e.excludeKeys ?? ve).map((n) => /* @__PURE__ */ l("section", {
|
|
231
261
|
className: "flex flex-col gap-4",
|
|
232
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ l("div", {
|
|
233
263
|
className: "grid gap-4 xl:grid-cols-2",
|
|
234
|
-
children: n.fields.map((e) => /* @__PURE__ */
|
|
235
|
-
className:
|
|
236
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: n.fields.map((e) => /* @__PURE__ */ l("div", {
|
|
265
|
+
className: he.has(e.key) ? "xl:col-span-2" : void 0,
|
|
266
|
+
children: /* @__PURE__ */ l(ge, {
|
|
237
267
|
field: e,
|
|
238
268
|
value: t[e.key],
|
|
239
269
|
isDisabled: !1,
|
|
240
|
-
onChange: (t) =>
|
|
270
|
+
onChange: (t) => Z(e.key, t)
|
|
241
271
|
})
|
|
242
272
|
}, e.key))
|
|
243
273
|
})
|
|
244
274
|
}, `${e.settingsSource}:${n.key}`));
|
|
245
275
|
}),
|
|
246
|
-
|
|
276
|
+
v ? null : /* @__PURE__ */ l("div", {
|
|
247
277
|
className: "flex justify-start pt-2",
|
|
248
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ l(te, {
|
|
249
279
|
testId: "save-button",
|
|
250
280
|
type: "button",
|
|
251
281
|
variant: "primary",
|
|
252
|
-
isDisabled:
|
|
253
|
-
onClick:
|
|
254
|
-
children: b(
|
|
282
|
+
isDisabled: x || !ze && !p,
|
|
283
|
+
onClick: Re,
|
|
284
|
+
children: b(x ? t.SETTINGS$SAVING : t.SETTINGS$SAVE_CHANGES)
|
|
255
285
|
})
|
|
256
286
|
})
|
|
257
287
|
]
|
|
258
288
|
})]
|
|
259
|
-
}) : /* @__PURE__ */
|
|
289
|
+
}) : /* @__PURE__ */ l("div", {
|
|
260
290
|
"data-testid": "sdk-schema-unavailable",
|
|
261
|
-
className:
|
|
262
|
-
children: /* @__PURE__ */
|
|
291
|
+
className: ne,
|
|
292
|
+
children: /* @__PURE__ */ l("p", {
|
|
263
293
|
className: "text-sm text-[var(--oh-muted)]",
|
|
264
|
-
children:
|
|
294
|
+
children: Pe
|
|
265
295
|
})
|
|
266
296
|
});
|
|
267
297
|
}
|
|
268
298
|
//#endregion
|
|
269
|
-
export {
|
|
299
|
+
export { f as SdkSectionPage };
|
|
270
300
|
|
|
271
301
|
//# sourceMappingURL=sdk-section-page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-section-page.js","names":[],"sources":["../../../../../src/components/features/settings/sdk-settings/sdk-section-page.tsx"],"sourcesContent":["import React from \"react\";\nimport { AxiosError } from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport { BrandButton } from \"#/components/features/settings/brand-button\";\nimport { LlmSettingsInputsSkeleton } from \"#/components/features/settings/llm-settings/llm-settings-inputs-skeleton\";\nimport { useSaveSettings } from \"#/hooks/mutation/use-save-settings\";\nimport {\n useAgentSettingsSchema,\n useConversationSettingsSchema,\n} from \"#/hooks/query/use-agent-settings-schema\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { Settings, SettingsSchema, SettingsScope } from \"#/types/settings\";\nimport { extensionModuleEmptyStateClassName } from \"#/utils/extension-module-card-classes\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport {\n buildInitialSettingsFormValues,\n buildSdkSettingsPayload,\n buildSdkSettingsPayloadForView,\n getVisibleSettingsSections,\n hasAdvancedSettings,\n hasCriticalSettings,\n hasMinorSettings,\n inferInitialView,\n isValidSettingsSchema,\n SettingsDirtyState,\n SettingsFormValues,\n type SettingsValueSource,\n type SettingsView,\n} from \"#/utils/sdk-settings-schema\";\nimport { FIELD_FULL_WIDTH_KEYS, SchemaField } from \"./schema-field\";\nimport { ViewToggle } from \"./view-toggle\";\n\nconst EMPTY_EXCLUDE_KEYS = new Set<string>();\n\nconst VIEW_ORDER: Record<SettingsView, number> = {\n basic: 0,\n advanced: 1,\n all: 2,\n};\n\nconst getLessDetailedView = (\n currentView: SettingsView,\n nextView: SettingsView,\n): SettingsView =>\n VIEW_ORDER[nextView] < VIEW_ORDER[currentView] ? nextView : currentView;\n\nconst getMoreDetailedView = (\n currentView: SettingsView,\n nextView: SettingsView,\n): SettingsView =>\n VIEW_ORDER[nextView] > VIEW_ORDER[currentView] ? nextView : currentView;\n\nconst normalizeView = (\n view: SettingsView,\n {\n showBasic,\n showAdvanced,\n showAll,\n }: {\n showBasic: boolean;\n showAdvanced: boolean;\n showAll: boolean;\n },\n): SettingsView => {\n if (view === \"all\") {\n if (showAll) {\n return \"all\";\n }\n\n return showAdvanced ? \"advanced\" : \"basic\";\n }\n\n if (view === \"advanced\") {\n if (showAdvanced) {\n return \"advanced\";\n }\n\n return showAll ? \"all\" : \"basic\";\n }\n\n // A critical-less page has nothing to render in the basic tier; bump up.\n if (!showBasic) {\n if (showAdvanced) return \"advanced\";\n if (showAll) return \"all\";\n }\n return \"basic\";\n};\n\nconst PAYLOAD_DIFF_KEY: Record<SettingsValueSource, string> = {\n agent_settings: \"agent_settings_diff\",\n conversation_settings: \"conversation_settings_diff\",\n};\n\nconst getSchemaUnavailableMessage = (\n error: unknown,\n fallbackMessage: string,\n): string => {\n if (!(error instanceof AxiosError)) {\n return fallbackMessage;\n }\n\n if (error.response?.status === 401) {\n return `${fallbackMessage} This agent server requires X-Session-API-Key. Set VITE_SESSION_API_KEY in the frontend to the same value used by the backend SESSION_API_KEY or OH_SESSION_API_KEYS_0.`;\n }\n\n if (error.response?.status === 404) {\n return `${fallbackMessage} This backend does not expose /api/settings/* schema endpoints. Upgrade to a recent openhands-agent-server release.`;\n }\n\n return fallbackMessage;\n};\n\nexport interface SettingsSourceConfig {\n /** Which schema/values bucket on `settings` this source pulls from. */\n settingsSource: SettingsValueSource;\n /** Section keys (e.g. [\"llm\"]) within that schema to render. */\n sectionKeys: string[];\n /** Field keys to skip (rendered elsewhere by the caller). */\n excludeKeys?: Set<string>;\n}\n\nexport interface SdkSectionHeaderProps {\n values: SettingsFormValues;\n isDisabled: boolean;\n view: SettingsView;\n onChange: (key: string, value: string | boolean) => void;\n}\n\ninterface ResolvedSource extends SettingsSourceConfig {\n filteredSchema: SettingsSchema | null;\n}\n\n/**\n * Snapshot of the page's save state, surfaced to the parent so it can\n * render its own Save/Next button (e.g. in onboarding) when\n * {@link SdkSectionPage}'s built-in button is hidden via\n * `hideSaveButton`.\n */\nexport interface SdkSectionSaveControl {\n /** Trigger a save of the currently-dirty fields. No-op while `isSaving` or `!isDirty`. */\n save: () => void;\n /** A save mutation is in flight. */\n isSaving: boolean;\n /** At least one field is dirty (or `extraDirty` was passed in). */\n isDirty: boolean;\n /** Current form values (for custom save flows). */\n values: SettingsFormValues;\n /** The active view tier (basic/advanced/all) the form is rendering. */\n view: SettingsView;\n /**\n * Returns the coerced, dirty-only payload as a nested object\n * (e.g. `{ llm: { temperature: 0.7 } }`). Lets a custom save flow persist\n * exactly the fields the user changed, with proper types, without\n * re-implementing schema-driven coercion. Throws if a field fails coercion.\n */\n getDirtyPayload: () => Record<string, unknown>;\n}\n\n/**\n * A generic SDK-schema-driven settings page that renders fields from one or\n * more schema sections.\n *\n * The `settingsSources` array specifies which schema(s)/section(s) the page\n * owns. The page tracks values/dirty state per source, renders sections from\n * each source in order (filtered by the schema's `prominence` field for the\n * selected view), and emits a combined save payload like\n * `{ conversation_settings_diff: {...}, agent_settings_diff: {...} }` ---\n * including only the keys for sources that actually have dirty changes.\n *\n * @param settingsSources one or more schemas to render fields from\n * @param header render prop above the fields (receives unified state)\n * @param buildPayload customize the save payload before submission\n * @param testId data-testid on the page wrapper\n */\nexport function SdkSectionPage({\n settingsSources,\n scope = \"personal\",\n header,\n extraDirty = false,\n buildPayload,\n onSaveSuccess,\n getInitialView,\n forceShowAdvancedView = false,\n allowAllView = true,\n initialValueOverrides,\n embedded = false,\n hideSaveButton = false,\n suppressSuccessToast = false,\n onSaveControlChange,\n testId = \"sdk-section-settings-screen\",\n}: {\n settingsSources: SettingsSourceConfig[];\n scope?: SettingsScope;\n\n header?: (props: SdkSectionHeaderProps) => React.ReactNode;\n extraDirty?: boolean;\n /**\n * Customize the save payload. Receives the wrapped default payload (e.g.\n * `{ agent_settings_diff: { llm: { model: \"gpt-4\" } } }`) plus the unified\n * form context. Return the payload to actually send.\n */\n buildPayload?: (\n defaultPayload: Record<string, unknown>,\n context: {\n values: SettingsFormValues;\n dirty: SettingsDirtyState;\n view: SettingsView;\n },\n ) => Record<string, unknown>;\n onSaveSuccess?: () => void;\n getInitialView?: (\n settings: Settings,\n filteredSchema: SettingsSchema,\n ) => SettingsView;\n forceShowAdvancedView?: boolean;\n allowAllView?: boolean;\n /**\n * Per-field initial value overrides that win over the values\n * derived from `useSettings`. The keys of each override are also\n * marked dirty on hydration so the user can save the form without\n * having to touch the prefilled fields. Useful when the page is\n * embedded in a flow that wants to nudge brand-new users toward a\n * particular default (e.g. onboarding pre-filling OpenHands/Opus).\n */\n initialValueOverrides?: SettingsFormValues;\n embedded?: boolean;\n hideSaveButton?: boolean;\n /** Suppress the default success toast after save completes. */\n suppressSuccessToast?: boolean;\n /**\n * Fires whenever the save state changes (a mutation starts/finishes,\n * dirty status flips). Provides a stable `save()` callback the\n * parent can wire to its own button. Useful when the form is\n * embedded in a custom flow and the built-in Save button is hidden.\n */\n onSaveControlChange?: (control: SdkSectionSaveControl) => void;\n testId?: string;\n}) {\n const { t } = useTranslation(\"openhands\");\n const { mutate: saveSettings, isPending } = useSaveSettings(scope);\n const { data: settings, isLoading, isFetching } = useSettings(scope);\n const agentSchemaQuery = useAgentSettingsSchema(\n settings?.agent_settings_schema,\n );\n const conversationSchemaQuery = useConversationSettingsSchema(\n settings?.conversation_settings_schema,\n );\n const isReadOnly = false;\n\n const sourcesSignature = React.useMemo(\n () =>\n JSON.stringify(\n settingsSources.map((s) => ({\n source: s.settingsSource,\n sectionKeys: s.sectionKeys,\n excludeKeys: s.excludeKeys ? Array.from(s.excludeKeys).sort() : null,\n })),\n ),\n [settingsSources],\n );\n\n const resolvedSourceConfigs = React.useMemo<SettingsSourceConfig[]>(() => {\n const parsed = JSON.parse(sourcesSignature) as Array<{\n source: SettingsValueSource;\n sectionKeys: string[];\n excludeKeys: string[] | null;\n }>;\n return parsed.map((p) => ({\n settingsSource: p.source,\n sectionKeys: p.sectionKeys,\n excludeKeys: p.excludeKeys ? new Set(p.excludeKeys) : undefined,\n }));\n }, [sourcesSignature]);\n\n const getSchemaForSource = React.useCallback(\n (source: SettingsValueSource) =>\n source === \"conversation_settings\"\n ? conversationSchemaQuery.data\n : agentSchemaQuery.data,\n [agentSchemaQuery.data, conversationSchemaQuery.data],\n );\n\n const isSchemaLoading = resolvedSourceConfigs.some((src) =>\n src.settingsSource === \"conversation_settings\"\n ? conversationSchemaQuery.isLoading\n : agentSchemaQuery.isLoading,\n );\n\n const resolvedSources = React.useMemo<ResolvedSource[]>(\n () =>\n resolvedSourceConfigs.map((src) => {\n const schema = getSchemaForSource(src.settingsSource);\n if (!isValidSettingsSchema(schema)) {\n return { ...src, filteredSchema: null };\n }\n const sectionSet = new Set(src.sectionKeys);\n // The agent schema can carry more than one section per key — e.g. the\n // combined AgentSettings schema emits an \"llm\" section for both the\n // \"openhands\" and \"acp\" variants. Only the first (openhands) is used,\n // so keep the first section per key; otherwise every field renders\n // twice and React sees duplicate section keys.\n const seenKeys = new Set<string>();\n const filteredSchema: SettingsSchema = {\n ...schema,\n sections: schema.sections.filter((s) => {\n if (!sectionSet.has(s.key) || seenKeys.has(s.key)) return false;\n seenKeys.add(s.key);\n return true;\n }),\n };\n return { ...src, filteredSchema };\n }),\n [resolvedSourceConfigs, getSchemaForSource],\n );\n\n // The basic tier only exists when some field renders in it; a critical-less\n // page (e.g. Memory, whose only field is major) hides the Basic tab and\n // floors its view at \"advanced\".\n const showBasic = resolvedSources.some((src) =>\n hasCriticalSettings(src.filteredSchema),\n );\n const showAdvanced =\n forceShowAdvancedView ||\n resolvedSources.some((src) => hasAdvancedSettings(src.filteredSchema));\n const showAll =\n allowAllView &&\n resolvedSources.some((src) => hasMinorSettings(src.filteredSchema));\n\n const schemaUnavailableMessage = React.useMemo(() => {\n const firstError = resolvedSourceConfigs.reduce<unknown>(\n (err, src) =>\n err ??\n (src.settingsSource === \"conversation_settings\"\n ? conversationSchemaQuery.error\n : agentSchemaQuery.error),\n null,\n );\n return getSchemaUnavailableMessage(\n firstError,\n t(I18nKey.SETTINGS$SDK_SCHEMA_UNAVAILABLE),\n );\n }, [\n resolvedSourceConfigs,\n agentSchemaQuery.error,\n conversationSchemaQuery.error,\n t,\n ]);\n\n const overridesSignature = React.useMemo(\n () => (initialValueOverrides ? JSON.stringify(initialValueOverrides) : \"\"),\n [initialValueOverrides],\n );\n\n const [view, setView] = React.useState<SettingsView>(\"basic\");\n const [valuesBySource, setValuesBySource] = React.useState<\n Partial<Record<SettingsValueSource, SettingsFormValues>>\n >({});\n const [dirtyBySource, setDirtyBySource] = React.useState<\n Partial<Record<SettingsValueSource, SettingsDirtyState>>\n >({});\n const hasHydratedViewRef = React.useRef(false);\n\n const initialValuesBySource = React.useMemo<Partial<\n Record<SettingsValueSource, SettingsFormValues>\n > | null>(() => {\n if (!settings) return null;\n const result: Partial<Record<SettingsValueSource, SettingsFormValues>> = {};\n for (const src of resolvedSources) {\n if (!src.filteredSchema) return null;\n result[src.settingsSource] = {\n ...(result[src.settingsSource] ?? {}),\n ...buildInitialSettingsFormValues(\n settings,\n src.filteredSchema,\n src.settingsSource,\n ),\n };\n }\n if (initialValueOverrides) {\n const firstSource = resolvedSources[0]?.settingsSource;\n if (firstSource && result[firstSource]) {\n result[firstSource] = {\n ...result[firstSource],\n ...initialValueOverrides,\n };\n }\n }\n return result;\n }, [settings, resolvedSources, overridesSignature]);\n\n const initialView = React.useMemo(() => {\n if (!settings) return null;\n let result: SettingsView | null = null;\n for (const src of resolvedSources) {\n if (!src.filteredSchema) return null;\n const perSource = getInitialView\n ? getInitialView(settings, src.filteredSchema)\n : inferInitialView(settings, src.filteredSchema, src.settingsSource);\n result = result ? getMoreDetailedView(result, perSource) : perSource;\n }\n if (!result) return null;\n return normalizeView(result, { showBasic, showAdvanced, showAll });\n }, [\n settings,\n resolvedSources,\n getInitialView,\n showBasic,\n showAdvanced,\n showAll,\n ]);\n\n React.useEffect(() => {\n hasHydratedViewRef.current = false;\n setView(\"basic\");\n setValuesBySource({});\n setDirtyBySource({});\n }, [scope, sourcesSignature]);\n\n React.useEffect(() => {\n if (!initialValuesBySource || !initialView) return;\n\n setValuesBySource(initialValuesBySource);\n if (initialValueOverrides) {\n const firstSource = resolvedSources[0]?.settingsSource;\n if (firstSource) {\n const overrideDirty: SettingsDirtyState = Object.fromEntries(\n Object.keys(initialValueOverrides).map((key) => [key, true]),\n );\n setDirtyBySource({ [firstSource]: overrideDirty });\n } else {\n setDirtyBySource({});\n }\n } else {\n setDirtyBySource({});\n }\n // The ref flip stays outside the updater: React double-invokes state\n // updaters in StrictMode, so mutating it in there makes the second\n // (kept) call take the already-hydrated branch and pin the view.\n if (!hasHydratedViewRef.current) {\n hasHydratedViewRef.current = true;\n setView(initialView);\n } else {\n setView((currentView) => getLessDetailedView(currentView, initialView));\n }\n }, [initialValuesBySource, initialView]);\n\n const fieldKeyToSource = React.useMemo(() => {\n const map = new Map<string, SettingsValueSource>();\n for (const src of resolvedSources) {\n if (src.filteredSchema) {\n for (const section of src.filteredSchema.sections) {\n for (const field of section.fields) {\n if (!map.has(field.key)) {\n map.set(field.key, src.settingsSource);\n }\n }\n }\n }\n }\n return map;\n }, [resolvedSources]);\n\n const flatValues = React.useMemo<SettingsFormValues>(() => {\n const merged: SettingsFormValues = {};\n for (const src of resolvedSources) {\n Object.assign(merged, valuesBySource[src.settingsSource] ?? {});\n }\n return merged;\n }, [resolvedSources, valuesBySource]);\n\n const flatDirty = React.useMemo<SettingsDirtyState>(() => {\n const merged: SettingsDirtyState = {};\n for (const src of resolvedSources) {\n Object.assign(merged, dirtyBySource[src.settingsSource] ?? {});\n }\n return merged;\n }, [resolvedSources, dirtyBySource]);\n\n const handleFieldChange = React.useCallback(\n (fieldKey: string, nextValue: string | boolean) => {\n const sourceKey = fieldKeyToSource.get(fieldKey);\n if (!sourceKey) return;\n setValuesBySource((prev) => ({\n ...prev,\n [sourceKey]: {\n ...(prev[sourceKey] ?? {}),\n [fieldKey]: nextValue,\n },\n }));\n setDirtyBySource((prev) => ({\n ...prev,\n [sourceKey]: {\n ...(prev[sourceKey] ?? {}),\n [fieldKey]: true,\n },\n }));\n },\n [fieldKeyToSource],\n );\n\n const handleError = React.useCallback(\n (error: AxiosError) => {\n const msg = retrieveAxiosErrorMessage(error);\n displayErrorToast(msg || t(I18nKey.ERROR$GENERIC));\n },\n [t],\n );\n\n const handleSaveRef = React.useRef<() => void>(() => {});\n const stableSave = React.useCallback(() => {\n handleSaveRef.current();\n }, []);\n\n // Stable accessor for the coerced, dirty-only payload. Mirrors the\n // `handleSaveRef` pattern so the exposed function reference stays stable\n // across renders while always reading the latest closure at call time.\n const buildDirtyPayloadRef = React.useRef<() => Record<string, unknown>>(\n () => ({}),\n );\n const stableGetDirtyPayload = React.useCallback(\n () => buildDirtyPayloadRef.current(),\n [],\n );\n\n const handleSave = () => {\n if (isReadOnly) return;\n if (resolvedSources.some((src) => !src.filteredSchema)) return;\n\n let payload: Record<string, unknown>;\n try {\n const defaultPayload: Record<string, unknown> = {};\n for (const src of resolvedSources) {\n const schema = src.filteredSchema!;\n const sourceValues = valuesBySource[src.settingsSource] ?? {};\n const sourceDirty = dirtyBySource[src.settingsSource] ?? {};\n const diff = buildSdkSettingsPayloadForView(\n schema,\n sourceValues,\n sourceDirty,\n view,\n );\n if (Object.keys(diff).length > 0) {\n const diffKey = PAYLOAD_DIFF_KEY[src.settingsSource];\n defaultPayload[diffKey] = {\n ...((defaultPayload[diffKey] as\n | Record<string, unknown>\n | undefined) ?? {}),\n ...diff,\n };\n }\n }\n\n payload = buildPayload\n ? buildPayload(defaultPayload, {\n values: flatValues,\n dirty: flatDirty,\n view,\n })\n : defaultPayload;\n } catch (error) {\n displayErrorToast(\n error instanceof Error ? error.message : t(I18nKey.ERROR$GENERIC),\n );\n return;\n }\n\n if (Object.keys(payload).length === 0) return;\n\n saveSettings(payload, {\n onError: handleError,\n onSuccess: () => {\n if (!suppressSuccessToast) {\n displaySuccessToast(t(I18nKey.SETTINGS$SAVED_WARNING));\n }\n setDirtyBySource({});\n onSaveSuccess?.();\n },\n });\n };\n\n handleSaveRef.current = handleSave;\n // Dirty-only (NOT view-filtered): we must never inject defaults for\n // non-visible fields here, or a custom save flow would reset fields the\n // user never touched. `buildSdkSettingsPayloadForView` is reserved for the\n // built-in full-replace save above. With multiple sources, we merge each\n // source's nested payload at the top level so single-source consumers\n // (e.g. `LlmSettingsLocalView`) keep reading `.llm` etc. unchanged.\n buildDirtyPayloadRef.current = () => {\n const merged: Record<string, unknown> = {};\n for (const src of resolvedSources) {\n if (!src.filteredSchema) continue;\n const sourceValues = valuesBySource[src.settingsSource] ?? {};\n const sourceDirty = dirtyBySource[src.settingsSource] ?? {};\n Object.assign(\n merged,\n buildSdkSettingsPayload(src.filteredSchema, sourceValues, sourceDirty),\n );\n }\n return merged;\n };\n\n const isDirty = Object.keys(flatDirty).length > 0;\n const saveControlIsDirty = isDirty || extraDirty;\n React.useEffect(() => {\n if (!onSaveControlChange) return;\n onSaveControlChange({\n save: stableSave,\n isSaving: isPending,\n isDirty: saveControlIsDirty,\n values: flatValues,\n view,\n getDirtyPayload: stableGetDirtyPayload,\n });\n }, [isPending, saveControlIsDirty, flatValues, view]);\n\n // Keep existing form content visible during background refetches to avoid\n // flashing the full skeleton (notably during onboarding Next transitions).\n const isInitialSettingsLoad = (isLoading || isFetching) && !settings;\n if (isInitialSettingsLoad || isSchemaLoading) {\n return <LlmSettingsInputsSkeleton />;\n }\n\n const hasAnyVisibleSection = resolvedSources.some(\n (src) => src.filteredSchema && src.filteredSchema.sections.length > 0,\n );\n\n if (!hasAnyVisibleSection) {\n return (\n <div\n data-testid=\"sdk-schema-unavailable\"\n className={extensionModuleEmptyStateClassName}\n >\n <p className=\"text-sm text-[var(--oh-muted)]\">\n {schemaUnavailableMessage}\n </p>\n </div>\n );\n }\n\n if (Object.keys(flatValues).length === 0) {\n return <LlmSettingsInputsSkeleton />;\n }\n\n // Scrolling is owned by the settings shell (or onboarding wrapper), not a\n // nested scroll region. Save actions are inline after the last field.\n const bodyClassName = \"flex flex-col gap-8\";\n\n return (\n <div\n data-testid={testId}\n className={\n embedded\n ? \"relative flex min-h-0 w-full flex-1 flex-col\"\n : \"relative w-full min-h-0\"\n }\n >\n <ViewToggle\n view={view}\n setView={setView}\n showBasic={showBasic}\n showAdvanced={showAdvanced}\n showAll={showAll}\n isDisabled={isReadOnly}\n />\n\n <div className={bodyClassName}>\n {header?.({\n values: flatValues,\n isDisabled: isReadOnly,\n view,\n onChange: handleFieldChange,\n })}\n\n {resolvedSources.map((src) => {\n if (!src.filteredSchema) return null;\n const sourceValues = valuesBySource[src.settingsSource] ?? {};\n const visibleSections = getVisibleSettingsSections(\n src.filteredSchema,\n { ...flatValues, ...sourceValues },\n view,\n src.excludeKeys ?? EMPTY_EXCLUDE_KEYS,\n );\n return visibleSections.map((section) => (\n <section\n key={`${src.settingsSource}:${section.key}`}\n className=\"flex flex-col gap-4\"\n >\n <div className=\"grid gap-4 xl:grid-cols-2\">\n {section.fields.map((field) => (\n <div\n key={field.key}\n className={\n FIELD_FULL_WIDTH_KEYS.has(field.key)\n ? \"xl:col-span-2\"\n : undefined\n }\n >\n <SchemaField\n field={field}\n value={sourceValues[field.key]}\n isDisabled={isReadOnly}\n onChange={(nextValue) =>\n handleFieldChange(field.key, nextValue)\n }\n />\n </div>\n ))}\n </div>\n </section>\n ));\n })}\n\n {!isReadOnly && !hideSaveButton ? (\n <div className=\"flex justify-start pt-2\">\n <BrandButton\n testId=\"save-button\"\n type=\"button\"\n variant=\"primary\"\n isDisabled={isPending || (!isDirty && !extraDirty)}\n onClick={handleSave}\n >\n {isPending\n ? t(I18nKey.SETTINGS$SAVING)\n : t(I18nKey.SETTINGS$SAVE_CHANGES)}\n </BrandButton>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,IAAM,qBAAqB,IAAI,IAAY,GAErC,IAA2C;CAC/C,OAAO;CACP,UAAU;CACV,KAAK;AACP,GAEM,MACJ,GACA,MAEA,EAAW,KAAY,EAAW,KAAe,IAAW,GAExD,KACJ,GACA,MAEA,EAAW,KAAY,EAAW,KAAe,IAAW,GAExD,MACJ,GACA,EACE,cACA,iBACA,iBAMe;CACjB,IAAI,MAAS,OAKX,OAJI,IACK,QAGF,IAAe,aAAa;CAGrC,IAAI,MAAS,YAKX,OAJI,IACK,aAGF,IAAU,QAAQ;CAI3B,IA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zC,CAAA;OACE,GAfE,EAAM,GAeR,CACN;MACE,CAAA;KACE,GAxBF,GAAG,EAAI,eAAe,GAAG,EAAQ,KAwB/B,CACV;IACH,CAAC;IAEgB,KAcb,OAbF,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,IAAD;MACE,QAAO;MACP,MAAK;MACL,SAAQ;MACR,YAAY,KAAc,CAAC,KAAW,CAAC;MACvC,SAAS;gBAGL,EADH,IACK,EAAQ,kBACR,EAAQ,qBAAqB;KACxB,CAAA;IACV,CAAA;GAEJ;IACF;MApGH,kBAAC,OAAD;EACE,eAAY;EACZ,WAAW;YAEX,kBAAC,KAAD;GAAG,WAAU;aACV;EACA,CAAA;CACA,CAAA;AA+FX"}
|
|
1
|
+
{"version":3,"file":"sdk-section-page.js","names":[],"sources":["../../../../../src/components/features/settings/sdk-settings/sdk-section-page.tsx"],"sourcesContent":["import React from \"react\";\nimport { AxiosError } from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport { BrandButton } from \"#/components/features/settings/brand-button\";\nimport { LlmSettingsInputsSkeleton } from \"#/components/features/settings/llm-settings/llm-settings-inputs-skeleton\";\nimport { useSaveSettings } from \"#/hooks/mutation/use-save-settings\";\nimport {\n useAgentSettingsSchema,\n useConversationSettingsSchema,\n} from \"#/hooks/query/use-agent-settings-schema\";\nimport { useSettings } from \"#/hooks/query/use-settings\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport {\n Settings,\n SettingsFieldSchema,\n SettingsSchema,\n SettingsScope,\n} from \"#/types/settings\";\nimport { extensionModuleEmptyStateClassName } from \"#/utils/extension-module-card-classes\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport {\n buildInitialSettingsFormValues,\n buildSdkSettingsPayload,\n buildSdkSettingsPayloadForView,\n getVisibleSettingsSections,\n hasAdvancedSettings,\n hasCriticalSettings,\n hasMinorSettings,\n inferInitialView,\n isValidSettingsSchema,\n normalizeComparableValue,\n SettingsDirtyState,\n SettingsFormValues,\n type SettingsValueSource,\n type SettingsView,\n} from \"#/utils/sdk-settings-schema\";\nimport { FIELD_FULL_WIDTH_KEYS, SchemaField } from \"./schema-field\";\nimport { ViewToggle } from \"./view-toggle\";\n\nconst EMPTY_EXCLUDE_KEYS = new Set<string>();\n\nconst VIEW_ORDER: Record<SettingsView, number> = {\n basic: 0,\n advanced: 1,\n all: 2,\n};\n\nconst getLessDetailedView = (\n currentView: SettingsView,\n nextView: SettingsView,\n): SettingsView =>\n VIEW_ORDER[nextView] < VIEW_ORDER[currentView] ? nextView : currentView;\n\nconst getMoreDetailedView = (\n currentView: SettingsView,\n nextView: SettingsView,\n): SettingsView =>\n VIEW_ORDER[nextView] > VIEW_ORDER[currentView] ? nextView : currentView;\n\nconst normalizeView = (\n view: SettingsView,\n {\n showBasic,\n showAdvanced,\n showAll,\n }: {\n showBasic: boolean;\n showAdvanced: boolean;\n showAll: boolean;\n },\n): SettingsView => {\n if (view === \"all\") {\n if (showAll) {\n return \"all\";\n }\n\n return showAdvanced ? \"advanced\" : \"basic\";\n }\n\n if (view === \"advanced\") {\n if (showAdvanced) {\n return \"advanced\";\n }\n\n return showAll ? \"all\" : \"basic\";\n }\n\n // A critical-less page has nothing to render in the basic tier; bump up.\n if (!showBasic) {\n if (showAdvanced) return \"advanced\";\n if (showAll) return \"all\";\n }\n return \"basic\";\n};\n\nconst PAYLOAD_DIFF_KEY: Record<SettingsValueSource, string> = {\n agent_settings: \"agent_settings_diff\",\n conversation_settings: \"conversation_settings_diff\",\n};\n\nconst getSchemaUnavailableMessage = (\n error: unknown,\n fallbackMessage: string,\n): string => {\n if (!(error instanceof AxiosError)) {\n return fallbackMessage;\n }\n\n if (error.response?.status === 401) {\n return `${fallbackMessage} This agent server requires X-Session-API-Key. Set VITE_SESSION_API_KEY in the frontend to the same value used by the backend SESSION_API_KEY or OH_SESSION_API_KEYS_0.`;\n }\n\n if (error.response?.status === 404) {\n return `${fallbackMessage} This backend does not expose /api/settings/* schema endpoints. Upgrade to a recent openhands-agent-server release.`;\n }\n\n return fallbackMessage;\n};\n\nexport interface SettingsSourceConfig {\n /** Which schema/values bucket on `settings` this source pulls from. */\n settingsSource: SettingsValueSource;\n /** Section keys (e.g. [\"llm\"]) within that schema to render. */\n sectionKeys: string[];\n /** Field keys to skip (rendered elsewhere by the caller). */\n excludeKeys?: Set<string>;\n}\n\nexport interface SdkSectionHeaderProps {\n values: SettingsFormValues;\n isDisabled: boolean;\n view: SettingsView;\n onChange: (key: string, value: string | boolean) => void;\n}\n\ninterface ResolvedSource extends SettingsSourceConfig {\n filteredSchema: SettingsSchema | null;\n}\n\n/**\n * Snapshot of the page's save state, surfaced to the parent so it can\n * render its own Save/Next button (e.g. in onboarding) when\n * {@link SdkSectionPage}'s built-in button is hidden via\n * `hideSaveButton`.\n */\nexport interface SdkSectionSaveControl {\n /** Trigger a save of the currently-dirty fields. No-op while `isSaving` or `!isDirty`. */\n save: () => void;\n /** A save mutation is in flight. */\n isSaving: boolean;\n /** At least one field is dirty (or `extraDirty` was passed in). */\n isDirty: boolean;\n /** Current form values (for custom save flows). */\n values: SettingsFormValues;\n /** The active view tier (basic/advanced/all) the form is rendering. */\n view: SettingsView;\n /**\n * Returns the coerced, dirty-only payload as a nested object\n * (e.g. `{ llm: { temperature: 0.7 } }`). Lets a custom save flow persist\n * exactly the fields the user changed, with proper types, without\n * re-implementing schema-driven coercion. Throws if a field fails coercion.\n */\n getDirtyPayload: () => Record<string, unknown>;\n}\n\n/**\n * A generic SDK-schema-driven settings page that renders fields from one or\n * more schema sections.\n *\n * The `settingsSources` array specifies which schema(s)/section(s) the page\n * owns. The page tracks values/dirty state per source, renders sections from\n * each source in order (filtered by the schema's `prominence` field for the\n * selected view), and emits a combined save payload like\n * `{ conversation_settings_diff: {...}, agent_settings_diff: {...} }` ---\n * including only the keys for sources that actually have dirty changes.\n *\n * @param settingsSources one or more schemas to render fields from\n * @param header render prop above the fields (receives unified state)\n * @param buildPayload customize the save payload before submission\n * @param testId data-testid on the page wrapper\n */\nexport function SdkSectionPage({\n settingsSources,\n scope = \"personal\",\n header,\n extraDirty = false,\n buildPayload,\n onSaveSuccess,\n getInitialView,\n forceShowAdvancedView = false,\n allowAllView = true,\n initialValueOverrides,\n markInitialOverridesDirty = true,\n embedded = false,\n hideSaveButton = false,\n suppressSuccessToast = false,\n onSaveControlChange,\n testId = \"sdk-section-settings-screen\",\n}: {\n settingsSources: SettingsSourceConfig[];\n scope?: SettingsScope;\n\n header?: (props: SdkSectionHeaderProps) => React.ReactNode;\n extraDirty?: boolean;\n /**\n * Customize the save payload. Receives the wrapped default payload (e.g.\n * `{ agent_settings_diff: { llm: { model: \"gpt-4\" } } }`) plus the unified\n * form context. Return the payload to actually send.\n */\n buildPayload?: (\n defaultPayload: Record<string, unknown>,\n context: {\n values: SettingsFormValues;\n dirty: SettingsDirtyState;\n view: SettingsView;\n },\n ) => Record<string, unknown>;\n onSaveSuccess?: () => void;\n getInitialView?: (\n settings: Settings,\n filteredSchema: SettingsSchema,\n ) => SettingsView;\n forceShowAdvancedView?: boolean;\n allowAllView?: boolean;\n /**\n * Per-field initial value overrides that win over the values derived from\n * `useSettings`. When {@link markInitialOverridesDirty} is true (default),\n * override keys also start dirty so onboarding can save a prefill without\n * a touch. Profile editors should pass `false` so Save stays off until the\n * user changes something.\n */\n initialValueOverrides?: SettingsFormValues;\n /** @default true */\n markInitialOverridesDirty?: boolean;\n embedded?: boolean;\n hideSaveButton?: boolean;\n /** Suppress the default success toast after save completes. */\n suppressSuccessToast?: boolean;\n /**\n * Fires whenever the save state changes (a mutation starts/finishes,\n * dirty status flips). Provides a stable `save()` callback the\n * parent can wire to its own button. Useful when the form is\n * embedded in a custom flow and the built-in Save button is hidden.\n */\n onSaveControlChange?: (control: SdkSectionSaveControl) => void;\n testId?: string;\n}) {\n const { t } = useTranslation(\"openhands\");\n const { mutate: saveSettings, isPending } = useSaveSettings(scope);\n const { data: settings, isLoading, isFetching } = useSettings(scope);\n const agentSchemaQuery = useAgentSettingsSchema(\n settings?.agent_settings_schema,\n );\n const conversationSchemaQuery = useConversationSettingsSchema(\n settings?.conversation_settings_schema,\n );\n const isReadOnly = false;\n\n const sourcesSignature = React.useMemo(\n () =>\n JSON.stringify(\n settingsSources.map((s) => ({\n source: s.settingsSource,\n sectionKeys: s.sectionKeys,\n excludeKeys: s.excludeKeys ? Array.from(s.excludeKeys).sort() : null,\n })),\n ),\n [settingsSources],\n );\n\n const resolvedSourceConfigs = React.useMemo<SettingsSourceConfig[]>(() => {\n const parsed = JSON.parse(sourcesSignature) as Array<{\n source: SettingsValueSource;\n sectionKeys: string[];\n excludeKeys: string[] | null;\n }>;\n return parsed.map((p) => ({\n settingsSource: p.source,\n sectionKeys: p.sectionKeys,\n excludeKeys: p.excludeKeys ? new Set(p.excludeKeys) : undefined,\n }));\n }, [sourcesSignature]);\n\n const getSchemaForSource = React.useCallback(\n (source: SettingsValueSource) =>\n source === \"conversation_settings\"\n ? conversationSchemaQuery.data\n : agentSchemaQuery.data,\n [agentSchemaQuery.data, conversationSchemaQuery.data],\n );\n\n const isSchemaLoading = resolvedSourceConfigs.some((src) =>\n src.settingsSource === \"conversation_settings\"\n ? conversationSchemaQuery.isLoading\n : agentSchemaQuery.isLoading,\n );\n\n const resolvedSources = React.useMemo<ResolvedSource[]>(\n () =>\n resolvedSourceConfigs.map((src) => {\n const schema = getSchemaForSource(src.settingsSource);\n if (!isValidSettingsSchema(schema)) {\n return { ...src, filteredSchema: null };\n }\n const sectionSet = new Set(src.sectionKeys);\n // The agent schema can carry more than one section per key — e.g. the\n // combined AgentSettings schema emits an \"llm\" section for both the\n // \"openhands\" and \"acp\" variants. Only the first (openhands) is used,\n // so keep the first section per key; otherwise every field renders\n // twice and React sees duplicate section keys.\n const seenKeys = new Set<string>();\n const filteredSchema: SettingsSchema = {\n ...schema,\n sections: schema.sections.filter((s) => {\n if (!sectionSet.has(s.key) || seenKeys.has(s.key)) return false;\n seenKeys.add(s.key);\n return true;\n }),\n };\n return { ...src, filteredSchema };\n }),\n [resolvedSourceConfigs, getSchemaForSource],\n );\n\n // The basic tier only exists when some field renders in it; a critical-less\n // page (e.g. Memory, whose only field is major) hides the Basic tab and\n // floors its view at \"advanced\".\n const showBasic = resolvedSources.some((src) =>\n hasCriticalSettings(src.filteredSchema),\n );\n const showAdvanced =\n forceShowAdvancedView ||\n resolvedSources.some((src) => hasAdvancedSettings(src.filteredSchema));\n const showAll =\n allowAllView &&\n resolvedSources.some((src) => hasMinorSettings(src.filteredSchema));\n\n const schemaUnavailableMessage = React.useMemo(() => {\n const firstError = resolvedSourceConfigs.reduce<unknown>(\n (err, src) =>\n err ??\n (src.settingsSource === \"conversation_settings\"\n ? conversationSchemaQuery.error\n : agentSchemaQuery.error),\n null,\n );\n return getSchemaUnavailableMessage(\n firstError,\n t(I18nKey.SETTINGS$SDK_SCHEMA_UNAVAILABLE),\n );\n }, [\n resolvedSourceConfigs,\n agentSchemaQuery.error,\n conversationSchemaQuery.error,\n t,\n ]);\n\n const overridesSignature = React.useMemo(\n () => (initialValueOverrides ? JSON.stringify(initialValueOverrides) : \"\"),\n [initialValueOverrides],\n );\n const firstSettingsSource = resolvedSources[0]?.settingsSource;\n\n const [view, setView] = React.useState<SettingsView>(\"basic\");\n const [valuesBySource, setValuesBySource] = React.useState<\n Partial<Record<SettingsValueSource, SettingsFormValues>>\n >({});\n const [dirtyBySource, setDirtyBySource] = React.useState<\n Partial<Record<SettingsValueSource, SettingsDirtyState>>\n >({});\n const hasHydratedViewRef = React.useRef(false);\n\n const initialValuesBySource = React.useMemo<Partial<\n Record<SettingsValueSource, SettingsFormValues>\n > | null>(() => {\n if (!settings) return null;\n const result: Partial<Record<SettingsValueSource, SettingsFormValues>> = {};\n for (const src of resolvedSources) {\n if (!src.filteredSchema) return null;\n result[src.settingsSource] = {\n ...(result[src.settingsSource] ?? {}),\n ...buildInitialSettingsFormValues(\n settings,\n src.filteredSchema,\n src.settingsSource,\n ),\n };\n }\n if (initialValueOverrides) {\n const firstSource = resolvedSources[0]?.settingsSource;\n if (firstSource && result[firstSource]) {\n result[firstSource] = {\n ...result[firstSource],\n ...initialValueOverrides,\n };\n }\n }\n return result;\n }, [settings, resolvedSources, overridesSignature]);\n\n const initialView = React.useMemo(() => {\n if (!settings) return null;\n let result: SettingsView | null = null;\n for (const src of resolvedSources) {\n if (!src.filteredSchema) return null;\n const perSource = getInitialView\n ? getInitialView(settings, src.filteredSchema)\n : inferInitialView(settings, src.filteredSchema, src.settingsSource);\n result = result ? getMoreDetailedView(result, perSource) : perSource;\n }\n if (!result) return null;\n return normalizeView(result, { showBasic, showAdvanced, showAll });\n }, [\n settings,\n resolvedSources,\n getInitialView,\n showBasic,\n showAdvanced,\n showAll,\n ]);\n\n React.useEffect(() => {\n hasHydratedViewRef.current = false;\n setView(\"basic\");\n setValuesBySource({});\n setDirtyBySource({});\n }, [scope, sourcesSignature]);\n\n React.useEffect(() => {\n if (!initialValuesBySource || !initialView) return;\n if (hideSaveButton && hasHydratedViewRef.current) {\n return;\n }\n\n setValuesBySource(initialValuesBySource);\n if (initialValueOverrides && markInitialOverridesDirty) {\n const firstSource = firstSettingsSource;\n if (firstSource) {\n const overrideDirty: SettingsDirtyState = Object.fromEntries(\n Object.keys(initialValueOverrides).map((key) => [key, true]),\n );\n setDirtyBySource({ [firstSource]: overrideDirty });\n } else {\n setDirtyBySource({});\n }\n } else {\n setDirtyBySource({});\n }\n // The ref flip stays outside the updater: React double-invokes state\n // updaters in StrictMode, so mutating it in there makes the second\n // (kept) call take the already-hydrated branch and pin the view.\n if (!hasHydratedViewRef.current) {\n hasHydratedViewRef.current = true;\n setView(initialView);\n } else {\n setView((currentView) => getLessDetailedView(currentView, initialView));\n }\n }, [\n initialValuesBySource,\n initialView,\n overridesSignature,\n markInitialOverridesDirty,\n firstSettingsSource,\n hideSaveButton,\n ]);\n\n const fieldKeyToSource = React.useMemo(() => {\n const map = new Map<string, SettingsValueSource>();\n for (const src of resolvedSources) {\n if (src.filteredSchema) {\n for (const section of src.filteredSchema.sections) {\n for (const field of section.fields) {\n if (!map.has(field.key)) {\n map.set(field.key, src.settingsSource);\n }\n }\n }\n }\n }\n return map;\n }, [resolvedSources]);\n\n const flatValues = React.useMemo<SettingsFormValues>(() => {\n const merged: SettingsFormValues = {};\n for (const src of resolvedSources) {\n Object.assign(merged, valuesBySource[src.settingsSource] ?? {});\n }\n return merged;\n }, [resolvedSources, valuesBySource]);\n\n const flatDirty = React.useMemo<SettingsDirtyState>(() => {\n const merged: SettingsDirtyState = {};\n for (const src of resolvedSources) {\n Object.assign(merged, dirtyBySource[src.settingsSource] ?? {});\n }\n return merged;\n }, [resolvedSources, dirtyBySource]);\n\n const fieldsByKey = React.useMemo(() => {\n const map = new Map<string, SettingsFieldSchema>();\n for (const src of resolvedSources) {\n if (!src.filteredSchema) continue;\n for (const section of src.filteredSchema.sections) {\n for (const field of section.fields) {\n if (!map.has(field.key)) {\n map.set(field.key, field);\n }\n }\n }\n }\n return map;\n }, [resolvedSources]);\n\n const initialValuesBySourceRef = React.useRef(initialValuesBySource);\n initialValuesBySourceRef.current = initialValuesBySource;\n const initialValueOverridesRef = React.useRef(initialValueOverrides);\n initialValueOverridesRef.current = initialValueOverrides;\n const markInitialOverridesDirtyRef = React.useRef(markInitialOverridesDirty);\n markInitialOverridesDirtyRef.current = markInitialOverridesDirty;\n const fieldsByKeyRef = React.useRef(fieldsByKey);\n fieldsByKeyRef.current = fieldsByKey;\n\n const handleFieldChange = React.useCallback(\n (fieldKey: string, nextValue: string | boolean) => {\n const sourceKey =\n fieldKeyToSource.get(fieldKey) ?? resolvedSources[0]?.settingsSource;\n if (!sourceKey) return;\n setValuesBySource((prev) => ({\n ...prev,\n [sourceKey]: {\n ...(prev[sourceKey] ?? {}),\n [fieldKey]: nextValue,\n },\n }));\n setDirtyBySource((prev) => {\n const initialVal =\n initialValuesBySourceRef.current?.[sourceKey]?.[fieldKey];\n const stickyOverride =\n markInitialOverridesDirtyRef.current &&\n !!initialValueOverridesRef.current &&\n fieldKey in initialValueOverridesRef.current;\n const field = fieldsByKeyRef.current.get(fieldKey);\n const valuesMatch = field\n ? normalizeComparableValue(field, nextValue) ===\n normalizeComparableValue(field, initialVal)\n : nextValue === initialVal;\n\n if (valuesMatch && !stickyOverride) {\n if (!prev[sourceKey]?.[fieldKey]) return prev;\n const sourceDirty = { ...(prev[sourceKey] ?? {}) };\n delete sourceDirty[fieldKey];\n return { ...prev, [sourceKey]: sourceDirty };\n }\n\n if (prev[sourceKey]?.[fieldKey]) return prev;\n return {\n ...prev,\n [sourceKey]: { ...(prev[sourceKey] ?? {}), [fieldKey]: true },\n };\n });\n },\n [fieldKeyToSource, resolvedSources],\n );\n\n const handleError = React.useCallback(\n (error: AxiosError) => {\n const msg = retrieveAxiosErrorMessage(error);\n displayErrorToast(msg || t(I18nKey.ERROR$GENERIC));\n },\n [t],\n );\n\n const handleSaveRef = React.useRef<() => void>(() => {});\n const stableSave = React.useCallback(() => {\n handleSaveRef.current();\n }, []);\n\n // Stable accessor for the coerced, dirty-only payload. Mirrors the\n // `handleSaveRef` pattern so the exposed function reference stays stable\n // across renders while always reading the latest closure at call time.\n const buildDirtyPayloadRef = React.useRef<() => Record<string, unknown>>(\n () => ({}),\n );\n const stableGetDirtyPayload = React.useCallback(\n () => buildDirtyPayloadRef.current(),\n [],\n );\n\n const handleSave = () => {\n if (isReadOnly) return;\n if (resolvedSources.some((src) => !src.filteredSchema)) return;\n\n let payload: Record<string, unknown>;\n try {\n const defaultPayload: Record<string, unknown> = {};\n for (const src of resolvedSources) {\n const schema = src.filteredSchema!;\n const sourceValues = valuesBySource[src.settingsSource] ?? {};\n const sourceDirty = dirtyBySource[src.settingsSource] ?? {};\n const diff = buildSdkSettingsPayloadForView(\n schema,\n sourceValues,\n sourceDirty,\n view,\n );\n if (Object.keys(diff).length > 0) {\n const diffKey = PAYLOAD_DIFF_KEY[src.settingsSource];\n defaultPayload[diffKey] = {\n ...((defaultPayload[diffKey] as\n | Record<string, unknown>\n | undefined) ?? {}),\n ...diff,\n };\n }\n }\n\n payload = buildPayload\n ? buildPayload(defaultPayload, {\n values: flatValues,\n dirty: flatDirty,\n view,\n })\n : defaultPayload;\n } catch (error) {\n displayErrorToast(\n error instanceof Error ? error.message : t(I18nKey.ERROR$GENERIC),\n );\n return;\n }\n\n if (Object.keys(payload).length === 0) return;\n\n saveSettings(payload, {\n onError: handleError,\n onSuccess: () => {\n if (!suppressSuccessToast) {\n displaySuccessToast(t(I18nKey.SETTINGS$SAVED_WARNING));\n }\n setDirtyBySource({});\n onSaveSuccess?.();\n },\n });\n };\n\n handleSaveRef.current = handleSave;\n // Dirty-only (NOT view-filtered): we must never inject defaults for\n // non-visible fields here, or a custom save flow would reset fields the\n // user never touched. `buildSdkSettingsPayloadForView` is reserved for the\n // built-in full-replace save above. With multiple sources, we merge each\n // source's nested payload at the top level so single-source consumers\n // (e.g. `LlmSettingsLocalView`) keep reading `.llm` etc. unchanged.\n buildDirtyPayloadRef.current = () => {\n const merged: Record<string, unknown> = {};\n for (const src of resolvedSources) {\n if (!src.filteredSchema) continue;\n const sourceValues = valuesBySource[src.settingsSource] ?? {};\n const sourceDirty = dirtyBySource[src.settingsSource] ?? {};\n Object.assign(\n merged,\n buildSdkSettingsPayload(src.filteredSchema, sourceValues, sourceDirty),\n );\n }\n return merged;\n };\n\n const isDirty = Object.keys(flatDirty).length > 0;\n const saveControlIsDirty = isDirty || extraDirty;\n React.useEffect(() => {\n if (!onSaveControlChange) return;\n onSaveControlChange({\n save: stableSave,\n isSaving: isPending,\n isDirty: saveControlIsDirty,\n values: flatValues,\n view,\n getDirtyPayload: stableGetDirtyPayload,\n });\n }, [isPending, saveControlIsDirty, flatValues, view]);\n\n // Keep existing form content visible during background refetches to avoid\n // flashing the full skeleton (notably during onboarding Next transitions).\n const isInitialSettingsLoad = (isLoading || isFetching) && !settings;\n if (isInitialSettingsLoad || isSchemaLoading) {\n return <LlmSettingsInputsSkeleton />;\n }\n\n const hasAnyVisibleSection = resolvedSources.some(\n (src) => src.filteredSchema && src.filteredSchema.sections.length > 0,\n );\n\n if (!hasAnyVisibleSection) {\n return (\n <div\n data-testid=\"sdk-schema-unavailable\"\n className={extensionModuleEmptyStateClassName}\n >\n <p className=\"text-sm text-[var(--oh-muted)]\">\n {schemaUnavailableMessage}\n </p>\n </div>\n );\n }\n\n if (Object.keys(flatValues).length === 0) {\n return <LlmSettingsInputsSkeleton />;\n }\n\n // Scrolling is owned by the settings shell (or onboarding wrapper), not a\n // nested scroll region. Save actions are inline after the last field.\n const bodyClassName = \"flex flex-col gap-8\";\n\n return (\n <div\n data-testid={testId}\n className={\n embedded\n ? \"relative flex min-h-0 w-full flex-1 flex-col\"\n : \"relative w-full min-h-0\"\n }\n >\n <ViewToggle\n view={view}\n setView={setView}\n showBasic={showBasic}\n showAdvanced={showAdvanced}\n showAll={showAll}\n isDisabled={isReadOnly}\n />\n\n <div className={bodyClassName}>\n {header?.({\n values: flatValues,\n isDisabled: isReadOnly,\n view,\n onChange: handleFieldChange,\n })}\n\n {resolvedSources.map((src) => {\n if (!src.filteredSchema) return null;\n const sourceValues = valuesBySource[src.settingsSource] ?? {};\n const visibleSections = getVisibleSettingsSections(\n src.filteredSchema,\n { ...flatValues, ...sourceValues },\n view,\n src.excludeKeys ?? EMPTY_EXCLUDE_KEYS,\n );\n return visibleSections.map((section) => (\n <section\n key={`${src.settingsSource}:${section.key}`}\n className=\"flex flex-col gap-4\"\n >\n <div className=\"grid gap-4 xl:grid-cols-2\">\n {section.fields.map((field) => (\n <div\n key={field.key}\n className={\n FIELD_FULL_WIDTH_KEYS.has(field.key)\n ? \"xl:col-span-2\"\n : undefined\n }\n >\n <SchemaField\n field={field}\n value={sourceValues[field.key]}\n isDisabled={isReadOnly}\n onChange={(nextValue) =>\n handleFieldChange(field.key, nextValue)\n }\n />\n </div>\n ))}\n </div>\n </section>\n ));\n })}\n\n {!isReadOnly && !hideSaveButton ? (\n <div className=\"flex justify-start pt-2\">\n <BrandButton\n testId=\"save-button\"\n type=\"button\"\n variant=\"primary\"\n isDisabled={isPending || (!isDirty && !extraDirty)}\n onClick={handleSave}\n >\n {isPending\n ? t(I18nKey.SETTINGS$SAVING)\n : t(I18nKey.SETTINGS$SAVE_CHANGES)}\n </BrandButton>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA2CA,IAAM,qBAAqB,IAAI,IAAY,GAErC,IAA2C;CAC/C,OAAO;CACP,UAAU;CACV,KAAK;AACP,GAEM,MACJ,GACA,MAEA,EAAW,KAAY,EAAW,KAAe,IAAW,GAExD,MACJ,GACA,MAEA,EAAW,KAAY,EAAW,KAAe,IAAW,GAExD,MACJ,GACA,EACE,cACA,iBACA,iBAMe;CACjB,IAAI,MAAS,OAKX,OAJI,IACK,QAGF,IAAe,aAAa;CAGrC,IAAI,MAAS,YAKX,OAJI,IACK,aAGF,IAAU,QAAQ;CAI3B,IAAI,CAAC,GAAW;EACd,IAAI,GAAc,OAAO;EACzB,IAAI,GAAS,OAAO;CACtB;CACA,OAAO;AACT,GAEM,KAAwD;CAC5D,gBAAgB;CAChB,uBAAuB;AACzB,GAEM,MACJ,GACA,MAEM,aAAiB,IAInB,EAAM,UAAU,WAAW,MACtB,GAAG,EAAgB,2KAGxB,EAAM,UAAU,WAAW,MACtB,GAAG,EAAgB,uHAGrB,IAXE;AA4EX,SAAgB,EAAe,EAC7B,oBACA,WAAQ,YACR,WACA,gBAAa,IACb,iBACA,mBACA,mBACA,4BAAwB,IACxB,mBAAe,IACf,0BACA,+BAA4B,IAC5B,eAAW,IACX,oBAAiB,IACjB,2BAAuB,IACvB,wBACA,aAAS,iCAiDR;CACD,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,QAAQ,IAAc,iBAAc,GAAgB,CAAK,GAC3D,EAAE,MAAM,GAAU,eAAW,mBAAe,EAAY,CAAK,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