@openhands/agent-canvas 1.12.0 → 1.13.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-D1PORKc0.js} +1 -1
- package/build/assets/active-backend-context-IqOjobNK.js +2 -0
- package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DMrObcIS.js} +1 -1
- package/build/assets/agent-profiles-settings-DororXN5.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DWBe0rbX.js +86 -0
- package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-BJVk92PU.js} +1 -1
- package/build/assets/agent-settings-COfJsQ1d.js +1 -0
- package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-CzZsm7ms.js} +1 -1
- package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-D8Fade_-.js} +1 -1
- package/build/assets/{app-settings-D0OKHB3M.js → app-settings-CpyGB3AT.js} +1 -1
- package/build/assets/{automation-detail-C0SxWTnQ.js → automation-detail-B-jQ39Mm.js} +1 -1
- package/build/assets/{automation-export-BjQa_fT6.js → automation-export-B1dywoqk.js} +1 -1
- package/build/assets/{automation-setup-route-BzCNpljP.js → automation-setup-route-C-bWUZBi.js} +1 -1
- package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DgpCGOJV.js} +1 -1
- package/build/assets/{automations-list-dZg8zOCl.js → automations-list-DnMxlxsL.js} +1 -1
- package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-HHEneWMw.js} +1 -1
- package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-DiVrD4Cm.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-7MIjpr8M.js} +1 -1
- package/build/assets/{badge-Dpn3-LTV.js → badge-CpYmcVZV.js} +1 -1
- package/build/assets/{base-modal-3NmIOKDm.js → base-modal-Fnh6Uln9.js} +1 -1
- package/build/assets/bot-BQZx8e2i.js +1 -0
- package/build/assets/{brand-button-CJcwjnfb.js → brand-button-swT1RyO0.js} +1 -1
- package/build/assets/browser-B9AbV6kG.js +7 -0
- package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-zAY12m_i.js} +1 -1
- package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-DsJtivmL.js} +1 -1
- package/build/assets/check-WAFXrrs_.js +1 -0
- package/build/assets/chevron-down-CifNWzme.js +1 -0
- package/build/assets/circle-check-CtnimJa8.js +1 -0
- package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-Cuzx55bo.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CcSez21r.js → cloud-funnel-analytics-86CwNdSh.js} +1 -1
- package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-D0fRotFi.js} +1 -1
- package/build/assets/{command-menu-BKOLj-TC.js → command-menu-BXy03FBl.js} +1 -1
- package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BmZa0ui_.js} +1 -1
- package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-BgoN6lbN.js} +1 -1
- package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-Bq02tc-P.js} +1 -1
- package/build/assets/conversation-BPo8SvLN.js +1 -0
- package/build/assets/conversation-CPCVsCUY.js +90 -0
- package/build/assets/conversation-panel-BPo8SvLN.js +1 -0
- package/build/assets/{conversation-state-store-CtgILxWF.js → conversation-state-store-C5YpjMNy.js} +1 -1
- package/build/assets/conversation-store-Blc5xysY.js +6 -0
- package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-CMqo_0Bd.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-Cg1pF0xn.js} +1 -1
- package/build/assets/{device-verify-BIjXeW9N.js → device-verify-BfQLgNyq.js} +1 -1
- package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-BIqQr5mx.js} +1 -1
- package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-CxFjRYqH.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-C_yV4_bo.js} +1 -1
- package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-Bi4qbh2g.js} +1 -1
- package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-BqUINAhp.js} +1 -1
- package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-lraj88Wk.js} +1 -1
- package/build/assets/external-link-CgtpA_a1.js +1 -0
- package/build/assets/{file-text-RecuaId_.js → file-text-DEK4LSVw.js} +1 -1
- package/build/assets/files-tab-DV0L-lFE.js +1 -0
- package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-7yFSQJq_.js} +1 -1
- package/build/assets/{format-relative-time-BerVamGl.js → format-relative-time-DSErAuVr.js} +1 -1
- package/build/assets/git-provider-icon-BvlLAche.js +1 -0
- package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-ByMzpNko.js} +1 -1
- package/build/assets/git-repo-dropdown-C6R7hgM8.js +1 -0
- package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_sfncLZ.js} +1 -1
- package/build/assets/{home-Y0aDou-a.js → home-BOrlwLqG.js} +1 -1
- package/build/assets/home-BvMNC6E-.js +1 -0
- package/build/assets/{home-store-Cubdq0uP.js → home-store-CxqsY9Fi.js} +1 -1
- package/build/assets/index-home-BvMNC6E-.js +1 -0
- package/build/assets/info-BRVcJAUg.js +1 -0
- package/build/assets/{install-server-modal-DW6dSyGr.js → install-server-modal-Bl4G1zF4.js} +1 -1
- package/build/assets/{kebab-menu-item-content-CKydZrbH.js → kebab-menu-item-content-BGoGFEAg.js} +1 -1
- package/build/assets/{launch-c4GEP8oo.js → launch-CkqiSCqi.js} +1 -1
- package/build/assets/{list-todo-CheUtB7F.js → list-todo-DNWlzfaM.js} +1 -1
- package/build/assets/llm-not-configured-banner-DLw_tu-G.js +27 -0
- package/build/assets/llm-settings-B-pkVCrt.js +1 -0
- package/build/assets/llm-settings-DSC0-IQ7.js +1 -0
- package/build/assets/llm-subscription-service-BAdOl5Xx.js +1 -0
- package/build/assets/loader-circle-B47W9XqT.js +1 -0
- package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-xhnrGP4Y.js} +1 -1
- package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-DhGk5mJt.js} +1 -1
- package/build/assets/manifest-653b89aa.js +1 -0
- package/build/assets/{manifest-subpage-layout-Ds7G5GZ8.js → manifest-subpage-layout-CKWvL2ig.js} +1 -1
- package/build/assets/{map-provider-7Bp2aih5.js → map-provider-Mx8mZuE-.js} +1 -1
- package/build/assets/markdown-renderer-DUmk7pFc.js +8 -0
- package/build/assets/{mcp-Da7wFU7A.js → mcp-DCkvl6K0.js} +2 -2
- package/build/assets/mcp-marketplace-utils-DEbMXlQr.js +1 -0
- package/build/assets/messages-DSXvyc21.js +40 -0
- package/build/assets/{modal-body-duRaxj_K.js → modal-body-gIe21fDv.js} +1 -1
- package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D66dlgZ7.js} +1 -1
- package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-B6iOGYpI.js} +1 -1
- package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-BYX1Pw5W.js} +1 -1
- package/build/assets/{npm-Cswluf6-.js → npm-DLckoeJc.js} +1 -1
- package/build/assets/{onboarding-BKbTYlW1.js → onboarding-D7WDG66N.js} +1 -1
- package/build/assets/{onboarding-modal-DrrGlEQq.js → onboarding-modal-C_xVrFNv.js} +1 -1
- package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-D-s9z18a.js} +1 -1
- package/build/assets/pencil-BGOCPRyu.js +1 -0
- package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-AKaXIIfg.js} +1 -1
- package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-wtmY4QQw.js} +1 -1
- package/build/assets/plus-zNEL8rcX.js +1 -0
- package/build/assets/{profiles-service.api-vcE_jJCe.js → profiles-service.api-DCMYxHMi.js} +1 -1
- package/build/assets/{providers-CdrPPm0z.js → providers-BjrtjX4L.js} +1 -1
- package/build/assets/{proxy-b4aqL4SX.js → proxy-9Z_WZggZ.js} +1 -1
- package/build/assets/{puzzle-B3v361yY.js → puzzle-BWLmN8z4.js} +1 -1
- package/build/assets/recommended-automations-launcher-CFlzhu1o.js +1 -0
- package/build/assets/refresh-cw-CXtFWpwv.js +1 -0
- package/build/assets/root-CanxKlNV.css +1 -0
- package/build/assets/{root-CBBi6IAe.js → root-DkfG_UWR.js} +2 -2
- package/build/assets/root-layout-D75LHYhh.js +2 -0
- package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-OnM5Uob_.js} +1 -1
- package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-m5WQm2sy.js} +1 -1
- package/build/assets/search-CycosyjN.js +1 -0
- package/build/assets/{secrets-service-BHF4fxML.js → secrets-service-B26R61C1.js} +1 -1
- package/build/assets/{secrets-settings-aBGXtQhX.js → secrets-settings-CbLYCKOX.js} +1 -1
- package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DCspm2U5.js} +1 -1
- package/build/assets/{settings-CZPGNens.js → settings-BJQI_iBM.js} +1 -1
- package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-BI8V_Nov.js} +1 -1
- package/build/assets/{settings-index-Dtlegd6s.js → settings-index-BiTqJoH7.js} +1 -1
- package/build/assets/{settings-input-D61Vzp9e.js → settings-input-Cz62hWVW.js} +1 -1
- package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-z_3FW5H3.js} +1 -1
- package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-BIrIVn97.js} +1 -1
- package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api--rJmnuLa.js} +1 -1
- package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-BRsSI8Vs.js} +1 -1
- package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-Ba7vel6T.js} +1 -1
- package/build/assets/shared-conversation-CQK_PqHx.js +1 -0
- package/build/assets/shield-check-T3JsDJiM.js +1 -0
- package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-Bhi3hVcu.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-YWJNRN4p.js} +1 -1
- package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-BSUlY5Ml.js} +1 -1
- package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-Cl1cUv_F.js} +1 -1
- package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-BXz8L8Rn.js} +1 -1
- package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-QgfKv31M.js} +1 -1
- package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-Dc3JPW-8.js} +1 -1
- package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-CpTV27n3.js} +1 -1
- package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-CSW__IW4.js} +1 -1
- package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-TJ0mdECe.js} +1 -1
- package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-BUMSbgrF.js} +1 -1
- package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-mAHMOkUz.js} +1 -1
- package/build/assets/{terminal-DRrJo-cR.js → terminal-BzxBaHx2.js} +1 -1
- package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-O5v1FgxW.js} +1 -1
- package/build/assets/trash-2-C0xNVp9c.js +1 -0
- package/build/assets/{typography-D9tiHct7.js → typography-NOKSk9_R.js} +1 -1
- package/build/assets/usage-tab-tEmVN0KD.js +1 -0
- package/build/assets/{use-acp-credential-form-DGyo0QvL.js → use-acp-credential-form-BPNi0Zbm.js} +1 -1
- package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-D9YRQPTF.js} +1 -1
- package/build/assets/{use-agent-profiles-B37XWDLq.js → use-agent-profiles-Cb2zUW3l.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dxzq2AEd.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-Co2eJk2A.js} +1 -1
- package/build/assets/{use-config-DapX3pjC.js → use-config-DKAMiI5R.js} +1 -1
- package/build/assets/use-create-conversation-CoHTiCbI.js +1 -0
- package/build/assets/{use-create-secret-DcpT3RPw.js → use-create-secret-2zBlCDsF.js} +1 -1
- package/build/assets/use-is-authed-C52-ivnB.js +1 -0
- package/build/assets/{use-is-creating-conversation-CVefC9Ns.js → use-is-creating-conversation-DdaAE6jV.js} +1 -1
- 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-C_BHue65.js +1 -0
- package/build/assets/{use-manifest-capabilities-zihHDbMW.js → use-manifest-capabilities-DPrQsaPP.js} +1 -1
- package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-CCE8OQgV.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-CEiak69h.js} +1 -1
- package/build/assets/use-save-agent-profile-DK9idD6a.js +1 -0
- package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-DNmnbG6f.js} +1 -1
- package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-BlFL7YhM.js} +1 -1
- package/build/assets/{use-settings-BmLzQjnC.js → use-settings-wCwPaSIv.js} +1 -1
- package/build/assets/{use-tracking-salbPJxT.js → use-tracking-CVwPmhlX.js} +1 -1
- package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-DVtfg0B_.js} +1 -1
- package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-p1xq35r2.js} +1 -1
- package/build/assets/{useMutation-ChpkYxI5.js → useMutation-BFDQmgk9.js} +1 -1
- package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-DF1NAAeC.js} +1 -1
- package/build/assets/{useQuery-BCnzy4LX.js → useQuery-DRv--6bK.js} +1 -1
- package/build/assets/utils-zxEjKE70.js +1 -0
- package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
- 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~kv3pap4j-B8i84bh4.js} +3 -3
- package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-D9wR9yM2.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation-Ipoe6hvY.js +13 -0
- package/build/assets/vendor~root-layout-C-IgVx6e.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-Dhd_I4H4.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-Cc0f9kPP.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-d7svw-BB.js} +1 -1
- 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~gxu4j2ea-D5DWZVc7.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-4WsUP-tz.js} +2 -2
- package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-B8UMQ7MG.js} +1 -1
- package/build/assets/{wrench-B1_H-tL1.js → wrench-DIka3hCq.js} +1 -1
- package/build/assets/x-BWKA2Ver.js +1 -0
- package/build/assets/zap-DHddTPc0.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +28 -1
- package/build/locales/ca/openhands.json +28 -1
- package/build/locales/de/openhands.json +28 -1
- package/build/locales/en/openhands.json +28 -1
- package/build/locales/es/openhands.json +28 -1
- package/build/locales/fr/openhands.json +28 -1
- package/build/locales/it/openhands.json +28 -1
- package/build/locales/ja/openhands.json +28 -1
- package/build/locales/ko-KR/openhands.json +28 -1
- package/build/locales/no/openhands.json +28 -1
- package/build/locales/pt/openhands.json +28 -1
- package/build/locales/tr/openhands.json +28 -1
- package/build/locales/uk/openhands.json +28 -1
- package/build/locales/zh-CN/openhands.json +28 -1
- package/build/locales/zh-TW/openhands.json +28 -1
- 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/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/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/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/recommended-automations-section.d.ts +7 -0
- 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/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/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 +230 -165
- 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/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 +217 -209
- 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-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-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/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-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/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +27 -0
- 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 +474 -15
- 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 +28 -1
- package/dist/locales/ca/openhands.json +28 -1
- package/dist/locales/de/openhands.json +28 -1
- package/dist/locales/en/openhands.json +28 -1
- package/dist/locales/es/openhands.json +28 -1
- package/dist/locales/fr/openhands.json +28 -1
- package/dist/locales/it/openhands.json +28 -1
- package/dist/locales/ja/openhands.json +28 -1
- package/dist/locales/ko-KR/openhands.json +28 -1
- package/dist/locales/no/openhands.json +28 -1
- package/dist/locales/pt/openhands.json +28 -1
- package/dist/locales/tr/openhands.json +28 -1
- package/dist/locales/uk/openhands.json +28 -1
- package/dist/locales/zh-CN/openhands.json +28 -1
- package/dist/locales/zh-TW/openhands.json +28 -1
- 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/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/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/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/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/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/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 +4 -4
- 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/dev-process-utils.mjs +6 -1
- package/scripts/dev-safe.mjs +57 -2
- 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/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/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-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/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/index-home-DqyeeFA_.js +0 -1
- package/build/assets/info-C9lpK5pw.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/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/pencil-Bl3GWhgq.js +0 -1
- package/build/assets/plus-CtzlyAoF.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-CRK9fOFd.css +0 -1
- package/build/assets/root-layout-BFN2rCOy.js +0 -2
- package/build/assets/search-CYaiKHRp.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-create-conversation-CRf1dCm5.js +0 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
- package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
- package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
- 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/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/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/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~dh9v73sa-rfV8mQ9m.js} +0 -0
|
@@ -5,91 +5,92 @@ import { useFileHandling as r } from "../../../hooks/chat/use-file-handling.js";
|
|
|
5
5
|
import { useGripResize as i } from "../../../hooks/chat/use-grip-resize.js";
|
|
6
6
|
import { useChatInputEvents as a } from "../../../hooks/chat/use-chat-input-events.js";
|
|
7
7
|
import { useChatSubmission as o } from "../../../hooks/chat/use-chat-submission.js";
|
|
8
|
-
import { useSlashCommand as
|
|
9
|
-
import { ChatInputGrip as
|
|
10
|
-
import { ChatInputContainer as
|
|
11
|
-
import { HiddenFileInput as
|
|
12
|
-
import
|
|
13
|
-
import { jsx as
|
|
8
|
+
import { useSlashCommand as ee } from "../../../hooks/chat/use-slash-command.js";
|
|
9
|
+
import { ChatInputGrip as s } from "./components/chat-input-grip.js";
|
|
10
|
+
import { ChatInputContainer as c } from "./components/chat-input-container.js";
|
|
11
|
+
import { HiddenFileInput as l } from "./components/hidden-file-input.js";
|
|
12
|
+
import u, { useEffect as d, useRef as f } from "react";
|
|
13
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/features/chat/custom-chat-input.tsx
|
|
15
|
-
function
|
|
16
|
-
let [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
!
|
|
15
|
+
function h({ disabled: h = !1, isNewConversationPending: g = !1, hasStartedConversation: _, showButton: v = !0, onSubmit: y, onFocus: te, onBlur: ne, onFilesPaste: b, className: x = "", buttonClassName: S = "" }) {
|
|
16
|
+
let [C, w] = u.useState(!1), { submittedMessage: T, clearAllFiles: E, setShouldHideSuggestions: D, setSubmittedMessage: O, images: k, files: A } = t(), j = h, M = f(y);
|
|
17
|
+
d(() => {
|
|
18
|
+
M.current = y;
|
|
19
|
+
}, [y]), d(() => {
|
|
20
|
+
!T || h || (M.current(T), O(null));
|
|
21
21
|
}, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
T,
|
|
23
|
+
h,
|
|
24
|
+
O
|
|
25
25
|
]);
|
|
26
|
-
let { chatInputRef:
|
|
27
|
-
let e =
|
|
28
|
-
|
|
26
|
+
let { chatInputRef: N, messageToSend: P, checkIsContentEmpty: F, clearEmptyContentHandler: I, saveDraft: L } = n(), R = u.useCallback(() => {
|
|
27
|
+
let e = N.current?.innerText ?? "", t = k.length > 0 || A.length > 0;
|
|
28
|
+
w(e.trim().length > 0 || t);
|
|
29
29
|
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
]), { fileInputRef:
|
|
34
|
-
Q(),
|
|
35
|
-
}, [Q,
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
}, [
|
|
39
|
-
|
|
30
|
+
N,
|
|
31
|
+
k,
|
|
32
|
+
A
|
|
33
|
+
]), { fileInputRef: z, chatContainerRef: B, isDragOver: V, handleFileIconClick: H, handleFileInputChange: U, handleDragOver: re, handleDragLeave: W, handleDrop: G } = r(b), { gripRef: K, isGripVisible: q, isGripDragging: J, canResize: Y, handleTopEdgeClick: X, smartResize: Z, handleGripMouseDown: ie, handleGripTouchStart: ae, increaseHeightForEmptyContent: oe, resetManualResize: se } = i(N, P), { handleSubmit: Q } = o(N, z, Z, y, se), $ = u.useCallback(() => {
|
|
34
|
+
Q(), R();
|
|
35
|
+
}, [Q, R]), { handleInput: ce, handlePaste: le, handleKeyDown: ue, handleBlur: de, handleFocus: fe } = a(N, Z, oe, F, I, te, ne), { isMenuOpen: pe, filteredItems: me, selectedIndex: he, updateSlashMenu: ge, selectItem: _e, handleSlashKeyDown: ve, closeMenu: ye } = ee(N);
|
|
36
|
+
return d(() => () => {
|
|
37
|
+
D(!1), E();
|
|
38
|
+
}, [D, E]), d(() => {
|
|
39
|
+
R();
|
|
40
40
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]), /* @__PURE__ */
|
|
45
|
-
className: e("w-full",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
47
|
-
fileInputRef:
|
|
48
|
-
onChange:
|
|
49
|
-
}), /* @__PURE__ */
|
|
41
|
+
R,
|
|
42
|
+
k.length,
|
|
43
|
+
A.length
|
|
44
|
+
]), /* @__PURE__ */ m("div", {
|
|
45
|
+
className: e("w-full", x),
|
|
46
|
+
children: [/* @__PURE__ */ p(l, {
|
|
47
|
+
fileInputRef: z,
|
|
48
|
+
onChange: U
|
|
49
|
+
}), /* @__PURE__ */ m("div", {
|
|
50
50
|
className: "relative w-full",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
-
gripRef:
|
|
53
|
-
isGripVisible:
|
|
54
|
-
isGripDragging:
|
|
51
|
+
children: [/* @__PURE__ */ p(s, {
|
|
52
|
+
gripRef: K,
|
|
53
|
+
isGripVisible: q,
|
|
54
|
+
isGripDragging: J,
|
|
55
|
+
canResize: Y,
|
|
55
56
|
handleTopEdgeClick: X,
|
|
56
|
-
handleGripMouseDown:
|
|
57
|
-
handleGripTouchStart:
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
-
chatContainerRef:
|
|
60
|
-
isDragOver:
|
|
61
|
-
disabled:
|
|
62
|
-
canSubmit:
|
|
63
|
-
hasStartedConversation:
|
|
64
|
-
isNewConversationPending:
|
|
65
|
-
showButton:
|
|
66
|
-
buttonClassName:
|
|
67
|
-
chatInputRef:
|
|
68
|
-
handleFileIconClick:
|
|
57
|
+
handleGripMouseDown: ie,
|
|
58
|
+
handleGripTouchStart: ae
|
|
59
|
+
}), /* @__PURE__ */ p(c, {
|
|
60
|
+
chatContainerRef: B,
|
|
61
|
+
isDragOver: V,
|
|
62
|
+
disabled: j,
|
|
63
|
+
canSubmit: C,
|
|
64
|
+
hasStartedConversation: _,
|
|
65
|
+
isNewConversationPending: g,
|
|
66
|
+
showButton: v,
|
|
67
|
+
buttonClassName: S,
|
|
68
|
+
chatInputRef: N,
|
|
69
|
+
handleFileIconClick: H,
|
|
69
70
|
handleSubmit: $,
|
|
70
|
-
onDragOver:
|
|
71
|
-
onDragLeave:
|
|
72
|
-
onDrop:
|
|
71
|
+
onDragOver: re,
|
|
72
|
+
onDragLeave: W,
|
|
73
|
+
onDrop: G,
|
|
73
74
|
onInput: () => {
|
|
74
|
-
|
|
75
|
+
ce(), ge(), L(), R();
|
|
75
76
|
},
|
|
76
|
-
onPaste:
|
|
77
|
+
onPaste: le,
|
|
77
78
|
onKeyDown: (e) => {
|
|
78
|
-
|
|
79
|
+
ve(e) || ue(e, j, $);
|
|
79
80
|
},
|
|
80
|
-
onFocus:
|
|
81
|
+
onFocus: fe,
|
|
81
82
|
onBlur: () => {
|
|
82
|
-
|
|
83
|
+
de(), ye(), R();
|
|
83
84
|
},
|
|
84
|
-
isSlashMenuOpen:
|
|
85
|
-
slashItems:
|
|
86
|
-
slashSelectedIndex:
|
|
87
|
-
onSlashSelect:
|
|
85
|
+
isSlashMenuOpen: pe,
|
|
86
|
+
slashItems: me,
|
|
87
|
+
slashSelectedIndex: he,
|
|
88
|
+
onSlashSelect: _e
|
|
88
89
|
})]
|
|
89
90
|
})]
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
//#endregion
|
|
93
|
-
export {
|
|
94
|
+
export { h as CustomChatInput };
|
|
94
95
|
|
|
95
96
|
//# sourceMappingURL=custom-chat-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-chat-input.js","names":[],"sources":["../../../../src/components/features/chat/custom-chat-input.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\nimport { useChatInputLogic } from \"#/hooks/chat/use-chat-input-logic\";\nimport { useFileHandling } from \"#/hooks/chat/use-file-handling\";\nimport { useGripResize } from \"#/hooks/chat/use-grip-resize\";\nimport { useChatInputEvents } from \"#/hooks/chat/use-chat-input-events\";\nimport { useChatSubmission } from \"#/hooks/chat/use-chat-submission\";\nimport { useSlashCommand } from \"#/hooks/chat/use-slash-command\";\nimport { ChatInputGrip } from \"./components/chat-input-grip\";\nimport { ChatInputContainer } from \"./components/chat-input-container\";\nimport { HiddenFileInput } from \"./components/hidden-file-input\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { cn } from \"#/utils/utils\";\n\nexport interface CustomChatInputProps {\n disabled?: boolean;\n isNewConversationPending?: boolean;\n hasStartedConversation?: boolean;\n showButton?: boolean;\n onSubmit: (message: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n onFilesPaste?: (\n files: File[],\n options?: import(\"#/hooks/chat/use-chat-attachment-upload\").ChatAttachmentUploadOptions,\n ) => void;\n className?: React.HTMLAttributes<HTMLDivElement>[\"className\"];\n buttonClassName?: React.HTMLAttributes<HTMLButtonElement>[\"className\"];\n}\n\nexport function CustomChatInput({\n disabled = false,\n isNewConversationPending = false,\n hasStartedConversation,\n showButton = true,\n onSubmit,\n onFocus,\n onBlur,\n onFilesPaste,\n className = \"\",\n buttonClassName = \"\",\n}: CustomChatInputProps) {\n const [canSubmit, setCanSubmit] = React.useState(false);\n const {\n submittedMessage,\n clearAllFiles,\n setShouldHideSuggestions,\n setSubmittedMessage,\n images,\n files,\n } = useConversationStore();\n\n // Note: we intentionally do NOT disable the input when the conversation is\n // in an ERROR/STUCK execution state. Users should be able to send a follow-up\n // message to recover the conversation; the message will be delivered\n // immediately via the WebSocket if connected, or queued via REST otherwise.\n const isDisabled = disabled;\n\n // Always call the latest `onSubmit` without making the effect re-run when\n // its identity changes. `onSubmit` (typically `handleSendMessage`) is a\n // fresh function on every parent render, and the parent re-renders\n // whenever the pending-message queue updates synchronously inside\n // `onSubmit` itself. Listing it in the dep array caused the effect to\n // fire twice — once for the original submit and again from the\n // mid-submit re-render, before `setSubmittedMessage(null)` was applied —\n // producing a duplicate \"Sending…\" bubble.\n const onSubmitRef = useRef(onSubmit);\n useEffect(() => {\n onSubmitRef.current = onSubmit;\n }, [onSubmit]);\n\n // Listen to submittedMessage state changes\n useEffect(() => {\n if (!submittedMessage || disabled) {\n return;\n }\n onSubmitRef.current(submittedMessage);\n setSubmittedMessage(null);\n }, [submittedMessage, disabled, setSubmittedMessage]);\n\n // Custom hooks\n const {\n chatInputRef,\n messageToSend,\n checkIsContentEmpty,\n clearEmptyContentHandler,\n saveDraft,\n } = useChatInputLogic();\n\n const syncCanSubmit = React.useCallback(() => {\n const text = chatInputRef.current?.innerText ?? \"\";\n const hasAttachments = images.length > 0 || files.length > 0;\n setCanSubmit(text.trim().length > 0 || hasAttachments);\n }, [chatInputRef, images, files]);\n\n const {\n fileInputRef,\n chatContainerRef,\n isDragOver,\n handleFileIconClick,\n handleFileInputChange,\n handleDragOver,\n handleDragLeave,\n handleDrop,\n } = useFileHandling(onFilesPaste);\n\n const {\n gripRef,\n isGripVisible,\n isGripDragging,\n handleTopEdgeClick,\n smartResize,\n handleGripMouseDown,\n handleGripTouchStart,\n increaseHeightForEmptyContent,\n resetManualResize,\n } = useGripResize(\n chatInputRef as React.RefObject<HTMLDivElement | null>,\n messageToSend,\n );\n\n const { handleSubmit } = useChatSubmission(\n chatInputRef as React.RefObject<HTMLDivElement | null>,\n fileInputRef as React.RefObject<HTMLInputElement | null>,\n smartResize,\n onSubmit,\n resetManualResize,\n );\n const handleSubmitAndSync = React.useCallback(() => {\n handleSubmit();\n syncCanSubmit();\n }, [handleSubmit, syncCanSubmit]);\n\n const { handleInput, handlePaste, handleKeyDown, handleBlur, handleFocus } =\n useChatInputEvents(\n chatInputRef as React.RefObject<HTMLDivElement | null>,\n smartResize,\n increaseHeightForEmptyContent,\n checkIsContentEmpty,\n clearEmptyContentHandler,\n onFocus,\n onBlur,\n );\n\n const {\n isMenuOpen: isSlashMenuOpen,\n filteredItems: slashItems,\n selectedIndex: slashSelectedIndex,\n updateSlashMenu,\n selectItem: selectSlashItem,\n handleSlashKeyDown,\n closeMenu: closeSlashMenu,\n } = useSlashCommand(chatInputRef as React.RefObject<HTMLDivElement | null>);\n\n // Cleanup: reset suggestions visibility when component unmounts\n useEffect(\n () => () => {\n setShouldHideSuggestions(false);\n clearAllFiles();\n },\n [setShouldHideSuggestions, clearAllFiles],\n );\n useEffect(() => {\n syncCanSubmit();\n }, [syncCanSubmit, images.length, files.length]);\n return (\n <div className={cn(\"w-full\", className)}>\n {/* Hidden file input */}\n <HiddenFileInput\n fileInputRef={fileInputRef}\n onChange={handleFileInputChange}\n />\n\n {/* Container with grip */}\n <div className=\"relative w-full\">\n <ChatInputGrip\n gripRef={gripRef}\n isGripVisible={isGripVisible}\n isGripDragging={isGripDragging}\n handleTopEdgeClick={handleTopEdgeClick}\n handleGripMouseDown={handleGripMouseDown}\n handleGripTouchStart={handleGripTouchStart}\n />\n\n <ChatInputContainer\n chatContainerRef={chatContainerRef}\n isDragOver={isDragOver}\n disabled={isDisabled}\n canSubmit={canSubmit}\n hasStartedConversation={hasStartedConversation}\n isNewConversationPending={isNewConversationPending}\n showButton={showButton}\n buttonClassName={buttonClassName}\n chatInputRef={chatInputRef}\n handleFileIconClick={handleFileIconClick}\n handleSubmit={handleSubmitAndSync}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n onInput={() => {\n handleInput();\n updateSlashMenu();\n saveDraft();\n syncCanSubmit();\n }}\n onPaste={handlePaste}\n onKeyDown={(e) => {\n if (handleSlashKeyDown(e)) return;\n handleKeyDown(e, isDisabled, handleSubmitAndSync);\n }}\n onFocus={handleFocus}\n onBlur={() => {\n handleBlur();\n closeSlashMenu();\n syncCanSubmit();\n }}\n isSlashMenuOpen={isSlashMenuOpen}\n slashItems={slashItems}\n slashSelectedIndex={slashSelectedIndex}\n onSlashSelect={selectSlashItem}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA6BA,SAAgB,EAAgB,EAC9B,cAAW,IACX,8BAA2B,IAC3B,2BACA,gBAAa,IACb,aACA,aACA,YACA,iBACA,eAAY,IACZ,qBAAkB,MACK;CACvB,IAAM,CAAC,GAAW,KAAgB,EAAM,SAAS,EAAK,GAChD,EACJ,qBACA,kBACA,6BACA,wBACA,WACA,aACE,EAAqB,GAMnB,IAAa,GAUb,IAAc,EAAO,CAAQ;CAMnC,AALA,QAAgB;EACd,EAAY,UAAU;CACxB,GAAG,CAAC,CAAQ,CAAC,GAGb,QAAgB;EACV,CAAC,KAAoB,MAGzB,EAAY,QAAQ,CAAgB,GACpC,EAAoB,IAAI;CAC1B,GAAG;EAAC;EAAkB;EAAU;CAAmB,CAAC;CAGpD,IAAM,EACJ,iBACA,kBACA,wBACA,6BACA,iBACE,EAAkB,GAEhB,IAAgB,EAAM,kBAAkB;EAC5C,IAAM,IAAO,EAAa,SAAS,aAAa,IAC1C,IAAiB,EAAO,SAAS,KAAK,EAAM,SAAS;EAC3D,EAAa,EAAK,KAAK,EAAE,SAAS,KAAK,CAAc;CACvD,GAAG;EAAC;EAAc;EAAQ;CAAK,CAAC,GAE1B,EACJ,iBACA,qBACA,eACA,wBACA,0BACA,oBACA,oBACA,kBACE,EAAgB,CAAY,GAE1B,EACJ,YACA,kBACA,mBACA,uBACA,gBACA,yBACA,0BACA,mCACA,0BACE,EACF,GACA,CACF,GAEM,EAAE,oBAAiB,EACvB,GACA,GACA,GACA,GACA,EACF,GACM,IAAsB,EAAM,kBAAkB;EAElD,AADA,EAAa,GACb,EAAc;CAChB,GAAG,CAAC,GAAc,CAAa,CAAC,GAE1B,EAAE,iBAAa,iBAAa,mBAAe,gBAAY,oBAC3D,EACE,GACA,GACA,IACA,GACA,GACA,IACA,EACF,GAEI,EACJ,YAAY,IACZ,eAAe,IACf,eAAe,IACf,qBACA,YAAY,IACZ,wBACA,WAAW,OACT,
|
|
1
|
+
{"version":3,"file":"custom-chat-input.js","names":[],"sources":["../../../../src/components/features/chat/custom-chat-input.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\nimport { useChatInputLogic } from \"#/hooks/chat/use-chat-input-logic\";\nimport { useFileHandling } from \"#/hooks/chat/use-file-handling\";\nimport { useGripResize } from \"#/hooks/chat/use-grip-resize\";\nimport { useChatInputEvents } from \"#/hooks/chat/use-chat-input-events\";\nimport { useChatSubmission } from \"#/hooks/chat/use-chat-submission\";\nimport { useSlashCommand } from \"#/hooks/chat/use-slash-command\";\nimport { ChatInputGrip } from \"./components/chat-input-grip\";\nimport { ChatInputContainer } from \"./components/chat-input-container\";\nimport { HiddenFileInput } from \"./components/hidden-file-input\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { cn } from \"#/utils/utils\";\n\nexport interface CustomChatInputProps {\n disabled?: boolean;\n isNewConversationPending?: boolean;\n hasStartedConversation?: boolean;\n showButton?: boolean;\n onSubmit: (message: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n onFilesPaste?: (\n files: File[],\n options?: import(\"#/hooks/chat/use-chat-attachment-upload\").ChatAttachmentUploadOptions,\n ) => void;\n className?: React.HTMLAttributes<HTMLDivElement>[\"className\"];\n buttonClassName?: React.HTMLAttributes<HTMLButtonElement>[\"className\"];\n}\n\nexport function CustomChatInput({\n disabled = false,\n isNewConversationPending = false,\n hasStartedConversation,\n showButton = true,\n onSubmit,\n onFocus,\n onBlur,\n onFilesPaste,\n className = \"\",\n buttonClassName = \"\",\n}: CustomChatInputProps) {\n const [canSubmit, setCanSubmit] = React.useState(false);\n const {\n submittedMessage,\n clearAllFiles,\n setShouldHideSuggestions,\n setSubmittedMessage,\n images,\n files,\n } = useConversationStore();\n\n // Note: we intentionally do NOT disable the input when the conversation is\n // in an ERROR/STUCK execution state. Users should be able to send a follow-up\n // message to recover the conversation; the message will be delivered\n // immediately via the WebSocket if connected, or queued via REST otherwise.\n const isDisabled = disabled;\n\n // Always call the latest `onSubmit` without making the effect re-run when\n // its identity changes. `onSubmit` (typically `handleSendMessage`) is a\n // fresh function on every parent render, and the parent re-renders\n // whenever the pending-message queue updates synchronously inside\n // `onSubmit` itself. Listing it in the dep array caused the effect to\n // fire twice — once for the original submit and again from the\n // mid-submit re-render, before `setSubmittedMessage(null)` was applied —\n // producing a duplicate \"Sending…\" bubble.\n const onSubmitRef = useRef(onSubmit);\n useEffect(() => {\n onSubmitRef.current = onSubmit;\n }, [onSubmit]);\n\n // Listen to submittedMessage state changes\n useEffect(() => {\n if (!submittedMessage || disabled) {\n return;\n }\n onSubmitRef.current(submittedMessage);\n setSubmittedMessage(null);\n }, [submittedMessage, disabled, setSubmittedMessage]);\n\n // Custom hooks\n const {\n chatInputRef,\n messageToSend,\n checkIsContentEmpty,\n clearEmptyContentHandler,\n saveDraft,\n } = useChatInputLogic();\n\n const syncCanSubmit = React.useCallback(() => {\n const text = chatInputRef.current?.innerText ?? \"\";\n const hasAttachments = images.length > 0 || files.length > 0;\n setCanSubmit(text.trim().length > 0 || hasAttachments);\n }, [chatInputRef, images, files]);\n\n const {\n fileInputRef,\n chatContainerRef,\n isDragOver,\n handleFileIconClick,\n handleFileInputChange,\n handleDragOver,\n handleDragLeave,\n handleDrop,\n } = useFileHandling(onFilesPaste);\n\n const {\n gripRef,\n isGripVisible,\n isGripDragging,\n canResize,\n handleTopEdgeClick,\n smartResize,\n handleGripMouseDown,\n handleGripTouchStart,\n increaseHeightForEmptyContent,\n resetManualResize,\n } = useGripResize(\n chatInputRef as React.RefObject<HTMLDivElement | null>,\n messageToSend,\n );\n\n const { handleSubmit } = useChatSubmission(\n chatInputRef as React.RefObject<HTMLDivElement | null>,\n fileInputRef as React.RefObject<HTMLInputElement | null>,\n smartResize,\n onSubmit,\n resetManualResize,\n );\n const handleSubmitAndSync = React.useCallback(() => {\n handleSubmit();\n syncCanSubmit();\n }, [handleSubmit, syncCanSubmit]);\n\n const { handleInput, handlePaste, handleKeyDown, handleBlur, handleFocus } =\n useChatInputEvents(\n chatInputRef as React.RefObject<HTMLDivElement | null>,\n smartResize,\n increaseHeightForEmptyContent,\n checkIsContentEmpty,\n clearEmptyContentHandler,\n onFocus,\n onBlur,\n );\n\n const {\n isMenuOpen: isSlashMenuOpen,\n filteredItems: slashItems,\n selectedIndex: slashSelectedIndex,\n updateSlashMenu,\n selectItem: selectSlashItem,\n handleSlashKeyDown,\n closeMenu: closeSlashMenu,\n } = useSlashCommand(chatInputRef as React.RefObject<HTMLDivElement | null>);\n\n // Cleanup: reset suggestions visibility when component unmounts\n useEffect(\n () => () => {\n setShouldHideSuggestions(false);\n clearAllFiles();\n },\n [setShouldHideSuggestions, clearAllFiles],\n );\n useEffect(() => {\n syncCanSubmit();\n }, [syncCanSubmit, images.length, files.length]);\n return (\n <div className={cn(\"w-full\", className)}>\n {/* Hidden file input */}\n <HiddenFileInput\n fileInputRef={fileInputRef}\n onChange={handleFileInputChange}\n />\n\n {/* Container with grip */}\n <div className=\"relative w-full\">\n <ChatInputGrip\n gripRef={gripRef}\n isGripVisible={isGripVisible}\n isGripDragging={isGripDragging}\n canResize={canResize}\n handleTopEdgeClick={handleTopEdgeClick}\n handleGripMouseDown={handleGripMouseDown}\n handleGripTouchStart={handleGripTouchStart}\n />\n\n <ChatInputContainer\n chatContainerRef={chatContainerRef}\n isDragOver={isDragOver}\n disabled={isDisabled}\n canSubmit={canSubmit}\n hasStartedConversation={hasStartedConversation}\n isNewConversationPending={isNewConversationPending}\n showButton={showButton}\n buttonClassName={buttonClassName}\n chatInputRef={chatInputRef}\n handleFileIconClick={handleFileIconClick}\n handleSubmit={handleSubmitAndSync}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n onInput={() => {\n handleInput();\n updateSlashMenu();\n saveDraft();\n syncCanSubmit();\n }}\n onPaste={handlePaste}\n onKeyDown={(e) => {\n if (handleSlashKeyDown(e)) return;\n handleKeyDown(e, isDisabled, handleSubmitAndSync);\n }}\n onFocus={handleFocus}\n onBlur={() => {\n handleBlur();\n closeSlashMenu();\n syncCanSubmit();\n }}\n isSlashMenuOpen={isSlashMenuOpen}\n slashItems={slashItems}\n slashSelectedIndex={slashSelectedIndex}\n onSlashSelect={selectSlashItem}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA6BA,SAAgB,EAAgB,EAC9B,cAAW,IACX,8BAA2B,IAC3B,2BACA,gBAAa,IACb,aACA,aACA,YACA,iBACA,eAAY,IACZ,qBAAkB,MACK;CACvB,IAAM,CAAC,GAAW,KAAgB,EAAM,SAAS,EAAK,GAChD,EACJ,qBACA,kBACA,6BACA,wBACA,WACA,aACE,EAAqB,GAMnB,IAAa,GAUb,IAAc,EAAO,CAAQ;CAMnC,AALA,QAAgB;EACd,EAAY,UAAU;CACxB,GAAG,CAAC,CAAQ,CAAC,GAGb,QAAgB;EACV,CAAC,KAAoB,MAGzB,EAAY,QAAQ,CAAgB,GACpC,EAAoB,IAAI;CAC1B,GAAG;EAAC;EAAkB;EAAU;CAAmB,CAAC;CAGpD,IAAM,EACJ,iBACA,kBACA,wBACA,6BACA,iBACE,EAAkB,GAEhB,IAAgB,EAAM,kBAAkB;EAC5C,IAAM,IAAO,EAAa,SAAS,aAAa,IAC1C,IAAiB,EAAO,SAAS,KAAK,EAAM,SAAS;EAC3D,EAAa,EAAK,KAAK,EAAE,SAAS,KAAK,CAAc;CACvD,GAAG;EAAC;EAAc;EAAQ;CAAK,CAAC,GAE1B,EACJ,iBACA,qBACA,eACA,wBACA,0BACA,oBACA,oBACA,kBACE,EAAgB,CAAY,GAE1B,EACJ,YACA,kBACA,mBACA,cACA,uBACA,gBACA,yBACA,0BACA,mCACA,0BACE,EACF,GACA,CACF,GAEM,EAAE,oBAAiB,EACvB,GACA,GACA,GACA,GACA,EACF,GACM,IAAsB,EAAM,kBAAkB;EAElD,AADA,EAAa,GACb,EAAc;CAChB,GAAG,CAAC,GAAc,CAAa,CAAC,GAE1B,EAAE,iBAAa,iBAAa,mBAAe,gBAAY,oBAC3D,EACE,GACA,GACA,IACA,GACA,GACA,IACA,EACF,GAEI,EACJ,YAAY,IACZ,eAAe,IACf,eAAe,IACf,qBACA,YAAY,IACZ,wBACA,WAAW,OACT,GAAgB,CAAsD;CAa1E,OAVA,cACc;EAEV,AADA,EAAyB,EAAK,GAC9B,EAAc;CAChB,GACA,CAAC,GAA0B,CAAa,CAC1C,GACA,QAAgB;EACd,EAAc;CAChB,GAAG;EAAC;EAAe,EAAO;EAAQ,EAAM;CAAM,CAAC,GAE7C,kBAAC,OAAD;EAAK,WAAW,EAAG,UAAU,CAAS;YAAtC,CAEE,kBAAC,GAAD;GACgB;GACd,UAAU;EACX,CAAA,GAGD,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IACW;IACM;IACC;IACL;IACS;IACC;IACC;GACvB,CAAA,GAED,kBAAC,GAAD;IACoB;IACN;IACZ,UAAU;IACC;IACa;IACE;IACd;IACK;IACH;IACO;IACrB,cAAc;IACd,YAAY;IACZ,aAAa;IACb,QAAQ;IACR,eAAe;KAIb,AAHA,GAAY,GACZ,GAAgB,GAChB,EAAU,GACV,EAAc;IAChB;IACA,SAAS;IACT,YAAY,MAAM;KACZ,GAAmB,CAAC,KACxB,GAAc,GAAG,GAAY,CAAmB;IAClD;IACA,SAAS;IACT,cAAc;KAGZ,AAFA,GAAW,GACX,GAAe,GACf,EAAc;IAChB;IACiB;IACL;IACQ;IACpB,eAAe;GAChB,CAAA,CACE;IACF;;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../utils/event-logger.cjs");let t=require("react/jsx-runtime");var n=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},r=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,i=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return r(e)&&!n.endsWith(`/`)?`${n}/`:n};function a(r){let{children:a}=r,o=r=>{try{let e=n(r);return(0,t.jsx)(`span`,{className:`font-mono`,title:e,children:i(e)})}catch(n){return e.default.error(String(n)),(0,t.jsx)(`span`,{className:`font-mono`,children:r})}};return Array.isArray(a)?(0,t.jsx)(`
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../utils/event-logger.cjs");let t=require("react/jsx-runtime");var n=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},r=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,i=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return r(e)&&!n.endsWith(`/`)?`${n}/`:n};function a(r){let{children:a}=r,o=r=>{try{let e=n(r);return(0,t.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,title:e,children:i(e)})}catch(n){return e.default.error(String(n)),(0,t.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,children:r})}};return Array.isArray(a)?(0,t.jsx)(`span`,{className:`font-normal tracking-tight`,children:a.map((e,n)=>typeof e==`string`?(0,t.jsx)(`span`,{children:o(e)},`${e}-${n}`):e)}):typeof a==`string`?(0,t.jsx)(`span`,{className:`font-normal tracking-tight`,children:o(a)}):(0,t.jsx)(`span`,{className:`font-mono font-normal tracking-tight`,children:a})}exports.PathComponent=a;
|
|
2
2
|
//# sourceMappingURL=path-component.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-component.cjs","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span
|
|
1
|
+
{"version":3,"file":"path-component.cjs","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span\n className=\"font-mono font-normal tracking-tight\"\n title={decodedPath}\n >\n {filename}\n </span>\n );\n } catch (e) {\n // Just log the error without any message to avoid localization issues\n EventLogger.error(String(e));\n return (\n <span className=\"font-mono font-normal tracking-tight\">{path}</span>\n );\n }\n };\n\n if (Array.isArray(children)) {\n const processedChildren = children.map((child, index) =>\n typeof child === \"string\" ? (\n <span key={`${child}-${index}`}>{processPath(child)}</span>\n ) : (\n child\n ),\n );\n\n return (\n <span className=\"font-normal tracking-tight\">{processedChildren}</span>\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <span className=\"font-normal tracking-tight\">\n {processPath(children)}\n </span>\n );\n }\n\n return (\n <span className=\"font-mono font-normal tracking-tight\">{children}</span>\n );\n}\n\nexport { PathComponent, isLikelyDirectory };\n"],"mappings":"yIAQA,IAAM,EAAsB,GAAyB,CACnD,IAAM,EAAW,SAAS,cAAc,UAAU,EAElD,MADA,GAAS,UAAY,EACd,EAAS,KAClB,EAOM,EAAqB,GACpB,EAED,EAAK,SAAS,GAAG,GAAK,EAAK,SAAS,IAAI,EAAU,GAI/C,EAFU,EAAK,MAAM,OAAO,EAAE,IAAI,GAAK,IAE7B,SAAS,GAAG,EANX,GAcd,EAAmB,GAAyB,CAChD,GAAI,CAAC,EAAM,MAAO,GAElB,IAAM,EAAQ,EAAK,MAAM,OAAO,EAC1B,EAAW,EAAM,EAAM,OAAS,GAOtC,OAJI,EAAkB,CAAI,GAAK,CAAC,EAAS,SAAS,GAAG,EAC5C,GAAG,EAAS,GAGd,CACT,EAMA,SAAS,EAAc,EAAiC,CACtD,GAAM,CAAE,YAAa,EAEf,EAAe,GAAiB,CACpC,GAAI,CAEF,IAAM,EAAc,EAAmB,CAAI,EAG3C,OACE,EAAA,EAAA,KAAC,OAAD,CACE,UAAU,uCACV,MAAO,WAJM,EAAgB,CAM5B,CACG,CAAA,CAEV,OAAS,EAAG,CAGV,OADA,EAAA,QAAY,MAAM,OAAO,CAAC,CAAC,GAEzB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,gDAAwC,CAAW,CAAA,CAEvE,CACF,EAwBA,OAtBI,MAAM,QAAQ,CAAQ,GAUtB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sCATQ,EAAS,KAAK,EAAO,IAC7C,OAAO,GAAU,UACf,EAAA,EAAA,KAAC,OAAD,CAAA,SAAiC,EAAY,CAAK,CAAQ,EAA/C,GAAG,EAAM,GAAG,GAAmC,EAE1D,CAK4C,CAAwB,CAAA,EAItE,OAAO,GAAa,UAEpB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sCACb,EAAY,CAAQ,CACjB,CAAA,GAKR,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,uCAAwC,UAAe,CAAA,CAE3E"}
|
|
@@ -14,22 +14,25 @@ function a(r) {
|
|
|
14
14
|
try {
|
|
15
15
|
let e = n(r);
|
|
16
16
|
return /* @__PURE__ */ t("span", {
|
|
17
|
-
className: "font-mono",
|
|
17
|
+
className: "font-mono font-normal tracking-tight",
|
|
18
18
|
title: e,
|
|
19
19
|
children: i(e)
|
|
20
20
|
});
|
|
21
21
|
} catch (n) {
|
|
22
22
|
return e.error(String(n)), /* @__PURE__ */ t("span", {
|
|
23
|
-
className: "font-mono",
|
|
23
|
+
className: "font-mono font-normal tracking-tight",
|
|
24
24
|
children: r
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
return Array.isArray(a) ? /* @__PURE__ */ t("
|
|
29
|
-
className: "font-
|
|
28
|
+
return Array.isArray(a) ? /* @__PURE__ */ t("span", {
|
|
29
|
+
className: "font-normal tracking-tight",
|
|
30
30
|
children: a.map((e, n) => typeof e == "string" ? /* @__PURE__ */ t("span", { children: o(e) }, `${e}-${n}`) : e)
|
|
31
|
-
}) : typeof a == "string" ? /* @__PURE__ */ t("
|
|
32
|
-
className: "font-
|
|
31
|
+
}) : typeof a == "string" ? /* @__PURE__ */ t("span", {
|
|
32
|
+
className: "font-normal tracking-tight",
|
|
33
|
+
children: o(a)
|
|
34
|
+
}) : /* @__PURE__ */ t("span", {
|
|
35
|
+
className: "font-mono font-normal tracking-tight",
|
|
33
36
|
children: a
|
|
34
37
|
});
|
|
35
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-component.js","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span
|
|
1
|
+
{"version":3,"file":"path-component.js","names":[],"sources":["../../../../src/components/features/chat/path-component.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport EventLogger from \"#/utils/event-logger\";\n\n/**\n * Decodes HTML entities in a string\n * @param text The text to decode\n * @returns The decoded text\n */\nconst decodeHtmlEntities = (text: string): string => {\n const textarea = document.createElement(\"textarea\");\n textarea.innerHTML = text;\n return textarea.value;\n};\n\n/**\n * Checks if a path is likely a directory\n * @param path The full path\n * @returns True if the path is likely a directory\n */\nconst isLikelyDirectory = (path: string): boolean => {\n if (!path) return false;\n // Check if path already ends with a slash\n if (path.endsWith(\"/\") || path.endsWith(\"\\\\\")) return true;\n // Check if path has no extension (simple heuristic)\n const lastPart = path.split(/[/\\\\]/).pop() || \"\";\n // If the last part has no dots, it's likely a directory\n return !lastPart.includes(\".\");\n};\n\n/**\n * Extracts the filename from a path\n * @param path The full path\n * @returns The filename (last part of the path)\n */\nconst extractFilename = (path: string): string => {\n if (!path) return \"\";\n // Handle both Unix and Windows paths\n const parts = path.split(/[/\\\\]/);\n const filename = parts[parts.length - 1];\n\n // Add trailing slash for directories\n if (isLikelyDirectory(path) && !filename.endsWith(\"/\")) {\n return `${filename}/`;\n }\n\n return filename;\n};\n\n/**\n * Component that displays only the filename in the text but shows the full path on hover\n * Similar to MonoComponent but with path-specific functionality\n */\nfunction PathComponent(props: { children?: ReactNode }) {\n const { children } = props;\n\n const processPath = (path: string) => {\n try {\n // First decode any HTML entities in the path\n const decodedPath = decodeHtmlEntities(path);\n // Extract the filename from the decoded path\n const filename = extractFilename(decodedPath);\n return (\n <span\n className=\"font-mono font-normal tracking-tight\"\n title={decodedPath}\n >\n {filename}\n </span>\n );\n } catch (e) {\n // Just log the error without any message to avoid localization issues\n EventLogger.error(String(e));\n return (\n <span className=\"font-mono font-normal tracking-tight\">{path}</span>\n );\n }\n };\n\n if (Array.isArray(children)) {\n const processedChildren = children.map((child, index) =>\n typeof child === \"string\" ? (\n <span key={`${child}-${index}`}>{processPath(child)}</span>\n ) : (\n child\n ),\n );\n\n return (\n <span className=\"font-normal tracking-tight\">{processedChildren}</span>\n );\n }\n\n if (typeof children === \"string\") {\n return (\n <span className=\"font-normal tracking-tight\">\n {processPath(children)}\n </span>\n );\n }\n\n return (\n <span className=\"font-mono font-normal tracking-tight\">{children}</span>\n );\n}\n\nexport { PathComponent, isLikelyDirectory };\n"],"mappings":";;;AAQA,IAAM,KAAsB,MAAyB;CACnD,IAAM,IAAW,SAAS,cAAc,UAAU;CAElD,OADA,EAAS,YAAY,GACd,EAAS;AAClB,GAOM,KAAqB,MACpB,IAED,EAAK,SAAS,GAAG,KAAK,EAAK,SAAS,IAAI,IAAU,KAI/C,EAFU,EAAK,MAAM,OAAO,EAAE,IAAI,KAAK,IAE7B,SAAS,GAAG,IANX,IAcd,KAAmB,MAAyB;CAChD,IAAI,CAAC,GAAM,OAAO;CAElB,IAAM,IAAQ,EAAK,MAAM,OAAO,GAC1B,IAAW,EAAM,EAAM,SAAS;CAOtC,OAJI,EAAkB,CAAI,KAAK,CAAC,EAAS,SAAS,GAAG,IAC5C,GAAG,EAAS,KAGd;AACT;AAMA,SAAS,EAAc,GAAiC;CACtD,IAAM,EAAE,gBAAa,GAEf,KAAe,MAAiB;EACpC,IAAI;GAEF,IAAM,IAAc,EAAmB,CAAI;GAG3C,OACE,kBAAC,QAAD;IACE,WAAU;IACV,OAAO;cAJM,EAAgB,CAM5B;GACG,CAAA;EAEV,SAAS,GAAG;GAGV,OADA,EAAY,MAAM,OAAO,CAAC,CAAC,GAEzB,kBAAC,QAAD;IAAM,WAAU;cAAwC;GAAW,CAAA;EAEvE;CACF;CAwBA,OAtBI,MAAM,QAAQ,CAAQ,IAUtB,kBAAC,QAAD;EAAM,WAAU;YATQ,EAAS,KAAK,GAAO,MAC7C,OAAO,KAAU,WACf,kBAAC,QAAD,EAAA,UAAiC,EAAY,CAAK,EAAQ,GAA/C,GAAG,EAAM,GAAG,GAAmC,IAE1D,CAK4C;CAAwB,CAAA,IAItE,OAAO,KAAa,WAEpB,kBAAC,QAAD;EAAM,WAAU;YACb,EAAY,CAAQ;CACjB,CAAA,IAKR,kBAAC,QAAD;EAAM,WAAU;EAAwC;CAAe,CAAA;AAE3E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("../../../node_modules/lucide-react/dist/esm/icons/arrow-up-right.cjs"),r=require("../../../utils/utils.cjs"),i=require("../markdown/markdown-renderer.cjs"),a=require("../../../ui/typography.cjs"),o=require("../../../icons/lesson-plan.cjs"),s=require("../../../
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),t=require("../../../i18n/declaration.cjs"),n=require("../../../node_modules/lucide-react/dist/esm/icons/arrow-up-right.cjs"),r=require("../../../utils/utils.cjs"),i=require("../markdown/markdown-renderer.cjs"),a=require("../../../ui/typography.cjs"),o=require("../../../icons/lesson-plan.cjs"),s=require("../../../hooks/use-select-conversation-tab.cjs"),c=require("../../../context/scroll-context.cjs"),l=require("../../../hooks/use-handle-build-plan-click.cjs"),u=require("../markdown/plan-components.cjs");let d=require("react"),f=require("react/jsx-runtime");var p=300,m=u.createPlanComponents(`shine-text`);function h({planContent:h,isStreaming:g,isBuildDisabled:_}){let{t:v}=e.useTranslation(`openhands`),{navigateToTab:y}=s.useSelectConversationTab(),{handleBuildPlanClick:b}=l.useHandleBuildPlanClick(),{scrollDomToBottom:x}=c.useScrollContext(),S=()=>{y(`planner`)},C=(0,d.useCallback)(e=>{b(e),x()},[b,x]),w=(0,d.useMemo)(()=>h?h.length<=p?h:`${h.slice(0,p)}...`:``,[h]);return h?(0,f.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,f.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,f.jsx)(o.default,{width:18,height:18,color:`var(--oh-muted)`}),(0,f.jsx)(a.Typography.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:v(t.I18nKey.COMMON$PLAN_MD)}),(0,f.jsx)(`div`,{className:`flex-1`}),(0,f.jsxs)(`button`,{type:`button`,onClick:S,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,f.jsx)(a.Typography.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:v(t.I18nKey.COMMON$VIEW)}),(0,f.jsx)(n.ArrowUpRight,{className:`text-white`,size:18})]})]}),(0,f.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:w&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i.MarkdownRenderer,{includeStandard:!0,components:g?m:u.planComponents,children:w}),h&&h.length>p&&(0,f.jsx)(`button`,{type:`button`,onClick:S,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:v(t.I18nKey.COMMON$READ_MORE)})]})}),(0,f.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,f.jsx)(`button`,{type:`button`,onClick:C,disabled:_,className:r.cn(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,_?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,f.jsxs)(a.Typography.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[v(t.I18nKey.COMMON$BUILD),` `,(0,f.jsx)(a.Typography.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}exports.PlanPreview=h;
|
|
2
2
|
//# sourceMappingURL=plan-preview.cjs.map
|
|
@@ -5,16 +5,16 @@ import { cn as r } from "../../../utils/utils.js";
|
|
|
5
5
|
import { MarkdownRenderer as i } from "../markdown/markdown-renderer.js";
|
|
6
6
|
import { Typography as a } from "../../../ui/typography.js";
|
|
7
7
|
import o from "../../../icons/lesson-plan.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { useSelectConversationTab as s } from "../../../hooks/use-select-conversation-tab.js";
|
|
9
|
+
import { useScrollContext as c } from "../../../context/scroll-context.js";
|
|
10
|
+
import { useHandleBuildPlanClick as l } from "../../../hooks/use-handle-build-plan-click.js";
|
|
11
11
|
import { createPlanComponents as u, planComponents as d } from "../markdown/plan-components.js";
|
|
12
12
|
import { useCallback as f, useMemo as p } from "react";
|
|
13
13
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/features/chat/plan-preview.tsx
|
|
15
15
|
var _ = 300, v = u("shine-text");
|
|
16
16
|
function y({ planContent: u, isStreaming: y, isBuildDisabled: b }) {
|
|
17
|
-
let { t: x } = e("openhands"), { navigateToTab: S } =
|
|
17
|
+
let { t: x } = e("openhands"), { navigateToTab: S } = s(), { handleBuildPlanClick: C } = l(), { scrollDomToBottom: w } = c(), T = () => {
|
|
18
18
|
S("planner");
|
|
19
19
|
}, E = f((e) => {
|
|
20
20
|
C(e), w();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("../define.cjs"),
|
|
1
|
+
const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../../../hooks/use-conversation-id.cjs"),n=require("../../../../../stores/files-tab-store.cjs"),r=require("../../../../../hooks/query/use-active-conversation.cjs"),i=require("../../../../../hooks/use-select-conversation-tab.cjs"),a=require("../define.cjs"),o=require("../text-content.cjs"),s=require("../primitives/code-block.cjs"),c=require("../../../../../utils/get-language-from-path.cjs"),l=require("../../../../../utils/workspace-relative-path.cjs"),u=require("../primitives/diff-view.cjs"),d=require("../primitives/file-path-chip.cjs"),f=require("../../../../../utils/is-markdown-file-path.cjs"),p=require("../primitives/markdown-file-preview.cjs");let m=require("react");m=e.__toESM(m,1);let h=require("react/jsx-runtime");var g=({action:e,observation:t})=>t?.observation.path??e?.action.path??``;function _({action:e,observation:t,onOpenFile:n}){let r=g({action:e,observation:t}),i=t?.observation.command??e?.action.command,a=c.getLanguageFromPath(r),l=e?.action.view_range,m=i===`view`&&l?`${l[0]}-${l[1]}`:void 0,_=r?(0,h.jsx)(d.FilePathChip,{path:r,range:m,onClick:n}):null,v=e=>r&&i===`create`&&f.isMarkdownFilePath(r)?{chip:null,body:(0,h.jsx)(p.MarkdownFilePreview,{content:e,path:r,onView:n})}:{chip:_,body:(0,h.jsx)(s.CodeBlock,{code:e,language:a})};if(t){let e=t.observation,n=null,r=_;if(e.error)n=(0,h.jsx)(`span`,{className:`whitespace-pre-wrap text-xs text-danger`,children:e.error});else if(e.old_content!=null&&e.new_content!=null)n=(0,h.jsx)(u.DiffView,{oldText:e.old_content,newText:e.new_content});else{let t=e.new_content||e.output||(e.content?o.textFromContent(e.content):``);if(t){let e=v(t);r=e.chip,n=e.body}}return(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,n]})}if(e){let t=e.action,n=null,r=_;if(t.command===`create`&&t.file_text){let e=v(t.file_text);r=e.chip,n=e.body}else (t.command===`str_replace`||t.command===`insert`)&&t.new_str!=null&&(n=(0,h.jsx)(u.DiffView,{oldText:t.old_str??``,newText:t.new_str}));return(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,n]})}return null}function v({conversationId:e,...t}){let{navigateToTab:a}=i.useSelectConversationTab(),o=n.useFilesTabStore(e=>e.setSelectedPath),{data:s}=r.useActiveConversation(),c=g(t),u=s?.workspace?.working_dir,d=c&&t.observation?()=>{o(l.toWorkspaceRelativePath(c,u),e),a(`files`)}:void 0;return(0,h.jsx)(_,{...t,onOpenFile:d})}var y=a.defineVisualizer({actionKinds:[`FileEditorAction`,`StrReplaceEditorAction`],observationKinds:[`FileEditorObservation`,`StrReplaceEditorObservation`],Body:function(e){let{conversationId:n}=t.useOptionalConversationId();return n?(0,h.jsx)(v,{...e,conversationId:n}):(0,h.jsx)(_,{...e})}});exports.fileEditorVisualizer=y;
|
|
2
2
|
//# sourceMappingURL=file-editor.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-editor.cjs","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"file-editor.cjs","names":[],"sources":["../../../../../../src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx"],"sourcesContent":["/**\n * File-editor visualizer for `file_editor` / `str_replace_editor` tools.\n *\n * Observation card: error → message; `str_replace`/`insert` → diff of the file\n * before vs after; `create`/`view` → the file content. Action card (shown while\n * the edit is in flight): `create` → new content; `str_replace` → diff of the\n * replaced snippet; `view`/`undo_edit` → just the path + range.\n *\n * Created Markdown artifacts get a height-clipped rich preview with a View bar\n * that opens the Files drawer, instead of dumping the full source into a code\n * block. Reads/edits of `.md` files keep the normal CodeBlock / DiffView path.\n */\nimport React from \"react\";\nimport { getLanguageFromPath } from \"#/utils/get-language-from-path\";\nimport { toWorkspaceRelativePath } from \"#/utils/workspace-relative-path\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useSelectConversationTab } from \"#/hooks/use-select-conversation-tab\";\nimport { useFilesTabStore } from \"#/stores/files-tab-store\";\nimport type {\n FileEditorAction,\n StrReplaceEditorAction,\n} from \"#/types/agent-server/core/base/action\";\nimport type {\n FileEditorObservation,\n StrReplaceEditorObservation,\n} from \"#/types/agent-server/core/base/observation\";\nimport { defineVisualizer, VisualizerProps } from \"../define\";\nimport { textFromContent } from \"../text-content\";\nimport { CodeBlock } from \"../primitives/code-block\";\nimport { DiffView } from \"../primitives/diff-view\";\nimport { FilePathChip } from \"../primitives/file-path-chip\";\nimport {\n isMarkdownFilePath,\n MarkdownFilePreview,\n} from \"../primitives/markdown-file-preview\";\n\ntype FileEditorCardProps = VisualizerProps<\n FileEditorAction | StrReplaceEditorAction,\n FileEditorObservation | StrReplaceEditorObservation\n>;\n\n/** The path the event touched; observations win because they are authoritative. */\nconst resolvePath = ({ action, observation }: FileEditorCardProps): string =>\n observation?.observation.path ?? action?.action.path ?? \"\";\n\ninterface FileEditorCardBodyProps extends FileEditorCardProps {\n /**\n * Deep-links the file into the Files drawer. Absent outside a conversation\n * route, where there is no drawer to open; the card then stays read-only.\n * Also omitted for in-flight creates so View does not open a missing file.\n */\n onOpenFile?: () => void;\n}\n\nfunction FileEditorCardBody({\n action,\n observation,\n onOpenFile,\n}: FileEditorCardBodyProps) {\n const path = resolvePath({ action, observation });\n const command = observation?.observation.command ?? action?.action.command;\n const language = getLanguageFromPath(path);\n\n const viewRange = action?.action.view_range;\n const range =\n command === \"view\" && viewRange\n ? `${viewRange[0]}-${viewRange[1]}`\n : undefined;\n const chip = path ? (\n <FilePathChip path={path} range={range} onClick={onOpenFile} />\n ) : null;\n\n const renderFileContent = (content: string) => {\n // Only created Markdown artifacts get the rich preview — `view` returns\n // `cat -n` numbered snippets that must stay in a CodeBlock.\n if (path && command === \"create\" && isMarkdownFilePath(path)) {\n // Markdown artifacts own their card (clipped preview + optional View),\n // so skip the separate path chip to avoid a duplicate filename affordance.\n return {\n chip: null as React.ReactNode,\n body: (\n <MarkdownFilePreview\n content={content}\n path={path}\n onView={onOpenFile}\n />\n ),\n };\n }\n return {\n chip,\n body: <CodeBlock code={content} language={language} />,\n };\n };\n\n if (observation) {\n const obs = observation.observation;\n let body: React.ReactNode = null;\n let leadingChip: React.ReactNode = chip;\n if (obs.error) {\n body = (\n <span className=\"whitespace-pre-wrap text-xs text-danger\">\n {obs.error}\n </span>\n );\n } else if (obs.old_content != null && obs.new_content != null) {\n // Nullish, not truthy: an empty string is a valid side of the diff —\n // clearing a file or inserting into an empty file must still render it.\n body = <DiffView oldText={obs.old_content} newText={obs.new_content} />;\n } else {\n // `view` returns the snippet the agent saw in `content` (the `cat -n`\n // output) rather than `output`/`new_content`, so fall back to it.\n // Mirrors the markdown path's \"prefer content for view\" handling.\n const content =\n obs.new_content ||\n obs.output ||\n (obs.content ? textFromContent(obs.content) : \"\");\n if (content) {\n const rendered = renderFileContent(content);\n leadingChip = rendered.chip;\n body = rendered.body;\n }\n }\n return (\n <div className=\"flex flex-col gap-2\">\n {leadingChip}\n {body}\n </div>\n );\n }\n\n if (action) {\n const act = action.action;\n let body: React.ReactNode = null;\n let leadingChip: React.ReactNode = chip;\n if (act.command === \"create\" && act.file_text) {\n const rendered = renderFileContent(act.file_text);\n leadingChip = rendered.chip;\n body = rendered.body;\n } else if (\n (act.command === \"str_replace\" || act.command === \"insert\") &&\n act.new_str != null\n ) {\n // `insert` carries only `new_str`, no `old_str`. Key on `new_str` and\n // default `old_str` to \"\" so an in-flight insert shows an addition diff\n // instead of nothing.\n body = <DiffView oldText={act.old_str ?? \"\"} newText={act.new_str} />;\n }\n return (\n <div className=\"flex flex-col gap-2\">\n {leadingChip}\n {body}\n </div>\n );\n }\n\n return null;\n}\n\n/**\n * Conversation-scoped wrapper: owns the Files-drawer deep link. Split from the\n * card so the conversation-only hooks below never run outside a conversation\n * route (they throw on a missing conversation id).\n */\nfunction FileEditorCardWithDrawerLink({\n conversationId,\n ...props\n}: FileEditorCardProps & { conversationId: string }) {\n const { navigateToTab } = useSelectConversationTab();\n const setSelectedPath = useFilesTabStore((state) => state.setSelectedPath);\n const { data: conversation } = useActiveConversation();\n const path = resolvePath(props);\n const workingDir = conversation?.workspace?.working_dir;\n\n // Only deep-link once the observation exists — the file is not guaranteed\n // to be on disk while the create action is still in flight.\n const onOpenFile =\n path && props.observation\n ? () => {\n setSelectedPath(\n toWorkspaceRelativePath(path, workingDir),\n conversationId,\n );\n navigateToTab(\"files\");\n }\n : undefined;\n\n return <FileEditorCardBody {...props} onOpenFile={onOpenFile} />;\n}\n\nexport const fileEditorVisualizer = defineVisualizer({\n actionKinds: [\"FileEditorAction\", \"StrReplaceEditorAction\"],\n observationKinds: [\"FileEditorObservation\", \"StrReplaceEditorObservation\"],\n Body: function FileEditorBody(props) {\n const { conversationId } = useOptionalConversationId();\n\n return conversationId ? (\n <FileEditorCardWithDrawerLink\n {...props}\n conversationId={conversationId}\n />\n ) : (\n <FileEditorCardBody {...props} />\n );\n },\n});\n"],"mappings":"4yBA2CA,IAAM,GAAe,CAAE,SAAQ,iBAC7B,GAAa,YAAY,MAAQ,GAAQ,OAAO,MAAQ,GAW1D,SAAS,EAAmB,CAC1B,SACA,cACA,cAC0B,CAC1B,IAAM,EAAO,EAAY,CAAE,SAAQ,aAAY,CAAC,EAC1C,EAAU,GAAa,YAAY,SAAW,GAAQ,OAAO,QAC7D,EAAW,EAAA,oBAAoB,CAAI,EAEnC,EAAY,GAAQ,OAAO,WAC3B,EACJ,IAAY,QAAU,EAClB,GAAG,EAAU,GAAG,GAAG,EAAU,KAC7B,IAAA,GACA,EAAO,GACX,EAAA,EAAA,KAAC,EAAA,aAAD,CAAoB,OAAa,QAAO,QAAS,CAAa,CAAA,EAC5D,KAEE,EAAqB,GAGrB,GAAQ,IAAY,UAAY,EAAA,mBAAmB,CAAI,EAGlD,CACL,KAAM,KACN,MACE,EAAA,EAAA,KAAC,EAAA,oBAAD,CACW,UACH,OACN,OAAQ,CACT,CAAA,CAEL,EAEK,CACL,OACA,MAAM,EAAA,EAAA,KAAC,EAAA,UAAD,CAAW,KAAM,EAAmB,UAAW,CAAA,CACvD,EAGF,GAAI,EAAa,CACf,IAAM,EAAM,EAAY,YACpB,EAAwB,KACxB,EAA+B,EACnC,GAAI,EAAI,MACN,GACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mDACb,EAAI,KACD,CAAA,OAEH,GAAI,EAAI,aAAe,MAAQ,EAAI,aAAe,KAGvD,GAAO,EAAA,EAAA,KAAC,EAAA,SAAD,CAAU,QAAS,EAAI,YAAa,QAAS,EAAI,WAAc,CAAA,MACjE,CAIL,IAAM,EACJ,EAAI,aACJ,EAAI,SACH,EAAI,QAAU,EAAA,gBAAgB,EAAI,OAAO,EAAI,IAChD,GAAI,EAAS,CACX,IAAM,EAAW,EAAkB,CAAO,EAC1C,EAAc,EAAS,KACvB,EAAO,EAAS,IAClB,CACF,CACA,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,+BAAf,CACG,EACA,CACE,GAET,CAEA,GAAI,EAAQ,CACV,IAAM,EAAM,EAAO,OACf,EAAwB,KACxB,EAA+B,EACnC,GAAI,EAAI,UAAY,UAAY,EAAI,UAAW,CAC7C,IAAM,EAAW,EAAkB,EAAI,SAAS,EAChD,EAAc,EAAS,KACvB,EAAO,EAAS,IAClB,OACG,EAAI,UAAY,eAAiB,EAAI,UAAY,WAClD,EAAI,SAAW,OAKf,GAAO,EAAA,EAAA,KAAC,EAAA,SAAD,CAAU,QAAS,EAAI,SAAW,GAAI,QAAS,EAAI,OAAU,CAAA,GAEtE,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,+BAAf,CACG,EACA,CACE,GAET,CAEA,OAAO,IACT,CAOA,SAAS,EAA6B,CACpC,iBACA,GAAG,GACgD,CACnD,GAAM,CAAE,iBAAkB,EAAA,yBAAyB,EAC7C,EAAkB,EAAA,iBAAkB,GAAU,EAAM,eAAe,EACnE,CAAE,KAAM,GAAiB,EAAA,sBAAsB,EAC/C,EAAO,EAAY,CAAK,EACxB,EAAa,GAAc,WAAW,YAItC,EACJ,GAAQ,EAAM,gBACJ,CACJ,EACE,EAAA,wBAAwB,EAAM,CAAU,EACxC,CACF,EACA,EAAc,OAAO,CACvB,EACA,IAAA,GAEN,OAAO,EAAA,EAAA,KAAC,EAAD,CAAoB,GAAI,EAAmB,YAAa,CAAA,CACjE,CAEA,IAAa,EAAuB,EAAA,iBAAiB,CACnD,YAAa,CAAC,mBAAoB,wBAAwB,EAC1D,iBAAkB,CAAC,wBAAyB,6BAA6B,EACzE,KAAM,SAAwB,EAAO,CACnC,GAAM,CAAE,kBAAmB,EAAA,0BAA0B,EAErD,OAAO,GACL,EAAA,EAAA,KAAC,EAAD,CACE,GAAI,EACY,gBACjB,CAAA,GAED,EAAA,EAAA,KAAC,EAAD,CAAoB,GAAI,CAAQ,CAAA,CAEpC,CACF,CAAC"}
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File-editor visualizer for `file_editor` / `str_replace_editor` tools.
|
|
3
|
-
*
|
|
4
|
-
* Observation card: error → message; `str_replace`/`insert` → diff of the file
|
|
5
|
-
* before vs after; `create`/`view` → the file content. Action card (shown while
|
|
6
|
-
* the edit is in flight): `create` → new content; `str_replace` → diff of the
|
|
7
|
-
* replaced snippet; `view`/`undo_edit` → just the path + range.
|
|
8
|
-
*/
|
|
9
1
|
export declare const fileEditorVisualizer: import("../define").RegisteredVisualizer;
|
|
@@ -1,59 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useOptionalConversationId as e } from "../../../../../hooks/use-conversation-id.js";
|
|
2
|
+
import { useFilesTabStore as t } from "../../../../../stores/files-tab-store.js";
|
|
3
|
+
import { useActiveConversation as n } from "../../../../../hooks/query/use-active-conversation.js";
|
|
4
|
+
import { useSelectConversationTab as r } from "../../../../../hooks/use-select-conversation-tab.js";
|
|
5
|
+
import { defineVisualizer as i } from "../define.js";
|
|
6
|
+
import { textFromContent as a } from "../text-content.js";
|
|
7
|
+
import { CodeBlock as o } from "../primitives/code-block.js";
|
|
8
|
+
import { getLanguageFromPath as s } from "../../../../../utils/get-language-from-path.js";
|
|
9
|
+
import { toWorkspaceRelativePath as c } from "../../../../../utils/workspace-relative-path.js";
|
|
10
|
+
import { DiffView as l } from "../primitives/diff-view.js";
|
|
11
|
+
import { FilePathChip as u } from "../primitives/file-path-chip.js";
|
|
12
|
+
import { isMarkdownFilePath as d } from "../../../../../utils/is-markdown-file-path.js";
|
|
13
|
+
import { MarkdownFilePreview as f } from "../primitives/markdown-file-preview.js";
|
|
7
14
|
import "react";
|
|
8
|
-
import { jsx as
|
|
15
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
16
|
//#region src/components/features/chat/tool-visualizers/file-editor/file-editor.tsx
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
var h = ({ action: e, observation: t }) => t?.observation.path ?? e?.action.path ?? "";
|
|
18
|
+
function g({ action: e, observation: t, onOpenFile: n }) {
|
|
19
|
+
let r = h({
|
|
20
|
+
action: e,
|
|
21
|
+
observation: t
|
|
22
|
+
}), i = t?.observation.command ?? e?.action.command, c = s(r), g = e?.action.view_range, _ = i === "view" && g ? `${g[0]}-${g[1]}` : void 0, v = r ? /* @__PURE__ */ p(u, {
|
|
23
|
+
path: r,
|
|
24
|
+
range: _,
|
|
25
|
+
onClick: n
|
|
26
|
+
}) : null, y = (e) => r && i === "create" && d(r) ? {
|
|
27
|
+
chip: null,
|
|
28
|
+
body: /* @__PURE__ */ p(f, {
|
|
29
|
+
content: e,
|
|
30
|
+
path: r,
|
|
31
|
+
onView: n
|
|
32
|
+
})
|
|
33
|
+
} : {
|
|
34
|
+
chip: v,
|
|
35
|
+
body: /* @__PURE__ */ p(o, {
|
|
36
|
+
code: e,
|
|
37
|
+
language: c
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
if (t) {
|
|
41
|
+
let e = t.observation, n = null, r = v;
|
|
42
|
+
if (e.error) n = /* @__PURE__ */ p("span", {
|
|
43
|
+
className: "whitespace-pre-wrap text-xs text-danger",
|
|
44
|
+
children: e.error
|
|
45
|
+
});
|
|
46
|
+
else if (e.old_content != null && e.new_content != null) n = /* @__PURE__ */ p(l, {
|
|
47
|
+
oldText: e.old_content,
|
|
48
|
+
newText: e.new_content
|
|
49
|
+
});
|
|
50
|
+
else {
|
|
51
|
+
let t = e.new_content || e.output || (e.content ? a(e.content) : "");
|
|
52
|
+
if (t) {
|
|
53
|
+
let e = y(t);
|
|
54
|
+
r = e.chip, n = e.body;
|
|
34
55
|
}
|
|
35
|
-
return /* @__PURE__ */ s("div", {
|
|
36
|
-
className: "flex flex-col gap-2",
|
|
37
|
-
children: [m, r]
|
|
38
|
-
});
|
|
39
56
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
return /* @__PURE__ */ m("div", {
|
|
58
|
+
className: "flex flex-col gap-2",
|
|
59
|
+
children: [r, n]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
if (e) {
|
|
63
|
+
let t = e.action, n = null, r = v;
|
|
64
|
+
if (t.command === "create" && t.file_text) {
|
|
65
|
+
let e = y(t.file_text);
|
|
66
|
+
r = e.chip, n = e.body;
|
|
67
|
+
} else (t.command === "str_replace" || t.command === "insert") && t.new_str != null && (n = /* @__PURE__ */ p(l, {
|
|
68
|
+
oldText: t.old_str ?? "",
|
|
69
|
+
newText: t.new_str
|
|
70
|
+
}));
|
|
71
|
+
return /* @__PURE__ */ m("div", {
|
|
72
|
+
className: "flex flex-col gap-2",
|
|
73
|
+
children: [r, n]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
function _({ conversationId: e, ...i }) {
|
|
79
|
+
let { navigateToTab: a } = r(), o = t((e) => e.setSelectedPath), { data: s } = n(), l = h(i), u = s?.workspace?.working_dir, d = l && i.observation ? () => {
|
|
80
|
+
o(c(l, u), e), a("files");
|
|
81
|
+
} : void 0;
|
|
82
|
+
return /* @__PURE__ */ p(g, {
|
|
83
|
+
...i,
|
|
84
|
+
onOpenFile: d
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
var v = i({
|
|
88
|
+
actionKinds: ["FileEditorAction", "StrReplaceEditorAction"],
|
|
89
|
+
observationKinds: ["FileEditorObservation", "StrReplaceEditorObservation"],
|
|
90
|
+
Body: function(t) {
|
|
91
|
+
let { conversationId: n } = e();
|
|
92
|
+
return n ? /* @__PURE__ */ p(_, {
|
|
93
|
+
...t,
|
|
94
|
+
conversationId: n
|
|
95
|
+
}) : /* @__PURE__ */ p(g, { ...t });
|
|
54
96
|
}
|
|
55
97
|
});
|
|
56
98
|
//#endregion
|
|
57
|
-
export {
|
|
99
|
+
export { v as fileEditorVisualizer };
|
|
58
100
|
|
|
59
101
|
//# sourceMappingURL=file-editor.js.map
|