@openhands/agent-canvas 1.12.0 → 1.14.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-BkL3HWa3.js → acp-providers-CYy8qA2z.js} +1 -1
- package/build/assets/active-backend-context-BZDG15C0.js +2 -0
- package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DGWBBbcp.js} +1 -1
- package/build/assets/agent-profiles-settings-DrkGdf4_.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DK56YPTs.js +86 -0
- package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-DfcSgkLD.js} +2 -2
- package/build/assets/agent-settings-Lrc5-twS.js +1 -0
- package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-BgDHhL7b.js} +1 -1
- package/build/assets/api-error-message-BEIE_yD1.js +1 -0
- package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-DaZnOlVo.js} +1 -1
- package/build/assets/{app-settings-D0OKHB3M.js → app-settings-BG5NAUbC.js} +1 -1
- package/build/assets/automation-detail-D4Hs831Z.js +3 -0
- package/build/assets/automation-export-n0X6FB0C.js +2 -0
- package/build/assets/automation-git-sync-CDrm8WV7.js +1 -0
- package/build/assets/automation-setup-route-CZCl4ONs.js +1 -0
- package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DFF96AdL.js} +1 -1
- package/build/assets/automations-list-Bl-oGOrV.js +1 -0
- package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-H_ThtDA0.js} +1 -1
- package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-CbCemvHt.js} +1 -1
- package/build/assets/backend-not-configured-DP8KLNq_.js +1 -0
- package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-BBASWqsb.js} +1 -1
- package/build/assets/{badge-Dpn3-LTV.js → badge-B-51h-SW.js} +1 -1
- package/build/assets/{base-modal-3NmIOKDm.js → base-modal-BbjycA8X.js} +1 -1
- package/build/assets/bot-CGPCg03p.js +1 -0
- package/build/assets/{brand-button-CJcwjnfb.js → brand-button-Blxv5nww.js} +1 -1
- package/build/assets/browser-CuW0nWvh.js +7 -0
- package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-D5G0ORwt.js} +1 -1
- package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-BD2tii1r.js} +1 -1
- package/build/assets/check-DSuS-lyr.js +1 -0
- package/build/assets/chevron-down-CgGcmtE2.js +1 -0
- package/build/assets/circle-check-CG5-NPw7.js +1 -0
- package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-ASbpB8vN.js} +1 -1
- package/build/assets/cloud-funnel-analytics-GlCUG0gk.js +1 -0
- package/build/assets/cog-CZiR80uT.js +1 -0
- package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-DvpEsh2O.js} +1 -1
- package/build/assets/{command-menu-BKOLj-TC.js → command-menu-DwUQzjYP.js} +1 -1
- package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BptcoiLA.js} +1 -1
- package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-CiEwxZAA.js} +1 -1
- package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-CdcamfM1.js} +1 -1
- package/build/assets/conversation-DREHj4nT.js +1 -0
- package/build/assets/conversation-DotRfiDz.js +90 -0
- package/build/assets/conversation-panel-DREHj4nT.js +1 -0
- package/build/assets/conversation-state-store-DMLtlHbE.js +1 -0
- package/build/assets/conversation-store-Blc5xysY.js +6 -0
- package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-D-puECpY.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-BGxcUbgy.js} +1 -1
- package/build/assets/{device-verify-BIjXeW9N.js → device-verify-CZJfWaJf.js} +1 -1
- package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-tLhpwtxS.js} +1 -1
- package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-D8GnI6GZ.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-Fk8k60nk.js} +1 -1
- package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-DeztVYuL.js} +1 -1
- package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-Cd6GCYzq.js} +1 -1
- package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-C4sgZg-y.js} +1 -1
- package/build/assets/external-link-C0UpBgsE.js +1 -0
- package/build/assets/{file-text-RecuaId_.js → file-text-C6WYtNdV.js} +1 -1
- package/build/assets/files-tab-BW_qzyAm.js +1 -0
- package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-CGXBLcn1.js} +1 -1
- package/build/assets/format-model-name-BNPKVsIq.js +1 -0
- package/build/assets/format-relative-time-ZhQD4rsl.js +1 -0
- package/build/assets/git-provider-icon-CaQ1yLPi.js +1 -0
- package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-CgXR6M_E.js} +1 -1
- package/build/assets/git-repo-dropdown-D2Uei3CO.js +1 -0
- package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_YOp8Fo.js} +1 -1
- package/build/assets/home-DNzzJcMP.js +1 -0
- package/build/assets/home-aCos-5vc.js +1 -0
- package/build/assets/{home-store-Cubdq0uP.js → home-store-DgzViC3f.js} +1 -1
- package/build/assets/index-home-DNzzJcMP.js +1 -0
- package/build/assets/info-CLoC1LRo.js +1 -0
- package/build/assets/install-server-modal-D7zIqNKz.js +1 -0
- package/build/assets/kebab-menu-item-content-DERMdnDv.js +1 -0
- package/build/assets/{launch-c4GEP8oo.js → launch-5PjKeLak.js} +1 -1
- package/build/assets/{list-todo-CheUtB7F.js → list-todo-BF049YaY.js} +1 -1
- package/build/assets/llm-not-configured-banner-BK9z5eS0.js +27 -0
- package/build/assets/llm-settings-BLAMK2tR.js +1 -0
- package/build/assets/llm-settings-BWsbarGM.js +1 -0
- package/build/assets/llm-subscription-service-SfnEV9Uc.js +1 -0
- package/build/assets/loader-circle-D7IagAyF.js +1 -0
- package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-DBgXgra0.js} +1 -1
- package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-BTqNPhzc.js} +1 -1
- package/build/assets/manifest-abebca3c.js +1 -0
- package/build/assets/manifest-subpage-layout-Rn-glaxV.js +1 -0
- package/build/assets/{map-provider-7Bp2aih5.js → map-provider-BK4HnqYz.js} +1 -1
- package/build/assets/markdown-renderer-Cp6DlHQN.js +8 -0
- package/build/assets/{mcp-Da7wFU7A.js → mcp-BC-Ixn4T.js} +2 -2
- package/build/assets/mcp-marketplace-utils-BJWJgbB6.js +1 -0
- package/build/assets/messages-CzFKrzPG.js +40 -0
- package/build/assets/{modal-body-duRaxj_K.js → modal-body-BdKfD3Hl.js} +1 -1
- package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D5_b5vMi.js} +1 -1
- package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-objukxk_.js} +1 -1
- package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-C_gXyLyD.js} +1 -1
- package/build/assets/{npm-Cswluf6-.js → npm-CHVHV1MC.js} +1 -1
- package/build/assets/{onboarding-BKbTYlW1.js → onboarding-Diw0V51A.js} +1 -1
- package/build/assets/onboarding-modal-Da4yHzsA.js +1 -0
- package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-BztSy69u.js} +1 -1
- package/build/assets/parse-git-remote-url-BkXN9jzl.js +1 -0
- package/build/assets/pencil-49avMHlD.js +1 -0
- package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-CJiSpNax.js} +1 -1
- package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-lHdNKWNU.js} +1 -1
- package/build/assets/plus-C0BagBpV.js +1 -0
- package/build/assets/profiles-service.api-BLr7FXec.js +1 -0
- package/build/assets/providers-CWXnb7S3.js +1 -0
- package/build/assets/{proxy-b4aqL4SX.js → proxy-DYDXxtje.js} +1 -1
- package/build/assets/{puzzle-B3v361yY.js → puzzle-Bt2B1rzf.js} +1 -1
- package/build/assets/recommended-automations-launcher-CcFMfJRR.js +1 -0
- package/build/assets/refresh-cw-nmcesifB.js +1 -0
- package/build/assets/root-CT4t7apy.css +1 -0
- package/build/assets/root-DnRgLKpU.js +2 -0
- package/build/assets/root-layout-2L9tr-BN.js +2 -0
- package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-C59lVZTA.js} +1 -1
- package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-BbBEQQjq.js} +1 -1
- package/build/assets/search-CYSDBczG.js +1 -0
- package/build/assets/secrets-service-BtsgYSlj.js +1 -0
- package/build/assets/secrets-settings-DJ0OKa4_.js +1 -0
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DiVfTZuN.js} +1 -1
- package/build/assets/{settings-CZPGNens.js → settings-CDqL_Uqh.js} +1 -1
- package/build/assets/{settings-CWFxymAf.js → settings-DcNPxz0v.js} +1 -1
- package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-Ba1UN5Du.js} +1 -1
- package/build/assets/{settings-index-Dtlegd6s.js → settings-index-Cz2cKt2K.js} +1 -1
- package/build/assets/{settings-input-D61Vzp9e.js → settings-input-CWUEHHvS.js} +1 -1
- package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-DdcLXDGn.js} +1 -1
- package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-nEEK1Kh1.js} +1 -1
- package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api-3yAUFcaP.js} +1 -1
- package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-Dk9hChx1.js} +1 -1
- package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-CxjtCSB3.js} +1 -1
- package/build/assets/shared-conversation-DbAcrx3s.js +1 -0
- package/build/assets/shield-check-CiOTXxV2.js +1 -0
- package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-lrfPooIB.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-KERXfNu1.js} +1 -1
- package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-B8lFD6Cb.js} +1 -1
- package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-u6pUpxJ7.js} +1 -1
- package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-dGIUzr_b.js} +1 -1
- package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-kkOWZ89w.js} +1 -1
- package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-DWN1PBPH.js} +1 -1
- package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-DFjH2Nq6.js} +1 -1
- package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-DIHpl3ol.js} +2 -2
- package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-ntyMLnbj.js} +1 -1
- package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-B6JXcsmL.js} +1 -1
- package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-aEJzEcHD.js} +1 -1
- package/build/assets/{terminal-DRrJo-cR.js → terminal-Dch7Ty5K.js} +1 -1
- package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-B2MLKsgt.js} +1 -1
- package/build/assets/trash-2-yZnDM4Ji.js +1 -0
- package/build/assets/{typography-D9tiHct7.js → typography-DB5HoCk0.js} +1 -1
- package/build/assets/usage-tab-DrEtBmBT.js +1 -0
- package/build/assets/use-acp-credential-form-c8KXAa8A.js +1 -0
- package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-B0p34N3q.js} +1 -1
- package/build/assets/use-agent-profiles-CPIc6wLH.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dz_8Eqkv.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-DvUVqCle.js} +1 -1
- package/build/assets/use-config-C3PO4TBw.js +1 -0
- package/build/assets/use-create-conversation-DVrA_uLD.js +1 -0
- package/build/assets/use-create-secret-DbBIpaCR.js +1 -0
- package/build/assets/use-get-secrets-6PBitf54.js +1 -0
- package/build/assets/use-has-permission-CQ31Cl8j.js +1 -0
- package/build/assets/use-is-authed-2UrDIziV.js +1 -0
- package/build/assets/use-is-creating-conversation-BvYpmb3v.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js} +1 -1
- package/build/assets/use-llm-profiles-diZS4FiN.js +1 -0
- package/build/assets/use-manifest-capabilities-HIWCtIUm.js +1 -0
- package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-Bs8PcXik.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-BCuNLFsr.js} +1 -1
- package/build/assets/use-save-agent-profile-BaMNSpBV.js +1 -0
- package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-BahvC2Gw.js} +1 -1
- package/build/assets/{use-settings-BmLzQjnC.js → use-settings-C6ZxpBDX.js} +1 -1
- package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-Bqn69Ggw.js} +2 -2
- package/build/assets/use-tracking-Bhu7gk2y.js +3 -0
- package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-BkNXpXrd.js} +1 -1
- package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-c_OmS3lK.js} +1 -1
- package/build/assets/{useMutation-ChpkYxI5.js → useMutation-6ZsQCqAn.js} +1 -1
- package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-xDrGlTO_.js} +1 -1
- package/build/assets/{useQuery-BCnzy4LX.js → useQuery-Bs5NFz2s.js} +1 -1
- package/build/assets/utils-DUD5ScdA.js +1 -0
- package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
- package/build/assets/{vendor~entry.client-CgNUwtQL.js → vendor~entry.client-BFE7Llz9.js} +1 -1
- package/build/assets/{vendor~entry.client-zSIea5EO.js → vendor~entry.client-BaKt_PIp.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js} +3 -3
- package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-B6POTS66.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js +13 -0
- package/build/assets/vendor~root-layout-DeQACFVA.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js} +2 -2
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js} +1 -1
- package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-COueVXmM.js} +1 -1
- package/build/assets/{wrench-B1_H-tL1.js → wrench-C95ujnYo.js} +1 -1
- package/build/assets/x-86ZCfxKY.js +1 -0
- package/build/assets/zap-DRa-r-Tf.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +88 -3
- package/build/locales/ca/openhands.json +88 -3
- package/build/locales/de/openhands.json +88 -3
- package/build/locales/en/openhands.json +88 -3
- package/build/locales/es/openhands.json +88 -3
- package/build/locales/fr/openhands.json +88 -3
- package/build/locales/it/openhands.json +88 -3
- package/build/locales/ja/openhands.json +88 -3
- package/build/locales/ko-KR/openhands.json +88 -3
- package/build/locales/no/openhands.json +88 -3
- package/build/locales/pt/openhands.json +88 -3
- package/build/locales/tr/openhands.json +88 -3
- package/build/locales/uk/openhands.json +88 -3
- package/build/locales/zh-CN/openhands.json +88 -3
- package/build/locales/zh-TW/openhands.json +88 -3
- package/config/defaults.json +3 -3
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.js +1 -1
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +10 -0
- package/dist/api/automation-service/automation-service.api.js +42 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +9 -0
- package/dist/api/cloud/conversation-service.api.js +11 -1
- package/dist/api/cloud/conversation-service.api.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 +24 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +116 -97
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/llm-balance-service.cjs +2 -0
- package/dist/api/llm-balance-service.cjs.map +1 -0
- package/dist/api/llm-balance-service.d.ts +33 -0
- package/dist/api/llm-balance-service.js +53 -0
- package/dist/api/llm-balance-service.js.map +1 -0
- package/dist/api/llm-subscription-service.cjs +1 -1
- package/dist/api/llm-subscription-service.cjs.map +1 -1
- package/dist/api/llm-subscription-service.js +42 -34
- package/dist/api/llm-subscription-service.js.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.d.ts +15 -2
- package/dist/api/profiles-service/profiles-service.api.js +25 -2
- package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.d.ts +5 -0
- package/dist/api/secrets-service.js +12 -6
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/components/conversation/index.cjs +1 -1
- package/dist/components/conversation/index.d.ts +0 -1
- package/dist/components/conversation/index.js +0 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/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.js +24 -23
- 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/index.d.ts +0 -1
- package/dist/components/conversation-events/chat/group-events.cjs +1 -1
- package/dist/components/conversation-events/chat/group-events.cjs.map +1 -1
- package/dist/components/conversation-events/chat/group-events.d.ts +3 -3
- package/dist/components/conversation-events/chat/group-events.js +27 -26
- package/dist/components/conversation-events/chat/group-events.js.map +1 -1
- package/dist/components/features/automations/git-sync/git-sync-activity-row.d.ts +15 -0
- package/dist/components/features/automations/git-sync/git-sync-config-form.d.ts +13 -0
- package/dist/components/features/automations/git-sync/git-sync-error-banner.d.ts +6 -0
- package/dist/components/features/automations/git-sync/git-sync-not-local-state.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-overview-section.d.ts +12 -0
- package/dist/components/features/automations/git-sync/git-sync-skeleton.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-status-pill.d.ts +7 -0
- package/dist/components/features/automations/git-sync/git-sync-unsupported-state.d.ts +7 -0
- package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
- package/dist/components/features/automations/responder-deployment-modal.d.ts +2 -1
- 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 +177 -176
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +123 -118
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-grip.js +7 -7
- package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
- package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
- package/dist/components/features/chat/components/context-window-meter.js +131 -0
- package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
- package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
- package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
- package/dist/components/features/chat/components/context-window-ring.js +45 -0
- package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.js +68 -67
- package/dist/components/features/chat/custom-chat-input.js.map +1 -1
- package/dist/components/features/chat/error-message-banner.cjs +1 -1
- package/dist/components/features/chat/error-message-banner.cjs.map +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +3 -1
- package/dist/components/features/chat/error-message-banner.js +64 -58
- package/dist/components/features/chat/error-message-banner.js.map +1 -1
- package/dist/components/features/chat/path-component.cjs +1 -1
- package/dist/components/features/chat/path-component.cjs.map +1 -1
- package/dist/components/features/chat/path-component.js +9 -6
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/chat/plan-preview.cjs +1 -1
- package/dist/components/features/chat/plan-preview.js +4 -4
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.d.ts +0 -8
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +92 -50
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +7 -2
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +15 -9
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs +2 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map +1 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.d.ts +20 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js +76 -0
- package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map +1 -0
- package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
- package/dist/components/features/controls/server-status-context-menu.cjs.map +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +5 -3
- package/dist/components/features/controls/server-status-context-menu.js +8 -8
- package/dist/components/features/controls/server-status-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.js +58 -61
- package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.js +74 -46
- package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
- package/dist/components/features/conversation/conversation-name.cjs +1 -1
- package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-name.js +69 -71
- package/dist/components/features/conversation/conversation-name.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +7 -6
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
- 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 +92 -86
- 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 +81 -71
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.js +6 -6
- package/dist/components/features/conversation/metrics-modal/cost-section.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +2 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.js +10 -9
- package/dist/components/features/conversation/metrics-modal/metric-row.js.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.cjs.map +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js +2 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.js.map +1 -1
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.d.ts +16 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js +59 -0
- package/dist/components/features/conversation/usage-panel/compact-context-button.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/context-meter.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/context-meter.d.ts +19 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js +46 -0
- package/dist/components/features/conversation/usage-panel/context-meter.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.d.ts +7 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js +57 -0
- package/dist/components/features/conversation/usage-panel/provider-balance-card.js.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs +2 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.cjs.map +1 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.d.ts +9 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.js +68 -0
- package/dist/components/features/conversation/usage-panel/usage-panel.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.js +10 -13
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.js +2 -2
- package/dist/components/features/conversation-panel/budget-progress-bar.js.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +6 -6
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
- package/dist/components/features/conversation-panel/confirm-archive-modal.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 +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
- 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 +3 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -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.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +25 -17
- 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.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 +9 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
- package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
- package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
- 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 +27 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
- 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 +240 -175
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +22 -25
- package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.js +2 -2
- package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +10 -7
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.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/llm-balance.cjs +2 -0
- package/dist/constants/llm-balance.cjs.map +1 -0
- package/dist/constants/llm-balance.d.ts +13 -0
- package/dist/constants/llm-balance.js +6 -0
- package/dist/constants/llm-balance.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +227 -219
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
- package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
- package/dist/hooks/chat/use-grip-resize.js +39 -30
- package/dist/hooks/chat/use-grip-resize.js.map +1 -1
- package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
- package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
- package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
- package/dist/hooks/mutation/use-condense-conversation.js +17 -0
- package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
- 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 +30 -21
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +1 -1
- package/dist/hooks/query/use-commit-changes.js +4 -4
- package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
- package/dist/hooks/query/use-conversation-metrics.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-metrics.js +1 -1
- package/dist/hooks/query/use-conversation-metrics.js.map +1 -1
- package/dist/hooks/query/use-git-sync.d.ts +19 -0
- package/dist/hooks/query/use-llm-balance.cjs +2 -0
- package/dist/hooks/query/use-llm-balance.cjs.map +1 -0
- package/dist/hooks/query/use-llm-balance.d.ts +10 -0
- package/dist/hooks/query/use-llm-balance.js +24 -0
- package/dist/hooks/query/use-llm-balance.js.map +1 -0
- 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 +1 -1
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/query/use-task-polling.cjs +1 -1
- package/dist/hooks/query/use-task-polling.cjs.map +1 -1
- package/dist/hooks/query/use-task-polling.js +12 -10
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
- package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
- package/dist/hooks/query/use-unified-git-commits.js +4 -4
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.js +4 -4
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.cjs.map +1 -1
- package/dist/hooks/query/use-workspace-files.d.ts +14 -4
- package/dist/hooks/query/use-workspace-files.js +45 -32
- package/dist/hooks/query/use-workspace-files.js.map +1 -1
- package/dist/hooks/use-await-context-compaction.cjs +2 -0
- package/dist/hooks/use-await-context-compaction.cjs.map +1 -0
- package/dist/hooks/use-await-context-compaction.d.ts +38 -0
- package/dist/hooks/use-await-context-compaction.js +61 -0
- package/dist/hooks/use-await-context-compaction.js.map +1 -0
- package/dist/hooks/use-compact-context-action.cjs +2 -0
- package/dist/hooks/use-compact-context-action.cjs.map +1 -0
- package/dist/hooks/use-compact-context-action.d.ts +10 -0
- package/dist/hooks/use-compact-context-action.js +61 -0
- package/dist/hooks/use-compact-context-action.js.map +1 -0
- package/dist/hooks/use-context-window-usage.cjs +2 -0
- package/dist/hooks/use-context-window-usage.cjs.map +1 -0
- package/dist/hooks/use-context-window-usage.d.ts +5 -0
- package/dist/hooks/use-context-window-usage.js +20 -0
- package/dist/hooks/use-context-window-usage.js.map +1 -0
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
- package/dist/hooks/use-conversation-name-context-menu.d.ts +0 -3
- package/dist/hooks/use-conversation-name-context-menu.js +54 -57
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.d.ts +8 -0
- package/dist/hooks/use-drag-resize.js +21 -18
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-live-conversation-metrics.cjs +2 -0
- package/dist/hooks/use-live-conversation-metrics.cjs.map +1 -0
- package/dist/hooks/use-live-conversation-metrics.d.ts +18 -0
- package/dist/hooks/use-live-conversation-metrics.js +37 -0
- package/dist/hooks/use-live-conversation-metrics.js.map +1 -0
- package/dist/hooks/use-responder-url-secret.d.ts +5 -0
- package/dist/hooks/use-select-conversation-tab.cjs +1 -1
- package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
- package/dist/hooks/use-select-conversation-tab.js +2 -2
- package/dist/hooks/use-select-conversation-tab.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +6 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +86 -1
- 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 +1475 -30
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +28 -29
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +0 -1
- package/dist/locales/ar/openhands.json +88 -3
- package/dist/locales/ca/openhands.json +88 -3
- package/dist/locales/de/openhands.json +88 -3
- package/dist/locales/en/openhands.json +88 -3
- package/dist/locales/es/openhands.json +88 -3
- package/dist/locales/fr/openhands.json +88 -3
- package/dist/locales/it/openhands.json +88 -3
- package/dist/locales/ja/openhands.json +88 -3
- package/dist/locales/ko-KR/openhands.json +88 -3
- package/dist/locales/no/openhands.json +88 -3
- package/dist/locales/pt/openhands.json +88 -3
- package/dist/locales/tr/openhands.json +88 -3
- package/dist/locales/uk/openhands.json +88 -3
- package/dist/locales/zh-CN/openhands.json +88 -3
- package/dist/locales/zh-TW/openhands.json +88 -3
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs +5 -5
- package/dist/node_modules/@microlink/react-json-view/dist/main.cjs.map +1 -1
- package/dist/node_modules/@microlink/react-json-view/dist/main.js +5194 -5187
- package/dist/node_modules/@microlink/react-json-view/dist/main.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +22 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +33 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +56 -22
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +31 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +2 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +21 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +9 -5
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.cjs.map +1 -1
- package/dist/node_modules/i18next-http-backend/esm/index.js +2 -2
- package/dist/node_modules/i18next-http-backend/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js +31 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/archive.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js.map +1 -0
- package/dist/node_modules/zustand/esm/middleware.cjs +3 -3
- package/dist/node_modules/zustand/esm/middleware.cjs.map +1 -1
- package/dist/node_modules/zustand/esm/middleware.js +33 -31
- package/dist/node_modules/zustand/esm/middleware.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +17 -16
- package/dist/package.js.map +1 -1
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.js +11 -11
- package/dist/routes/files-tab.js.map +1 -1
- package/dist/routes/usage-tab.cjs +2 -0
- package/dist/routes/usage-tab.cjs.map +1 -0
- package/dist/routes/usage-tab.d.ts +2 -0
- package/dist/routes/usage-tab.js +10 -0
- package/dist/routes/usage-tab.js.map +1 -0
- package/dist/services/child-conversation-launch.cjs +1 -1
- package/dist/services/child-conversation-launch.cjs.map +1 -1
- package/dist/services/child-conversation-launch.js +11 -5
- package/dist/services/child-conversation-launch.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +2 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.js +47 -51
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/archived-conversations-store.cjs +2 -0
- package/dist/stores/archived-conversations-store.cjs.map +1 -0
- package/dist/stores/archived-conversations-store.d.ts +24 -0
- package/dist/stores/archived-conversations-store.js +33 -0
- package/dist/stores/archived-conversations-store.js.map +1 -0
- 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 +3 -0
- package/dist/stores/conversation-panel-preferences-store.js +4 -0
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +1 -1
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/error-message-store.cjs +1 -1
- package/dist/stores/error-message-store.cjs.map +1 -1
- package/dist/stores/error-message-store.d.ts +3 -1
- package/dist/stores/error-message-store.js +5 -3
- package/dist/stores/error-message-store.js.map +1 -1
- package/dist/stores/metrics-store.cjs +1 -1
- package/dist/stores/metrics-store.cjs.map +1 -1
- package/dist/stores/metrics-store.d.ts +1 -0
- package/dist/stores/metrics-store.js +7 -4
- package/dist/stores/metrics-store.js.map +1 -1
- package/dist/types/agent-server/core/events/condensation-event.d.ts +3 -0
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +4 -6
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +5 -0
- package/dist/types/agent-server/type-guards.js +3 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/git-sync.d.ts +51 -0
- package/dist/utils/conversation-local-storage.cjs +1 -1
- package/dist/utils/conversation-local-storage.cjs.map +1 -1
- package/dist/utils/conversation-local-storage.js +2 -1
- package/dist/utils/conversation-local-storage.js.map +1 -1
- package/dist/utils/error-handler.cjs +1 -1
- package/dist/utils/error-handler.cjs.map +1 -1
- package/dist/utils/error-handler.d.ts +3 -2
- package/dist/utils/error-handler.js +18 -5
- package/dist/utils/error-handler.js.map +1 -1
- 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 +1 -0
- package/dist/utils/format-model-name.js +1 -0
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/format-token-count.cjs +2 -0
- package/dist/utils/format-token-count.cjs.map +1 -0
- package/dist/utils/format-token-count.d.ts +3 -0
- package/dist/utils/format-token-count.js +19 -0
- package/dist/utils/format-token-count.js.map +1 -0
- package/dist/utils/hover-reveal-classes.cjs +2 -0
- package/dist/utils/hover-reveal-classes.cjs.map +1 -0
- package/dist/utils/hover-reveal-classes.d.ts +34 -0
- package/dist/utils/hover-reveal-classes.js +41 -0
- package/dist/utils/hover-reveal-classes.js.map +1 -0
- package/dist/utils/is-markdown-file-path.cjs +2 -0
- package/dist/utils/is-markdown-file-path.cjs.map +1 -0
- package/dist/utils/is-markdown-file-path.d.ts +4 -0
- package/dist/utils/is-markdown-file-path.js +14 -0
- package/dist/utils/is-markdown-file-path.js.map +1 -0
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.d.ts +7 -0
- package/dist/utils/mcp-marketplace-utils.js +19 -16
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/transcript-export/index.cjs +3 -3
- package/dist/utils/transcript-export/index.cjs.map +1 -1
- package/dist/utils/transcript-export/index.js +12 -12
- package/dist/utils/transcript-export/index.js.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.js +25 -17
- package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
- package/dist/utils/workspace-relative-path.cjs +2 -0
- package/dist/utils/workspace-relative-path.cjs.map +1 -0
- package/dist/utils/workspace-relative-path.d.ts +10 -0
- package/dist/utils/workspace-relative-path.js +22 -0
- package/dist/utils/workspace-relative-path.js.map +1 -0
- package/package.json +17 -16
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +3 -0
- package/scripts/dev-process-utils.mjs +6 -1
- package/scripts/dev-safe.mjs +57 -2
- package/scripts/dev-with-automation.mjs +98 -9
- package/build/assets/active-backend-context-B_bg5h9O.js +0 -2
- package/build/assets/agent-profiles-settings-hd2cAIZM.js +0 -1
- package/build/assets/agent-server-conversation-service.api-BheU4HX3.js +0 -86
- package/build/assets/agent-settings-D_SVrWhI.js +0 -1
- package/build/assets/automation-detail-C0SxWTnQ.js +0 -3
- package/build/assets/automation-export-BjQa_fT6.js +0 -2
- package/build/assets/automation-setup-route-BzCNpljP.js +0 -1
- package/build/assets/automations-list-dZg8zOCl.js +0 -1
- package/build/assets/bot-DuN83i3p.js +0 -1
- package/build/assets/browser--eoQOo4M.js +0 -6
- package/build/assets/check-DLOKoFU9.js +0 -1
- package/build/assets/chevron-down-CnIbtM6i.js +0 -1
- package/build/assets/circle-check-CxCYJrpZ.js +0 -1
- package/build/assets/cloud-funnel-analytics-CcSez21r.js +0 -1
- package/build/assets/conversation-Cmyw9bFh.js +0 -90
- package/build/assets/conversation-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-panel-CvoGZ5vC.js +0 -1
- package/build/assets/conversation-state-store-CtgILxWF.js +0 -1
- package/build/assets/conversation-store-B8Eahyeg.js +0 -6
- package/build/assets/external-link-zWbg5KXS.js +0 -1
- package/build/assets/files-tab-D5zuU5TY.js +0 -1
- package/build/assets/format-model-name-BN_rx1Y3.js +0 -1
- package/build/assets/format-relative-time-BerVamGl.js +0 -1
- package/build/assets/git-provider-icon-zuKz2cwo.js +0 -1
- package/build/assets/git-repo-dropdown-Bo7ciSNX.js +0 -1
- package/build/assets/home-DqyeeFA_.js +0 -1
- package/build/assets/home-Y0aDou-a.js +0 -1
- package/build/assets/index-home-DqyeeFA_.js +0 -1
- package/build/assets/info-C9lpK5pw.js +0 -1
- package/build/assets/install-server-modal-DW6dSyGr.js +0 -1
- package/build/assets/kebab-menu-item-content-CKydZrbH.js +0 -1
- package/build/assets/llm-not-configured-banner-DCE_0B4I.js +0 -27
- package/build/assets/llm-settings-8eWBF3Ij.js +0 -1
- package/build/assets/llm-settings-D9ko42Pi.js +0 -1
- package/build/assets/llm-subscription-service-B3K-97lP.js +0 -1
- package/build/assets/loader-circle-C5AnEN8r.js +0 -1
- package/build/assets/manifest-e1c3bc3b.js +0 -1
- package/build/assets/manifest-subpage-layout-Ds7G5GZ8.js +0 -1
- package/build/assets/markdown-renderer-DzvgdZey.js +0 -8
- package/build/assets/mcp-marketplace-utils-DSLou4n7.js +0 -1
- package/build/assets/messages-B2l0qLVk.js +0 -40
- package/build/assets/onboarding-modal-DrrGlEQq.js +0 -1
- package/build/assets/pencil-Bl3GWhgq.js +0 -1
- package/build/assets/plus-CtzlyAoF.js +0 -1
- package/build/assets/profiles-service.api-vcE_jJCe.js +0 -1
- package/build/assets/providers-CdrPPm0z.js +0 -1
- package/build/assets/recommended-automations-launcher-DIYgUdMm.js +0 -1
- package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
- package/build/assets/root-CBBi6IAe.js +0 -2
- package/build/assets/root-CRK9fOFd.css +0 -1
- package/build/assets/root-layout-BFN2rCOy.js +0 -2
- package/build/assets/search-CYaiKHRp.js +0 -1
- package/build/assets/secrets-service-BHF4fxML.js +0 -1
- package/build/assets/secrets-settings-aBGXtQhX.js +0 -1
- package/build/assets/shared-conversation-BIAcuORk.js +0 -1
- package/build/assets/shield-check-D2cpEpv3.js +0 -1
- package/build/assets/trash-2-CzDVN-Iw.js +0 -1
- package/build/assets/use-acp-credential-form-DGyo0QvL.js +0 -1
- package/build/assets/use-agent-profiles-B37XWDLq.js +0 -1
- package/build/assets/use-config-DapX3pjC.js +0 -1
- package/build/assets/use-create-conversation-CRf1dCm5.js +0 -1
- package/build/assets/use-create-secret-DcpT3RPw.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-is-creating-conversation-CVefC9Ns.js +0 -1
- package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
- package/build/assets/use-manifest-capabilities-zihHDbMW.js +0 -1
- package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
- package/build/assets/use-tracking-salbPJxT.js +0 -3
- package/build/assets/utils-DPQfkd-7.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js +0 -13
- package/build/assets/x-RYDBg-e2.js +0 -1
- package/build/assets/zap-tbKDzCe3.js +0 -1
- package/dist/api/cloud/suggestions-service.api.d.ts +0 -8
- package/dist/api/suggestions-service/suggestions-service.api.d.ts +0 -11
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +0 -7
- package/dist/components/conversation-events/index.d.ts +0 -1
- package/dist/components/features/automations/metadata-chip.d.ts +0 -6
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +0 -10
- package/dist/components/features/controls/tools.d.ts +0 -2
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/context-window-section.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/context-window-section.js +0 -46
- package/dist/components/features/conversation/metrics-modal/context-window-section.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/empty-state.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +0 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.js +0 -18
- package/dist/components/features/conversation/metrics-modal/empty-state.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +0 -5
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js +0 -20
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs +0 -2
- package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs.map +0 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +0 -6
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js +0 -57
- package/dist/components/features/conversation/metrics-modal/metrics-modal.js.map +0 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +0 -23
- package/dist/components/features/home/home-header/guide-message.d.ts +0 -1
- package/dist/components/features/home/home-header/home-header.d.ts +0 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +0 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +0 -1
- package/dist/components/features/home/new-conversation.d.ts +0 -1
- package/dist/components/features/home/tasks/task-card.d.ts +0 -6
- package/dist/components/features/home/tasks/task-group.d.ts +0 -7
- package/dist/components/features/home/tasks/task-issue-number.d.ts +0 -6
- package/dist/components/features/home/tasks/task-item-title.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +0 -6
- package/dist/components/features/settings/agent-server-onboarding.d.ts +0 -10
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +0 -6
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +0 -8
- package/dist/hooks/query/use-suggested-tasks.d.ts +0 -1
- package/dist/hooks/use-should-show-user-features.d.ts +0 -1
- package/dist/icons/u-credit-card.cjs +0 -2
- package/dist/icons/u-credit-card.cjs.map +0 -1
- package/dist/icons/u-credit-card.js +0 -21
- package/dist/icons/u-credit-card.js.map +0 -1
- package/dist/ui/card-title.d.ts +0 -16
- package/dist/ui/card.d.ts +0 -14
- package/dist/utils/group-suggested-tasks.d.ts +0 -7
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-task-polling.cjs","names":[],"sources":["../../../src/hooks/query/use-task-polling.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport type { AppConversationStartTask } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n} from \"#/api/conversation-metadata-store\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport {\n consumePendingTaskDraft,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { trackCloudConversationReady } from \"#/services/cloud-funnel-analytics\";\nimport { flushPendingTaskAttachments } from \"#/utils/flush-pending-task-attachments\";\nimport {\n clearPendingTaskMessageLink,\n consumeScheduledPendingTaskMessageReassign,\n linkPendingTaskMessages,\n schedulePendingTaskMessageReassign,\n} from \"#/utils/pending-task-message-link\";\n\nconst storeTaskPlugins = (\n task: AppConversationStartTask,\n conversationId: string,\n) => {\n const plugins = task.request.plugins?.map(toPluginCoordinates);\n if (!plugins?.length) return;\n\n const metadata = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n ...metadata,\n selected_repository:\n metadata?.selected_repository ?? task.request.selected_repository ?? null,\n selected_branch:\n metadata?.selected_branch ?? task.request.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? task.request.git_provider ?? null,\n plugins,\n });\n};\n\n/**\n * Read the shared polling state for a V1 conversation start task.\n *\n * This hook:\n * - Detects if the conversationId URL param is a task ID (format: \"task-{uuid}\")\n * - Polls the V1 start task API every 3 seconds until status is READY or ERROR\n * - Exposes task status and details for UI components to show loading states and errors\n *\n * URL patterns:\n * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}\n * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)\n *\n * The conversation route mounts useTaskPollingController once to own READY\n * side effects; other components can consume this hook without repeating them.\n */\nexport const useTaskPolling = () => {\n // Optional: the chat input shell renders on the home page too; polling\n // simply no-ops when there's no conversation id yet.\n const { conversationId } = useOptionalConversationId();\n\n // Check if this is a task ID (format: \"task-{uuid}\")\n const isTask = !!conversationId && conversationId.startsWith(\"task-\");\n const taskId = isTask ? conversationId!.replace(\"task-\", \"\") : null;\n\n // Poll the task if this is a task ID\n const taskQuery = useQuery({\n queryKey: [\"start-task\", taskId],\n queryFn: async () => {\n if (!taskId) return null;\n return AgentServerConversationService.getStartTask(taskId);\n },\n enabled: !!taskId,\n refetchInterval: (query) => {\n const task = query.state.data;\n if (!task) return false;\n\n // Stop polling if ready or error\n if (task.status === \"READY\" || task.status === \"ERROR\") {\n return false;\n }\n\n // Poll every 3 seconds while task is in progress\n return 3000;\n },\n retry: false,\n });\n\n return {\n isTask,\n taskId,\n conversationId: isTask ? null : (conversationId ?? null),\n task: taskQuery.data,\n taskStatus: taskQuery.data?.status,\n taskDetail: taskQuery.data?.detail,\n taskError: taskQuery.error,\n isLoadingTask: taskQuery.isLoading,\n // Repository information from task request\n repositoryInfo: {\n selectedRepository: taskQuery.data?.request?.selected_repository,\n selectedBranch: taskQuery.data?.request?.selected_branch,\n gitProvider: taskQuery.data?.request?.git_provider,\n },\n };\n};\n\n/** Own the task lifecycle side effects once at the conversation route. */\nexport const useTaskPollingController = () => {\n const polling = useTaskPolling();\n const { task, taskId } = polling;\n const { conversationId } = useOptionalConversationId();\n const { navigate } = useNavigation();\n const handledReadyTaskIdRef = useRef<string | null>(null);\n\n // Reassign optimistic pending messages before paint on the real conversation\n // route. Doing this in the ready handler before navigate leaves a frame where\n // the URL still points at `task-{uuid}` but pending is keyed to the real id.\n useLayoutEffect(() => {\n if (!conversationId) {\n return;\n }\n\n const pendingReassign =\n consumeScheduledPendingTaskMessageReassign(conversationId);\n if (!pendingReassign) {\n return;\n }\n\n useOptimisticUserMessageStore\n .getState()\n .reassignPendingMessages(\n pendingReassign.fromConversationId,\n pendingReassign.toConversationId,\n );\n clearPendingTaskMessageLink(pendingReassign.toConversationId);\n }, [conversationId]);\n\n // Navigate to conversation ID when task is ready\n useEffect(() => {\n const appConversationId = task?.app_conversation_id;\n if (\n !taskId ||\n task?.status !== \"READY\" ||\n !appConversationId ||\n handledReadyTaskIdRef.current === taskId\n ) {\n return;\n }\n\n handledReadyTaskIdRef.current = taskId;\n trackCloudConversationReady(taskId, appConversationId);\n storeTaskPlugins(task, appConversationId);\n\n void (async () => {\n await flushPendingTaskAttachments(taskId, appConversationId);\n\n const taskConversationId = `task-${taskId}`;\n linkPendingTaskMessages(appConversationId, taskConversationId);\n schedulePendingTaskMessageReassign(taskConversationId, appConversationId);\n\n const pendingDraft = consumePendingTaskDraft(taskId);\n if (pendingDraft) {\n setConversationState(appConversationId, {\n draftMessage: pendingDraft,\n });\n }\n\n navigate(`/conversations/${appConversationId}
|
|
1
|
+
{"version":3,"file":"use-task-polling.cjs","names":[],"sources":["../../../src/hooks/query/use-task-polling.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport type { AppConversationStartTask } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n} from \"#/api/conversation-metadata-store\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport {\n consumePendingTaskDraft,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { trackCloudConversationReady } from \"#/services/cloud-funnel-analytics\";\nimport { flushPendingTaskAttachments } from \"#/utils/flush-pending-task-attachments\";\nimport {\n clearPendingTaskMessageLink,\n consumeScheduledPendingTaskMessageReassign,\n linkPendingTaskMessages,\n schedulePendingTaskMessageReassign,\n} from \"#/utils/pending-task-message-link\";\nimport { useBackendScopedPath } from \"#/hooks/use-backend-scoped-path\";\n\nconst storeTaskPlugins = (\n task: AppConversationStartTask,\n conversationId: string,\n) => {\n const plugins = task.request.plugins?.map(toPluginCoordinates);\n if (!plugins?.length) return;\n\n const metadata = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n ...metadata,\n selected_repository:\n metadata?.selected_repository ?? task.request.selected_repository ?? null,\n selected_branch:\n metadata?.selected_branch ?? task.request.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? task.request.git_provider ?? null,\n plugins,\n });\n};\n\n/**\n * Read the shared polling state for a V1 conversation start task.\n *\n * This hook:\n * - Detects if the conversationId URL param is a task ID (format: \"task-{uuid}\")\n * - Polls the V1 start task API every 3 seconds until status is READY or ERROR\n * - Exposes task status and details for UI components to show loading states and errors\n *\n * URL patterns:\n * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}\n * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)\n *\n * The conversation route mounts useTaskPollingController once to own READY\n * side effects; other components can consume this hook without repeating them.\n */\nexport const useTaskPolling = () => {\n // Optional: the chat input shell renders on the home page too; polling\n // simply no-ops when there's no conversation id yet.\n const { conversationId } = useOptionalConversationId();\n\n // Check if this is a task ID (format: \"task-{uuid}\")\n const isTask = !!conversationId && conversationId.startsWith(\"task-\");\n const taskId = isTask ? conversationId!.replace(\"task-\", \"\") : null;\n\n // Poll the task if this is a task ID\n const taskQuery = useQuery({\n queryKey: [\"start-task\", taskId],\n queryFn: async () => {\n if (!taskId) return null;\n return AgentServerConversationService.getStartTask(taskId);\n },\n enabled: !!taskId,\n refetchInterval: (query) => {\n const task = query.state.data;\n if (!task) return false;\n\n // Stop polling if ready or error\n if (task.status === \"READY\" || task.status === \"ERROR\") {\n return false;\n }\n\n // Poll every 3 seconds while task is in progress\n return 3000;\n },\n retry: false,\n });\n\n return {\n isTask,\n taskId,\n conversationId: isTask ? null : (conversationId ?? null),\n task: taskQuery.data,\n taskStatus: taskQuery.data?.status,\n taskDetail: taskQuery.data?.detail,\n taskError: taskQuery.error,\n isLoadingTask: taskQuery.isLoading,\n // Repository information from task request\n repositoryInfo: {\n selectedRepository: taskQuery.data?.request?.selected_repository,\n selectedBranch: taskQuery.data?.request?.selected_branch,\n gitProvider: taskQuery.data?.request?.git_provider,\n },\n };\n};\n\n/** Own the task lifecycle side effects once at the conversation route. */\nexport const useTaskPollingController = () => {\n const polling = useTaskPolling();\n const { task, taskId } = polling;\n const { conversationId } = useOptionalConversationId();\n const { navigate } = useNavigation();\n const backendScopedPath = useBackendScopedPath();\n const handledReadyTaskIdRef = useRef<string | null>(null);\n\n // Reassign optimistic pending messages before paint on the real conversation\n // route. Doing this in the ready handler before navigate leaves a frame where\n // the URL still points at `task-{uuid}` but pending is keyed to the real id.\n useLayoutEffect(() => {\n if (!conversationId) {\n return;\n }\n\n const pendingReassign =\n consumeScheduledPendingTaskMessageReassign(conversationId);\n if (!pendingReassign) {\n return;\n }\n\n useOptimisticUserMessageStore\n .getState()\n .reassignPendingMessages(\n pendingReassign.fromConversationId,\n pendingReassign.toConversationId,\n );\n clearPendingTaskMessageLink(pendingReassign.toConversationId);\n }, [conversationId]);\n\n // Navigate to conversation ID when task is ready\n useEffect(() => {\n const appConversationId = task?.app_conversation_id;\n if (\n !taskId ||\n task?.status !== \"READY\" ||\n !appConversationId ||\n handledReadyTaskIdRef.current === taskId\n ) {\n return;\n }\n\n handledReadyTaskIdRef.current = taskId;\n trackCloudConversationReady(taskId, appConversationId);\n storeTaskPlugins(task, appConversationId);\n\n void (async () => {\n await flushPendingTaskAttachments(taskId, appConversationId);\n\n const taskConversationId = `task-${taskId}`;\n linkPendingTaskMessages(appConversationId, taskConversationId);\n schedulePendingTaskMessageReassign(taskConversationId, appConversationId);\n\n const pendingDraft = consumePendingTaskDraft(taskId);\n if (pendingDraft) {\n setConversationState(appConversationId, {\n draftMessage: pendingDraft,\n });\n }\n\n navigate(backendScopedPath(`/conversations/${appConversationId}`), {\n replace: true,\n });\n })();\n }, [backendScopedPath, task, taskId, navigate]);\n\n return polling;\n};\n"],"mappings":"8sBA0BA,IAAM,GACJ,EACA,IACG,CACH,IAAM,EAAU,EAAK,QAAQ,SAAS,IAAI,EAAA,mBAAmB,EAC7D,GAAI,CAAC,GAAS,OAAQ,OAEtB,IAAM,EAAW,EAAA,8BAA8B,CAAc,EAC7D,EAAA,8BAA8B,EAAgB,CAC5C,GAAG,EACH,oBACE,GAAU,qBAAuB,EAAK,QAAQ,qBAAuB,KACvE,gBACE,GAAU,iBAAmB,EAAK,QAAQ,iBAAmB,KAC/D,aAAc,GAAU,cAAgB,EAAK,QAAQ,cAAgB,KACrE,SACF,CAAC,CACH,EAiBa,MAAuB,CAGlC,GAAM,CAAE,kBAAmB,EAAA,0BAA0B,EAG/C,EAAS,CAAC,CAAC,GAAkB,EAAe,WAAW,OAAO,EAC9D,EAAS,EAAS,EAAgB,QAAQ,QAAS,EAAE,EAAI,KAGzD,EAAY,EAAA,SAAS,CACzB,SAAU,CAAC,aAAc,CAAM,EAC/B,QAAS,SACF,EACE,EAAA,QAA+B,aAAa,CAAM,EADrC,KAGtB,QAAS,CAAC,CAAC,EACX,gBAAkB,GAAU,CAC1B,IAAM,EAAO,EAAM,MAAM,KASzB,MARI,CAAC,GAGD,EAAK,SAAW,SAAW,EAAK,SAAW,QACtC,GAIF,GACT,EACA,MAAO,EACT,CAAC,EAED,MAAO,CACL,SACA,SACA,eAAgB,EAAS,KAAQ,GAAkB,KACnD,KAAM,EAAU,KAChB,WAAY,EAAU,MAAM,OAC5B,WAAY,EAAU,MAAM,OAC5B,UAAW,EAAU,MACrB,cAAe,EAAU,UAEzB,eAAgB,CACd,mBAAoB,EAAU,MAAM,SAAS,oBAC7C,eAAgB,EAAU,MAAM,SAAS,gBACzC,YAAa,EAAU,MAAM,SAAS,YACxC,CACF,CACF,EAGa,MAAiC,CAC5C,IAAM,EAAU,EAAe,EACzB,CAAE,OAAM,UAAW,EACnB,CAAE,kBAAmB,EAAA,0BAA0B,EAC/C,CAAE,YAAa,EAAA,cAAc,EAC7B,EAAoB,EAAA,qBAAqB,EACzC,GAAA,EAAA,EAAA,QAA8C,IAAI,EA6DxD,OAxDA,EAAA,EAAA,qBAAsB,CACpB,GAAI,CAAC,EACH,OAGF,IAAM,EACJ,EAAA,2CAA2C,CAAc,EACtD,IAIL,EAAA,8BACG,SAAS,EACT,wBACC,EAAgB,mBAChB,EAAgB,gBAClB,EACF,EAAA,4BAA4B,EAAgB,gBAAgB,EAC9D,EAAG,CAAC,CAAc,CAAC,GAGnB,EAAA,EAAA,eAAgB,CACd,IAAM,EAAoB,GAAM,oBAE9B,CAAC,GACD,GAAM,SAAW,SACjB,CAAC,GACD,EAAsB,UAAY,IAKpC,EAAsB,QAAU,EAChC,EAAA,4BAA4B,EAAQ,CAAiB,EACrD,EAAiB,EAAM,CAAiB,GAElC,SAAY,CAChB,MAAM,EAAA,4BAA4B,EAAQ,CAAiB,EAE3D,IAAM,EAAqB,QAAQ,IACnC,EAAA,wBAAwB,EAAmB,CAAkB,EAC7D,EAAA,mCAAmC,EAAoB,CAAiB,EAExE,IAAM,EAAe,EAAA,wBAAwB,CAAM,EAC/C,GACF,EAAA,qBAAqB,EAAmB,CACtC,aAAc,CAChB,CAAC,EAGH,EAAS,EAAkB,kBAAkB,GAAmB,EAAG,CACjE,QAAS,EACX,CAAC,CACH,GAAG,EACL,EAAG,CAAC,EAAmB,EAAM,EAAQ,CAAQ,CAAC,EAEvC,CACT"}
|
|
@@ -8,9 +8,10 @@ import l from "../../api/conversation-service/agent-server-conversation-service.
|
|
|
8
8
|
import { trackCloudConversationReady as u } from "../../services/cloud-funnel-analytics.js";
|
|
9
9
|
import { flushPendingTaskAttachments as d } from "../../utils/flush-pending-task-attachments.js";
|
|
10
10
|
import { clearPendingTaskMessageLink as f, consumeScheduledPendingTaskMessageReassign as p, linkPendingTaskMessages as m, schedulePendingTaskMessageReassign as h } from "../../utils/pending-task-message-link.js";
|
|
11
|
-
import {
|
|
11
|
+
import { useBackendScopedPath as g } from "../use-backend-scoped-path.js";
|
|
12
|
+
import { useEffect as _, useLayoutEffect as v, useRef as y } from "react";
|
|
12
13
|
//#region src/hooks/query/use-task-polling.ts
|
|
13
|
-
var
|
|
14
|
+
var b = (e, t) => {
|
|
14
15
|
let n = e.request.plugins?.map(c);
|
|
15
16
|
if (!n?.length) return;
|
|
16
17
|
let r = o(t);
|
|
@@ -21,7 +22,7 @@ var y = (e, t) => {
|
|
|
21
22
|
git_provider: r?.git_provider ?? e.request.git_provider ?? null,
|
|
22
23
|
plugins: n
|
|
23
24
|
});
|
|
24
|
-
},
|
|
25
|
+
}, x = () => {
|
|
25
26
|
let { conversationId: e } = t(), n = !!e && e.startsWith("task-"), r = n ? e.replace("task-", "") : null, a = i({
|
|
26
27
|
queryKey: ["start-task", r],
|
|
27
28
|
queryFn: async () => r ? l.getStartTask(r) : null,
|
|
@@ -47,28 +48,29 @@ var y = (e, t) => {
|
|
|
47
48
|
gitProvider: a.data?.request?.git_provider
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
|
-
},
|
|
51
|
-
let i =
|
|
52
|
-
return
|
|
51
|
+
}, S = () => {
|
|
52
|
+
let i = x(), { task: o, taskId: s } = i, { conversationId: c } = t(), { navigate: l } = e(), S = g(), C = y(null);
|
|
53
|
+
return v(() => {
|
|
53
54
|
if (!c) return;
|
|
54
55
|
let e = p(c);
|
|
55
56
|
e && (a.getState().reassignPendingMessages(e.fromConversationId, e.toConversationId), f(e.toConversationId));
|
|
56
|
-
}, [c]),
|
|
57
|
+
}, [c]), _(() => {
|
|
57
58
|
let e = o?.app_conversation_id;
|
|
58
|
-
!s || o?.status !== "READY" || !e ||
|
|
59
|
+
!s || o?.status !== "READY" || !e || C.current === s || (C.current = s, u(s, e), b(o, e), (async () => {
|
|
59
60
|
await d(s, e);
|
|
60
61
|
let t = `task-${s}`;
|
|
61
62
|
m(e, t), h(t, e);
|
|
62
63
|
let i = n(s);
|
|
63
|
-
i && r(e, { draftMessage: i }), l(`/conversations/${e}
|
|
64
|
+
i && r(e, { draftMessage: i }), l(S(`/conversations/${e}`), { replace: !0 });
|
|
64
65
|
})());
|
|
65
66
|
}, [
|
|
67
|
+
S,
|
|
66
68
|
o,
|
|
67
69
|
s,
|
|
68
70
|
l
|
|
69
71
|
]), i;
|
|
70
72
|
};
|
|
71
73
|
//#endregion
|
|
72
|
-
export {
|
|
74
|
+
export { x as useTaskPolling, S as useTaskPollingController };
|
|
73
75
|
|
|
74
76
|
//# sourceMappingURL=use-task-polling.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-task-polling.js","names":[],"sources":["../../../src/hooks/query/use-task-polling.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport type { AppConversationStartTask } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n} from \"#/api/conversation-metadata-store\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport {\n consumePendingTaskDraft,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { trackCloudConversationReady } from \"#/services/cloud-funnel-analytics\";\nimport { flushPendingTaskAttachments } from \"#/utils/flush-pending-task-attachments\";\nimport {\n clearPendingTaskMessageLink,\n consumeScheduledPendingTaskMessageReassign,\n linkPendingTaskMessages,\n schedulePendingTaskMessageReassign,\n} from \"#/utils/pending-task-message-link\";\n\nconst storeTaskPlugins = (\n task: AppConversationStartTask,\n conversationId: string,\n) => {\n const plugins = task.request.plugins?.map(toPluginCoordinates);\n if (!plugins?.length) return;\n\n const metadata = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n ...metadata,\n selected_repository:\n metadata?.selected_repository ?? task.request.selected_repository ?? null,\n selected_branch:\n metadata?.selected_branch ?? task.request.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? task.request.git_provider ?? null,\n plugins,\n });\n};\n\n/**\n * Read the shared polling state for a V1 conversation start task.\n *\n * This hook:\n * - Detects if the conversationId URL param is a task ID (format: \"task-{uuid}\")\n * - Polls the V1 start task API every 3 seconds until status is READY or ERROR\n * - Exposes task status and details for UI components to show loading states and errors\n *\n * URL patterns:\n * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}\n * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)\n *\n * The conversation route mounts useTaskPollingController once to own READY\n * side effects; other components can consume this hook without repeating them.\n */\nexport const useTaskPolling = () => {\n // Optional: the chat input shell renders on the home page too; polling\n // simply no-ops when there's no conversation id yet.\n const { conversationId } = useOptionalConversationId();\n\n // Check if this is a task ID (format: \"task-{uuid}\")\n const isTask = !!conversationId && conversationId.startsWith(\"task-\");\n const taskId = isTask ? conversationId!.replace(\"task-\", \"\") : null;\n\n // Poll the task if this is a task ID\n const taskQuery = useQuery({\n queryKey: [\"start-task\", taskId],\n queryFn: async () => {\n if (!taskId) return null;\n return AgentServerConversationService.getStartTask(taskId);\n },\n enabled: !!taskId,\n refetchInterval: (query) => {\n const task = query.state.data;\n if (!task) return false;\n\n // Stop polling if ready or error\n if (task.status === \"READY\" || task.status === \"ERROR\") {\n return false;\n }\n\n // Poll every 3 seconds while task is in progress\n return 3000;\n },\n retry: false,\n });\n\n return {\n isTask,\n taskId,\n conversationId: isTask ? null : (conversationId ?? null),\n task: taskQuery.data,\n taskStatus: taskQuery.data?.status,\n taskDetail: taskQuery.data?.detail,\n taskError: taskQuery.error,\n isLoadingTask: taskQuery.isLoading,\n // Repository information from task request\n repositoryInfo: {\n selectedRepository: taskQuery.data?.request?.selected_repository,\n selectedBranch: taskQuery.data?.request?.selected_branch,\n gitProvider: taskQuery.data?.request?.git_provider,\n },\n };\n};\n\n/** Own the task lifecycle side effects once at the conversation route. */\nexport const useTaskPollingController = () => {\n const polling = useTaskPolling();\n const { task, taskId } = polling;\n const { conversationId } = useOptionalConversationId();\n const { navigate } = useNavigation();\n const handledReadyTaskIdRef = useRef<string | null>(null);\n\n // Reassign optimistic pending messages before paint on the real conversation\n // route. Doing this in the ready handler before navigate leaves a frame where\n // the URL still points at `task-{uuid}` but pending is keyed to the real id.\n useLayoutEffect(() => {\n if (!conversationId) {\n return;\n }\n\n const pendingReassign =\n consumeScheduledPendingTaskMessageReassign(conversationId);\n if (!pendingReassign) {\n return;\n }\n\n useOptimisticUserMessageStore\n .getState()\n .reassignPendingMessages(\n pendingReassign.fromConversationId,\n pendingReassign.toConversationId,\n );\n clearPendingTaskMessageLink(pendingReassign.toConversationId);\n }, [conversationId]);\n\n // Navigate to conversation ID when task is ready\n useEffect(() => {\n const appConversationId = task?.app_conversation_id;\n if (\n !taskId ||\n task?.status !== \"READY\" ||\n !appConversationId ||\n handledReadyTaskIdRef.current === taskId\n ) {\n return;\n }\n\n handledReadyTaskIdRef.current = taskId;\n trackCloudConversationReady(taskId, appConversationId);\n storeTaskPlugins(task, appConversationId);\n\n void (async () => {\n await flushPendingTaskAttachments(taskId, appConversationId);\n\n const taskConversationId = `task-${taskId}`;\n linkPendingTaskMessages(appConversationId, taskConversationId);\n schedulePendingTaskMessageReassign(taskConversationId, appConversationId);\n\n const pendingDraft = consumePendingTaskDraft(taskId);\n if (pendingDraft) {\n setConversationState(appConversationId, {\n draftMessage: pendingDraft,\n });\n }\n\n navigate(`/conversations/${appConversationId}
|
|
1
|
+
{"version":3,"file":"use-task-polling.js","names":[],"sources":["../../../src/hooks/query/use-task-polling.ts"],"sourcesContent":["import { useEffect, useLayoutEffect, useRef } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport AgentServerConversationService from \"#/api/conversation-service/agent-server-conversation-service.api\";\nimport type { AppConversationStartTask } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n getStoredConversationMetadata,\n setStoredConversationMetadata,\n toPluginCoordinates,\n} from \"#/api/conversation-metadata-store\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport {\n consumePendingTaskDraft,\n setConversationState,\n} from \"#/utils/conversation-local-storage\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { trackCloudConversationReady } from \"#/services/cloud-funnel-analytics\";\nimport { flushPendingTaskAttachments } from \"#/utils/flush-pending-task-attachments\";\nimport {\n clearPendingTaskMessageLink,\n consumeScheduledPendingTaskMessageReassign,\n linkPendingTaskMessages,\n schedulePendingTaskMessageReassign,\n} from \"#/utils/pending-task-message-link\";\nimport { useBackendScopedPath } from \"#/hooks/use-backend-scoped-path\";\n\nconst storeTaskPlugins = (\n task: AppConversationStartTask,\n conversationId: string,\n) => {\n const plugins = task.request.plugins?.map(toPluginCoordinates);\n if (!plugins?.length) return;\n\n const metadata = getStoredConversationMetadata(conversationId);\n setStoredConversationMetadata(conversationId, {\n ...metadata,\n selected_repository:\n metadata?.selected_repository ?? task.request.selected_repository ?? null,\n selected_branch:\n metadata?.selected_branch ?? task.request.selected_branch ?? null,\n git_provider: metadata?.git_provider ?? task.request.git_provider ?? null,\n plugins,\n });\n};\n\n/**\n * Read the shared polling state for a V1 conversation start task.\n *\n * This hook:\n * - Detects if the conversationId URL param is a task ID (format: \"task-{uuid}\")\n * - Polls the V1 start task API every 3 seconds until status is READY or ERROR\n * - Exposes task status and details for UI components to show loading states and errors\n *\n * URL patterns:\n * - /conversations/task-{uuid} → Polls start task, then navigates to /conversations/{conversation-id}\n * - /conversations/{uuid or hex} → No polling (handled by useActiveConversation)\n *\n * The conversation route mounts useTaskPollingController once to own READY\n * side effects; other components can consume this hook without repeating them.\n */\nexport const useTaskPolling = () => {\n // Optional: the chat input shell renders on the home page too; polling\n // simply no-ops when there's no conversation id yet.\n const { conversationId } = useOptionalConversationId();\n\n // Check if this is a task ID (format: \"task-{uuid}\")\n const isTask = !!conversationId && conversationId.startsWith(\"task-\");\n const taskId = isTask ? conversationId!.replace(\"task-\", \"\") : null;\n\n // Poll the task if this is a task ID\n const taskQuery = useQuery({\n queryKey: [\"start-task\", taskId],\n queryFn: async () => {\n if (!taskId) return null;\n return AgentServerConversationService.getStartTask(taskId);\n },\n enabled: !!taskId,\n refetchInterval: (query) => {\n const task = query.state.data;\n if (!task) return false;\n\n // Stop polling if ready or error\n if (task.status === \"READY\" || task.status === \"ERROR\") {\n return false;\n }\n\n // Poll every 3 seconds while task is in progress\n return 3000;\n },\n retry: false,\n });\n\n return {\n isTask,\n taskId,\n conversationId: isTask ? null : (conversationId ?? null),\n task: taskQuery.data,\n taskStatus: taskQuery.data?.status,\n taskDetail: taskQuery.data?.detail,\n taskError: taskQuery.error,\n isLoadingTask: taskQuery.isLoading,\n // Repository information from task request\n repositoryInfo: {\n selectedRepository: taskQuery.data?.request?.selected_repository,\n selectedBranch: taskQuery.data?.request?.selected_branch,\n gitProvider: taskQuery.data?.request?.git_provider,\n },\n };\n};\n\n/** Own the task lifecycle side effects once at the conversation route. */\nexport const useTaskPollingController = () => {\n const polling = useTaskPolling();\n const { task, taskId } = polling;\n const { conversationId } = useOptionalConversationId();\n const { navigate } = useNavigation();\n const backendScopedPath = useBackendScopedPath();\n const handledReadyTaskIdRef = useRef<string | null>(null);\n\n // Reassign optimistic pending messages before paint on the real conversation\n // route. Doing this in the ready handler before navigate leaves a frame where\n // the URL still points at `task-{uuid}` but pending is keyed to the real id.\n useLayoutEffect(() => {\n if (!conversationId) {\n return;\n }\n\n const pendingReassign =\n consumeScheduledPendingTaskMessageReassign(conversationId);\n if (!pendingReassign) {\n return;\n }\n\n useOptimisticUserMessageStore\n .getState()\n .reassignPendingMessages(\n pendingReassign.fromConversationId,\n pendingReassign.toConversationId,\n );\n clearPendingTaskMessageLink(pendingReassign.toConversationId);\n }, [conversationId]);\n\n // Navigate to conversation ID when task is ready\n useEffect(() => {\n const appConversationId = task?.app_conversation_id;\n if (\n !taskId ||\n task?.status !== \"READY\" ||\n !appConversationId ||\n handledReadyTaskIdRef.current === taskId\n ) {\n return;\n }\n\n handledReadyTaskIdRef.current = taskId;\n trackCloudConversationReady(taskId, appConversationId);\n storeTaskPlugins(task, appConversationId);\n\n void (async () => {\n await flushPendingTaskAttachments(taskId, appConversationId);\n\n const taskConversationId = `task-${taskId}`;\n linkPendingTaskMessages(appConversationId, taskConversationId);\n schedulePendingTaskMessageReassign(taskConversationId, appConversationId);\n\n const pendingDraft = consumePendingTaskDraft(taskId);\n if (pendingDraft) {\n setConversationState(appConversationId, {\n draftMessage: pendingDraft,\n });\n }\n\n navigate(backendScopedPath(`/conversations/${appConversationId}`), {\n replace: true,\n });\n })();\n }, [backendScopedPath, task, taskId, navigate]);\n\n return polling;\n};\n"],"mappings":";;;;;;;;;;;;;AA0BA,IAAM,KACJ,GACA,MACG;CACH,IAAM,IAAU,EAAK,QAAQ,SAAS,IAAI,CAAmB;CAC7D,IAAI,CAAC,GAAS,QAAQ;CAEtB,IAAM,IAAW,EAA8B,CAAc;CAC7D,EAA8B,GAAgB;EAC5C,GAAG;EACH,qBACE,GAAU,uBAAuB,EAAK,QAAQ,uBAAuB;EACvE,iBACE,GAAU,mBAAmB,EAAK,QAAQ,mBAAmB;EAC/D,cAAc,GAAU,gBAAgB,EAAK,QAAQ,gBAAgB;EACrE;CACF,CAAC;AACH,GAiBa,UAAuB;CAGlC,IAAM,EAAE,sBAAmB,EAA0B,GAG/C,IAAS,CAAC,CAAC,KAAkB,EAAe,WAAW,OAAO,GAC9D,IAAS,IAAS,EAAgB,QAAQ,SAAS,EAAE,IAAI,MAGzD,IAAY,EAAS;EACzB,UAAU,CAAC,cAAc,CAAM;EAC/B,SAAS,YACF,IACE,EAA+B,aAAa,CAAM,IADrC;EAGtB,SAAS,CAAC,CAAC;EACX,kBAAkB,MAAU;GAC1B,IAAM,IAAO,EAAM,MAAM;GASzB,OARI,CAAC,KAGD,EAAK,WAAW,WAAW,EAAK,WAAW,UACtC,KAIF;EACT;EACA,OAAO;CACT,CAAC;CAED,OAAO;EACL;EACA;EACA,gBAAgB,IAAS,OAAQ,KAAkB;EACnD,MAAM,EAAU;EAChB,YAAY,EAAU,MAAM;EAC5B,YAAY,EAAU,MAAM;EAC5B,WAAW,EAAU;EACrB,eAAe,EAAU;EAEzB,gBAAgB;GACd,oBAAoB,EAAU,MAAM,SAAS;GAC7C,gBAAgB,EAAU,MAAM,SAAS;GACzC,aAAa,EAAU,MAAM,SAAS;EACxC;CACF;AACF,GAGa,UAAiC;CAC5C,IAAM,IAAU,EAAe,GACzB,EAAE,SAAM,cAAW,GACnB,EAAE,sBAAmB,EAA0B,GAC/C,EAAE,gBAAa,EAAc,GAC7B,IAAoB,EAAqB,GACzC,IAAwB,EAAsB,IAAI;CA6DxD,OAxDA,QAAsB;EACpB,IAAI,CAAC,GACH;EAGF,IAAM,IACJ,EAA2C,CAAc;EACtD,MAIL,EACG,SAAS,EACT,wBACC,EAAgB,oBAChB,EAAgB,gBAClB,GACF,EAA4B,EAAgB,gBAAgB;CAC9D,GAAG,CAAC,CAAc,CAAC,GAGnB,QAAgB;EACd,IAAM,IAAoB,GAAM;EAE9B,CAAC,KACD,GAAM,WAAW,WACjB,CAAC,KACD,EAAsB,YAAY,MAKpC,EAAsB,UAAU,GAChC,EAA4B,GAAQ,CAAiB,GACrD,EAAiB,GAAM,CAAiB,IAElC,YAAY;GAChB,MAAM,EAA4B,GAAQ,CAAiB;GAE3D,IAAM,IAAqB,QAAQ;GAEnC,AADA,EAAwB,GAAmB,CAAkB,GAC7D,EAAmC,GAAoB,CAAiB;GAExE,IAAM,IAAe,EAAwB,CAAM;GAOnD,AANI,KACF,EAAqB,GAAmB,EACtC,cAAc,EAChB,CAAC,GAGH,EAAS,EAAkB,kBAAkB,GAAmB,GAAG,EACjE,SAAS,GACX,CAAC;EACH,GAAG;CACL,GAAG;EAAC;EAAmB;EAAM;EAAQ;CAAQ,CAAC,GAEvC;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../utils/get-git-path.cjs"),o=require("../../api/git-service/agent-server-git-service.api.cjs");let s=require("react");s=e.__toESM(s,1);var c=()=>{let{conversationId:e}=t.useConversationId(),{data:c}=r.useActiveConversation(),[l,u]=s.default.useState([]),d=s.default.useRef(null),f=i.useRuntimeIsReady(),p=c?.conversation_url,m=c?.session_api_key,h=c?.selected_repository,g=c?.workspace?.working_dir?.trim(),_=s.default.useMemo(()=>a.getGitPath(h,g),[h,g]),v=n.useQuery({queryKey:[`file_changes`,e,p,m,_],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return o.default.getGitChanges(e,p,m,_)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:f&&!!e,meta:{disableToast:!0}});return s.default.useEffect(()=>{if(!v.isFetching&&v.isSuccess&&v.data){let e=v.data;if(e!==d.current)if(d.current=e,Array.isArray(e)){let t=new Set(e.map(e=>e.path)),n=new Set(l.map(e=>e.path)),r=e.filter(e=>!n.has(e.path)),i=l.filter(e=>t.has(e.path));u([...r,...i])}else u([e])}},[v.isFetching,v.isSuccess,v.data]),{data:l,isLoading:v.isLoading,isFetching:v.isFetching,isSuccess:v.isSuccess,isError:v.isError,error:v.error,refetch:v.refetch}};exports.useUnifiedGetGitChanges=c;
|
|
2
2
|
//# sourceMappingURL=use-unified-get-git-changes.cjs.map
|
|
@@ -2,12 +2,12 @@ import { useConversationId as e } from "../use-conversation-id.js";
|
|
|
2
2
|
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
3
|
import { useActiveConversation as n } from "./use-active-conversation.js";
|
|
4
4
|
import { useRuntimeIsReady as r } from "../use-runtime-is-ready.js";
|
|
5
|
-
import i from "../../
|
|
6
|
-
import
|
|
5
|
+
import { getGitPath as i } from "../../utils/get-git-path.js";
|
|
6
|
+
import a from "../../api/git-service/agent-server-git-service.api.js";
|
|
7
7
|
import o from "react";
|
|
8
8
|
//#region src/hooks/query/use-unified-get-git-changes.ts
|
|
9
9
|
var s = () => {
|
|
10
|
-
let { conversationId: s } = e(), { data: c } = n(), [l, u] = o.useState([]), d = o.useRef(null), f = r(), p = c?.conversation_url, m = c?.session_api_key, h = c?.selected_repository, g = c?.workspace?.working_dir?.trim(), _ = o.useMemo(() =>
|
|
10
|
+
let { conversationId: s } = e(), { data: c } = n(), [l, u] = o.useState([]), d = o.useRef(null), f = r(), p = c?.conversation_url, m = c?.session_api_key, h = c?.selected_repository, g = c?.workspace?.working_dir?.trim(), _ = o.useMemo(() => i(h, g), [h, g]), v = t({
|
|
11
11
|
queryKey: [
|
|
12
12
|
"file_changes",
|
|
13
13
|
s,
|
|
@@ -17,7 +17,7 @@ var s = () => {
|
|
|
17
17
|
],
|
|
18
18
|
queryFn: async () => {
|
|
19
19
|
if (!s) throw Error("No conversation ID");
|
|
20
|
-
return
|
|
20
|
+
return a.getGitChanges(s, p, m, _);
|
|
21
21
|
},
|
|
22
22
|
retry: !1,
|
|
23
23
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../use-runtime-is-ready.cjs"),a=require("../../utils/get-git-path.cjs"),o=require("../../api/git-service/agent-server-git-service.api.cjs");let s=require("react");s=e.__toESM(s,1);var c=()=>{let{conversationId:e}=t.useConversationId(),{data:c}=r.useActiveConversation(),l=i.useRuntimeIsReady(),u=c?.conversation_url,d=c?.session_api_key,f=c?.selected_repository,p=c?.workspace?.working_dir?.trim(),m=s.default.useMemo(()=>a.getGitPath(f,p),[f,p]),h=n.useQuery({queryKey:[`git_commits`,e,u,d,m],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return o.default.getGitCommits(u,d,m,50)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:l&&!!e,meta:{disableToast:!0}});return{commits:h.data?.commits??[],hasMore:h.data?.hasMore??!1,isUnsupported:h.data===null,isLoading:h.isLoading,isFetching:h.isFetching,isSuccess:h.isSuccess,isError:h.isError}};exports.useUnifiedGitCommits=c;
|
|
2
2
|
//# sourceMappingURL=use-unified-git-commits.cjs.map
|
|
@@ -2,11 +2,11 @@ import { useConversationId as e } from "../use-conversation-id.js";
|
|
|
2
2
|
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
3
|
import { useActiveConversation as n } from "./use-active-conversation.js";
|
|
4
4
|
import { useRuntimeIsReady as r } from "../use-runtime-is-ready.js";
|
|
5
|
-
import i from "../../
|
|
6
|
-
import
|
|
5
|
+
import { getGitPath as i } from "../../utils/get-git-path.js";
|
|
6
|
+
import a from "../../api/git-service/agent-server-git-service.api.js";
|
|
7
7
|
import o from "react";
|
|
8
8
|
var s = () => {
|
|
9
|
-
let { conversationId: s } = e(), { data: c } = n(), l = r(), u = c?.conversation_url, d = c?.session_api_key, f = c?.selected_repository, p = c?.workspace?.working_dir?.trim(), m = o.useMemo(() =>
|
|
9
|
+
let { conversationId: s } = e(), { data: c } = n(), l = r(), u = c?.conversation_url, d = c?.session_api_key, f = c?.selected_repository, p = c?.workspace?.working_dir?.trim(), m = o.useMemo(() => i(f, p), [f, p]), h = t({
|
|
10
10
|
queryKey: [
|
|
11
11
|
"git_commits",
|
|
12
12
|
s,
|
|
@@ -16,7 +16,7 @@ var s = () => {
|
|
|
16
16
|
],
|
|
17
17
|
queryFn: async () => {
|
|
18
18
|
if (!s) throw Error("No conversation ID");
|
|
19
|
-
return
|
|
19
|
+
return a.getGitCommits(u, d, m, 50);
|
|
20
20
|
},
|
|
21
21
|
retry: !1,
|
|
22
22
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../../
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../use-conversation-id.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("./use-active-conversation.cjs"),i=require("../../utils/get-git-path.cjs"),a=require("../../api/git-service/agent-server-git-service.api.cjs");let o=require("react");o=e.__toESM(o,1);var s=e=>{let{conversationId:s}=t.useConversationId(),{data:c}=r.useActiveConversation(),l=c?.conversation_url,u=c?.session_api_key,d=c?.selected_repository,f=c?.workspace?.working_dir?.trim(),p=o.default.useMemo(()=>`${i.getGitPath(d,f)}/${e.filePath}`,[d,e.filePath,f]),m=e.type===`D`;return n.useQuery({queryKey:e.commit?[`commit_file_diff`,s,l,u,e.commit,p]:[`file_diff`,s,l,u,p],queryFn:async()=>{if(!s)throw Error(`No conversation ID`);return a.default.getGitChangeDiff(s,l,u,p,e.commit)},enabled:e.enabled&&(!m||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};exports.useUnifiedGitDiff=s;
|
|
2
2
|
//# sourceMappingURL=use-unified-git-diff.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useConversationId as e } from "../use-conversation-id.js";
|
|
2
2
|
import { useQuery as t } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
3
3
|
import { useActiveConversation as n } from "./use-active-conversation.js";
|
|
4
|
-
import r from "../../
|
|
5
|
-
import
|
|
4
|
+
import { getGitPath as r } from "../../utils/get-git-path.js";
|
|
5
|
+
import i from "../../api/git-service/agent-server-git-service.api.js";
|
|
6
6
|
import a from "react";
|
|
7
7
|
//#region src/hooks/query/use-unified-git-diff.ts
|
|
8
8
|
var o = (o) => {
|
|
9
|
-
let { conversationId: s } = e(), { data: c } = n(), l = c?.conversation_url, u = c?.session_api_key, d = c?.selected_repository, f = c?.workspace?.working_dir?.trim(), p = a.useMemo(() => `${
|
|
9
|
+
let { conversationId: s } = e(), { data: c } = n(), l = c?.conversation_url, u = c?.session_api_key, d = c?.selected_repository, f = c?.workspace?.working_dir?.trim(), p = a.useMemo(() => `${r(d, f)}/${o.filePath}`, [
|
|
10
10
|
d,
|
|
11
11
|
o.filePath,
|
|
12
12
|
f
|
|
@@ -28,7 +28,7 @@ var o = (o) => {
|
|
|
28
28
|
],
|
|
29
29
|
queryFn: async () => {
|
|
30
30
|
if (!s) throw Error("No conversation ID");
|
|
31
|
-
return
|
|
31
|
+
return i.getGitChangeDiff(s, l, u, p, o.commit);
|
|
32
32
|
},
|
|
33
33
|
enabled: o.enabled && (!m || !!o.commit),
|
|
34
34
|
staleTime: o.commit ? Infinity : 1e3 * 60 * 5,
|
|
@@ -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("../use-conversation-id.cjs"),t=require("../../api/backend-registry/active-store.cjs"),n=require("../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"),r=require("../../api/cloud/conversation-service.api.cjs"),i=require("./use-active-conversation.cjs"),a=require("../use-runtime-is-ready.cjs"),o=require("../../api/runtime-service/agent-server-runtime-service.cjs"),s=require("../../utils/get-git-path.cjs");let c=require("react");var l=2e3,u=[`.git`,`node_modules`,`.venv`,`venv`,`__pycache__`,`dist`,`build`,`.next`,`.cache`,`.pytest_cache`,`.mypy_cache`,`.turbo`,`.parcel-cache`,`target`];function d(){return`find . \\( ${u.map(e=>`-name '${e}' -prune`).join(` -o `)} \\) -o -type f -print 2>/dev/null | sort | head -n ${l}`}function f(e){return e.startsWith(`./`)?e.slice(2):e}function p(e){let{data:t}=i.useActiveConversation(),r=a.useRuntimeIsReady(),s=t?.id,c=t?.conversation_url,u=t?.session_api_key,p=t?.workspace?.working_dir?.trim(),m=n.useQuery({queryKey:[`workspace-files`,s,c,u,p],queryFn:async()=>{let e=await o.default.executeCommand(c,u,d(),p,30);if(e.exit_code!==0)throw Error(e.stderr?.trim()||`Failed to list workspace files`);let t=e.stdout.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(f);return Array.from(new Set(t)).slice(0,l)},enabled:e&&r&&!!s&&!!p,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}});return{data:m.data,isLoading:m.isLoading}}function m(t){let{conversationId:o}=e.useOptionalConversationId(),{data:c}=i.useActiveConversation(),u=a.useRuntimeIsReady(),d=c?.selected_repository,p=c?.workspace?.working_dir?.trim(),m=s.getGitPath(d,p),h=m.startsWith(`/`)?m:`/${m}`,g=n.useQuery({queryKey:[`workspace-files-cloud`,o,h],queryFn:async()=>{let e=(await r.listCloudConversationFiles(o,h)).map(f).filter(Boolean);return Array.from(new Set(e)).slice(0,l)},enabled:t&&u&&!!o,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}});return{data:g.data,isLoading:g.isLoading}}function h(){let e=(0,c.useSyncExternalStore)(t.subscribeActiveBackend,t.getSnapshot,t.getSnapshot).active.backend.kind===`cloud`,n=p(!e),r=m(e);return e?r:n}exports.useWorkspaceFiles=h;
|
|
2
2
|
//# sourceMappingURL=use-workspace-files.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-workspace-files.cjs","names":[],"sources":["../../../src/hooks/query/use-workspace-files.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"use-workspace-files.cjs","names":[],"sources":["../../../src/hooks/query/use-workspace-files.ts"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\n\nimport AgentServerRuntimeService from \"#/api/runtime-service/agent-server-runtime-service\";\nimport { listCloudConversationFiles } from \"#/api/cloud/conversation-service.api\";\nimport {\n getSnapshot,\n subscribeActiveBackend,\n} from \"#/api/backend-registry/active-store\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useRuntimeIsReady } from \"#/hooks/use-runtime-is-ready\";\nimport { getGitPath } from \"#/utils/get-git-path\";\n\n// Cap the number of files we render so a giant repo doesn't freeze the UI.\nconst MAX_FILES = 2000;\n\nexport interface WorkspaceFilesResult {\n data: string[] | undefined;\n isLoading: boolean;\n}\n\n// Directory names that we never want to descend into when listing files.\nconst EXCLUDED_DIRS = [\n \".git\",\n \"node_modules\",\n \".venv\",\n \"venv\",\n \"__pycache__\",\n \"dist\",\n \"build\",\n \".next\",\n \".cache\",\n \".pytest_cache\",\n \".mypy_cache\",\n \".turbo\",\n \".parcel-cache\",\n \"target\",\n];\n\n// Build a `find` invocation that lists files relative to the workspace root.\nfunction buildListCommand(): string {\n const pruneExpr = EXCLUDED_DIRS.map((dir) => `-name '${dir}' -prune`).join(\n \" -o \",\n );\n return `find . \\\\( ${pruneExpr} \\\\) -o -type f -print 2>/dev/null | sort | head -n ${MAX_FILES}`;\n}\n\nfunction normalizePath(path: string): string {\n // Strip a leading \"./\" so paths render cleanly in the UI.\n return path.startsWith(\"./\") ? path.slice(2) : path;\n}\n\n/**\n * Local-backend listing: enumerate every regular file beneath the active\n * conversation's working directory via `find` over the agent-server's\n * `/api/bash/execute_bash_command`, excluding common heavy/build directories.\n * Returns paths relative to the working dir (e.g. `src/index.html`).\n *\n * Local only: the browser can't drive `/api/bash/execute_bash_command` on a\n * cloud runtime (no CORS, and the `/api/cloud-proxy` hop was removed). Cloud\n * backends hit a first-class cloud API listing endpoint instead — see\n * `useCloudWorkspaceFiles`.\n */\nfunction useLocalWorkspaceFiles(enabled: boolean): WorkspaceFilesResult {\n const { data: conversation } = useActiveConversation();\n const runtimeIsReady = useRuntimeIsReady();\n\n const conversationId = conversation?.id;\n const conversationUrl = conversation?.conversation_url;\n const sessionApiKey = conversation?.session_api_key;\n const workingDir = conversation?.workspace?.working_dir?.trim();\n\n const query = useQuery<string[]>({\n queryKey: [\n \"workspace-files\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n workingDir,\n ],\n queryFn: async () => {\n const result = await AgentServerRuntimeService.executeCommand(\n conversationUrl,\n sessionApiKey,\n buildListCommand(),\n workingDir,\n 30,\n );\n\n if (result.exit_code !== 0) {\n throw new Error(\n result.stderr?.trim() || \"Failed to list workspace files\",\n );\n }\n\n const lines = result.stdout\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter(Boolean)\n .map(normalizePath);\n\n // Defensive: keep results unique and bounded.\n return Array.from(new Set(lines)).slice(0, MAX_FILES);\n },\n enabled: enabled && runtimeIsReady && !!conversationId && !!workingDir,\n retry: false,\n staleTime: 1000 * 30,\n gcTime: 1000 * 60 * 5,\n meta: { disableToast: true },\n });\n\n return { data: query.data, isLoading: query.isLoading };\n}\n\n/**\n * Cloud-backend listing: enumerate the full workspace tree via the cloud API's\n * first-class `GET /api/v1/app-conversations/{id}/files` endpoint, which\n * resolves the conversation's runtime and runs the same bounded `find`\n * server-side (see enterprise `list_conversation_files`). This is the same\n * server-side runtime-hop transport the git-changes/diff and single-file read\n * already use, so it works without CORS or the removed `/api/cloud-proxy` hop.\n *\n * Unlike the previous git-changes-based approach, this returns unchanged\n * tracked files too, so a conversation attached to a large existing repo shows\n * the whole tree — matching the local-backend experience. Paths come back\n * relative to the working dir (e.g. `src/index.html`).\n */\nfunction useCloudWorkspaceFiles(enabled: boolean): WorkspaceFilesResult {\n // Source the id from the route (like the diff/commits cloud hooks), NOT from\n // `useActiveConversation().data.id`: the cloud API listing call only needs\n // the id, and gating on the batch-get query's data would keep the query\n // disabled — and never fire — whenever that data is null or still loading.\n const { conversationId } = useOptionalConversationId();\n const { data: conversation } = useActiveConversation();\n const runtimeIsReady = useRuntimeIsReady();\n\n const selectedRepository = conversation?.selected_repository;\n const workingDir = conversation?.workspace?.working_dir?.trim();\n\n // Anchor against an absolute workspace path the same way the diff view and\n // single-file read do (`getGitPath` defaults to a relative convention; the\n // cloud runtime needs an absolute path).\n const gitPath = getGitPath(selectedRepository, workingDir);\n const absolutePath = gitPath.startsWith(\"/\") ? gitPath : `/${gitPath}`;\n\n const query = useQuery<string[]>({\n queryKey: [\"workspace-files-cloud\", conversationId, absolutePath],\n queryFn: async () => {\n const files = await listCloudConversationFiles(\n conversationId!,\n absolutePath,\n );\n const normalized = files.map(normalizePath).filter(Boolean);\n return Array.from(new Set(normalized)).slice(0, MAX_FILES);\n },\n enabled: enabled && runtimeIsReady && !!conversationId,\n retry: false,\n staleTime: 1000 * 30,\n gcTime: 1000 * 60 * 5,\n meta: { disableToast: true },\n });\n\n return { data: query.data, isLoading: query.isLoading };\n}\n\n/**\n * Lists the files shown in the Files tab for the active conversation.\n *\n * Both backends enumerate the full workspace tree. Local backends run bash\n * `find` directly against the agent-server; cloud backends call the cloud\n * API's first-class file-listing endpoint, which runs the same `find`\n * server-side on the conversation's runtime (see `useCloudWorkspaceFiles`).\n *\n * Cloud detection reads the backend-registry store (via `useSyncExternalStore`)\n * rather than the `ActiveBackendProvider` context. The transport layer that\n * actually issues the requests — `executeCommand`, `getGitChanges`, the cloud\n * file-read — all branch on the *store* (`getActiveBackend()`), so the Files\n * tab must use the same source. Reading the context here can disagree with the\n * store (its `useActiveBackend` fallback synthesizes a *local* backend when the\n * provider isn't in scope), which would run the local bash path against a cloud\n * backend: `executeCommand` then POSTs to the removed `/api/cloud-proxy` (405)\n * and the cloud `/files` call never fires.\n */\nexport function useWorkspaceFiles(): WorkspaceFilesResult {\n const snapshot = useSyncExternalStore(\n subscribeActiveBackend,\n getSnapshot,\n getSnapshot,\n );\n const isCloud = snapshot.active.backend.kind === \"cloud\";\n\n const local = useLocalWorkspaceFiles(!isCloud);\n const cloud = useCloudWorkspaceFiles(isCloud);\n\n return isCloud ? cloud : local;\n}\n"],"mappings":"8fAeA,IAAM,EAAY,IAQZ,EAAgB,CACpB,OACA,eACA,QACA,OACA,cACA,OACA,QACA,QACA,SACA,gBACA,cACA,SACA,gBACA,QACF,EAGA,SAAS,GAA2B,CAIlC,MAAO,cAHW,EAAc,IAAK,GAAQ,UAAU,EAAI,SAAS,EAAE,KACpE,MAEmB,EAAU,sDAAsD,GACvF,CAEA,SAAS,EAAc,EAAsB,CAE3C,OAAO,EAAK,WAAW,IAAI,EAAI,EAAK,MAAM,CAAC,EAAI,CACjD,CAaA,SAAS,EAAuB,EAAwC,CACtE,GAAM,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,EAAiB,EAAA,kBAAkB,EAEnC,EAAiB,GAAc,GAC/B,EAAkB,GAAc,iBAChC,EAAgB,GAAc,gBAC9B,EAAa,GAAc,WAAW,aAAa,KAAK,EAExD,EAAQ,EAAA,SAAmB,CAC/B,SAAU,CACR,kBACA,EACA,EACA,EACA,CACF,EACA,QAAS,SAAY,CACnB,IAAM,EAAS,MAAM,EAAA,QAA0B,eAC7C,EACA,EACA,EAAiB,EACjB,EACA,EACF,EAEA,GAAI,EAAO,YAAc,EACvB,MAAU,MACR,EAAO,QAAQ,KAAK,GAAK,gCAC3B,EAGF,IAAM,EAAQ,EAAO,OAClB,MAAM,OAAO,EACb,IAAK,GAAS,EAAK,KAAK,CAAC,EACzB,OAAO,OAAO,EACd,IAAI,CAAa,EAGpB,OAAO,MAAM,KAAK,IAAI,IAAI,CAAK,CAAC,EAAE,MAAM,EAAG,CAAS,CACtD,EACA,QAAS,GAAW,GAAkB,CAAC,CAAC,GAAkB,CAAC,CAAC,EAC5D,MAAO,GACP,UAAW,IAAO,GAClB,OAAQ,IAAO,GAAK,EACpB,KAAM,CAAE,aAAc,EAAK,CAC7B,CAAC,EAED,MAAO,CAAE,KAAM,EAAM,KAAM,UAAW,EAAM,SAAU,CACxD,CAeA,SAAS,EAAuB,EAAwC,CAKtE,GAAM,CAAE,kBAAmB,EAAA,0BAA0B,EAC/C,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,EAAiB,EAAA,kBAAkB,EAEnC,EAAqB,GAAc,oBACnC,EAAa,GAAc,WAAW,aAAa,KAAK,EAKxD,EAAU,EAAA,WAAW,EAAoB,CAAU,EACnD,EAAe,EAAQ,WAAW,GAAG,EAAI,EAAU,IAAI,IAEvD,EAAQ,EAAA,SAAmB,CAC/B,SAAU,CAAC,wBAAyB,EAAgB,CAAY,EAChE,QAAS,SAAY,CAKnB,IAAM,GAAa,MAJC,EAAA,2BAClB,EACA,CACF,GACyB,IAAI,CAAa,EAAE,OAAO,OAAO,EAC1D,OAAO,MAAM,KAAK,IAAI,IAAI,CAAU,CAAC,EAAE,MAAM,EAAG,CAAS,CAC3D,EACA,QAAS,GAAW,GAAkB,CAAC,CAAC,EACxC,MAAO,GACP,UAAW,IAAO,GAClB,OAAQ,IAAO,GAAK,EACpB,KAAM,CAAE,aAAc,EAAK,CAC7B,CAAC,EAED,MAAO,CAAE,KAAM,EAAM,KAAM,UAAW,EAAM,SAAU,CACxD,CAoBA,SAAgB,GAA0C,CAMxD,IAAM,GAAA,EAAA,EAAA,sBAJJ,EAAA,uBACA,EAAA,YACA,EAAA,WAEc,EAAS,OAAO,QAAQ,OAAS,QAE3C,EAAQ,EAAuB,CAAC,CAAO,EACvC,EAAQ,EAAuB,CAAO,EAE5C,OAAO,EAAU,EAAQ,CAC3B"}
|
|
@@ -5,9 +5,19 @@ export interface WorkspaceFilesResult {
|
|
|
5
5
|
/**
|
|
6
6
|
* Lists the files shown in the Files tab for the active conversation.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Both backends enumerate the full workspace tree. Local backends run bash
|
|
9
|
+
* `find` directly against the agent-server; cloud backends call the cloud
|
|
10
|
+
* API's first-class file-listing endpoint, which runs the same `find`
|
|
11
|
+
* server-side on the conversation's runtime (see `useCloudWorkspaceFiles`).
|
|
12
|
+
*
|
|
13
|
+
* Cloud detection reads the backend-registry store (via `useSyncExternalStore`)
|
|
14
|
+
* rather than the `ActiveBackendProvider` context. The transport layer that
|
|
15
|
+
* actually issues the requests — `executeCommand`, `getGitChanges`, the cloud
|
|
16
|
+
* file-read — all branch on the *store* (`getActiveBackend()`), so the Files
|
|
17
|
+
* tab must use the same source. Reading the context here can disagree with the
|
|
18
|
+
* store (its `useActiveBackend` fallback synthesizes a *local* backend when the
|
|
19
|
+
* provider isn't in scope), which would run the local bash path against a cloud
|
|
20
|
+
* backend: `executeCommand` then POSTs to the removed `/api/cloud-proxy` (405)
|
|
21
|
+
* and the cloud `/files` call never fires.
|
|
12
22
|
*/
|
|
13
23
|
export declare function useWorkspaceFiles(): WorkspaceFilesResult;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { useOptionalConversationId as e } from "../use-conversation-id.js";
|
|
2
|
+
import { getSnapshot as t, subscribeActiveBackend as n } from "../../api/backend-registry/active-store.js";
|
|
3
|
+
import { useQuery as r } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
|
|
4
|
+
import { listCloudConversationFiles as i } from "../../api/cloud/conversation-service.api.js";
|
|
5
|
+
import { useActiveConversation as a } from "./use-active-conversation.js";
|
|
6
|
+
import { useRuntimeIsReady as o } from "../use-runtime-is-ready.js";
|
|
7
|
+
import s from "../../api/runtime-service/agent-server-runtime-service.js";
|
|
8
|
+
import { getGitPath as c } from "../../utils/get-git-path.js";
|
|
9
|
+
import { useSyncExternalStore as l } from "react";
|
|
8
10
|
//#region src/hooks/query/use-workspace-files.ts
|
|
9
|
-
var
|
|
11
|
+
var u = 2e3, d = [
|
|
10
12
|
".git",
|
|
11
13
|
"node_modules",
|
|
12
14
|
".venv",
|
|
@@ -22,28 +24,28 @@ var s = 2e3, c = [
|
|
|
22
24
|
".parcel-cache",
|
|
23
25
|
"target"
|
|
24
26
|
];
|
|
25
|
-
function
|
|
26
|
-
return `find . \\( ${
|
|
27
|
+
function f() {
|
|
28
|
+
return `find . \\( ${d.map((e) => `-name '${e}' -prune`).join(" -o ")} \\) -o -type f -print 2>/dev/null | sort | head -n ${u}`;
|
|
27
29
|
}
|
|
28
|
-
function
|
|
30
|
+
function p(e) {
|
|
29
31
|
return e.startsWith("./") ? e.slice(2) : e;
|
|
30
32
|
}
|
|
31
|
-
function
|
|
32
|
-
let { data:
|
|
33
|
+
function m(e) {
|
|
34
|
+
let { data: t } = a(), n = o(), i = t?.id, c = t?.conversation_url, l = t?.session_api_key, d = t?.workspace?.working_dir?.trim(), m = r({
|
|
33
35
|
queryKey: [
|
|
34
36
|
"workspace-files",
|
|
37
|
+
i,
|
|
35
38
|
c,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
p
|
|
39
|
+
l,
|
|
40
|
+
d
|
|
39
41
|
],
|
|
40
42
|
queryFn: async () => {
|
|
41
|
-
let e = await
|
|
43
|
+
let e = await s.executeCommand(c, l, f(), d, 30);
|
|
42
44
|
if (e.exit_code !== 0) throw Error(e.stderr?.trim() || "Failed to list workspace files");
|
|
43
|
-
let t = e.stdout.split(/\r?\n/).map((e) => e.trim()).filter(Boolean).map(
|
|
44
|
-
return Array.from(new Set(t)).slice(0,
|
|
45
|
+
let t = e.stdout.split(/\r?\n/).map((e) => e.trim()).filter(Boolean).map(p);
|
|
46
|
+
return Array.from(new Set(t)).slice(0, u);
|
|
45
47
|
},
|
|
46
|
-
enabled:
|
|
48
|
+
enabled: e && n && !!i && !!d,
|
|
47
49
|
retry: !1,
|
|
48
50
|
staleTime: 1e3 * 30,
|
|
49
51
|
gcTime: 1e3 * 60 * 5,
|
|
@@ -54,22 +56,33 @@ function d(t) {
|
|
|
54
56
|
isLoading: m.isLoading
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
|
-
function
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
function h(t) {
|
|
60
|
+
let { conversationId: n } = e(), { data: s } = a(), l = o(), d = s?.selected_repository, f = s?.workspace?.working_dir?.trim(), m = c(d, f), h = m.startsWith("/") ? m : `/${m}`, g = r({
|
|
61
|
+
queryKey: [
|
|
62
|
+
"workspace-files-cloud",
|
|
63
|
+
n,
|
|
64
|
+
h
|
|
65
|
+
],
|
|
66
|
+
queryFn: async () => {
|
|
67
|
+
let e = (await i(n, h)).map(p).filter(Boolean);
|
|
68
|
+
return Array.from(new Set(e)).slice(0, u);
|
|
69
|
+
},
|
|
70
|
+
enabled: t && l && !!n,
|
|
71
|
+
retry: !1,
|
|
72
|
+
staleTime: 1e3 * 30,
|
|
73
|
+
gcTime: 1e3 * 60 * 5,
|
|
74
|
+
meta: { disableToast: !0 }
|
|
75
|
+
});
|
|
63
76
|
return {
|
|
64
|
-
data:
|
|
65
|
-
isLoading:
|
|
77
|
+
data: g.data,
|
|
78
|
+
isLoading: g.isLoading
|
|
66
79
|
};
|
|
67
80
|
}
|
|
68
|
-
function
|
|
69
|
-
let
|
|
70
|
-
return
|
|
81
|
+
function g() {
|
|
82
|
+
let e = l(n, t, t).active.backend.kind === "cloud", r = m(!e), i = h(e);
|
|
83
|
+
return e ? i : r;
|
|
71
84
|
}
|
|
72
85
|
//#endregion
|
|
73
|
-
export {
|
|
86
|
+
export { g as useWorkspaceFiles };
|
|
74
87
|
|
|
75
88
|
//# sourceMappingURL=use-workspace-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-workspace-files.js","names":[],"sources":["../../../src/hooks/query/use-workspace-files.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"use-workspace-files.js","names":[],"sources":["../../../src/hooks/query/use-workspace-files.ts"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\n\nimport AgentServerRuntimeService from \"#/api/runtime-service/agent-server-runtime-service\";\nimport { listCloudConversationFiles } from \"#/api/cloud/conversation-service.api\";\nimport {\n getSnapshot,\n subscribeActiveBackend,\n} from \"#/api/backend-registry/active-store\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useRuntimeIsReady } from \"#/hooks/use-runtime-is-ready\";\nimport { getGitPath } from \"#/utils/get-git-path\";\n\n// Cap the number of files we render so a giant repo doesn't freeze the UI.\nconst MAX_FILES = 2000;\n\nexport interface WorkspaceFilesResult {\n data: string[] | undefined;\n isLoading: boolean;\n}\n\n// Directory names that we never want to descend into when listing files.\nconst EXCLUDED_DIRS = [\n \".git\",\n \"node_modules\",\n \".venv\",\n \"venv\",\n \"__pycache__\",\n \"dist\",\n \"build\",\n \".next\",\n \".cache\",\n \".pytest_cache\",\n \".mypy_cache\",\n \".turbo\",\n \".parcel-cache\",\n \"target\",\n];\n\n// Build a `find` invocation that lists files relative to the workspace root.\nfunction buildListCommand(): string {\n const pruneExpr = EXCLUDED_DIRS.map((dir) => `-name '${dir}' -prune`).join(\n \" -o \",\n );\n return `find . \\\\( ${pruneExpr} \\\\) -o -type f -print 2>/dev/null | sort | head -n ${MAX_FILES}`;\n}\n\nfunction normalizePath(path: string): string {\n // Strip a leading \"./\" so paths render cleanly in the UI.\n return path.startsWith(\"./\") ? path.slice(2) : path;\n}\n\n/**\n * Local-backend listing: enumerate every regular file beneath the active\n * conversation's working directory via `find` over the agent-server's\n * `/api/bash/execute_bash_command`, excluding common heavy/build directories.\n * Returns paths relative to the working dir (e.g. `src/index.html`).\n *\n * Local only: the browser can't drive `/api/bash/execute_bash_command` on a\n * cloud runtime (no CORS, and the `/api/cloud-proxy` hop was removed). Cloud\n * backends hit a first-class cloud API listing endpoint instead — see\n * `useCloudWorkspaceFiles`.\n */\nfunction useLocalWorkspaceFiles(enabled: boolean): WorkspaceFilesResult {\n const { data: conversation } = useActiveConversation();\n const runtimeIsReady = useRuntimeIsReady();\n\n const conversationId = conversation?.id;\n const conversationUrl = conversation?.conversation_url;\n const sessionApiKey = conversation?.session_api_key;\n const workingDir = conversation?.workspace?.working_dir?.trim();\n\n const query = useQuery<string[]>({\n queryKey: [\n \"workspace-files\",\n conversationId,\n conversationUrl,\n sessionApiKey,\n workingDir,\n ],\n queryFn: async () => {\n const result = await AgentServerRuntimeService.executeCommand(\n conversationUrl,\n sessionApiKey,\n buildListCommand(),\n workingDir,\n 30,\n );\n\n if (result.exit_code !== 0) {\n throw new Error(\n result.stderr?.trim() || \"Failed to list workspace files\",\n );\n }\n\n const lines = result.stdout\n .split(/\\r?\\n/)\n .map((line) => line.trim())\n .filter(Boolean)\n .map(normalizePath);\n\n // Defensive: keep results unique and bounded.\n return Array.from(new Set(lines)).slice(0, MAX_FILES);\n },\n enabled: enabled && runtimeIsReady && !!conversationId && !!workingDir,\n retry: false,\n staleTime: 1000 * 30,\n gcTime: 1000 * 60 * 5,\n meta: { disableToast: true },\n });\n\n return { data: query.data, isLoading: query.isLoading };\n}\n\n/**\n * Cloud-backend listing: enumerate the full workspace tree via the cloud API's\n * first-class `GET /api/v1/app-conversations/{id}/files` endpoint, which\n * resolves the conversation's runtime and runs the same bounded `find`\n * server-side (see enterprise `list_conversation_files`). This is the same\n * server-side runtime-hop transport the git-changes/diff and single-file read\n * already use, so it works without CORS or the removed `/api/cloud-proxy` hop.\n *\n * Unlike the previous git-changes-based approach, this returns unchanged\n * tracked files too, so a conversation attached to a large existing repo shows\n * the whole tree — matching the local-backend experience. Paths come back\n * relative to the working dir (e.g. `src/index.html`).\n */\nfunction useCloudWorkspaceFiles(enabled: boolean): WorkspaceFilesResult {\n // Source the id from the route (like the diff/commits cloud hooks), NOT from\n // `useActiveConversation().data.id`: the cloud API listing call only needs\n // the id, and gating on the batch-get query's data would keep the query\n // disabled — and never fire — whenever that data is null or still loading.\n const { conversationId } = useOptionalConversationId();\n const { data: conversation } = useActiveConversation();\n const runtimeIsReady = useRuntimeIsReady();\n\n const selectedRepository = conversation?.selected_repository;\n const workingDir = conversation?.workspace?.working_dir?.trim();\n\n // Anchor against an absolute workspace path the same way the diff view and\n // single-file read do (`getGitPath` defaults to a relative convention; the\n // cloud runtime needs an absolute path).\n const gitPath = getGitPath(selectedRepository, workingDir);\n const absolutePath = gitPath.startsWith(\"/\") ? gitPath : `/${gitPath}`;\n\n const query = useQuery<string[]>({\n queryKey: [\"workspace-files-cloud\", conversationId, absolutePath],\n queryFn: async () => {\n const files = await listCloudConversationFiles(\n conversationId!,\n absolutePath,\n );\n const normalized = files.map(normalizePath).filter(Boolean);\n return Array.from(new Set(normalized)).slice(0, MAX_FILES);\n },\n enabled: enabled && runtimeIsReady && !!conversationId,\n retry: false,\n staleTime: 1000 * 30,\n gcTime: 1000 * 60 * 5,\n meta: { disableToast: true },\n });\n\n return { data: query.data, isLoading: query.isLoading };\n}\n\n/**\n * Lists the files shown in the Files tab for the active conversation.\n *\n * Both backends enumerate the full workspace tree. Local backends run bash\n * `find` directly against the agent-server; cloud backends call the cloud\n * API's first-class file-listing endpoint, which runs the same `find`\n * server-side on the conversation's runtime (see `useCloudWorkspaceFiles`).\n *\n * Cloud detection reads the backend-registry store (via `useSyncExternalStore`)\n * rather than the `ActiveBackendProvider` context. The transport layer that\n * actually issues the requests — `executeCommand`, `getGitChanges`, the cloud\n * file-read — all branch on the *store* (`getActiveBackend()`), so the Files\n * tab must use the same source. Reading the context here can disagree with the\n * store (its `useActiveBackend` fallback synthesizes a *local* backend when the\n * provider isn't in scope), which would run the local bash path against a cloud\n * backend: `executeCommand` then POSTs to the removed `/api/cloud-proxy` (405)\n * and the cloud `/files` call never fires.\n */\nexport function useWorkspaceFiles(): WorkspaceFilesResult {\n const snapshot = useSyncExternalStore(\n subscribeActiveBackend,\n getSnapshot,\n getSnapshot,\n );\n const isCloud = snapshot.active.backend.kind === \"cloud\";\n\n const local = useLocalWorkspaceFiles(!isCloud);\n const cloud = useCloudWorkspaceFiles(isCloud);\n\n return isCloud ? cloud : local;\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAM,IAAY,KAQZ,IAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,SAAS,IAA2B;CAIlC,OAAO,cAHW,EAAc,KAAK,MAAQ,UAAU,EAAI,SAAS,EAAE,KACpE,MAEmB,EAAU,sDAAsD;AACvF;AAEA,SAAS,EAAc,GAAsB;CAE3C,OAAO,EAAK,WAAW,IAAI,IAAI,EAAK,MAAM,CAAC,IAAI;AACjD;AAaA,SAAS,EAAuB,GAAwC;CACtE,IAAM,EAAE,MAAM,MAAiB,EAAsB,GAC/C,IAAiB,EAAkB,GAEnC,IAAiB,GAAc,IAC/B,IAAkB,GAAc,kBAChC,IAAgB,GAAc,iBAC9B,IAAa,GAAc,WAAW,aAAa,KAAK,GAExD,IAAQ,EAAmB;EAC/B,UAAU;GACR;GACA;GACA;GACA;GACA;EACF;EACA,SAAS,YAAY;GACnB,IAAM,IAAS,MAAM,EAA0B,eAC7C,GACA,GACA,EAAiB,GACjB,GACA,EACF;GAEA,IAAI,EAAO,cAAc,GACvB,MAAU,MACR,EAAO,QAAQ,KAAK,KAAK,gCAC3B;GAGF,IAAM,IAAQ,EAAO,OAClB,MAAM,OAAO,EACb,KAAK,MAAS,EAAK,KAAK,CAAC,EACzB,OAAO,OAAO,EACd,IAAI,CAAa;GAGpB,OAAO,MAAM,KAAK,IAAI,IAAI,CAAK,CAAC,EAAE,MAAM,GAAG,CAAS;EACtD;EACA,SAAS,KAAW,KAAkB,CAAC,CAAC,KAAkB,CAAC,CAAC;EAC5D,OAAO;EACP,WAAW,MAAO;EAClB,QAAQ,MAAO,KAAK;EACpB,MAAM,EAAE,cAAc,GAAK;CAC7B,CAAC;CAED,OAAO;EAAE,MAAM,EAAM;EAAM,WAAW,EAAM;CAAU;AACxD;AAeA,SAAS,EAAuB,GAAwC;CAKtE,IAAM,EAAE,sBAAmB,EAA0B,GAC/C,EAAE,MAAM,MAAiB,EAAsB,GAC/C,IAAiB,EAAkB,GAEnC,IAAqB,GAAc,qBACnC,IAAa,GAAc,WAAW,aAAa,KAAK,GAKxD,IAAU,EAAW,GAAoB,CAAU,GACnD,IAAe,EAAQ,WAAW,GAAG,IAAI,IAAU,IAAI,KAEvD,IAAQ,EAAmB;EAC/B,UAAU;GAAC;GAAyB;GAAgB;EAAY;EAChE,SAAS,YAAY;GAKnB,IAAM,KAAa,MAJC,EAClB,GACA,CACF,GACyB,IAAI,CAAa,EAAE,OAAO,OAAO;GAC1D,OAAO,MAAM,KAAK,IAAI,IAAI,CAAU,CAAC,EAAE,MAAM,GAAG,CAAS;EAC3D;EACA,SAAS,KAAW,KAAkB,CAAC,CAAC;EACxC,OAAO;EACP,WAAW,MAAO;EAClB,QAAQ,MAAO,KAAK;EACpB,MAAM,EAAE,cAAc,GAAK;CAC7B,CAAC;CAED,OAAO;EAAE,MAAM,EAAM;EAAM,WAAW,EAAM;CAAU;AACxD;AAoBA,SAAgB,IAA0C;CAMxD,IAAM,IALW,EACf,GACA,GACA,CAEc,EAAS,OAAO,QAAQ,SAAS,SAE3C,IAAQ,EAAuB,CAAC,CAAO,GACvC,IAAQ,EAAuB,CAAO;CAE5C,OAAO,IAAU,IAAQ;AAC3B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");const e=require("../types/agent-server/type-guards.cjs"),t=require("../stores/use-event-store.cjs"),n=require("../stores/metrics-store.cjs");let r=require("react");var i=2500,a=9e4;function o(e,t,n){return{beforeToken:e,afterToken:t,savedToken:Math.max(0,e-t),outcome:n}}function s({beforeToken:s,baselineEventIds:c,onComplete:l,timeoutMs:u=a}){let d=(0,r.useRef)(l);d.current=l,(0,r.useEffect)(()=>{if(s===null)return;let r=!1,a=!1,l,f=c?new Set(c):new Set(t.useEventStore.getState().eventIds),p=()=>n.default.getState().usage?.per_turn_token??s,m=(e,t)=>{r||(r=!0,d.current(o(s,e,t)))},h=()=>{let e=p();return a&&e<s?(m(e,`compacted`),!0):!1},g=()=>{clearTimeout(l),l=setTimeout(()=>{m(p(),`no_change`)},i)},_=()=>{for(let n of t.useEventStore.getState().events){let t=`id`in n?n.id:void 0;if(t!==void 0){if(f.has(t))continue;f.add(t)}if(e.isCondensationEvent(n)){a=!0,h()||g();return}}};_();let v=t.useEventStore.subscribe(()=>{r||_()}),y=n.default.subscribe(()=>{r||h()&&clearTimeout(l)}),b=setTimeout(()=>{m(p(),a?`no_change`:`timeout`)},u);return()=>{r=!0,v(),y(),clearTimeout(l),clearTimeout(b)}},[s,c,u])}exports.useAwaitContextCompaction=s;
|
|
2
|
+
//# sourceMappingURL=use-await-context-compaction.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-await-context-compaction.cjs","names":[],"sources":["../../src/hooks/use-await-context-compaction.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\nimport useMetricsStore from \"#/stores/metrics-store\";\nimport { useEventStore } from \"#/stores/use-event-store\";\nimport { isCondensationEvent } from \"#/types/agent-server/type-guards\";\n\n/** How long to wait after a Condensation event for a lower per_turn_token. */\nconst METRICS_SETTLE_MS = 2_500;\n/** Give up waiting for condensation / metrics and surface whatever we have. */\nconst DEFAULT_TIMEOUT_MS = 90_000;\n\nexport type ContextCompactionOutcome = \"compacted\" | \"no_change\" | \"timeout\";\n\nexport interface ContextCompactionResult {\n beforeToken: number;\n afterToken: number;\n savedToken: number;\n /**\n * \"compacted\" — a Condensation event landed and per_turn_token dropped.\n * \"no_change\" — a Condensation event landed but no token drop was measured.\n * \"timeout\" — no Condensation event arrived in time; compaction did not\n * happen (or was never processed), so this is a failure, not a no-op.\n */\n outcome: ContextCompactionOutcome;\n}\n\nexport function buildContextCompactionResult(\n beforeToken: number,\n afterToken: number,\n outcome: ContextCompactionOutcome,\n): ContextCompactionResult {\n return {\n beforeToken,\n afterToken,\n savedToken: Math.max(0, beforeToken - afterToken),\n outcome,\n };\n}\n\ninterface UseAwaitContextCompactionOptions {\n /**\n * Snapshot of `per_turn_token` taken when compaction was requested.\n * Pass `null` when not awaiting a result.\n */\n beforeToken: number | null;\n /**\n * Event ids that predate the compaction *request*. The condense POST can\n * return only after the server already emitted its Condensation event, so\n * snapshotting \"known\" ids when this effect starts would miss fast\n * condensations; the baseline must be captured before the request fires.\n * When omitted, falls back to the ids present when the effect starts.\n */\n baselineEventIds?: Set<string | number> | null;\n onComplete: (result: ContextCompactionResult) => void;\n timeoutMs?: number;\n}\n\n/**\n * Waits for a post-request Condensation event (and ideally a lower\n * `per_turn_token` in the live metrics store), then reports how many tokens\n * were freed. The HTTP `/condense` ack only means work *started*.\n */\nexport function useAwaitContextCompaction({\n beforeToken,\n baselineEventIds,\n onComplete,\n timeoutMs = DEFAULT_TIMEOUT_MS,\n}: UseAwaitContextCompactionOptions) {\n const onCompleteRef = useRef(onComplete);\n onCompleteRef.current = onComplete;\n\n useEffect(() => {\n if (beforeToken === null) {\n return undefined;\n }\n\n let completed = false;\n let sawCondensation = false;\n let settleTimer: ReturnType<typeof setTimeout> | undefined;\n const knownEventIds = baselineEventIds\n ? new Set(baselineEventIds)\n : new Set(useEventStore.getState().eventIds);\n\n const readAfterToken = () =>\n useMetricsStore.getState().usage?.per_turn_token ?? beforeToken;\n\n const finish = (afterToken: number, outcome: ContextCompactionOutcome) => {\n if (completed) {\n return;\n }\n completed = true;\n onCompleteRef.current(\n buildContextCompactionResult(beforeToken, afterToken, outcome),\n );\n };\n\n const finishFromMetricsIfReady = () => {\n const afterToken = readAfterToken();\n if (sawCondensation && afterToken < beforeToken) {\n finish(afterToken, \"compacted\");\n return true;\n }\n return false;\n };\n\n const scheduleSettleFinish = () => {\n clearTimeout(settleTimer);\n settleTimer = setTimeout(() => {\n finish(readAfterToken(), \"no_change\");\n }, METRICS_SETTLE_MS);\n };\n\n const scanForNewCondensation = () => {\n for (const event of useEventStore.getState().events) {\n const eventId = \"id\" in event ? event.id : undefined;\n if (eventId !== undefined) {\n if (knownEventIds.has(eventId)) {\n continue;\n }\n knownEventIds.add(eventId);\n }\n if (!isCondensationEvent(event)) {\n continue;\n }\n sawCondensation = true;\n if (!finishFromMetricsIfReady()) {\n scheduleSettleFinish();\n }\n return;\n }\n };\n\n scanForNewCondensation();\n\n const unsubscribeEvents = useEventStore.subscribe(() => {\n if (completed) {\n return;\n }\n scanForNewCondensation();\n });\n\n const unsubscribeMetrics = useMetricsStore.subscribe(() => {\n if (completed) {\n return;\n }\n if (finishFromMetricsIfReady()) {\n clearTimeout(settleTimer);\n }\n });\n\n const timeoutTimer = setTimeout(() => {\n // No Condensation event in time means the compaction never landed —\n // a failure, not a \"nothing to compact\" no-op.\n finish(readAfterToken(), sawCondensation ? \"no_change\" : \"timeout\");\n }, timeoutMs);\n\n return () => {\n completed = true;\n unsubscribeEvents();\n unsubscribeMetrics();\n clearTimeout(settleTimer);\n clearTimeout(timeoutTimer);\n };\n }, [beforeToken, baselineEventIds, timeoutMs]);\n}\n"],"mappings":"iNAMA,IAAM,EAAoB,KAEpB,EAAqB,IAiB3B,SAAgB,EACd,EACA,EACA,EACyB,CACzB,MAAO,CACL,cACA,aACA,WAAY,KAAK,IAAI,EAAG,EAAc,CAAU,EAChD,SACF,CACF,CAyBA,SAAgB,EAA0B,CACxC,cACA,mBACA,aACA,YAAY,GACuB,CACnC,IAAM,GAAA,EAAA,EAAA,QAAuB,CAAU,EACvC,EAAc,QAAU,GAExB,EAAA,EAAA,eAAgB,CACd,GAAI,IAAgB,KAClB,OAGF,IAAI,EAAY,GACZ,EAAkB,GAClB,EACE,EAAgB,EAClB,IAAI,IAAI,CAAgB,EACxB,IAAI,IAAI,EAAA,cAAc,SAAS,EAAE,QAAQ,EAEvC,MACJ,EAAA,QAAgB,SAAS,EAAE,OAAO,gBAAkB,EAEhD,GAAU,EAAoB,IAAsC,CACpE,IAGJ,EAAY,GACZ,EAAc,QACZ,EAA6B,EAAa,EAAY,CAAO,CAC/D,EACF,EAEM,MAAiC,CACrC,IAAM,EAAa,EAAe,EAKlC,OAJI,GAAmB,EAAa,GAClC,EAAO,EAAY,WAAW,EACvB,IAEF,EACT,EAEM,MAA6B,CACjC,aAAa,CAAW,EACxB,EAAc,eAAiB,CAC7B,EAAO,EAAe,EAAG,WAAW,CACtC,EAAG,CAAiB,CACtB,EAEM,MAA+B,CACnC,IAAK,IAAM,KAAS,EAAA,cAAc,SAAS,EAAE,OAAQ,CACnD,IAAM,EAAU,OAAQ,EAAQ,EAAM,GAAK,IAAA,GAC3C,GAAI,IAAY,IAAA,GAAW,CACzB,GAAI,EAAc,IAAI,CAAO,EAC3B,SAEF,EAAc,IAAI,CAAO,CAC3B,CACK,KAAA,oBAAoB,CAAK,EAI9B,CADA,EAAkB,GACb,EAAyB,GAC5B,EAAqB,EAEvB,MAFuB,CAGzB,CACF,EAEA,EAAuB,EAEvB,IAAM,EAAoB,EAAA,cAAc,cAAgB,CAClD,GAGJ,EAAuB,CACzB,CAAC,EAEK,EAAqB,EAAA,QAAgB,cAAgB,CACrD,GAGA,EAAyB,GAC3B,aAAa,CAAW,CAE5B,CAAC,EAEK,EAAe,eAAiB,CAGpC,EAAO,EAAe,EAAG,EAAkB,YAAc,SAAS,CACpE,EAAG,CAAS,EAEZ,UAAa,CACX,EAAY,GACZ,EAAkB,EAClB,EAAmB,EACnB,aAAa,CAAW,EACxB,aAAa,CAAY,CAC3B,CACF,EAAG,CAAC,EAAa,EAAkB,CAAS,CAAC,CAC/C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type ContextCompactionOutcome = "compacted" | "no_change" | "timeout";
|
|
2
|
+
export interface ContextCompactionResult {
|
|
3
|
+
beforeToken: number;
|
|
4
|
+
afterToken: number;
|
|
5
|
+
savedToken: number;
|
|
6
|
+
/**
|
|
7
|
+
* "compacted" — a Condensation event landed and per_turn_token dropped.
|
|
8
|
+
* "no_change" — a Condensation event landed but no token drop was measured.
|
|
9
|
+
* "timeout" — no Condensation event arrived in time; compaction did not
|
|
10
|
+
* happen (or was never processed), so this is a failure, not a no-op.
|
|
11
|
+
*/
|
|
12
|
+
outcome: ContextCompactionOutcome;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildContextCompactionResult(beforeToken: number, afterToken: number, outcome: ContextCompactionOutcome): ContextCompactionResult;
|
|
15
|
+
interface UseAwaitContextCompactionOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Snapshot of `per_turn_token` taken when compaction was requested.
|
|
18
|
+
* Pass `null` when not awaiting a result.
|
|
19
|
+
*/
|
|
20
|
+
beforeToken: number | null;
|
|
21
|
+
/**
|
|
22
|
+
* Event ids that predate the compaction *request*. The condense POST can
|
|
23
|
+
* return only after the server already emitted its Condensation event, so
|
|
24
|
+
* snapshotting "known" ids when this effect starts would miss fast
|
|
25
|
+
* condensations; the baseline must be captured before the request fires.
|
|
26
|
+
* When omitted, falls back to the ids present when the effect starts.
|
|
27
|
+
*/
|
|
28
|
+
baselineEventIds?: Set<string | number> | null;
|
|
29
|
+
onComplete: (result: ContextCompactionResult) => void;
|
|
30
|
+
timeoutMs?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Waits for a post-request Condensation event (and ideally a lower
|
|
34
|
+
* `per_turn_token` in the live metrics store), then reports how many tokens
|
|
35
|
+
* were freed. The HTTP `/condense` ack only means work *started*.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useAwaitContextCompaction({ beforeToken, baselineEventIds, onComplete, timeoutMs, }: UseAwaitContextCompactionOptions): void;
|
|
38
|
+
export {};
|