@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-provider-models.js","names":[],"sources":["../../../src/hooks/query/use-provider-models.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMModel } from \"#/api/config-service/config-service.types\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchPage(\n provider: string,\n verifiedByProvider: Record<string, string[]>,\n pageId?: string,\n depth = 0,\n): Promise<LLMModel[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(`Too many pagination requests for provider ${provider}`);\n }\n\n const page = await ConfigService.searchModels(\n {\n provider__eq: provider,\n limit: 100,\n page_id: pageId,\n },\n verifiedByProvider,\n );\n\n if (page.next_page_id) {\n const rest = await fetchPage(\n provider,\n verifiedByProvider,\n page.next_page_id,\n depth + 1,\n );\n return [...page.items, ...rest];\n }\n return page.items;\n}\n\nexport const useProviderModels = (provider: string | null)
|
|
1
|
+
{"version":3,"file":"use-provider-models.js","names":[],"sources":["../../../src/hooks/query/use-provider-models.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMModel } from \"#/api/config-service/config-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchPage(\n provider: string,\n verifiedByProvider: Record<string, string[]>,\n pageId?: string,\n depth = 0,\n): Promise<LLMModel[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(`Too many pagination requests for provider ${provider}`);\n }\n\n const page = await ConfigService.searchModels(\n {\n provider__eq: provider,\n limit: 100,\n page_id: pageId,\n },\n verifiedByProvider,\n );\n\n if (page.next_page_id) {\n const rest = await fetchPage(\n provider,\n verifiedByProvider,\n page.next_page_id,\n depth + 1,\n );\n return [...page.items, ...rest];\n }\n return page.items;\n}\n\nexport const useProviderModels = (provider: string | null) => {\n // `ActiveBackendProvider` deliberately does not blanket-invalidate on\n // backend/org switches, so the query key must carry the active backend\n // identity (id, connection revision, org id). Otherwise React Query serves\n // the previous backend/org's cached page — including DB-driven `free`/\n // `default`/`verified` flags — for the full stale window after a switch.\n const { backend, orgId } = useActiveBackend();\n const backendScope = [\n backend.id,\n backend.connectionRevision ?? 0,\n orgId,\n ] as const;\n\n return useQuery({\n queryKey: [\"config\", \"models\", provider, ...backendScope],\n queryFn: async ({ client }) => {\n const verifiedByProvider = await client.fetchQuery({\n queryKey: [...VERIFIED_MODELS_QUERY_KEY, ...backendScope],\n queryFn: fetchVerifiedModelsByProvider,\n staleTime: VERIFIED_MODELS_STALE_TIME,\n });\n return fetchPage(provider!, verifiedByProvider);\n },\n enabled: !!provider,\n staleTime: VERIFIED_MODELS_STALE_TIME,\n gcTime: VERIFIED_MODELS_GC_TIME,\n });\n};\n"],"mappings":";;;;;AAWA,IAAM,IAAuB;AAE7B,eAAe,EACb,GACA,GACA,GACA,IAAQ,GACa;CACrB,IAAI,KAAS,GACX,MAAU,MAAM,6CAA6C,GAAU;CAGzE,IAAM,IAAO,MAAM,EAAc,aAC/B;EACE,cAAc;EACd,OAAO;EACP,SAAS;CACX,GACA,CACF;CAEA,IAAI,EAAK,cAAc;EACrB,IAAM,IAAO,MAAM,EACjB,GACA,GACA,EAAK,cACL,IAAQ,CACV;EACA,OAAO,CAAC,GAAG,EAAK,OAAO,GAAG,CAAI;CAChC;CACA,OAAO,EAAK;AACd;AAEA,IAAa,KAAqB,MAA4B;CAM5D,IAAM,EAAE,YAAS,aAAU,EAAiB,GACtC,IAAe;EACnB,EAAQ;EACR,EAAQ,sBAAsB;EAC9B;CACF;CAEA,OAAO,EAAS;EACd,UAAU;GAAC;GAAU;GAAU;GAAU,GAAG;EAAY;EACxD,SAAS,OAAO,EAAE,gBAMT,EAAU,GAAW,MALK,EAAO,WAAW;GACjD,UAAU,CAAC,GAAG,GAA2B,GAAG,CAAY;GACxD,SAAS;GACT,WAAW;EACb,CAAC,CAC6C;EAEhD,SAAS,CAAC,CAAC;EACX,WAAW;EACX,QAAQ;CACV,CAAC;AACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),t=require("../../api/config-service/config-service.api.cjs"),
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),t=require("../../contexts/active-backend-context.cjs"),n=require("../../api/config-service/config-service.api.cjs"),r=require("./use-verified-models.cjs");var i=10;async function a(e,t,r,o){if(o>=i)throw Error(`Too many pagination requests while fetching providers (depth=${o})`);let s=await n.default.searchProviders(t?{page_id:t}:{},e);if(!s.next_page_id)return s.items;if(r.has(s.next_page_id))throw Error(`Repeated page id while fetching providers: ${s.next_page_id}`);r.add(s.next_page_id);let c=await a(e,s.next_page_id,r,o+1);return[...s.items,...c]}var o=()=>{let{backend:n,orgId:i}=t.useActiveBackend(),o=[n.id,n.connectionRevision??0,i];return e.useQuery({queryKey:[`config`,`providers`,...o],queryFn:async({client:e})=>a(await e.fetchQuery({queryKey:[...r.VERIFIED_MODELS_QUERY_KEY,...o],queryFn:r.fetchVerifiedModelsByProvider,staleTime:r.VERIFIED_MODELS_STALE_TIME}),null,new Set,0),staleTime:r.VERIFIED_MODELS_STALE_TIME,gcTime:r.VERIFIED_MODELS_GC_TIME})};exports.useSearchProviders=o;
|
|
2
2
|
//# sourceMappingURL=use-search-providers.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-search-providers.cjs","names":[],"sources":["../../../src/hooks/query/use-search-providers.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMProvider } from \"#/api/config-service/config-service.types\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\n// Cloud backends paginate `/api/v1/config/providers/search` with a default\n// page size smaller than the provider list (~150 entries from litellm), so a\n// single-page fetch silently drops everything past the cut. Cap the walk\n// in case the cursor ever drifts (e.g. the cloud service returns an unstable\n// `next_page_id` that loops back).\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchAllProviders(\n verifiedByProvider: Record<string, string[]>,\n pageId: string | null | undefined,\n seenPageIds: Set<string>,\n depth: number,\n): Promise<LLMProvider[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(\n `Too many pagination requests while fetching providers (depth=${depth})`,\n );\n }\n\n const page = await ConfigService.searchProviders(\n pageId ? { page_id: pageId } : {},\n verifiedByProvider,\n );\n\n if (!page.next_page_id) {\n return page.items;\n }\n\n // Cycle guard: the cloud backend is out of our control — if `next_page_id`\n // repeats, refuse to hang the settings page. Mirrors `use-search-subdirs`.\n if (seenPageIds.has(page.next_page_id)) {\n throw new Error(\n `Repeated page id while fetching providers: ${page.next_page_id}`,\n );\n }\n seenPageIds.add(page.next_page_id);\n\n const rest = await fetchAllProviders(\n verifiedByProvider,\n page.next_page_id,\n seenPageIds,\n depth + 1,\n );\n return [...page.items, ...rest];\n}\n\nexport const useSearchProviders = ()
|
|
1
|
+
{"version":3,"file":"use-search-providers.cjs","names":[],"sources":["../../../src/hooks/query/use-search-providers.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMProvider } from \"#/api/config-service/config-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\n// Cloud backends paginate `/api/v1/config/providers/search` with a default\n// page size smaller than the provider list (~150 entries from litellm), so a\n// single-page fetch silently drops everything past the cut. Cap the walk\n// in case the cursor ever drifts (e.g. the cloud service returns an unstable\n// `next_page_id` that loops back).\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchAllProviders(\n verifiedByProvider: Record<string, string[]>,\n pageId: string | null | undefined,\n seenPageIds: Set<string>,\n depth: number,\n): Promise<LLMProvider[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(\n `Too many pagination requests while fetching providers (depth=${depth})`,\n );\n }\n\n const page = await ConfigService.searchProviders(\n pageId ? { page_id: pageId } : {},\n verifiedByProvider,\n );\n\n if (!page.next_page_id) {\n return page.items;\n }\n\n // Cycle guard: the cloud backend is out of our control — if `next_page_id`\n // repeats, refuse to hang the settings page. Mirrors `use-search-subdirs`.\n if (seenPageIds.has(page.next_page_id)) {\n throw new Error(\n `Repeated page id while fetching providers: ${page.next_page_id}`,\n );\n }\n seenPageIds.add(page.next_page_id);\n\n const rest = await fetchAllProviders(\n verifiedByProvider,\n page.next_page_id,\n seenPageIds,\n depth + 1,\n );\n return [...page.items, ...rest];\n}\n\nexport const useSearchProviders = () => {\n // `ActiveBackendProvider` deliberately does not blanket-invalidate on\n // backend/org switches, so the query key must carry the active backend\n // identity (id, connection revision, org id). Otherwise React Query serves\n // the previous backend/org's cached provider list — including DB-driven\n // `verified` flags — for the full stale window after a switch.\n const { backend, orgId } = useActiveBackend();\n const backendScope = [\n backend.id,\n backend.connectionRevision ?? 0,\n orgId,\n ] as const;\n\n return useQuery({\n queryKey: [\"config\", \"providers\", ...backendScope],\n queryFn: async ({ client }): Promise<LLMProvider[]> => {\n const verifiedByProvider = await client.fetchQuery({\n queryKey: [...VERIFIED_MODELS_QUERY_KEY, ...backendScope],\n queryFn: fetchVerifiedModelsByProvider,\n staleTime: VERIFIED_MODELS_STALE_TIME,\n });\n // The local backend returns a single page with `next_page_id: null`\n // so this loop is a no-op there; on the cloud backend it walks the\n // cursor to exhaustion.\n return fetchAllProviders(verifiedByProvider, null, new Set(), 0);\n },\n staleTime: VERIFIED_MODELS_STALE_TIME,\n gcTime: VERIFIED_MODELS_GC_TIME,\n });\n};\n"],"mappings":"iSAgBA,IAAM,EAAuB,GAE7B,eAAe,EACb,EACA,EACA,EACA,EACwB,CACxB,GAAI,GAAS,EACX,MAAU,MACR,gEAAgE,EAAM,EACxE,EAGF,IAAM,EAAO,MAAM,EAAA,QAAc,gBAC/B,EAAS,CAAE,QAAS,CAAO,EAAI,CAAC,EAChC,CACF,EAEA,GAAI,CAAC,EAAK,aACR,OAAO,EAAK,MAKd,GAAI,EAAY,IAAI,EAAK,YAAY,EACnC,MAAU,MACR,8CAA8C,EAAK,cACrD,EAEF,EAAY,IAAI,EAAK,YAAY,EAEjC,IAAM,EAAO,MAAM,EACjB,EACA,EAAK,aACL,EACA,EAAQ,CACV,EACA,MAAO,CAAC,GAAG,EAAK,MAAO,GAAG,CAAI,CAChC,CAEA,IAAa,MAA2B,CAMtC,GAAM,CAAE,UAAS,SAAU,EAAA,iBAAiB,EACtC,EAAe,CACnB,EAAQ,GACR,EAAQ,oBAAsB,EAC9B,CACF,EAEA,OAAO,EAAA,SAAS,CACd,SAAU,CAAC,SAAU,YAAa,GAAG,CAAY,EACjD,QAAS,MAAO,CAAE,YAST,EAAkB,MARQ,EAAO,WAAW,CACjD,SAAU,CAAC,GAAG,EAAA,0BAA2B,GAAG,CAAY,EACxD,QAAS,EAAA,8BACT,UAAW,EAAA,0BACb,CAAC,EAI4C,KAAM,IAAI,IAAO,CAAC,EAEjE,UAAW,EAAA,2BACX,OAAQ,EAAA,uBACV,CAAC,CACH"}
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
import { useQuery as e } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
2
|
-
import t from "../../
|
|
3
|
-
import
|
|
2
|
+
import { useActiveBackend as t } from "../../contexts/active-backend-context.js";
|
|
3
|
+
import n from "../../api/config-service/config-service.api.js";
|
|
4
|
+
import { VERIFIED_MODELS_GC_TIME as r, VERIFIED_MODELS_QUERY_KEY as i, VERIFIED_MODELS_STALE_TIME as a, fetchVerifiedModelsByProvider as o } from "./use-verified-models.js";
|
|
4
5
|
//#region src/hooks/query/use-search-providers.ts
|
|
5
|
-
var
|
|
6
|
-
async function
|
|
7
|
-
if (i >=
|
|
8
|
-
let a = await
|
|
6
|
+
var s = 10;
|
|
7
|
+
async function c(e, t, r, i) {
|
|
8
|
+
if (i >= s) throw Error(`Too many pagination requests while fetching providers (depth=${i})`);
|
|
9
|
+
let a = await n.searchProviders(t ? { page_id: t } : {}, e);
|
|
9
10
|
if (!a.next_page_id) return a.items;
|
|
10
11
|
if (r.has(a.next_page_id)) throw Error(`Repeated page id while fetching providers: ${a.next_page_id}`);
|
|
11
12
|
r.add(a.next_page_id);
|
|
12
|
-
let
|
|
13
|
-
return [...a.items, ...
|
|
13
|
+
let o = await c(e, a.next_page_id, r, i + 1);
|
|
14
|
+
return [...a.items, ...o];
|
|
14
15
|
}
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
var l = () => {
|
|
17
|
+
let { backend: n, orgId: s } = t(), l = [
|
|
18
|
+
n.id,
|
|
19
|
+
n.connectionRevision ?? 0,
|
|
20
|
+
s
|
|
21
|
+
];
|
|
22
|
+
return e({
|
|
23
|
+
queryKey: [
|
|
24
|
+
"config",
|
|
25
|
+
"providers",
|
|
26
|
+
...l
|
|
27
|
+
],
|
|
28
|
+
queryFn: async ({ client: e }) => c(await e.fetchQuery({
|
|
29
|
+
queryKey: [...i, ...l],
|
|
30
|
+
queryFn: o,
|
|
31
|
+
staleTime: a
|
|
32
|
+
}), null, /* @__PURE__ */ new Set(), 0),
|
|
33
|
+
staleTime: a,
|
|
34
|
+
gcTime: r
|
|
35
|
+
});
|
|
36
|
+
};
|
|
25
37
|
//#endregion
|
|
26
|
-
export {
|
|
38
|
+
export { l as useSearchProviders };
|
|
27
39
|
|
|
28
40
|
//# sourceMappingURL=use-search-providers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-search-providers.js","names":[],"sources":["../../../src/hooks/query/use-search-providers.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMProvider } from \"#/api/config-service/config-service.types\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\n// Cloud backends paginate `/api/v1/config/providers/search` with a default\n// page size smaller than the provider list (~150 entries from litellm), so a\n// single-page fetch silently drops everything past the cut. Cap the walk\n// in case the cursor ever drifts (e.g. the cloud service returns an unstable\n// `next_page_id` that loops back).\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchAllProviders(\n verifiedByProvider: Record<string, string[]>,\n pageId: string | null | undefined,\n seenPageIds: Set<string>,\n depth: number,\n): Promise<LLMProvider[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(\n `Too many pagination requests while fetching providers (depth=${depth})`,\n );\n }\n\n const page = await ConfigService.searchProviders(\n pageId ? { page_id: pageId } : {},\n verifiedByProvider,\n );\n\n if (!page.next_page_id) {\n return page.items;\n }\n\n // Cycle guard: the cloud backend is out of our control — if `next_page_id`\n // repeats, refuse to hang the settings page. Mirrors `use-search-subdirs`.\n if (seenPageIds.has(page.next_page_id)) {\n throw new Error(\n `Repeated page id while fetching providers: ${page.next_page_id}`,\n );\n }\n seenPageIds.add(page.next_page_id);\n\n const rest = await fetchAllProviders(\n verifiedByProvider,\n page.next_page_id,\n seenPageIds,\n depth + 1,\n );\n return [...page.items, ...rest];\n}\n\nexport const useSearchProviders = ()
|
|
1
|
+
{"version":3,"file":"use-search-providers.js","names":[],"sources":["../../../src/hooks/query/use-search-providers.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport ConfigService from \"#/api/config-service/config-service.api\";\nimport type { LLMProvider } from \"#/api/config-service/config-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\n// Cloud backends paginate `/api/v1/config/providers/search` with a default\n// page size smaller than the provider list (~150 entries from litellm), so a\n// single-page fetch silently drops everything past the cut. Cap the walk\n// in case the cursor ever drifts (e.g. the cloud service returns an unstable\n// `next_page_id` that loops back).\nconst MAX_PAGINATION_DEPTH = 10;\n\nasync function fetchAllProviders(\n verifiedByProvider: Record<string, string[]>,\n pageId: string | null | undefined,\n seenPageIds: Set<string>,\n depth: number,\n): Promise<LLMProvider[]> {\n if (depth >= MAX_PAGINATION_DEPTH) {\n throw new Error(\n `Too many pagination requests while fetching providers (depth=${depth})`,\n );\n }\n\n const page = await ConfigService.searchProviders(\n pageId ? { page_id: pageId } : {},\n verifiedByProvider,\n );\n\n if (!page.next_page_id) {\n return page.items;\n }\n\n // Cycle guard: the cloud backend is out of our control — if `next_page_id`\n // repeats, refuse to hang the settings page. Mirrors `use-search-subdirs`.\n if (seenPageIds.has(page.next_page_id)) {\n throw new Error(\n `Repeated page id while fetching providers: ${page.next_page_id}`,\n );\n }\n seenPageIds.add(page.next_page_id);\n\n const rest = await fetchAllProviders(\n verifiedByProvider,\n page.next_page_id,\n seenPageIds,\n depth + 1,\n );\n return [...page.items, ...rest];\n}\n\nexport const useSearchProviders = () => {\n // `ActiveBackendProvider` deliberately does not blanket-invalidate on\n // backend/org switches, so the query key must carry the active backend\n // identity (id, connection revision, org id). Otherwise React Query serves\n // the previous backend/org's cached provider list — including DB-driven\n // `verified` flags — for the full stale window after a switch.\n const { backend, orgId } = useActiveBackend();\n const backendScope = [\n backend.id,\n backend.connectionRevision ?? 0,\n orgId,\n ] as const;\n\n return useQuery({\n queryKey: [\"config\", \"providers\", ...backendScope],\n queryFn: async ({ client }): Promise<LLMProvider[]> => {\n const verifiedByProvider = await client.fetchQuery({\n queryKey: [...VERIFIED_MODELS_QUERY_KEY, ...backendScope],\n queryFn: fetchVerifiedModelsByProvider,\n staleTime: VERIFIED_MODELS_STALE_TIME,\n });\n // The local backend returns a single page with `next_page_id: null`\n // so this loop is a no-op there; on the cloud backend it walks the\n // cursor to exhaustion.\n return fetchAllProviders(verifiedByProvider, null, new Set(), 0);\n },\n staleTime: VERIFIED_MODELS_STALE_TIME,\n gcTime: VERIFIED_MODELS_GC_TIME,\n });\n};\n"],"mappings":";;;;;AAgBA,IAAM,IAAuB;AAE7B,eAAe,EACb,GACA,GACA,GACA,GACwB;CACxB,IAAI,KAAS,GACX,MAAU,MACR,gEAAgE,EAAM,EACxE;CAGF,IAAM,IAAO,MAAM,EAAc,gBAC/B,IAAS,EAAE,SAAS,EAAO,IAAI,CAAC,GAChC,CACF;CAEA,IAAI,CAAC,EAAK,cACR,OAAO,EAAK;CAKd,IAAI,EAAY,IAAI,EAAK,YAAY,GACnC,MAAU,MACR,8CAA8C,EAAK,cACrD;CAEF,EAAY,IAAI,EAAK,YAAY;CAEjC,IAAM,IAAO,MAAM,EACjB,GACA,EAAK,cACL,GACA,IAAQ,CACV;CACA,OAAO,CAAC,GAAG,EAAK,OAAO,GAAG,CAAI;AAChC;AAEA,IAAa,UAA2B;CAMtC,IAAM,EAAE,YAAS,aAAU,EAAiB,GACtC,IAAe;EACnB,EAAQ;EACR,EAAQ,sBAAsB;EAC9B;CACF;CAEA,OAAO,EAAS;EACd,UAAU;GAAC;GAAU;GAAa,GAAG;EAAY;EACjD,SAAS,OAAO,EAAE,gBAST,EAAkB,MARQ,EAAO,WAAW;GACjD,UAAU,CAAC,GAAG,GAA2B,GAAG,CAAY;GACxD,SAAS;GACT,WAAW;EACb,CAAC,GAI4C,sBAAM,IAAI,IAAI,GAAG,CAAC;EAEjE,WAAW;EACX,QAAQ;CACV,CAAC;AACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../_virtual/_rolldown/runtime.cjs");const e=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),
|
|
1
|
+
require("../../_virtual/_rolldown/runtime.cjs");const e=require("./query-keys.cjs"),t=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),n=require("../../contexts/active-backend-context.cjs"),r=require("../../api/conversation-service/agent-server-conversation-service.api.cjs");var i=1e3*60*5,a=1e3*60*15,o=o=>{let s=o||[],c=n.useActiveBackend();return t.useQuery({queryKey:[...e.CONVERSATION_QUERY_KEYS.subConversations,s,c.backend.id,c.orgId],queryFn:async()=>s.length===0?[]:r.default.batchGetAppConversations(s),enabled:s.length>0,staleTime:i,gcTime:a,retry:!1})};exports.useSubConversations=o;
|
|
2
2
|
//# sourceMappingURL=use-sub-conversations.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sub-conversations.cjs","names":[],"sources":["../../../src/hooks/query/use-sub-conversations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { AppConversation } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\nconst FIVE_MINUTES = 1000 * 60 * 5;\nconst FIFTEEN_MINUTES = 1000 * 60 * 15;\n\n/**\n * React hook to fetch sub-conversations by their IDs\n *\n * @param subConversationIds Array of sub-conversation IDs to fetch\n * @returns React Query result with sub-conversation data, loading, and error states\n *\n * @example\n * ```tsx\n * const { data: subConversations, isLoading, isError } = useSubConversations(\n * conversation.sub_conversation_ids || []\n * );\n * ```\n */\nexport const useSubConversations = (\n subConversationIds: string[] | null | undefined,\n) => {\n const ids = subConversationIds || [];\n const active = useActiveBackend();\n\n return useQuery<(AppConversation | null)[]>({\n // Backend-keyed: a local→cloud→local switch must produce a fresh\n // cache identity for these per-conversation fetches, otherwise a\n // `null` result captured while the cloud backend was active can\n // bleed through to the next local visit. Same invariant as\n // `useUserConversation` and `usePaginatedConversations`.\n queryKey: [\
|
|
1
|
+
{"version":3,"file":"use-sub-conversations.cjs","names":[],"sources":["../../../src/hooks/query/use-sub-conversations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { AppConversation } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { CONVERSATION_QUERY_KEYS } from \"./query-keys\";\n\nconst FIVE_MINUTES = 1000 * 60 * 5;\nconst FIFTEEN_MINUTES = 1000 * 60 * 15;\n\n/**\n * React hook to fetch sub-conversations by their IDs\n *\n * @param subConversationIds Array of sub-conversation IDs to fetch\n * @returns React Query result with sub-conversation data, loading, and error states\n *\n * @example\n * ```tsx\n * const { data: subConversations, isLoading, isError } = useSubConversations(\n * conversation.sub_conversation_ids || []\n * );\n * ```\n */\nexport const useSubConversations = (\n subConversationIds: string[] | null | undefined,\n) => {\n const ids = subConversationIds || [];\n const active = useActiveBackend();\n\n return useQuery<(AppConversation | null)[]>({\n // Backend-keyed: a local→cloud→local switch must produce a fresh\n // cache identity for these per-conversation fetches, otherwise a\n // `null` result captured while the cloud backend was active can\n // bleed through to the next local visit. Same invariant as\n // `useUserConversation` and `usePaginatedConversations`.\n queryKey: [\n ...CONVERSATION_QUERY_KEYS.subConversations,\n ids,\n active.backend.id,\n active.orgId,\n ],\n queryFn: async () => {\n if (ids.length === 0) {\n return [];\n }\n return AgentServerConversationService.batchGetAppConversations(ids);\n },\n enabled: ids.length > 0,\n staleTime: FIVE_MINUTES,\n gcTime: FIFTEEN_MINUTES,\n retry: false,\n });\n};\n"],"mappings":"iTAMA,IAAM,EAAe,IAAO,GAAK,EAC3B,EAAkB,IAAO,GAAK,GAevB,EACX,GACG,CACH,IAAM,EAAM,GAAsB,CAAC,EAC7B,EAAS,EAAA,iBAAiB,EAEhC,OAAO,EAAA,SAAqC,CAM1C,SAAU,CACR,GAAG,EAAA,wBAAwB,iBAC3B,EACA,EAAO,QAAQ,GACf,EAAO,KACT,EACA,QAAS,SACH,EAAI,SAAW,EACV,CAAC,EAEH,EAAA,QAA+B,yBAAyB,CAAG,EAEpE,QAAS,EAAI,OAAS,EACtB,UAAW,EACX,OAAQ,EACR,MAAO,EACT,CAAC,CACH"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import n from "../../
|
|
1
|
+
import { CONVERSATION_QUERY_KEYS as e } from "./query-keys.js";
|
|
2
|
+
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
|
+
import { useActiveBackend as n } from "../../contexts/active-backend-context.js";
|
|
4
|
+
import r from "../../api/conversation-service/agent-server-conversation-service.api.js";
|
|
4
5
|
//#region src/hooks/query/use-sub-conversations.ts
|
|
5
|
-
var
|
|
6
|
-
let
|
|
7
|
-
return
|
|
6
|
+
var i = 1e3 * 60 * 5, a = 1e3 * 60 * 15, o = (o) => {
|
|
7
|
+
let s = o || [], c = n();
|
|
8
|
+
return t({
|
|
8
9
|
queryKey: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
s.orgId
|
|
10
|
+
...e.subConversations,
|
|
11
|
+
s,
|
|
12
|
+
c.backend.id,
|
|
13
|
+
c.orgId
|
|
14
14
|
],
|
|
15
|
-
queryFn: async () =>
|
|
16
|
-
enabled:
|
|
17
|
-
staleTime:
|
|
18
|
-
gcTime:
|
|
15
|
+
queryFn: async () => s.length === 0 ? [] : r.batchGetAppConversations(s),
|
|
16
|
+
enabled: s.length > 0,
|
|
17
|
+
staleTime: i,
|
|
18
|
+
gcTime: a,
|
|
19
19
|
retry: !1
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { o as useSubConversations };
|
|
24
24
|
|
|
25
25
|
//# sourceMappingURL=use-sub-conversations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sub-conversations.js","names":[],"sources":["../../../src/hooks/query/use-sub-conversations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { AppConversation } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\n\nconst FIVE_MINUTES = 1000 * 60 * 5;\nconst FIFTEEN_MINUTES = 1000 * 60 * 15;\n\n/**\n * React hook to fetch sub-conversations by their IDs\n *\n * @param subConversationIds Array of sub-conversation IDs to fetch\n * @returns React Query result with sub-conversation data, loading, and error states\n *\n * @example\n * ```tsx\n * const { data: subConversations, isLoading, isError } = useSubConversations(\n * conversation.sub_conversation_ids || []\n * );\n * ```\n */\nexport const useSubConversations = (\n subConversationIds: string[] | null | undefined,\n) => {\n const ids = subConversationIds || [];\n const active = useActiveBackend();\n\n return useQuery<(AppConversation | null)[]>({\n // Backend-keyed: a local→cloud→local switch must produce a fresh\n // cache identity for these per-conversation fetches, otherwise a\n // `null` result captured while the cloud backend was active can\n // bleed through to the next local visit. Same invariant as\n // `useUserConversation` and `usePaginatedConversations`.\n queryKey: [\
|
|
1
|
+
{"version":3,"file":"use-sub-conversations.js","names":[],"sources":["../../../src/hooks/query/use-sub-conversations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { AppConversation } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { CONVERSATION_QUERY_KEYS } from \"./query-keys\";\n\nconst FIVE_MINUTES = 1000 * 60 * 5;\nconst FIFTEEN_MINUTES = 1000 * 60 * 15;\n\n/**\n * React hook to fetch sub-conversations by their IDs\n *\n * @param subConversationIds Array of sub-conversation IDs to fetch\n * @returns React Query result with sub-conversation data, loading, and error states\n *\n * @example\n * ```tsx\n * const { data: subConversations, isLoading, isError } = useSubConversations(\n * conversation.sub_conversation_ids || []\n * );\n * ```\n */\nexport const useSubConversations = (\n subConversationIds: string[] | null | undefined,\n) => {\n const ids = subConversationIds || [];\n const active = useActiveBackend();\n\n return useQuery<(AppConversation | null)[]>({\n // Backend-keyed: a local→cloud→local switch must produce a fresh\n // cache identity for these per-conversation fetches, otherwise a\n // `null` result captured while the cloud backend was active can\n // bleed through to the next local visit. Same invariant as\n // `useUserConversation` and `usePaginatedConversations`.\n queryKey: [\n ...CONVERSATION_QUERY_KEYS.subConversations,\n ids,\n active.backend.id,\n active.orgId,\n ],\n queryFn: async () => {\n if (ids.length === 0) {\n return [];\n }\n return AgentServerConversationService.batchGetAppConversations(ids);\n },\n enabled: ids.length > 0,\n staleTime: FIVE_MINUTES,\n gcTime: FIFTEEN_MINUTES,\n retry: false,\n });\n};\n"],"mappings":";;;;;AAMA,IAAM,IAAe,MAAO,KAAK,GAC3B,IAAkB,MAAO,KAAK,IAevB,KACX,MACG;CACH,IAAM,IAAM,KAAsB,CAAC,GAC7B,IAAS,EAAiB;CAEhC,OAAO,EAAqC;EAM1C,UAAU;GACR,GAAG,EAAwB;GAC3B;GACA,EAAO,QAAQ;GACf,EAAO;EACT;EACA,SAAS,YACH,EAAI,WAAW,IACV,CAAC,IAEH,EAA+B,yBAAyB,CAAG;EAEpE,SAAS,EAAI,SAAS;EACtB,WAAW;EACX,QAAQ;EACR,OAAO;CACT,CAAC;AACH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../i18n/declaration.cjs"),n=require("../contexts/active-backend-context.cjs"),r=require("./query/use-
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../i18n/declaration.cjs"),n=require("../contexts/active-backend-context.cjs"),r=require("./query/use-settings.cjs"),i=require("./query/use-active-conversation.cjs"),a=require("./use-active-agent-profile.cjs");var o=`/settings/agents`,s=`/settings/llm`;function c(){let{t:c}=e.useTranslation(`openhands`),{backend:l}=n.useActiveBackend(),{data:u}=i.useActiveConversation(),{data:d}=r.useSettings(),f=a.useActiveAgentKind(),p=u?.agent_kind===`acp`,m=!u&&(f??d?.agent_settings?.agent_kind)===`acp`,h=p||m;return{isActiveAcpConversation:p,isHomeAcp:m,isAcpContext:h,destinationPath:h?o:s,destinationLabel:c(h?t.I18nKey.SETTINGS$NAV_AGENT:l.kind===`cloud`?t.I18nKey.SETTINGS$LLM_SETTINGS:t.I18nKey.SETTINGS$LLM_PROFILES)}}exports.useAcpModelContext=c;
|
|
2
2
|
//# sourceMappingURL=use-acp-model-context.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useTranslation as e } from "../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
2
|
import { I18nKey as t } from "../i18n/declaration.js";
|
|
3
3
|
import { useActiveBackend as n } from "../contexts/active-backend-context.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useSettings as r } from "./query/use-settings.js";
|
|
5
|
+
import { useActiveConversation as i } from "./query/use-active-conversation.js";
|
|
6
6
|
import { useActiveAgentKind as a } from "./use-active-agent-profile.js";
|
|
7
7
|
//#region src/hooks/use-acp-model-context.ts
|
|
8
8
|
var o = "/settings/agents", s = "/settings/llm";
|
|
9
9
|
function c() {
|
|
10
|
-
let { t: c } = e("openhands"), { backend: l } = n(), { data: u } =
|
|
10
|
+
let { t: c } = e("openhands"), { backend: l } = n(), { data: u } = i(), { data: d } = r(), f = a(), p = u?.agent_kind === "acp", m = !u && (f ?? d?.agent_settings?.agent_kind) === "acp", h = p || m;
|
|
11
11
|
return {
|
|
12
12
|
isActiveAcpConversation: p,
|
|
13
13
|
isHomeAcp: m,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../types/agent-state.cjs"),t=require("../types/agent-server/core/base/common.cjs"),n=require("../stores/conversation-state-store.cjs"),
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../types/agent-state.cjs"),t=require("../types/agent-server/core/base/common.cjs"),n=require("./use-conversation-id.cjs"),r=require("../stores/conversation-store.cjs"),i=require("../stores/conversation-state-store.cjs"),a=require("./query/use-active-conversation.cjs");let o=require("react");function s(n){if(!n)return e.AgentState.LOADING;switch(n){case t.ExecutionStatus.IDLE:return e.AgentState.AWAITING_USER_INPUT;case t.ExecutionStatus.RUNNING:return e.AgentState.RUNNING;case t.ExecutionStatus.PAUSED:return e.AgentState.PAUSED;case t.ExecutionStatus.WAITING_FOR_CONFIRMATION:return e.AgentState.AWAITING_USER_CONFIRMATION;case t.ExecutionStatus.FINISHED:return e.AgentState.FINISHED;case t.ExecutionStatus.ERROR:return e.AgentState.ERROR;case t.ExecutionStatus.STUCK:return e.AgentState.ERROR;default:return e.AgentState.LOADING}}function c(e){let{conversationId:t}=n.useOptionalConversationId(),r=e??t,c=!e||e===t,l=i.useConversationStateStore(e=>r?e.executionStatusByConversation[r]??null:null),u=a.useActiveConversation().data?.execution_status??null,d=l??(c?u:null);return{curAgentState:(0,o.useMemo)(()=>s(d),[d]),executionStatus:d}}function l(){let t=r.useConversationStore(e=>e.localPlanningConversationId),{curAgentState:n}=c(t??void 0);return{localPlanningConversationId:t,curPlanningAgentState:n,isPlanningAgentRunning:!!t&&(n===e.AgentState.RUNNING||n===e.AgentState.LOADING)}}exports.useAgentState=c,exports.usePlanningAgentState=l;
|
|
2
2
|
//# sourceMappingURL=use-agent-state.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-state.cjs","names":[],"sources":["../../src/hooks/use-agent-state.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useConversationStateStore } from \"#/stores/conversation-state-store\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\n\n/**\n * Maps agent execution status to AgentState\n */\nfunction mapExecutionStatusToAgentState(\n status: ExecutionStatus | null,\n): AgentState {\n if (!status) {\n return AgentState.LOADING;\n }\n\n switch (status) {\n case ExecutionStatus.IDLE:\n return AgentState.AWAITING_USER_INPUT;\n case ExecutionStatus.RUNNING:\n return AgentState.RUNNING;\n case ExecutionStatus.PAUSED:\n return AgentState.PAUSED;\n case ExecutionStatus.WAITING_FOR_CONFIRMATION:\n return AgentState.AWAITING_USER_CONFIRMATION;\n case ExecutionStatus.FINISHED:\n return AgentState.FINISHED;\n case ExecutionStatus.ERROR:\n return AgentState.ERROR;\n case ExecutionStatus.STUCK:\n return AgentState.ERROR; // Map STUCK to ERROR for now\n default:\n return AgentState.LOADING;\n }\n}\n\nexport interface UseAgentStateResult {\n curAgentState: AgentState;\n executionStatus?: ExecutionStatus | null;\n}\n\n/**\n * Returns the current agent state from conversation execution status.\n */\nexport function useAgentState(): UseAgentStateResult {\n const
|
|
1
|
+
{"version":3,"file":"use-agent-state.cjs","names":[],"sources":["../../src/hooks/use-agent-state.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useConversationStateStore } from \"#/stores/conversation-state-store\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\n\n/**\n * Maps agent execution status to AgentState\n */\nfunction mapExecutionStatusToAgentState(\n status: ExecutionStatus | null,\n): AgentState {\n if (!status) {\n return AgentState.LOADING;\n }\n\n switch (status) {\n case ExecutionStatus.IDLE:\n return AgentState.AWAITING_USER_INPUT;\n case ExecutionStatus.RUNNING:\n return AgentState.RUNNING;\n case ExecutionStatus.PAUSED:\n return AgentState.PAUSED;\n case ExecutionStatus.WAITING_FOR_CONFIRMATION:\n return AgentState.AWAITING_USER_CONFIRMATION;\n case ExecutionStatus.FINISHED:\n return AgentState.FINISHED;\n case ExecutionStatus.ERROR:\n return AgentState.ERROR;\n case ExecutionStatus.STUCK:\n return AgentState.ERROR; // Map STUCK to ERROR for now\n default:\n return AgentState.LOADING;\n }\n}\n\nexport interface UseAgentStateResult {\n curAgentState: AgentState;\n executionStatus?: ExecutionStatus | null;\n}\n\n/**\n * Returns the current agent state from conversation execution status.\n *\n * Defaults to the conversation in the current route. Pass `conversationId`\n * to read another conversation's status instead — e.g. a local planner\n * helper conversation, whose run/idle transitions are tracked separately\n * from the main conversation's (see conversation-state-store.ts).\n */\nexport function useAgentState(conversationId?: string): UseAgentStateResult {\n const { conversationId: routeConversationId } = useOptionalConversationId();\n const targetConversationId = conversationId ?? routeConversationId;\n const isRouteConversation =\n !conversationId || conversationId === routeConversationId;\n\n const liveExecutionStatus = useConversationStateStore((state) =>\n targetConversationId\n ? (state.executionStatusByConversation[targetConversationId] ?? null)\n : null,\n );\n // The REST fallback only ever describes the route's own conversation, so it\n // only applies when no other conversation was explicitly requested.\n const routeConversationExecutionStatus =\n useActiveConversation().data?.execution_status ?? null;\n const fallbackExecutionStatus = isRouteConversation\n ? routeConversationExecutionStatus\n : null;\n\n const executionStatus = liveExecutionStatus ?? fallbackExecutionStatus;\n const curAgentState = useMemo(\n () => mapExecutionStatusToAgentState(executionStatus),\n [executionStatus],\n );\n\n return { curAgentState, executionStatus };\n}\n\nexport interface UsePlanningAgentStateResult {\n localPlanningConversationId: string | null;\n curPlanningAgentState: AgentState;\n /** Running or loading. `false` (not \"unknown\") when there's no planner yet. */\n isPlanningAgentRunning: boolean;\n}\n\n/**\n * The local planner helper's own state — read separately from the main\n * conversation's via `useAgentState` since the two run independently.\n */\nexport function usePlanningAgentState(): UsePlanningAgentStateResult {\n const localPlanningConversationId = useConversationStore(\n (state) => state.localPlanningConversationId,\n );\n const { curAgentState: curPlanningAgentState } = useAgentState(\n localPlanningConversationId ?? undefined,\n );\n const isPlanningAgentRunning =\n !!localPlanningConversationId &&\n (curPlanningAgentState === AgentState.RUNNING ||\n curPlanningAgentState === AgentState.LOADING);\n return {\n localPlanningConversationId,\n curPlanningAgentState,\n isPlanningAgentRunning,\n };\n}\n"],"mappings":"kWAWA,SAAS,EACP,EACY,CACZ,GAAI,CAAC,EACH,OAAO,EAAA,WAAW,QAGpB,OAAQ,EAAR,CACE,KAAK,EAAA,gBAAgB,KACnB,OAAO,EAAA,WAAW,oBACpB,KAAK,EAAA,gBAAgB,QACnB,OAAO,EAAA,WAAW,QACpB,KAAK,EAAA,gBAAgB,OACnB,OAAO,EAAA,WAAW,OACpB,KAAK,EAAA,gBAAgB,yBACnB,OAAO,EAAA,WAAW,2BACpB,KAAK,EAAA,gBAAgB,SACnB,OAAO,EAAA,WAAW,SACpB,KAAK,EAAA,gBAAgB,MACnB,OAAO,EAAA,WAAW,MACpB,KAAK,EAAA,gBAAgB,MACnB,OAAO,EAAA,WAAW,MACpB,QACE,OAAO,EAAA,WAAW,OACtB,CACF,CAeA,SAAgB,EAAc,EAA8C,CAC1E,GAAM,CAAE,eAAgB,GAAwB,EAAA,0BAA0B,EACpE,EAAuB,GAAkB,EACzC,EACJ,CAAC,GAAkB,IAAmB,EAElC,EAAsB,EAAA,0BAA2B,GACrD,EACK,EAAM,8BAA8B,IAAyB,KAC9D,IACN,EAGM,EACJ,EAAA,sBAAsB,EAAE,MAAM,kBAAoB,KAK9C,EAAkB,IAJQ,EAC5B,EACA,MAQJ,MAAO,CAAE,eAAA,EAAA,EAAA,aAJD,EAA+B,CAAe,EACpD,CAAC,CAAe,CAGT,EAAe,iBAAgB,CAC1C,CAaA,SAAgB,GAAqD,CACnE,IAAM,EAA8B,EAAA,qBACjC,GAAU,EAAM,2BACnB,EACM,CAAE,cAAe,GAA0B,EAC/C,GAA+B,IAAA,EACjC,EAKA,MAAO,CACL,8BACA,wBACA,uBANA,CAAC,CAAC,IACD,IAA0B,EAAA,WAAW,SACpC,IAA0B,EAAA,WAAW,QAKzC,CACF"}
|
|
@@ -6,5 +6,21 @@ export interface UseAgentStateResult {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Returns the current agent state from conversation execution status.
|
|
9
|
+
*
|
|
10
|
+
* Defaults to the conversation in the current route. Pass `conversationId`
|
|
11
|
+
* to read another conversation's status instead — e.g. a local planner
|
|
12
|
+
* helper conversation, whose run/idle transitions are tracked separately
|
|
13
|
+
* from the main conversation's (see conversation-state-store.ts).
|
|
9
14
|
*/
|
|
10
|
-
export declare function useAgentState(): UseAgentStateResult;
|
|
15
|
+
export declare function useAgentState(conversationId?: string): UseAgentStateResult;
|
|
16
|
+
export interface UsePlanningAgentStateResult {
|
|
17
|
+
localPlanningConversationId: string | null;
|
|
18
|
+
curPlanningAgentState: AgentState;
|
|
19
|
+
/** Running or loading. `false` (not "unknown") when there's no planner yet. */
|
|
20
|
+
isPlanningAgentRunning: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The local planner helper's own state — read separately from the main
|
|
24
|
+
* conversation's via `useAgentState` since the two run independently.
|
|
25
|
+
*/
|
|
26
|
+
export declare function usePlanningAgentState(): UsePlanningAgentStateResult;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AgentState as e } from "../types/agent-state.js";
|
|
2
2
|
import { ExecutionStatus as t } from "../types/agent-server/core/base/common.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useOptionalConversationId as n } from "./use-conversation-id.js";
|
|
4
|
+
import { useConversationStore as r } from "../stores/conversation-store.js";
|
|
5
|
+
import { useConversationStateStore as i } from "../stores/conversation-state-store.js";
|
|
6
|
+
import { useActiveConversation as a } from "./query/use-active-conversation.js";
|
|
7
|
+
import { useMemo as o } from "react";
|
|
6
8
|
//#region src/hooks/use-agent-state.ts
|
|
7
|
-
function
|
|
9
|
+
function s(n) {
|
|
8
10
|
if (!n) return e.LOADING;
|
|
9
11
|
switch (n) {
|
|
10
12
|
case t.IDLE: return e.AWAITING_USER_INPUT;
|
|
@@ -17,14 +19,22 @@ function a(n) {
|
|
|
17
19
|
default: return e.LOADING;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
+
function c(e) {
|
|
23
|
+
let { conversationId: t } = n(), r = e ?? t, c = !e || e === t, l = i((e) => r ? e.executionStatusByConversation[r] ?? null : null), u = a().data?.execution_status ?? null, d = l ?? (c ? u : null);
|
|
22
24
|
return {
|
|
23
|
-
curAgentState:
|
|
24
|
-
executionStatus:
|
|
25
|
+
curAgentState: o(() => s(d), [d]),
|
|
26
|
+
executionStatus: d
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function l() {
|
|
30
|
+
let t = r((e) => e.localPlanningConversationId), { curAgentState: n } = c(t ?? void 0);
|
|
31
|
+
return {
|
|
32
|
+
localPlanningConversationId: t,
|
|
33
|
+
curPlanningAgentState: n,
|
|
34
|
+
isPlanningAgentRunning: !!t && (n === e.RUNNING || n === e.LOADING)
|
|
25
35
|
};
|
|
26
36
|
}
|
|
27
37
|
//#endregion
|
|
28
|
-
export {
|
|
38
|
+
export { c as useAgentState, l as usePlanningAgentState };
|
|
29
39
|
|
|
30
40
|
//# sourceMappingURL=use-agent-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent-state.js","names":[],"sources":["../../src/hooks/use-agent-state.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useConversationStateStore } from \"#/stores/conversation-state-store\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\n\n/**\n * Maps agent execution status to AgentState\n */\nfunction mapExecutionStatusToAgentState(\n status: ExecutionStatus | null,\n): AgentState {\n if (!status) {\n return AgentState.LOADING;\n }\n\n switch (status) {\n case ExecutionStatus.IDLE:\n return AgentState.AWAITING_USER_INPUT;\n case ExecutionStatus.RUNNING:\n return AgentState.RUNNING;\n case ExecutionStatus.PAUSED:\n return AgentState.PAUSED;\n case ExecutionStatus.WAITING_FOR_CONFIRMATION:\n return AgentState.AWAITING_USER_CONFIRMATION;\n case ExecutionStatus.FINISHED:\n return AgentState.FINISHED;\n case ExecutionStatus.ERROR:\n return AgentState.ERROR;\n case ExecutionStatus.STUCK:\n return AgentState.ERROR; // Map STUCK to ERROR for now\n default:\n return AgentState.LOADING;\n }\n}\n\nexport interface UseAgentStateResult {\n curAgentState: AgentState;\n executionStatus?: ExecutionStatus | null;\n}\n\n/**\n * Returns the current agent state from conversation execution status.\n */\nexport function useAgentState(): UseAgentStateResult {\n const
|
|
1
|
+
{"version":3,"file":"use-agent-state.js","names":[],"sources":["../../src/hooks/use-agent-state.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useConversationStateStore } from \"#/stores/conversation-state-store\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { ExecutionStatus } from \"#/types/agent-server/core/base/common\";\n\n/**\n * Maps agent execution status to AgentState\n */\nfunction mapExecutionStatusToAgentState(\n status: ExecutionStatus | null,\n): AgentState {\n if (!status) {\n return AgentState.LOADING;\n }\n\n switch (status) {\n case ExecutionStatus.IDLE:\n return AgentState.AWAITING_USER_INPUT;\n case ExecutionStatus.RUNNING:\n return AgentState.RUNNING;\n case ExecutionStatus.PAUSED:\n return AgentState.PAUSED;\n case ExecutionStatus.WAITING_FOR_CONFIRMATION:\n return AgentState.AWAITING_USER_CONFIRMATION;\n case ExecutionStatus.FINISHED:\n return AgentState.FINISHED;\n case ExecutionStatus.ERROR:\n return AgentState.ERROR;\n case ExecutionStatus.STUCK:\n return AgentState.ERROR; // Map STUCK to ERROR for now\n default:\n return AgentState.LOADING;\n }\n}\n\nexport interface UseAgentStateResult {\n curAgentState: AgentState;\n executionStatus?: ExecutionStatus | null;\n}\n\n/**\n * Returns the current agent state from conversation execution status.\n *\n * Defaults to the conversation in the current route. Pass `conversationId`\n * to read another conversation's status instead — e.g. a local planner\n * helper conversation, whose run/idle transitions are tracked separately\n * from the main conversation's (see conversation-state-store.ts).\n */\nexport function useAgentState(conversationId?: string): UseAgentStateResult {\n const { conversationId: routeConversationId } = useOptionalConversationId();\n const targetConversationId = conversationId ?? routeConversationId;\n const isRouteConversation =\n !conversationId || conversationId === routeConversationId;\n\n const liveExecutionStatus = useConversationStateStore((state) =>\n targetConversationId\n ? (state.executionStatusByConversation[targetConversationId] ?? null)\n : null,\n );\n // The REST fallback only ever describes the route's own conversation, so it\n // only applies when no other conversation was explicitly requested.\n const routeConversationExecutionStatus =\n useActiveConversation().data?.execution_status ?? null;\n const fallbackExecutionStatus = isRouteConversation\n ? routeConversationExecutionStatus\n : null;\n\n const executionStatus = liveExecutionStatus ?? fallbackExecutionStatus;\n const curAgentState = useMemo(\n () => mapExecutionStatusToAgentState(executionStatus),\n [executionStatus],\n );\n\n return { curAgentState, executionStatus };\n}\n\nexport interface UsePlanningAgentStateResult {\n localPlanningConversationId: string | null;\n curPlanningAgentState: AgentState;\n /** Running or loading. `false` (not \"unknown\") when there's no planner yet. */\n isPlanningAgentRunning: boolean;\n}\n\n/**\n * The local planner helper's own state — read separately from the main\n * conversation's via `useAgentState` since the two run independently.\n */\nexport function usePlanningAgentState(): UsePlanningAgentStateResult {\n const localPlanningConversationId = useConversationStore(\n (state) => state.localPlanningConversationId,\n );\n const { curAgentState: curPlanningAgentState } = useAgentState(\n localPlanningConversationId ?? undefined,\n );\n const isPlanningAgentRunning =\n !!localPlanningConversationId &&\n (curPlanningAgentState === AgentState.RUNNING ||\n curPlanningAgentState === AgentState.LOADING);\n return {\n localPlanningConversationId,\n curPlanningAgentState,\n isPlanningAgentRunning,\n };\n}\n"],"mappings":";;;;;;;;AAWA,SAAS,EACP,GACY;CACZ,IAAI,CAAC,GACH,OAAO,EAAW;CAGpB,QAAQ,GAAR;EACE,KAAK,EAAgB,MACnB,OAAO,EAAW;EACpB,KAAK,EAAgB,SACnB,OAAO,EAAW;EACpB,KAAK,EAAgB,QACnB,OAAO,EAAW;EACpB,KAAK,EAAgB,0BACnB,OAAO,EAAW;EACpB,KAAK,EAAgB,UACnB,OAAO,EAAW;EACpB,KAAK,EAAgB,OACnB,OAAO,EAAW;EACpB,KAAK,EAAgB,OACnB,OAAO,EAAW;EACpB,SACE,OAAO,EAAW;CACtB;AACF;AAeA,SAAgB,EAAc,GAA8C;CAC1E,IAAM,EAAE,gBAAgB,MAAwB,EAA0B,GACpE,IAAuB,KAAkB,GACzC,IACJ,CAAC,KAAkB,MAAmB,GAElC,IAAsB,GAA2B,MACrD,IACK,EAAM,8BAA8B,MAAyB,OAC9D,IACN,GAGM,IACJ,EAAsB,EAAE,MAAM,oBAAoB,MAK9C,IAAkB,MAJQ,IAC5B,IACA;CAQJ,OAAO;EAAE,eALa,QACd,EAA+B,CAAe,GACpD,CAAC,CAAe,CAGT;EAAe;CAAgB;AAC1C;AAaA,SAAgB,IAAqD;CACnE,IAAM,IAA8B,GACjC,MAAU,EAAM,2BACnB,GACM,EAAE,eAAe,MAA0B,EAC/C,KAA+B,KAAA,CACjC;CAKA,OAAO;EACL;EACA;EACA,wBANA,CAAC,CAAC,MACD,MAA0B,EAAW,WACpC,MAA0B,EAAW;CAKzC;AACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),t=require("../contexts/active-backend-context.cjs"),n=require("../api/cloud/organization-service.api.cjs"),r=require("./query/use-cloud-current-user-id.cjs");var i=`view_automations`,a=`manage_automations`;function o(){let{backend:r,orgId:o}=t.useActiveBackend(),s=r.kind===`cloud`,{data:c,isLoading:l}=e.useQuery({queryKey:[`cloud-current-user`,r.id,o,r.connectionRevision??0],queryFn:()=>n.getCloudOrganizationMe(o,r),enabled:s&&!!o,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});if(!s)return{canView:!0,canManage:!0,isLoading:!1};if(l||!c)return{canView:!1,canManage:!1,isLoading:l};if(c.permissions)return{canView:c.permissions.includes(i),canManage:c.permissions.includes(a),isLoading:!1};let u=c.role===`owner`||c.role===`admin`;return{canView:u||c.role===`member`,canManage:u,isLoading:!1}}function s(e){let{backend:n}=t.useActiveBackend(),i=r.useCloudCurrentUserId();if(n.kind!==`cloud`)return!0;let a=i[n.id];return!a||a.isLoading||!a.userId?!1:e.user_id===a.userId}exports.useAutomationPermissions=o,exports.useIsAutomationOwner=s;
|
|
2
|
+
//# sourceMappingURL=use-automation-permissions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-automation-permissions.cjs","names":[],"sources":["../../src/hooks/use-automation-permissions.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { getCloudOrganizationMe } from \"#/api/cloud/organization-service.api\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useCloudCurrentUserId } from \"./query/use-cloud-current-user-id\";\nimport type { Automation } from \"#/types/automation\";\n\n/**\n * Server-defined permission strings (mirror the automation service's\n * `view_automations` / `manage_automations` and the enterprise\n * `authorization.Permission` enum). The `/me` endpoint returns whichever\n * subset the caller's role grants.\n */\nexport const VIEW_AUTOMATIONS = \"view_automations\";\nexport const MANAGE_AUTOMATIONS = \"manage_automations\";\n\nexport interface AutomationPermissionsResult {\n /** Read-only access (list, get, list runs, capabilities, git-sync status). */\n canView: boolean;\n /** Full write access (create, update, delete, dispatch, git-sync config). */\n canManage: boolean;\n /**\n * `true` when permissions are still being resolved on cloud. Local always\n * resolves synchronously. Mutating controls should stay hidden while this is\n * `true` so a member never sees a flash of write controls before the\n * server-defined permission set arrives.\n */\n isLoading: boolean;\n}\n\n/**\n * Resolve the caller's automation-level permissions on the active backend.\n *\n * - Local agent-server (OSS): always `{ canView: true, canManage: true }`.\n * - Cloud: reads the server-defined `permissions` array from\n * `GET /api/organizations/{orgId}/me` (same query `useCloudCurrentUserId`\n * and `useCanManageOrgProfiles` use, so no extra request is issued) and\n * falls back to a role check (`owner`/`admin` ⇒ both, `member` ⇒ view\n * only) when an older app-server doesn't return `permissions`.\n */\nexport function useAutomationPermissions(): AutomationPermissionsResult {\n const { backend, orgId } = useActiveBackend();\n const isCloud = backend.kind === \"cloud\";\n\n // eslint-disable-next-line @tanstack/query/exhaustive-deps\n const { data, isLoading } = useQuery({\n queryKey: [\n \"cloud-current-user\",\n backend.id,\n orgId,\n backend.connectionRevision ?? 0,\n ],\n queryFn: () => getCloudOrganizationMe(orgId!, backend),\n enabled: isCloud && !!orgId,\n staleTime: 1000 * 60 * 5,\n retry: false,\n meta: { disableToast: true },\n });\n\n if (!isCloud) {\n return { canView: true, canManage: true, isLoading: false };\n }\n\n if (isLoading || !data) {\n return { canView: false, canManage: false, isLoading };\n }\n\n if (data.permissions) {\n const canView = data.permissions.includes(VIEW_AUTOMATIONS);\n const canManage = data.permissions.includes(MANAGE_AUTOMATIONS);\n return { canView, canManage, isLoading: false };\n }\n\n // Fall back to role check for older app-servers without `permissions`.\n const isOwnerOrAdmin = data.role === \"owner\" || data.role === \"admin\";\n return {\n canView: isOwnerOrAdmin || data.role === \"member\",\n canManage: isOwnerOrAdmin,\n isLoading: false,\n };\n}\n\n/**\n * Resolve whether the current user is the creator of the given automation.\n *\n * - Local: always `true` (the local user owns every automation; and since\n * local always has `manage_automations`, the distinction is moot).\n * - Cloud: compares `automation.user_id` with the caller's `user_id` from\n * `GET /api/organizations/{orgId}/me`. Returns `false` while the id is\n * still loading so the creator escape hatch never flashes open prematurely.\n */\nexport function useIsAutomationOwner(automation: Automation): boolean {\n const { backend } = useActiveBackend();\n // Always call the hook so rules-of-hooks is satisfied; it's a no-op for\n // local backends since the early return below short-circuits before use.\n const userIds = useCloudCurrentUserId();\n\n if (backend.kind !== \"cloud\") return true;\n\n const entry = userIds[backend.id];\n if (!entry || entry.isLoading || !entry.userId) return false;\n return automation.user_id === entry.userId;\n}\n"],"mappings":"8RAYA,IAAa,EAAmB,mBACnB,EAAqB,qBA0BlC,SAAgB,GAAwD,CACtE,GAAM,CAAE,UAAS,SAAU,EAAA,iBAAiB,EACtC,EAAU,EAAQ,OAAS,QAG3B,CAAE,OAAM,aAAc,EAAA,SAAS,CACnC,SAAU,CACR,qBACA,EAAQ,GACR,EACA,EAAQ,oBAAsB,CAChC,EACA,YAAe,EAAA,uBAAuB,EAAQ,CAAO,EACrD,QAAS,GAAW,CAAC,CAAC,EACtB,UAAW,IAAO,GAAK,EACvB,MAAO,GACP,KAAM,CAAE,aAAc,EAAK,CAC7B,CAAC,EAED,GAAI,CAAC,EACH,MAAO,CAAE,QAAS,GAAM,UAAW,GAAM,UAAW,EAAM,EAG5D,GAAI,GAAa,CAAC,EAChB,MAAO,CAAE,QAAS,GAAO,UAAW,GAAO,WAAU,EAGvD,GAAI,EAAK,YAGP,MAAO,CAAE,QAFO,EAAK,YAAY,SAAS,CAEjC,EAAS,UADA,EAAK,YAAY,SAAS,CAC1B,EAAW,UAAW,EAAM,EAIhD,IAAM,EAAiB,EAAK,OAAS,SAAW,EAAK,OAAS,QAC9D,MAAO,CACL,QAAS,GAAkB,EAAK,OAAS,SACzC,UAAW,EACX,UAAW,EACb,CACF,CAWA,SAAgB,EAAqB,EAAiC,CACpE,GAAM,CAAE,WAAY,EAAA,iBAAiB,EAG/B,EAAU,EAAA,sBAAsB,EAEtC,GAAI,EAAQ,OAAS,QAAS,MAAO,GAErC,IAAM,EAAQ,EAAQ,EAAQ,IAE9B,MADI,CAAC,GAAS,EAAM,WAAa,CAAC,EAAM,OAAe,GAChD,EAAW,UAAY,EAAM,MACtC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Automation } from "#/types/automation";
|
|
2
|
+
/**
|
|
3
|
+
* Server-defined permission strings (mirror the automation service's
|
|
4
|
+
* `view_automations` / `manage_automations` and the enterprise
|
|
5
|
+
* `authorization.Permission` enum). The `/me` endpoint returns whichever
|
|
6
|
+
* subset the caller's role grants.
|
|
7
|
+
*/
|
|
8
|
+
export declare const VIEW_AUTOMATIONS = "view_automations";
|
|
9
|
+
export declare const MANAGE_AUTOMATIONS = "manage_automations";
|
|
10
|
+
export interface AutomationPermissionsResult {
|
|
11
|
+
/** Read-only access (list, get, list runs, capabilities, git-sync status). */
|
|
12
|
+
canView: boolean;
|
|
13
|
+
/** Full write access (create, update, delete, dispatch, git-sync config). */
|
|
14
|
+
canManage: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* `true` when permissions are still being resolved on cloud. Local always
|
|
17
|
+
* resolves synchronously. Mutating controls should stay hidden while this is
|
|
18
|
+
* `true` so a member never sees a flash of write controls before the
|
|
19
|
+
* server-defined permission set arrives.
|
|
20
|
+
*/
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Resolve the caller's automation-level permissions on the active backend.
|
|
25
|
+
*
|
|
26
|
+
* - Local agent-server (OSS): always `{ canView: true, canManage: true }`.
|
|
27
|
+
* - Cloud: reads the server-defined `permissions` array from
|
|
28
|
+
* `GET /api/organizations/{orgId}/me` (same query `useCloudCurrentUserId`
|
|
29
|
+
* and `useCanManageOrgProfiles` use, so no extra request is issued) and
|
|
30
|
+
* falls back to a role check (`owner`/`admin` ⇒ both, `member` ⇒ view
|
|
31
|
+
* only) when an older app-server doesn't return `permissions`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useAutomationPermissions(): AutomationPermissionsResult;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve whether the current user is the creator of the given automation.
|
|
36
|
+
*
|
|
37
|
+
* - Local: always `true` (the local user owns every automation; and since
|
|
38
|
+
* local always has `manage_automations`, the distinction is moot).
|
|
39
|
+
* - Cloud: compares `automation.user_id` with the caller's `user_id` from
|
|
40
|
+
* `GET /api/organizations/{orgId}/me`. Returns `false` while the id is
|
|
41
|
+
* still loading so the creator escape hatch never flashes open prematurely.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useIsAutomationOwner(automation: Automation): boolean;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useQuery as e } from "../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
2
|
+
import { useActiveBackend as t } from "../contexts/active-backend-context.js";
|
|
3
|
+
import { getCloudOrganizationMe as n } from "../api/cloud/organization-service.api.js";
|
|
4
|
+
import { useCloudCurrentUserId as r } from "./query/use-cloud-current-user-id.js";
|
|
5
|
+
//#region src/hooks/use-automation-permissions.ts
|
|
6
|
+
var i = "view_automations", a = "manage_automations";
|
|
7
|
+
function o() {
|
|
8
|
+
let { backend: r, orgId: o } = t(), s = r.kind === "cloud", { data: c, isLoading: l } = e({
|
|
9
|
+
queryKey: [
|
|
10
|
+
"cloud-current-user",
|
|
11
|
+
r.id,
|
|
12
|
+
o,
|
|
13
|
+
r.connectionRevision ?? 0
|
|
14
|
+
],
|
|
15
|
+
queryFn: () => n(o, r),
|
|
16
|
+
enabled: s && !!o,
|
|
17
|
+
staleTime: 1e3 * 60 * 5,
|
|
18
|
+
retry: !1,
|
|
19
|
+
meta: { disableToast: !0 }
|
|
20
|
+
});
|
|
21
|
+
if (!s) return {
|
|
22
|
+
canView: !0,
|
|
23
|
+
canManage: !0,
|
|
24
|
+
isLoading: !1
|
|
25
|
+
};
|
|
26
|
+
if (l || !c) return {
|
|
27
|
+
canView: !1,
|
|
28
|
+
canManage: !1,
|
|
29
|
+
isLoading: l
|
|
30
|
+
};
|
|
31
|
+
if (c.permissions) return {
|
|
32
|
+
canView: c.permissions.includes(i),
|
|
33
|
+
canManage: c.permissions.includes(a),
|
|
34
|
+
isLoading: !1
|
|
35
|
+
};
|
|
36
|
+
let u = c.role === "owner" || c.role === "admin";
|
|
37
|
+
return {
|
|
38
|
+
canView: u || c.role === "member",
|
|
39
|
+
canManage: u,
|
|
40
|
+
isLoading: !1
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function s(e) {
|
|
44
|
+
let { backend: n } = t(), i = r();
|
|
45
|
+
if (n.kind !== "cloud") return !0;
|
|
46
|
+
let a = i[n.id];
|
|
47
|
+
return !a || a.isLoading || !a.userId ? !1 : e.user_id === a.userId;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { o as useAutomationPermissions, s as useIsAutomationOwner };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=use-automation-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-automation-permissions.js","names":[],"sources":["../../src/hooks/use-automation-permissions.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { getCloudOrganizationMe } from \"#/api/cloud/organization-service.api\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { useCloudCurrentUserId } from \"./query/use-cloud-current-user-id\";\nimport type { Automation } from \"#/types/automation\";\n\n/**\n * Server-defined permission strings (mirror the automation service's\n * `view_automations` / `manage_automations` and the enterprise\n * `authorization.Permission` enum). The `/me` endpoint returns whichever\n * subset the caller's role grants.\n */\nexport const VIEW_AUTOMATIONS = \"view_automations\";\nexport const MANAGE_AUTOMATIONS = \"manage_automations\";\n\nexport interface AutomationPermissionsResult {\n /** Read-only access (list, get, list runs, capabilities, git-sync status). */\n canView: boolean;\n /** Full write access (create, update, delete, dispatch, git-sync config). */\n canManage: boolean;\n /**\n * `true` when permissions are still being resolved on cloud. Local always\n * resolves synchronously. Mutating controls should stay hidden while this is\n * `true` so a member never sees a flash of write controls before the\n * server-defined permission set arrives.\n */\n isLoading: boolean;\n}\n\n/**\n * Resolve the caller's automation-level permissions on the active backend.\n *\n * - Local agent-server (OSS): always `{ canView: true, canManage: true }`.\n * - Cloud: reads the server-defined `permissions` array from\n * `GET /api/organizations/{orgId}/me` (same query `useCloudCurrentUserId`\n * and `useCanManageOrgProfiles` use, so no extra request is issued) and\n * falls back to a role check (`owner`/`admin` ⇒ both, `member` ⇒ view\n * only) when an older app-server doesn't return `permissions`.\n */\nexport function useAutomationPermissions(): AutomationPermissionsResult {\n const { backend, orgId } = useActiveBackend();\n const isCloud = backend.kind === \"cloud\";\n\n // eslint-disable-next-line @tanstack/query/exhaustive-deps\n const { data, isLoading } = useQuery({\n queryKey: [\n \"cloud-current-user\",\n backend.id,\n orgId,\n backend.connectionRevision ?? 0,\n ],\n queryFn: () => getCloudOrganizationMe(orgId!, backend),\n enabled: isCloud && !!orgId,\n staleTime: 1000 * 60 * 5,\n retry: false,\n meta: { disableToast: true },\n });\n\n if (!isCloud) {\n return { canView: true, canManage: true, isLoading: false };\n }\n\n if (isLoading || !data) {\n return { canView: false, canManage: false, isLoading };\n }\n\n if (data.permissions) {\n const canView = data.permissions.includes(VIEW_AUTOMATIONS);\n const canManage = data.permissions.includes(MANAGE_AUTOMATIONS);\n return { canView, canManage, isLoading: false };\n }\n\n // Fall back to role check for older app-servers without `permissions`.\n const isOwnerOrAdmin = data.role === \"owner\" || data.role === \"admin\";\n return {\n canView: isOwnerOrAdmin || data.role === \"member\",\n canManage: isOwnerOrAdmin,\n isLoading: false,\n };\n}\n\n/**\n * Resolve whether the current user is the creator of the given automation.\n *\n * - Local: always `true` (the local user owns every automation; and since\n * local always has `manage_automations`, the distinction is moot).\n * - Cloud: compares `automation.user_id` with the caller's `user_id` from\n * `GET /api/organizations/{orgId}/me`. Returns `false` while the id is\n * still loading so the creator escape hatch never flashes open prematurely.\n */\nexport function useIsAutomationOwner(automation: Automation): boolean {\n const { backend } = useActiveBackend();\n // Always call the hook so rules-of-hooks is satisfied; it's a no-op for\n // local backends since the early return below short-circuits before use.\n const userIds = useCloudCurrentUserId();\n\n if (backend.kind !== \"cloud\") return true;\n\n const entry = userIds[backend.id];\n if (!entry || entry.isLoading || !entry.userId) return false;\n return automation.user_id === entry.userId;\n}\n"],"mappings":";;;;;AAYA,IAAa,IAAmB,oBACnB,IAAqB;AA0BlC,SAAgB,IAAwD;CACtE,IAAM,EAAE,YAAS,aAAU,EAAiB,GACtC,IAAU,EAAQ,SAAS,SAG3B,EAAE,SAAM,iBAAc,EAAS;EACnC,UAAU;GACR;GACA,EAAQ;GACR;GACA,EAAQ,sBAAsB;EAChC;EACA,eAAe,EAAuB,GAAQ,CAAO;EACrD,SAAS,KAAW,CAAC,CAAC;EACtB,WAAW,MAAO,KAAK;EACvB,OAAO;EACP,MAAM,EAAE,cAAc,GAAK;CAC7B,CAAC;CAED,IAAI,CAAC,GACH,OAAO;EAAE,SAAS;EAAM,WAAW;EAAM,WAAW;CAAM;CAG5D,IAAI,KAAa,CAAC,GAChB,OAAO;EAAE,SAAS;EAAO,WAAW;EAAO;CAAU;CAGvD,IAAI,EAAK,aAGP,OAAO;EAAE,SAFO,EAAK,YAAY,SAAS,CAEjC;EAAS,WADA,EAAK,YAAY,SAAS,CAC1B;EAAW,WAAW;CAAM;CAIhD,IAAM,IAAiB,EAAK,SAAS,WAAW,EAAK,SAAS;CAC9D,OAAO;EACL,SAAS,KAAkB,EAAK,SAAS;EACzC,WAAW;EACX,WAAW;CACb;AACF;AAWA,SAAgB,EAAqB,GAAiC;CACpE,IAAM,EAAE,eAAY,EAAiB,GAG/B,IAAU,EAAsB;CAEtC,IAAI,EAAQ,SAAS,SAAS,OAAO;CAErC,IAAM,IAAQ,EAAQ,EAAQ;CAE9B,OADI,CAAC,KAAS,EAAM,aAAa,CAAC,EAAM,SAAe,KAChD,EAAW,YAAY,EAAM;AACtC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("./use-conversation-id.cjs"),t=require("../contexts/active-backend-context.cjs"),n=require("../constants/acp-providers.cjs"),r=require("./query/use-
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("./use-conversation-id.cjs"),t=require("../contexts/active-backend-context.cjs"),n=require("../constants/acp-providers.cjs"),r=require("./query/use-settings.cjs"),i=require("./query/use-active-conversation.cjs"),a=require("./use-acp-model-context.cjs"),o=require("./use-can-manage-org-profiles.cjs"),s=require("./query/use-active-acp-profile-detail.cjs");function c(){let{data:c}=i.useActiveConversation(),{data:l}=r.useSettings(),{conversationId:u}=e.useOptionalConversationId(),{backend:d}=t.useActiveBackend(),f=o.useCanManageOrgProfiles(),p=s.useActiveAcpProfileDetail(),{isActiveAcpConversation:m,isHomeAcp:h,isAcpContext:g,destinationPath:_,destinationLabel:v}=a.useAcpModelContext(),y=typeof l?.agent_settings?.acp_server==`string`?l.agent_settings.acp_server:null,b=m?c?.acp_server:h?p?.acp_server??y:null,x=g?n.getAcpProvider(b):void 0,S=typeof l?.agent_settings?.acp_model==`string`?l.agent_settings.acp_model:null,C=h&&p?p.acp_model:S,w=null;w=m?c?.llm_model??n.resolveEffectiveAcpModel({configured:C,providerDefault:n.getAcpPreferredDefaultModel(b)}):h?n.resolveEffectiveAcpModel({configured:C,providerDefault:n.getAcpPreferredDefaultModel(b)}):c?.llm_model??l?.llm_model??null;let T=w&&g?n.labelForAcpModel(b,w)??w:w,E=x?.available_models??[],D=!h||d.kind!==`cloud`||f,O=g&&E.length>0&&D;return{isAcpContext:g,displayModel:T,currentModelId:w,availableAcpModels:E,showAcpPicker:O,switchConversationId:m?u??null:null,destinationPath:_,destinationLabel:v}}exports.useChatInputModelState=c;
|
|
2
2
|
//# sourceMappingURL=use-chat-input-model-state.cjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useOptionalConversationId as e } from "./use-conversation-id.js";
|
|
2
2
|
import { useActiveBackend as t } from "../contexts/active-backend-context.js";
|
|
3
3
|
import { getAcpPreferredDefaultModel as n, getAcpProvider as r, labelForAcpModel as i, resolveEffectiveAcpModel as a } from "../constants/acp-providers.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useSettings as o } from "./query/use-settings.js";
|
|
5
|
+
import { useActiveConversation as s } from "./query/use-active-conversation.js";
|
|
6
6
|
import { useAcpModelContext as c } from "./use-acp-model-context.js";
|
|
7
7
|
import { useCanManageOrgProfiles as l } from "./use-can-manage-org-profiles.js";
|
|
8
8
|
import { useActiveAcpProfileDetail as u } from "./query/use-active-acp-profile-detail.js";
|
|
9
9
|
//#region src/hooks/use-chat-input-model-state.ts
|
|
10
10
|
function d() {
|
|
11
|
-
let { data: d } =
|
|
11
|
+
let { data: d } = s(), { data: f } = o(), { conversationId: p } = e(), { backend: m } = t(), h = l(), g = u(), { isActiveAcpConversation: _, isHomeAcp: v, isAcpContext: y, destinationPath: b, destinationLabel: x } = c(), S = typeof f?.agent_settings?.acp_server == "string" ? f.agent_settings.acp_server : null, C = _ ? d?.acp_server : v ? g?.acp_server ?? S : null, w = y ? r(C) : void 0, T = typeof f?.agent_settings?.acp_model == "string" ? f.agent_settings.acp_model : null, E = v && g ? g.acp_model : T, D = null;
|
|
12
12
|
D = _ ? d?.llm_model ?? a({
|
|
13
13
|
configured: E,
|
|
14
14
|
providerDefault: n(C)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../i18n/declaration.cjs"),n=require("../utils/conversation-local-storage.cjs"),r=require("../stores/conversation-store.cjs"),i=require("../utils/custom-toast-handlers.cjs"),
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../i18n/declaration.cjs"),n=require("../utils/conversation-local-storage.cjs"),r=require("../stores/conversation-store.cjs"),i=require("./query/query-keys.cjs"),a=require("../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"),o=require("../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"),s=require("../utils/custom-toast-handlers.cjs"),c=require("../contexts/active-backend-context.cjs"),l=require("../api/conversation-metadata-store.cjs"),u=require("../utils/plan-file.cjs"),d=require("../api/conversation-service/agent-server-conversation-service.api.cjs"),f=require("./mutation/conversation-mutation-utils.cjs"),p=require("./query/use-active-conversation.cjs"),m=require("./mutation/use-create-conversation.cjs"),h=require("./query/use-sub-conversations.cjs");let g=require("react");function _(e){let t=a.useQueryClient();return o.useMutation({mutationKey:i.LOCAL_PLANNER_MUTATION_KEYS.create,mutationFn:e=>d.default.createLocalPlanningConversation(e.parentConversationId,e.initialMessage),onSuccess:(n,r)=>{e.onCreated(n.id),f.invalidateConversationQueries(t,r.parentConversationId),t.invalidateQueries({queryKey:i.CONVERSATION_QUERY_KEYS.subConversations}),e.onInitialized()},onError:e.onFailed})}function v(e){let t=n.getConversationState(e.conversationId);t.subConversationTaskId&&!e.subConversationTaskId&&e.setSubConversationTaskId(t.subConversationTaskId);let r=e.serverPlanningConversationId??l.getStoredConversationMetadata(e.conversationId)?.local_planning_conversation_id??null;r&&r!==e.localPlanningConversationId&&e.setLocalPlanningConversationId(r)}var y=()=>{let{t:i}=e.useTranslation(`openhands`),{backend:a}=c.useActiveBackend(),{setConversationMode:o,setSubConversationTaskId:l,subConversationTaskId:d,setLocalPlanningConversationId:f,localPlanningConversationId:y}=r.useConversationStore(),{data:b}=p.useActiveConversation(),{mutate:x,isPending:S}=m.useCreateConversation(),{mutate:C,isPending:w}=_({onCreated:f,onInitialized:()=>{s.displaySuccessToast(i(t.I18nKey.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED))},onFailed:()=>{o(`code`),s.displayErrorToast(i(t.I18nKey.CONVERSATION$ERROR_STARTING_CONVERSATION))}}),T=a.kind!==`cloud`,{data:E}=h.useSubConversations(T?b?.sub_conversation_ids:void 0),D=T?u.findPlannerConversationId(E,b?.id):null;(0,g.useEffect)(()=>{b?.id&&v({conversationId:b.id,serverPlanningConversationId:D,subConversationTaskId:d,localPlanningConversationId:y,setSubConversationTaskId:l,setLocalPlanningConversationId:f})},[b?.id,D,y,f,d,l]);let O=!!(b?.sub_conversation_ids&&b.sub_conversation_ids.length>0||d),k=T?!!(y||D):O;return{handlePlanClick:(0,g.useCallback)((e,r)=>{if(e?.preventDefault(),e?.stopPropagation(),o(`plan`),a.kind!==`cloud`){if(!b?.id||y||D||w)return;C({parentConversationId:b.id,initialMessage:r});return}O||!b?.id||x({parentConversationId:b.id,agentType:`plan`,entryPoint:`plan_sub_conversation`,...r?{query:r}:{}},{onSuccess:e=>{s.displaySuccessToast(i(t.I18nKey.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),e.task_id&&(l(e.task_id),n.setConversationState(b.id,{subConversationTaskId:e.task_id}))}})},[a.kind,b,x,C,O,w,y,D,o,l,i]),hasPlanner:k,isCreatingConversation:S||w}};exports.useHandlePlanClick=y;
|
|
2
2
|
//# sourceMappingURL=use-handle-plan-click.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-handle-plan-click.cjs","names":[],"sources":["../../src/hooks/use-handle-plan-click.ts"],"sourcesContent":["import { useCallback, useEffect } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { displaySuccessToast } from \"#/utils/custom-toast-handlers\";\nimport {\n getConversationState,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\n\n/**\n * Custom hook that encapsulates the logic for handling plan creation.\n * Returns a function that can be called to create a plan conversation and\n * the pending state of the conversation creation.\n *\n * @returns An object containing handlePlanClick function and isCreatingConversation boolean\n */\nexport const useHandlePlanClick = () => {\n const { t } = useTranslation(\"openhands\");\n const {\n setConversationMode,\n setSubConversationTaskId,\n subConversationTaskId,\n } = useConversationStore();\n const { data: conversation } = useActiveConversation();\n const { mutate: createConversation, isPending: isCreatingConversation } =\n useCreateConversation();\n\n // Restore subConversationTaskId from localStorage on conversation load\n // This handles the case where page was refreshed while sub-conversation creation was in progress\n useEffect(() => {\n if (!conversation?.id) return;\n\n const storedState = getConversationState(conversation.id);\n if (storedState.subConversationTaskId && !subConversationTaskId) {\n setSubConversationTaskId(storedState.subConversationTaskId);\n }\n }, [conversation?.id, subConversationTaskId, setSubConversationTaskId]);\n\n const handlePlanClick = useCallback(\n (event?: React.MouseEvent<HTMLButtonElement> | KeyboardEvent) => {\n event?.preventDefault();\n event?.stopPropagation();\n\n // Set conversation mode to \"plan\" immediately\n setConversationMode(\"plan\");\n\n // Check if sub_conversation_ids is not empty or if a sub-conversation creation is already in progress\n if (\n (conversation?.sub_conversation_ids &&\n conversation.sub_conversation_ids.length > 0) ||\n !conversation?.id ||\n subConversationTaskId\n ) {\n // Do nothing if any condition is true\n return;\n }\n\n // Create a new sub-conversation if we have a current conversation ID\n createConversation(\n {\n parentConversationId: conversation.id,\n agentType: \"plan\",\n entryPoint: \"plan_sub_conversation\",\n },\n {\n onSuccess: (data) => {\n displaySuccessToast(\n t(I18nKey.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED),\n );\n // Track the task ID to poll for sub-conversation creation\n if (data.task_id) {\n setSubConversationTaskId(data.task_id);\n // Persist to localStorage so it survives page refresh\n setConversationState(conversation.id, {\n subConversationTaskId: data.task_id,\n });\n }\n },\n },\n );\n },\n [\n conversation,\n createConversation,\n setConversationMode,\n setSubConversationTaskId,\n subConversationTaskId,\n t,\n ],\n );\n\n return { handlePlanClick, isCreatingConversation };\n};\n"],"mappings":"6aAmBA,IAAa,MAA2B,CACtC,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CACJ,sBACA,2BACA,yBACE,EAAA,qBAAqB,EACnB,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,CAAE,OAAQ,EAAoB,UAAW,GAC7C,EAAA,sBAAsB,EAkExB,OA9DA,EAAA,EAAA,eAAgB,CACd,GAAI,CAAC,GAAc,GAAI,OAEvB,IAAM,EAAc,EAAA,qBAAqB,EAAa,EAAE,EACpD,EAAY,uBAAyB,CAAC,GACxC,EAAyB,EAAY,qBAAqB,CAE9D,EAAG,CAAC,GAAc,GAAI,EAAuB,CAAwB,CAAC,EAuD/D,CAAE,iBAAA,EAAA,EAAA,aApDN,GAAgE,CAC/D,GAAO,eAAe,EACtB,GAAO,gBAAgB,EAGvB,EAAoB,MAAM,EAIvB,KAAc,sBACb,EAAa,qBAAqB,OAAS,GAC7C,CAAC,GAAc,IACf,IAOF,EACE,CACE,qBAAsB,EAAa,GACnC,UAAW,OACX,WAAY,uBACd,EACA,CACE,UAAY,GAAS,CACnB,EAAA,oBACE,EAAE,EAAA,QAAQ,0CAA0C,CACtD,EAEI,EAAK,UACP,EAAyB,EAAK,OAAO,EAErC,EAAA,qBAAqB,EAAa,GAAI,CACpC,sBAAuB,EAAK,OAC9B,CAAC,EAEL,CACF,CACF,CACF,EACA,CACE,EACA,EACA,EACA,EACA,EACA,CACF,CAGO,EAAiB,wBAAuB,CACnD"}
|
|
1
|
+
{"version":3,"file":"use-handle-plan-click.cjs","names":[],"sources":["../../src/hooks/use-handle-plan-click.ts"],"sourcesContent":["import { useCallback, useEffect, type MouseEvent } from \"react\";\nimport { useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport {\n getConversationState,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport { getStoredConversationMetadata } from \"#/api/conversation-metadata-store\";\nimport {\n CONVERSATION_QUERY_KEYS,\n LOCAL_PLANNER_MUTATION_KEYS,\n} from \"#/hooks/query/query-keys\";\nimport { useSubConversations } from \"#/hooks/query/use-sub-conversations\";\nimport { findPlannerConversationId } from \"#/utils/plan-file\";\nimport { invalidateConversationQueries } from \"#/hooks/mutation/conversation-mutation-utils\";\n\nfunction useCreateLocalPlanningConversationMutation(options: {\n onCreated: (planningConversationId: string) => void;\n onInitialized: () => void;\n onFailed: () => void;\n}) {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationKey: LOCAL_PLANNER_MUTATION_KEYS.create,\n mutationFn: (variables: {\n parentConversationId: string;\n initialMessage?: string;\n }) =>\n AgentServerConversationService.createLocalPlanningConversation(\n variables.parentConversationId,\n variables.initialMessage,\n ),\n onSuccess: (planningConversation, variables) => {\n options.onCreated(planningConversation.id);\n invalidateConversationQueries(\n queryClient,\n variables.parentConversationId,\n );\n queryClient.invalidateQueries({\n queryKey: CONVERSATION_QUERY_KEYS.subConversations,\n });\n options.onInitialized();\n },\n onError: options.onFailed,\n });\n}\n\nfunction restorePlanningConversationIds(options: {\n conversationId: string;\n serverPlanningConversationId: string | null;\n subConversationTaskId: string | null;\n localPlanningConversationId: string | null;\n setSubConversationTaskId: (taskId: string | null) => void;\n setLocalPlanningConversationId: (conversationId: string | null) => void;\n}) {\n const storedState = getConversationState(options.conversationId);\n if (storedState.subConversationTaskId && !options.subConversationTaskId) {\n options.setSubConversationTaskId(storedState.subConversationTaskId);\n }\n\n // Server first: `sub_conversation_ids` is derived by the agent-server from\n // the planner's `parent_conversation_id`, so it survives cleared site data\n // and follows the user to another browser. The localStorage hint is only the\n // fallback for agent-servers older than 1.37.1, which drop the parent link.\n const restoredId =\n options.serverPlanningConversationId ??\n getStoredConversationMetadata(options.conversationId)\n ?.local_planning_conversation_id ??\n null;\n\n if (restoredId && restoredId !== options.localPlanningConversationId) {\n options.setLocalPlanningConversationId(restoredId);\n }\n}\n\n/**\n * Custom hook that encapsulates the logic for handling plan creation.\n * Returns a function that can be called to create a plan conversation and\n * the pending state of the conversation creation.\n *\n * @returns An object containing handlePlanClick function and isCreatingConversation boolean\n */\nexport const useHandlePlanClick = () => {\n const { t } = useTranslation(\"openhands\");\n const { backend } = useActiveBackend();\n const {\n setConversationMode,\n setSubConversationTaskId,\n subConversationTaskId,\n setLocalPlanningConversationId,\n localPlanningConversationId,\n } = useConversationStore();\n const { data: conversation } = useActiveConversation();\n const { mutate: createConversation, isPending: isCreatingCloudConversation } =\n useCreateConversation();\n const {\n mutate: createLocalPlanningConversation,\n isPending: isCreatingLocalPlanningConversation,\n } = useCreateLocalPlanningConversationMutation({\n onCreated: setLocalPlanningConversationId,\n onInitialized: () => {\n displaySuccessToast(\n t(I18nKey.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED),\n );\n },\n // handlePlanClick sets conversationMode(\"plan\") before this mutation\n // starts. On failure, back out of that mode instead of stranding the\n // user in plan mode with no planner to talk to.\n onFailed: () => {\n setConversationMode(\"code\");\n displayErrorToast(t(I18nKey.CONVERSATION$ERROR_STARTING_CONVERSATION));\n },\n });\n\n // On local backends the agent-server reports the planner helper back on the\n // parent's `sub_conversation_ids` (it was created with\n // `parent_conversation_id`), so that is the authoritative handle. Cloud\n // sub-conversations are driven by their own task/socket plumbing.\n const isLocalBackend = backend.kind !== \"cloud\";\n const { data: rawSubConversations } = useSubConversations(\n isLocalBackend ? conversation?.sub_conversation_ids : undefined,\n );\n\n const serverPlanningConversationId = isLocalBackend\n ? findPlannerConversationId(rawSubConversations, conversation?.id)\n : null;\n\n // Restore planning conversation ids on conversation load. This handles page\n // refreshes while cloud or local planning conversation creation is in\n // progress, and recovers the local planner after browser storage is lost.\n useEffect(() => {\n if (!conversation?.id) return;\n\n restorePlanningConversationIds({\n conversationId: conversation.id,\n serverPlanningConversationId,\n subConversationTaskId,\n localPlanningConversationId,\n setSubConversationTaskId,\n setLocalPlanningConversationId,\n });\n }, [\n conversation?.id,\n serverPlanningConversationId,\n localPlanningConversationId,\n setLocalPlanningConversationId,\n subConversationTaskId,\n setSubConversationTaskId,\n ]);\n\n const hasCloudPlanner = !!(\n (conversation?.sub_conversation_ids &&\n conversation.sub_conversation_ids.length > 0) ||\n subConversationTaskId\n );\n // Whether a planner helper already exists for this conversation — callers\n // (e.g. the `/plan <task>` interceptor) use this to decide whether they can\n // send a message to the planner immediately, or must wait for creation.\n const hasPlanner = isLocalBackend\n ? !!(localPlanningConversationId || serverPlanningConversationId)\n : hasCloudPlanner;\n\n const handlePlanClick = useCallback(\n (\n event?: MouseEvent<HTMLButtonElement> | KeyboardEvent,\n initialMessage?: string,\n ) => {\n event?.preventDefault();\n event?.stopPropagation();\n\n setConversationMode(\"plan\");\n\n if (backend.kind !== \"cloud\") {\n // Guard on the server-reported helper, the store, and the mutation's\n // own in-flight state — the last one stops two rapid invocations\n // (e.g. a double-click) from both passing before either updates and\n // creating two planners for the same parent.\n if (\n !conversation?.id ||\n localPlanningConversationId ||\n serverPlanningConversationId ||\n isCreatingLocalPlanningConversation\n ) {\n return;\n }\n createLocalPlanningConversation({\n parentConversationId: conversation.id,\n initialMessage,\n });\n return;\n }\n\n if (hasCloudPlanner || !conversation?.id) {\n return;\n }\n\n createConversation(\n {\n parentConversationId: conversation.id,\n agentType: \"plan\",\n entryPoint: \"plan_sub_conversation\",\n ...(initialMessage ? { query: initialMessage } : {}),\n },\n {\n onSuccess: (data) => {\n displaySuccessToast(\n t(I18nKey.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED),\n );\n if (data.task_id) {\n setSubConversationTaskId(data.task_id);\n setConversationState(conversation.id, {\n subConversationTaskId: data.task_id,\n });\n }\n },\n },\n );\n },\n [\n backend.kind,\n conversation,\n createConversation,\n createLocalPlanningConversation,\n hasCloudPlanner,\n isCreatingLocalPlanningConversation,\n localPlanningConversationId,\n serverPlanningConversationId,\n setConversationMode,\n setSubConversationTaskId,\n t,\n ],\n );\n\n return {\n handlePlanClick,\n hasPlanner,\n isCreatingConversation:\n isCreatingCloudConversation || isCreatingLocalPlanningConversation,\n };\n};\n"],"mappings":"+7BA0BA,SAAS,EAA2C,EAIjD,CACD,IAAM,EAAc,EAAA,eAAe,EAEnC,OAAO,EAAA,YAAY,CACjB,YAAa,EAAA,4BAA4B,OACzC,WAAa,GAIX,EAAA,QAA+B,gCAC7B,EAAU,qBACV,EAAU,cACZ,EACF,WAAY,EAAsB,IAAc,CAC9C,EAAQ,UAAU,EAAqB,EAAE,EACzC,EAAA,8BACE,EACA,EAAU,oBACZ,EACA,EAAY,kBAAkB,CAC5B,SAAU,EAAA,wBAAwB,gBACpC,CAAC,EACD,EAAQ,cAAc,CACxB,EACA,QAAS,EAAQ,QACnB,CAAC,CACH,CAEA,SAAS,EAA+B,EAOrC,CACD,IAAM,EAAc,EAAA,qBAAqB,EAAQ,cAAc,EAC3D,EAAY,uBAAyB,CAAC,EAAQ,uBAChD,EAAQ,yBAAyB,EAAY,qBAAqB,EAOpE,IAAM,EACJ,EAAQ,8BACR,EAAA,8BAA8B,EAAQ,cAAc,GAChD,gCACJ,KAEE,GAAc,IAAe,EAAQ,6BACvC,EAAQ,+BAA+B,CAAU,CAErD,CASA,IAAa,MAA2B,CACtC,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,CAAE,WAAY,EAAA,iBAAiB,EAC/B,CACJ,sBACA,2BACA,wBACA,iCACA,+BACE,EAAA,qBAAqB,EACnB,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,CAAE,OAAQ,EAAoB,UAAW,GAC7C,EAAA,sBAAsB,EAClB,CACJ,OAAQ,EACR,UAAW,GACT,EAA2C,CAC7C,UAAW,EACX,kBAAqB,CACnB,EAAA,oBACE,EAAE,EAAA,QAAQ,0CAA0C,CACtD,CACF,EAIA,aAAgB,CACd,EAAoB,MAAM,EAC1B,EAAA,kBAAkB,EAAE,EAAA,QAAQ,wCAAwC,CAAC,CACvE,CACF,CAAC,EAMK,EAAiB,EAAQ,OAAS,QAClC,CAAE,KAAM,GAAwB,EAAA,oBACpC,EAAiB,GAAc,qBAAuB,IAAA,EACxD,EAEM,EAA+B,EACjC,EAAA,0BAA0B,EAAqB,GAAc,EAAE,EAC/D,MAKJ,EAAA,EAAA,eAAgB,CACT,GAAc,IAEnB,EAA+B,CAC7B,eAAgB,EAAa,GAC7B,+BACA,wBACA,8BACA,2BACA,gCACF,CAAC,CACH,EAAG,CACD,GAAc,GACd,EACA,EACA,EACA,EACA,CACF,CAAC,EAED,IAAM,EAAkB,CAAC,EACtB,GAAc,sBACb,EAAa,qBAAqB,OAAS,GAC7C,GAKI,EAAa,EACf,CAAC,EAAE,GAA+B,GAClC,EAyEJ,MAAO,CACL,iBAAA,EAAA,EAAA,cAtEE,EACA,IACG,CAMH,GALA,GAAO,eAAe,EACtB,GAAO,gBAAgB,EAEvB,EAAoB,MAAM,EAEtB,EAAQ,OAAS,QAAS,CAK5B,GACE,CAAC,GAAc,IACf,GACA,GACA,EAEA,OAEF,EAAgC,CAC9B,qBAAsB,EAAa,GACnC,gBACF,CAAC,EACD,MACF,CAEI,GAAmB,CAAC,GAAc,IAItC,EACE,CACE,qBAAsB,EAAa,GACnC,UAAW,OACX,WAAY,wBACZ,GAAI,EAAiB,CAAE,MAAO,CAAe,EAAI,CAAC,CACpD,EACA,CACE,UAAY,GAAS,CACnB,EAAA,oBACE,EAAE,EAAA,QAAQ,0CAA0C,CACtD,EACI,EAAK,UACP,EAAyB,EAAK,OAAO,EACrC,EAAA,qBAAqB,EAAa,GAAI,CACpC,sBAAuB,EAAK,OAC9B,CAAC,EAEL,CACF,CACF,CACF,EACA,CACE,EAAQ,KACR,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACF,CAIA,EACA,aACA,uBACE,GAA+B,CACnC,CACF"}
|