@nextclaw/ui 0.25.3 → 0.26.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/CHANGELOG.md +40 -0
- package/dist/.vite/manifest.json +1146 -1390
- package/dist/assets/{abnfDiagram-VRR7QNED-DX_u5BBX.js → abnfDiagram-VRR7QNED-Bjrmb5-o.js} +1 -1
- package/dist/assets/account-panel-C1S3xtUB.js +1 -0
- package/dist/assets/{aiden0z-pptx-renderer.es-C-E9e5yB.js → aiden0z-pptx-renderer.es-DO4DCX3e.js} +1 -1
- package/dist/assets/api-D9e9cHtW.js +20 -0
- package/dist/assets/app-presenter-provider-J9IgTbc9.js +124 -0
- package/dist/assets/appearance-settings-page-BljTr6nB.js +1 -0
- package/dist/assets/{arc-Cxwa624o.js → arc-g4XaP3S4.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-BWywYH_m.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-D8mCj0H1.js → architectureDiagram-ZJ3FMSHR-CAP7YDux.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-CbGC1IHl.js → blockDiagram-677ZJIJ3-DhaP0zUG.js} +1 -1
- package/dist/assets/{book-open-xqEj1OLE.js → book-open-vxpV2eSM.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-BQhGC1Vc.js → c4Diagram-LMCZKHZV-DHCQJJkD.js} +1 -1
- package/dist/assets/card-D9NYhSdf.js +1 -0
- package/dist/assets/channel-1nKIAEXr.js +1 -0
- package/dist/assets/channels-list-page-BiHA1zZd.js +8 -0
- package/dist/assets/chunk-2Q5K7J3B-CAwv72v4.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-B74ZZwYG.js → chunk-32BRIVSS-BcQlxl4v.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-BvmxW_f_.js → chunk-52WLFC77-ClPpG-2S.js} +1 -1
- package/dist/assets/{chunk-5FCAYU7R-DQvBRnwL.js → chunk-5FCAYU7R-B_qmYOdX.js} +1 -1
- package/dist/assets/{chunk-5HE753X5-CDIH0_y3.js → chunk-5HE753X5-DTO-V56q.js} +1 -1
- package/dist/assets/{chunk-5JV3BV7I-CcevlKd-.js → chunk-5JV3BV7I-CU1SOaaG.js} +1 -1
- package/dist/assets/{chunk-5TONJI2A-_3dxVdnY.js → chunk-5TONJI2A-CzSDkWNa.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-pGO5vvo-.js → chunk-5VM5RSS4-ChkfqIRE.js} +1 -1
- package/dist/assets/{chunk-7BUUIJ7U-DEKF5uAN.js → chunk-7BUUIJ7U-Du3Ozi62.js} +1 -1
- package/dist/assets/{chunk-BIQX33UG-CjBFgq2r.js → chunk-BIQX33UG-C-HVafHB.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-e_K9OGTz.js → chunk-C7G6YPKG-BSjZ86D0.js} +1 -1
- package/dist/assets/{chunk-CQNSW5MT-C2IiHyHz.js → chunk-CQNSW5MT-1D1W2lF6.js} +1 -1
- package/dist/assets/{chunk-CYSBUYHQ-DCC6KmGp.js → chunk-CYSBUYHQ-ISpyj_lK.js} +1 -1
- package/dist/assets/{chunk-EMLP6XTP-BYGgekQ0.js → chunk-EMLP6XTP-Cp8iUBt2.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-FGcwuVsA.js → chunk-EX3LRPZG-BN5RzF5j.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-CV3Ih_Os.js → chunk-FWX5IMBZ-DecJDW4r.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-CXpq_hfV.js → chunk-HOUHSVGY-BE_XNgGk.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-CZIpjupq.js → chunk-ICXQ74PX-BFOKMkWV.js} +1 -1
- package/dist/assets/{chunk-JG7HCLWE-CdgwBpW7.js → chunk-JG7HCLWE-DL-pl8VB.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BPjAZpOQ.js → chunk-JWPE2WC7-B-bcwfmh.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-DbJDm8to.js → chunk-MOJQB5TN-BC0taFro.js} +1 -1
- package/dist/assets/{chunk-MOZMSUNE-BUa1fqKn.js → chunk-MOZMSUNE-RrhfU6MO.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-CtnzLgRu.js → chunk-OGEWGWER-TuI7SR7i.js} +1 -1
- package/dist/assets/{chunk-OSBZ3O6U-fUgdpTUM.js → chunk-OSBZ3O6U-C5jMBKlU.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-CtDWZT9-.js → chunk-PUDLZKDR-C5lMBn0K.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-BxnK2qxr.js → chunk-Q4XR5HBZ-B-kzUbwT.js} +1 -1
- package/dist/assets/{chunk-QBLGF6JB-CH4UKoCF.js → chunk-QBLGF6JB-CRb_WAEj.js} +1 -1
- package/dist/assets/{chunk-R7FJI6CG-BxwFoF1v.js → chunk-R7FJI6CG-De6Y7ozO.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-DpHAmq7O.js → chunk-RYQCIY6F-Igv92q8k.js} +1 -1
- package/dist/assets/{chunk-U6XO7XAA-BjH2VUHU.js → chunk-U6XO7XAA-bCjRshkT.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DKJZ3HGj.js → chunk-V7JOEXUC-0J1s_Kgq.js} +1 -1
- package/dist/assets/chunk-VAUOI2AC-DnaryNw2.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-Cf-o2GtI.js → chunk-VR4S4FIN-DX6lXnNx.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-zeNXGm20.js → chunk-WYO6CB5R-DLqMXfFC.js} +3 -3
- package/dist/assets/chunk-XXDRQBXY-BToo1uqb.js +1 -0
- package/dist/assets/{chunk-YOTPTUD7-Ck87Kqxe.js → chunk-YOTPTUD7-CY4obsV0.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-BbfK6Bfd.js → chunk-ZGVPDNZ5-BleImZKe.js} +1 -1
- package/dist/assets/{chunk-ZIRB5QZD-BDpzh4Yl.js → chunk-ZIRB5QZD-C1TfdjpX.js} +1 -1
- package/dist/assets/{circle-dashed-CU3yApvP.js → circle-dashed-CEEssYIw.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-D_TusZGx.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-B1NFZTmS.js +1 -0
- package/dist/assets/client-C6YQx7A-.js +1 -0
- package/dist/assets/config-split-page-DKPelvjR.js +1 -0
- package/dist/assets/confirm-dialog-BCGeh61X.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CQfMxKCT.js → cose-bilkent-JH36ORCC-CVgUHXkj.js} +1 -1
- package/dist/assets/createLucideIcon-CF8U9dh7.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-CJZSs5s_.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-CxFTiC-p.js → cynefinDiagram-TSTJHNR4-cdfImbfI.js} +1 -1
- package/dist/assets/{dagre-CaBNMcB1.js → dagre-CHNN9L9I.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-S_7Hc7bI.js → dagre-VKFMJZFB-PscaENwr.js} +1 -1
- package/dist/assets/desktop-capabilities-page-BENHdKfk.js +1 -0
- package/dist/assets/desktop-update-config-BJMTQMRS.js +1 -0
- package/dist/assets/{diagram-FQU43EPY-C7zENvFb.js → diagram-FQU43EPY-CH_wye41.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-DqYTCqZA.js → diagram-G47NLZAW-Dtjpmi6D.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-BfSJtXRc.js → diagram-NH7WQ7WH-UdjLHyaz.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CFO-j67H.js → diagram-OA4YK3LP-DYsToEaL.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-DBQDbTaJ.js → diagram-WEI45ONY-CA7kuIer.js} +1 -1
- package/dist/assets/dialog-DQXou6pg.js +5 -0
- package/dist/assets/dist-CiC9Fd9J.js +1 -0
- package/dist/assets/doc-browser-CCYS_csH.js +1 -0
- package/dist/assets/doc-browser-context-CPLWVFLd.js +1 -0
- package/dist/assets/{docx-preview-B4-aDfvO.js → docx-preview-D--EsUWi.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-CfDNIXFN.js → ebnfDiagram-CCIWWBDH-BrjaoOuq.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-D95rFXMM.js → erDiagram-Q63AITRT-nZQa2kCM.js} +1 -1
- package/dist/assets/es2015-DHRpDU-q.js +41 -0
- package/dist/assets/eventmodeling-45OFAUF4-rc7kUq4V.js +1 -0
- package/dist/assets/extensions-CsWT7x3v.js +1 -0
- package/dist/assets/{eye-C84inPcV.js → eye-DJtw5KJ5.js} +1 -1
- package/dist/assets/flowDiagram-23GEKE2U-DAjaeGO8.js +1 -0
- package/dist/assets/form-actions-DDQk0END.js +1 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-Bawg0P0r.js → ganttDiagram-NO4QXBWP-CyFZHIHN.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-Ce0gf6ps.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-BbKh9nbL.js → gitGraphDiagram-IHSO6WYX-Dfpq3z2M.js} +1 -1
- package/dist/assets/{i18n-20rSH40D.js → i18n-BjPkAKMQ.js} +2 -2
- package/dist/assets/info-DKCQHKI2-Cp-Tr78m.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-DPffZXYh.js → infoDiagram-FWYZ7A6U-Diiz0k1E.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-CBMsLwZ2.js → ishikawaDiagram-FXEZZL3T-B3R3SN4M.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-Mz5U4OzU.js → journeyDiagram-5HDEW3XC-DFOLKiNv.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-FXZq2k19.js → kanban-definition-HUTT4EX6-BMXpDp3g.js} +1 -1
- package/dist/assets/katex-B4FQSo9k.js +1 -0
- package/dist/assets/keyboard-shortcuts-settings-page-hqTP7akj.js +1 -0
- package/dist/assets/{line-BZwCgT9K.js → line-64_FhCoJ.js} +1 -1
- package/dist/assets/{linear-CTe9mKUw.js → linear-aF1fg7bK.js} +1 -1
- package/dist/assets/loader-circle-B-4WwzBj.js +1 -0
- package/dist/assets/login-page-BUwshAq4.js +1 -0
- package/dist/assets/login-page-CdlI6B8e.js +1 -0
- package/dist/assets/main-BVYdyT60.css +1 -0
- package/dist/assets/main-DYEALeoQ.js +2 -0
- package/dist/assets/main-i18n-catalog.config-1o2hjZ0m.js +1 -0
- package/dist/assets/{map-Ci48ZwAp.js → map-BC3Amra3.js} +1 -1
- package/dist/assets/mcp-marketplace-page-CRRQT6SP.js +1 -0
- package/dist/assets/{mermaid-parser.core-CzPD3U_z.js → mermaid-parser.core-DdMcZwnE.js} +2 -2
- package/dist/assets/{mermaid.core-geIMNPbV.js → mermaid.core-BHdiEBbI.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-xqlKxsr_.js → mindmap-definition-LN4V7U3C-CtHVaZyV.js} +1 -1
- package/dist/assets/model-config-page-BSsHOhV7.js +1 -0
- package/dist/assets/navigation-history-CyawyVz0.js +1 -0
- package/dist/assets/navigation-link-D-fxdv0i.js +3 -0
- package/dist/assets/{ordinal-MxnX8yhv.js → ordinal-6b3jw4cz.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-BOJuCraS.js +1 -0
- package/dist/assets/panel-app-i18n-catalog.config-kQO7QAwH.js +1 -0
- package/dist/assets/panelStandalone-BeI0Ndsx.js +2 -0
- package/dist/assets/{pegDiagram-2B236MQR-D50MFTN1.js → pegDiagram-2B236MQR-BtbG3Bgu.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-D-FEO81x.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-CpA13oiC.js → pieDiagram-ENE6RG2P-FmLl2hzN.js} +1 -1
- package/dist/assets/privacy-settings-page-pW_1naDz.js +1 -0
- package/dist/assets/projects-k6SLda_A.js +1 -0
- package/dist/assets/provider-models-mVzuEQBS.js +1 -0
- package/dist/assets/provider-scoped-model-input-CVbtT8L9.js +1 -0
- package/dist/assets/providers-config-page-rBlVrHkb.js +1 -0
- package/dist/assets/{puzzle-D6gulz7u.js → puzzle-kKiVft9-.js} +1 -1
- package/dist/assets/pwa-BgGM4kkY.js +1 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-CYCgaj4l.js → quadrantDiagram-ABIIQ3AL-7-OzMNpF.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-Bq3eK1vK.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-C3uZ1esg.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-D3iZd1KT.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-Dl0FWqZu.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-B51SbzGp.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-4LKDGlXN.js → railroadDiagram-RFXS5EU6-B_UVtLJO.js} +1 -1
- package/dist/assets/{refresh-cw-h9Xq3LY3.js → refresh-cw-BeG0y6yZ.js} +1 -1
- package/dist/assets/remote-wYWqir2w.js +1 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-CxNOU0JH.js → requirementDiagram-TGXJPOKE-D8TO2YeZ.js} +1 -1
- package/dist/assets/{rotate-cw-B6xm41Wn.js → rotate-cw-Ci2dcTO5.js} +1 -1
- package/dist/assets/runtime-config-page-DCXN0nkS.js +1 -0
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DbCBDe2S.js → sankeyDiagram-HTMAVEWB-CUzIcq0B.js} +1 -1
- package/dist/assets/{save-fff_WpY2.js → save-Cr895abt.js} +1 -1
- package/dist/assets/search-config-page-CNQd481d.js +1 -0
- package/dist/assets/secrets-config-page--q7M58L8.js +3 -0
- package/dist/assets/security-config-CJb2pK2O.js +1 -0
- package/dist/assets/select-Bq-UmfCK.js +1 -0
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-DA6W2BS_.js → sequenceDiagram-DBY2YBRQ-kqJzXbwu.js} +1 -1
- package/dist/assets/service-apps-panel-iLLEByRF.js +1 -0
- package/dist/assets/{settings-2-CE3ELQyk.js → settings-2-IodCcaXd.js} +1 -1
- package/dist/assets/{sizeCapture-X5ZJPWSS-T_q_d_VW.js → sizeCapture-X5ZJPWSS-D9ISogq1.js} +1 -1
- package/dist/assets/{src-CYpUlx-4.js → src-Bc0PoUJ1.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-mi8z2G0a.js → stateDiagram-2N3HPSRC-CqH5xc9W.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-CcOGfDdx.js +1 -0
- package/dist/assets/status-dot-DUYSKRCU.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-DkBEhWE4.js → swimlanes-5IMT3BWC-mwejV-rW.js} +2 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-BMI2k8RZ.js +8 -0
- package/dist/assets/tag-chip-CQU51ST3.js +1 -0
- package/dist/assets/theme-provider-D-zZkXxS.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-BoFmqBw1.js → timeline-definition-FHXFAJF6-CuikIDlX.js} +1 -1
- package/dist/assets/trash-2-BDdqDh6E.js +1 -0
- package/dist/assets/treeView-QDETBFTQ-C0_07QI1.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-Djpx6ccG.js +1 -0
- package/dist/assets/use-config-Bxx7DdaL.js +1 -0
- package/dist/assets/{use-desktop-capabilities-BkuRd2cY.js → use-desktop-capabilities-BTgdFgJy.js} +1 -1
- package/dist/assets/use-viewport-layout-CDcca0YL.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-BlZ3Or5U.js → vennDiagram-L72KCM5P-BD0P0qHh.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-DZVFxu81.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-yDfr33i3.js → wardleyDiagram-EHGQE667-C6ma3t5D.js} +1 -1
- package/dist/assets/x-LUUwl8rK.js +1 -0
- package/dist/assets/{xychartDiagram-FW5EYKEG-mIXwIGAQ.js → xychartDiagram-FW5EYKEG-D7E40NBk.js} +1 -1
- package/dist/index.html +37 -54
- package/dist/panel-standalone.html +11 -15
- package/package.json +5 -5
- package/src/app/components/layout/__tests__/app-layout.test.tsx +8 -0
- package/src/app/components/layout/app-layout.tsx +18 -46
- package/src/app/configs/__tests__/app-navigation.config.test.ts +4 -0
- package/src/app/configs/app-navigation.config.ts +2 -0
- package/src/app/configs/page-resource-renderers.config.ts +13 -0
- package/src/app/hooks/__tests__/use-app-event-consumers.test.ts +66 -3
- package/src/app/hooks/use-app-event-consumers.ts +5 -0
- package/src/app/index.tsx +4 -0
- package/src/app/presenters/app.presenter.ts +13 -2
- package/src/features/agents/components/__tests__/agents-page.test.tsx +4 -0
- package/src/features/agents/components/agent-details-dialog.tsx +3 -0
- package/src/features/agents/components/agents-page.tsx +7 -3
- package/src/features/apps/components/app-package-card.tsx +2 -2
- package/src/features/chat/components/conversation/chat-conversation-content.tsx +32 -19
- package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +1 -0
- package/src/features/chat/components/conversation/chat-conversation-header.tsx +1 -1
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +2 -2
- package/src/features/chat/components/conversation/chat-conversation-workspace-section.tsx +1 -0
- package/src/features/chat/components/layout/__tests__/chat-page-shell.test.tsx +7 -6
- package/src/features/chat/components/layout/__tests__/chat-sidebar-toolbar.test.tsx +14 -12
- package/src/features/chat/components/layout/chat-page-shell.tsx +33 -64
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +8 -4
- package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +64 -256
- package/src/features/chat/components/layout/chat-sidebar.tsx +8 -30
- package/src/features/chat/components/providers/chat-runtime.provider.tsx +62 -0
- package/src/features/chat/features/conversation/components/__tests__/floating-session-conversation.test.tsx +70 -0
- package/src/features/chat/features/conversation/components/floating-session-conversation.tsx +27 -0
- package/src/features/chat/features/conversation/components/session-conversation-area.tsx +1 -0
- package/src/features/chat/features/conversation/components/session-conversation-panel-tab.tsx +25 -0
- package/src/features/chat/features/conversation/hooks/use-chat-composer-reference-intent.ts +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-inline-panel-app-card.test.tsx +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-message-assistant-header.container.test.tsx +3 -0
- package/src/features/chat/features/message/components/__tests__/chat-message-list-skill-preview.container.test.tsx +3 -0
- package/src/features/chat/features/message/components/__tests__/chat-message-list.container.test.tsx +3 -0
- package/src/features/chat/features/message/hooks/use-chat-inline-token-actions.ts +7 -3
- package/src/features/chat/features/ncp/hooks/__tests__/use-ncp-session-list-view.test.tsx +44 -1
- package/src/features/chat/features/ncp/hooks/use-ncp-child-session-tabs-view.ts +10 -2
- package/src/features/chat/features/ncp/hooks/use-ncp-session-list-view.ts +6 -2
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-session-item.test.tsx +20 -0
- package/src/features/chat/features/session/components/chat-mobile-session-row.tsx +61 -0
- package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +0 -35
- package/src/features/chat/features/session/components/chat-sidebar-session-entry.tsx +2 -0
- package/src/features/chat/features/session/components/chat-sidebar-session-item.tsx +13 -5
- package/src/features/chat/features/session/components/chat-sidebar-session-list.tsx +5 -3
- package/src/features/chat/features/session/components/session-header/__tests__/chat-session-header-actions.test.tsx +8 -0
- package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +3 -0
- package/src/features/chat/features/session/components/session-header/chat-session-more-actions-menu.tsx +6 -0
- package/src/features/chat/features/session/utils/chat-session-route.utils.ts +12 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-child-sessions.test.tsx +28 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +9 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +6 -2
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel.test.tsx +49 -12
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +13 -6
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +6 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-nav.tsx +21 -36
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel.tsx +40 -31
- package/src/features/chat/features/workspace/components/child-sessions/chat-session-child-sessions.tsx +6 -1
- package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx +2 -2
- package/src/features/chat/features/workspace/components/project-files/workspace-project-files-toolbar.tsx +2 -2
- package/src/features/chat/features/workspace/utils/__tests__/chat-workspace-panel-view-model.utils.test.ts +27 -0
- package/src/features/chat/features/workspace/utils/__tests__/workspace-file-panel-route.utils.test.ts +94 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab-persistence.utils.ts +2 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab.utils.ts +15 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-panel-view-model.utils.ts +11 -0
- package/src/features/chat/features/workspace/utils/workspace-file-panel-route.utils.ts +147 -0
- package/src/features/chat/index.ts +20 -4
- package/src/features/chat/managers/__tests__/chat-completion-notification.manager.test.ts +8 -0
- package/src/features/chat/managers/__tests__/chat-thread-workspace.manager.test.ts +7 -2
- package/src/features/chat/managers/__tests__/session-surface.manager.test.ts +45 -0
- package/src/features/chat/managers/chat-completion-notification.manager.ts +5 -0
- package/src/features/chat/managers/chat-composer-intent.manager.ts +16 -0
- package/src/features/chat/managers/chat-thread.manager.ts +18 -27
- package/src/features/chat/managers/session-surface.manager.ts +46 -0
- package/src/features/chat/pages/__tests__/ncp-chat-page.test.tsx +23 -5
- package/src/features/chat/pages/ncp-chat-page.tsx +6 -86
- package/src/features/chat/presenters/chat.presenter.ts +2 -1
- package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +2 -2
- package/src/features/chat/stores/chat-session-list.store.ts +27 -1
- package/src/features/chat/stores/chat-thread.store.ts +7 -1
- package/src/features/chat/stores/floating-session.store.ts +11 -0
- package/src/features/cron/components/__tests__/cron-config.test.tsx +4 -0
- package/src/features/cron/components/cron-job-detail-dialog.tsx +3 -1
- package/src/features/cron/components/cron-job-row.tsx +5 -1
- package/src/features/inbox/components/inbox-reader-dialog.test.tsx +3 -0
- package/src/features/inbox/components/inbox-reader-dialog.tsx +3 -0
- package/src/features/inbox/pages/inbox-page.test.ts +3 -0
- package/src/features/inbox/pages/inbox-page.tsx +3 -0
- package/src/features/marketplace/components/__tests__/marketplace-page-detail.test.tsx +5 -1
- package/src/features/marketplace/components/__tests__/marketplace-page.test.tsx +3 -0
- package/src/features/marketplace/components/curated-shelves/__tests__/marketplace-curated-scene-route.test.tsx +2 -0
- package/src/features/marketplace/components/marketplace-list-card.tsx +4 -0
- package/src/features/marketplace/components/mcp/__tests__/mcp-marketplace-page.test.tsx +2 -0
- package/src/features/marketplace/components/mcp/mcp-marketplace-card.tsx +3 -0
- package/src/features/notifications/components/__tests__/app-notification-toast.test.tsx +19 -0
- package/src/features/notifications/components/app-notification-toast.tsx +33 -15
- package/src/features/notifications/managers/app-notification.manager.ts +2 -0
- package/src/features/panel-apps/components/__tests__/panel-app-list-item.test.tsx +11 -4
- package/src/features/panel-apps/components/__tests__/panel-app-toolbar.test.tsx +11 -5
- package/src/features/panel-apps/components/panel-app-main-sidebar-menu-item.tsx +5 -38
- package/src/features/panel-apps/index.ts +1 -1
- package/src/features/projects/components/project-materials.test.tsx +2 -0
- package/src/features/projects/components/project-skills.tsx +7 -3
- package/src/features/projects/components/work/project-work-item-drawer.test.tsx +2 -0
- package/src/features/projects/components/work/project-work-item-drawer.tsx +3 -1
- package/src/features/right-panel-resources/components/__tests__/page-resource-icon.test.tsx +67 -0
- package/src/features/right-panel-resources/components/__tests__/page-resource-sidebar-nav.test.tsx +158 -0
- package/src/features/right-panel-resources/components/__tests__/system-object-resource.test.tsx +42 -0
- package/src/features/right-panel-resources/components/current-page-actions.tsx +36 -0
- package/src/features/right-panel-resources/components/page-resource-actions-menu.tsx +71 -0
- package/src/features/right-panel-resources/components/page-resource-icon.tsx +245 -0
- package/src/features/right-panel-resources/components/page-resource-sidebar-nav.tsx +122 -0
- package/src/features/right-panel-resources/components/system-object-resource.tsx +100 -0
- package/src/features/right-panel-resources/components/workspace-file-resource.tsx +56 -0
- package/src/features/right-panel-resources/configs/right-panel-resource-routes.config.ts +46 -3
- package/src/features/right-panel-resources/hooks/use-page-resource-actions.ts +137 -0
- package/src/features/right-panel-resources/index.ts +22 -8
- package/src/features/right-panel-resources/managers/__tests__/page-resource.manager.test.ts +149 -0
- package/src/features/right-panel-resources/managers/page-resource.manager.ts +342 -0
- package/src/features/right-panel-resources/pages/resource-page.tsx +114 -0
- package/src/features/right-panel-resources/stores/page-navigation.store.ts +55 -0
- package/src/features/right-panel-resources/types/page-resource.types.ts +11 -0
- package/src/features/right-panel-resources/utils/__tests__/right-panel-resource-route-resolver.utils.test.ts +10 -0
- package/src/features/right-panel-resources/utils/page-resource-identity.utils.ts +61 -0
- package/src/features/right-panel-resources/utils/right-panel-resource-uri.utils.ts +2 -6
- package/src/features/service-apps/components/__tests__/service-apps-panel.test.tsx +2 -0
- package/src/features/service-apps/components/service-app-list-item.tsx +5 -1
- package/src/features/settings/pages/providers-config-page.tsx +2 -2
- package/src/features/side-dock/components/__tests__/side-dock.test.tsx +9 -8
- package/src/features/side-dock/components/side-dock.tsx +14 -47
- package/src/features/side-dock/managers/side-dock.manager.ts +2 -0
- package/src/platforms/desktop/components/__tests__/desktop-app-shell.test.tsx +3 -0
- package/src/platforms/desktop/components/desktop-app-shell.tsx +5 -14
- package/src/platforms/mobile/components/__tests__/mobile-app-shell.test.tsx +1 -0
- package/src/platforms/mobile/components/__tests__/mobile-bottom-nav.test.tsx +3 -2
- package/src/platforms/mobile/components/mobile-app-shell.tsx +5 -4
- package/src/platforms/mobile/components/mobile-bottom-nav.tsx +7 -7
- package/src/platforms/mobile/components/mobile-topbar.tsx +4 -4
- package/src/shared/components/doc-browser/__tests__/doc-browser-context.test.tsx +4 -3
- package/src/shared/components/doc-browser/__tests__/doc-browser-tab-strip.test.tsx +0 -5
- package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +57 -73
- package/src/shared/components/doc-browser/__tests__/resource-link-interceptor.test.tsx +104 -0
- package/src/shared/components/doc-browser/doc-browser-context.tsx +5 -1
- package/src/shared/components/doc-browser/doc-browser-panel-parts.tsx +1 -1
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +6 -118
- package/src/shared/components/doc-browser/doc-browser.tsx +30 -194
- package/src/shared/components/doc-browser/hooks/use-doc-browser-scroll-restoration.ts +1 -1
- package/src/shared/components/doc-browser/managers/doc-browser.manager.ts +11 -1
- package/src/shared/components/doc-browser/stores/doc-browser.store.ts +3 -7
- package/src/shared/components/doc-browser/types/doc-browser.types.ts +8 -1
- package/src/shared/components/doc-browser/use-doc-link-interceptor.ts +30 -32
- package/src/shared/components/doc-browser/utils/doc-browser-state.utils.ts +6 -6
- package/src/shared/components/ui/context-menu/__tests__/context-menu.test.tsx +22 -0
- package/src/shared/components/ui/context-menu/context-menu.tsx +18 -10
- package/src/shared/components/workbench/__tests__/workbench-surface.manager.test.ts +70 -0
- package/src/shared/components/workbench/__tests__/workbench-surface.test.tsx +111 -0
- package/src/shared/components/workbench/managers/workbench-surface.manager.ts +120 -0
- package/src/shared/components/workbench/stores/workbench-surface.store.ts +83 -0
- package/src/shared/components/workbench/types/workbench-surface.types.ts +32 -0
- package/src/shared/components/workbench/utils/workbench-surface-geometry.utils.ts +46 -0
- package/src/shared/components/workbench/workbench-surface-toolbar.tsx +102 -0
- package/src/shared/components/workbench/workbench-surface.tsx +401 -0
- package/src/shared/hooks/use-panel-app-scroll-restoration.test.tsx +19 -0
- package/src/shared/hooks/use-panel-app-scroll-restoration.ts +8 -6
- package/src/shared/hooks/use-scroll-restoration.test.tsx +39 -2
- package/src/shared/hooks/use-scroll-restoration.ts +33 -33
- package/src/shared/lib/api/marketplace.types.ts +1 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +38 -0
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +1 -1
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +38 -0
- package/src/shared/lib/navigation-history/index.ts +1 -0
- package/src/shared/lib/navigation-history/navigation-history.utils.ts +1 -1
- package/src/shared/lib/navigation-history/scroll-restoration.manager.test.ts +11 -0
- package/src/shared/lib/navigation-history/scroll-restoration.manager.ts +36 -7
- package/src/shared/lib/navigation-history/view-memory-storage.store.test.ts +37 -0
- package/src/shared/lib/navigation-history/view-memory-storage.store.ts +21 -0
- package/src/shared/lib/ui-document-title/index.ts +1 -0
- package/dist/assets/account-panel-BXTCFv7d.js +0 -1
- package/dist/assets/api-DqzQ-_3w.js +0 -13
- package/dist/assets/app-data-C54N2p8b.js +0 -1
- package/dist/assets/app-presenter-provider-V0xnU_Wb.js +0 -115
- package/dist/assets/appearance-settings-page-83T2AtVm.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-DEt0Abz9.js +0 -1
- package/dist/assets/boxes-D6uPnkGo.js +0 -1
- package/dist/assets/card-BhfAZv5L.js +0 -1
- package/dist/assets/channel-CxQkbwRD.js +0 -1
- package/dist/assets/channels-list-page-Bv7CVSqV.js +0 -8
- package/dist/assets/chevron-down-BL-yMYcX.js +0 -1
- package/dist/assets/chunk-2Q5K7J3B-ClVhziok.js +0 -1
- package/dist/assets/chunk-VAUOI2AC-DZQxkIsv.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-BkExtw5C.js +0 -1
- package/dist/assets/circle-alert-lSa3LRvS.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-Bd6apBb-.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-CYxUZGCI.js +0 -1
- package/dist/assets/client-BtGBwLTs.js +0 -1
- package/dist/assets/config-split-page-DqAXKLmG.js +0 -1
- package/dist/assets/confirm-dialog-BTKCWMn6.js +0 -1
- package/dist/assets/createLucideIcon-BNKf0_kc.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-CV0bFLH9.js +0 -1
- package/dist/assets/desktop-capabilities-page-zLzCSB7A.js +0 -1
- package/dist/assets/desktop-update-config-PmofcFf6.js +0 -1
- package/dist/assets/dialog-Xe73hpQz.js +0 -5
- package/dist/assets/dist-BiIcnf9j.js +0 -1
- package/dist/assets/dist-C5I0v8Qn.js +0 -1
- package/dist/assets/dist-czPa8xFO.js +0 -1
- package/dist/assets/doc-browser-BJrre2S_.js +0 -1
- package/dist/assets/doc-browser-BPqA-zQx.js +0 -1
- package/dist/assets/doc-browser-context-TILuCY5c.js +0 -1
- package/dist/assets/ellipsis-C5YXdOUx.js +0 -1
- package/dist/assets/es2015-cuwbYI-l.js +0 -41
- package/dist/assets/eventmodeling-45OFAUF4-BzkLWWdP.js +0 -1
- package/dist/assets/extensions-CVUFK6Jj.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-ukkCsB0j.js +0 -1
- package/dist/assets/form-actions-BRESe-m_.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-BYFhT0Q5.js +0 -1
- package/dist/assets/i18n-provider-BPRq6S7O.js +0 -1
- package/dist/assets/info-DKCQHKI2-CTmlJdcH.js +0 -1
- package/dist/assets/katex-DbZC06Q5.js +0 -1
- package/dist/assets/keyboard-shortcuts-settings-page-CkQbSKwI.js +0 -1
- package/dist/assets/loader-circle-K1BDdHR5.js +0 -1
- package/dist/assets/login-page-Dlyvp-81.js +0 -1
- package/dist/assets/login-page-f8qQ4xKY.js +0 -1
- package/dist/assets/logo-badge-C-5-zim6.js +0 -1
- package/dist/assets/main-D2dWy8fM.css +0 -1
- package/dist/assets/main-i18n-catalog.config-DZ-5ollN.js +0 -1
- package/dist/assets/main-ky5Efhq1.js +0 -2
- package/dist/assets/mcp-marketplace-page-FfIfEo6w.js +0 -10
- package/dist/assets/mcp-marketplace-page-sH7VptN_.js +0 -1
- package/dist/assets/model-config-page-Bcm6-pCX.js +0 -1
- package/dist/assets/navigation-link-BAQjgx2F.js +0 -3
- package/dist/assets/packet-7NZHBO7P-BbrI0ZlN.js +0 -1
- package/dist/assets/panel-app-i18n-catalog.config-p3qAY_Eq.js +0 -1
- package/dist/assets/panelStandalone-By-6dDXS.js +0 -2
- package/dist/assets/pie-RZYD4A2V-B7zE1ZIr.js +0 -1
- package/dist/assets/plus-LA8-jpxP.js +0 -1
- package/dist/assets/popover-NkrFlWHp.js +0 -1
- package/dist/assets/privacy-settings-page-B1sHLAc1.js +0 -1
- package/dist/assets/projects-O3GTERwP.js +0 -1
- package/dist/assets/provider-models-hrHMcHqg.js +0 -1
- package/dist/assets/provider-scoped-model-input-BQsugx1v.js +0 -1
- package/dist/assets/providers-config-page-BDEdHJbw.js +0 -1
- package/dist/assets/pwa-D_nZUwG0.js +0 -1
- package/dist/assets/radar-I7S5WNFK-1X_q11Ed.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-CIXnuFyE.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-D6ImKl2r.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-2j9d3twU.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-DMVaJGbm.js +0 -1
- package/dist/assets/remote-CFWp4wyH.js +0 -1
- package/dist/assets/runtime-config-page-BHTKwgDi.js +0 -1
- package/dist/assets/search-CUe41wjm.js +0 -1
- package/dist/assets/search-config-page-DWKlMHgH.js +0 -1
- package/dist/assets/secrets-config-page-DiQL088Y.js +0 -3
- package/dist/assets/security-config-DmTDKKY4.js +0 -1
- package/dist/assets/select-CG5YWnwe.js +0 -1
- package/dist/assets/service-apps-panel-CEnyYsQp.js +0 -1
- package/dist/assets/skeleton-Drvn83YW.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-OlIMT57r.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-sLThrh07.js +0 -8
- package/dist/assets/tabs-BuE0qKMh.js +0 -1
- package/dist/assets/tag-chip-B1AYPOKL.js +0 -1
- package/dist/assets/theme-provider-DzvAi3pe.js +0 -1
- package/dist/assets/tooltip-DYcuWhuP.js +0 -1
- package/dist/assets/trash-2-BPPYt2NV.js +0 -1
- package/dist/assets/treeView-QDETBFTQ-CCFyazDE.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-D6wvq1Hz.js +0 -1
- package/dist/assets/use-config-BEdbtpD4.js +0 -1
- package/dist/assets/use-panel-app-scroll-restoration-ZnicIfo3.js +0 -1
- package/dist/assets/use-viewport-layout-BS18drMT.js +0 -1
- package/dist/assets/utils-CBZPzC_b.js +0 -8
- package/dist/assets/wardley-OPB4EBWU-BRzaRyFf.js +0 -1
- package/dist/assets/x-DdXOqLnX.js +0 -1
- package/src/features/panel-apps/components/__tests__/panel-app-main-sidebar-nav.test.tsx +0 -219
- package/src/features/panel-apps/components/panel-app-main-sidebar-nav.tsx +0 -258
- package/src/shared/components/doc-browser/utils/doc-browser-floating-panel.utils.ts +0 -83
- /package/dist/assets/{array-D0DyKZdT.js → array-B0sEvCP9.js} +0 -0
- /package/dist/assets/{chunk-KEIR6QF5-CuZFOa6q.js → chunk-KEIR6QF5-BeO7fxDQ.js} +0 -0
- /package/dist/assets/{chunk-Y2CYZVJY-Frut-1TF.js → chunk-Y2CYZVJY-JQfgEV36.js} +0 -0
- /package/dist/assets/{config-hints-B_C9DAp5.js → config-hints-D3OuwoEY.js} +0 -0
- /package/dist/assets/{cytoscape.esm-BibuhnZD.js → cytoscape.esm-CzJ9uXgi.js} +0 -0
- /package/dist/assets/{defaultLocale-q7sRUXPc.js → defaultLocale-USmzX3VG.js} +0 -0
- /package/dist/assets/{dist-DhMddrrH.js → dist-BYF6XVna.js} +0 -0
- /package/dist/assets/{graphlib-BM63WsW3.js → graphlib-DEFMkHdW.js} +0 -0
- /package/dist/assets/{host-capabilities-B107nwS3.js → host-capabilities-C0MmWd3M.js} +0 -0
- /package/dist/assets/{init-CRMkf9sL.js → init-04ErALoz.js} +0 -0
- /package/dist/assets/{jszip.min-6thm2J_a.js → jszip.min-BnQ5NRy2.js} +0 -0
- /package/dist/assets/{katex-B26hhTOT.js → katex-CsAM73R9.js} +0 -0
- /package/dist/assets/{middleware-0o3JF3tS.js → middleware-CAXxl-af.js} +0 -0
- /package/dist/assets/{panel-app-B39rJPj8.js → panel-app-2EACRB8p.js} +0 -0
- /package/dist/assets/{path-BFMmafCM.js → path-CzxQ9n2G.js} +0 -0
- /package/dist/assets/{rough.esm-5Tjchx1D.js → rough.esm-pT9fdsW3.js} +0 -0
- /package/dist/assets/{xlsx-BC8ibjXK.js → xlsx-BRpCSiE4.js} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { usePageResourceActions } from '@/features/right-panel-resources';
|
|
2
|
+
import { pageResourceFromTarget } from '@/features/right-panel-resources';
|
|
3
|
+
import { createWorkspaceFilePanelTarget } from '@/features/chat/features/workspace/utils/workspace-file-panel-route.utils';
|
|
4
|
+
import { buildSessionPanelUrl } from '@/features/chat/features/session/utils/chat-session-route.utils';
|
|
5
|
+
import { sessionSurfaceManager } from '@/features/chat/managers/session-surface.manager';
|
|
1
6
|
import { useEffect, useMemo, useState } from "react";
|
|
2
7
|
import { useQueryClient } from "@tanstack/react-query";
|
|
3
8
|
import type { CronJobView } from "@/shared/lib/api";
|
|
@@ -23,8 +28,9 @@ import {
|
|
|
23
28
|
import { WorkspaceTabsBar } from "./chat-session-workspace-panel-nav";
|
|
24
29
|
import { usePresenter } from "@/features/chat/components/providers/chat-presenter.provider";
|
|
25
30
|
import { ChatSessionWorkspacePanelContent } from "@/features/chat/features/workspace/components/chat-session-workspace-panel-content";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
31
|
+
import { WorkbenchSurface } from "@/shared/components/workbench/workbench-surface";
|
|
32
|
+
import { getAppPresenter } from "@/app/presenters/app.presenter";
|
|
33
|
+
import { t } from "@/shared/lib/i18n";
|
|
28
34
|
import {
|
|
29
35
|
canGoBackInNavigationHistory,
|
|
30
36
|
canGoForwardInNavigationHistory,
|
|
@@ -34,6 +40,7 @@ import { buildServerPathReadQueryKey } from "@/shared/hooks/use-server-path-read
|
|
|
34
40
|
|
|
35
41
|
type ChatSessionWorkspacePanelProps = {
|
|
36
42
|
sessionKey: string | null;
|
|
43
|
+
hidden?: boolean;
|
|
37
44
|
childSessionTabs: readonly ChatChildSessionTab[];
|
|
38
45
|
activeChildSessionKey: string | null;
|
|
39
46
|
activeSideChatDraft: ChatWorkspaceSideChatDraft | null;
|
|
@@ -55,6 +62,7 @@ type ChatSessionWorkspacePanelProps = {
|
|
|
55
62
|
|
|
56
63
|
export function ChatSessionWorkspacePanel({
|
|
57
64
|
sessionKey,
|
|
65
|
+
hidden = false,
|
|
58
66
|
childSessionTabs,
|
|
59
67
|
activeChildSessionKey,
|
|
60
68
|
activeSideChatDraft,
|
|
@@ -74,8 +82,8 @@ export function ChatSessionWorkspacePanel({
|
|
|
74
82
|
displayMode = "docked",
|
|
75
83
|
}: ChatSessionWorkspacePanelProps) {
|
|
76
84
|
const presenter = usePresenter();
|
|
85
|
+
const pageActions = usePageResourceActions();
|
|
77
86
|
const queryClient = useQueryClient();
|
|
78
|
-
const [isMaximized, setIsMaximized] = useState(false);
|
|
79
87
|
const [filePreviewRefreshVersion, setFilePreviewRefreshVersion] = useState(0);
|
|
80
88
|
const resolvedChildTabs = useNcpChildSessionTabsView(childSessionTabs);
|
|
81
89
|
const optimisticReadAtBySessionKey = useChatSessionListStore(
|
|
@@ -159,8 +167,6 @@ export function ChatSessionWorkspacePanel({
|
|
|
159
167
|
return null;
|
|
160
168
|
}
|
|
161
169
|
|
|
162
|
-
const isContainerMaximized = displayMode === "docked" && isMaximized;
|
|
163
|
-
const isOverlayPanel = displayMode === "overlay" || isContainerMaximized;
|
|
164
170
|
const activeFile =
|
|
165
171
|
activeSelection.kind === "file" && activeSelection.file.viewMode === "preview"
|
|
166
172
|
? activeSelection.file
|
|
@@ -185,40 +191,43 @@ export function ChatSessionWorkspacePanel({
|
|
|
185
191
|
: undefined;
|
|
186
192
|
|
|
187
193
|
return (
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
isOverlayPanel
|
|
193
|
-
? "bg-white"
|
|
194
|
-
: "hidden border-gray-200/70 bg-white/95 backdrop-blur-sm md:flex",
|
|
195
|
-
isContainerMaximized ? "shadow-xl" : null,
|
|
196
|
-
)}
|
|
197
|
-
defaultWidth={workspacePanelWidth}
|
|
198
|
-
width={workspacePanelWidth}
|
|
199
|
-
minWidth={CHAT_WORKSPACE_PANEL_MIN_WIDTH}
|
|
200
|
-
maxWidth={CHAT_WORKSPACE_PANEL_MAX_WIDTH}
|
|
194
|
+
<WorkbenchSurface
|
|
195
|
+
id={`session-workspace:${sessionKey ?? 'draft'}`} manager={getAppPresenter().workbenchSurfaceManager}
|
|
196
|
+
title={t('workbenchSessionGroup')} testId="chat-session-workspace-panel" hidden={hidden}
|
|
197
|
+
width={workspacePanelWidth} minWidth={CHAT_WORKSPACE_PANEL_MIN_WIDTH} maxWidth={CHAT_WORKSPACE_PANEL_MAX_WIDTH}
|
|
201
198
|
onWidthCommit={presenter.chatThreadManager.setWorkspacePanelWidth}
|
|
202
|
-
overlay={
|
|
203
|
-
|
|
204
|
-
>
|
|
199
|
+
fullscreen={displayMode === "overlay"} onClose={presenter.chatThreadManager.closeWorkspacePanel} closeLabel={t('workbenchHideGroup')}
|
|
200
|
+
navigation={
|
|
205
201
|
<WorkspaceTabsBar
|
|
206
|
-
tabs={workspaceTabs
|
|
202
|
+
tabs={workspaceTabs.map((tab) => ({
|
|
203
|
+
...tab,
|
|
204
|
+
menuGroups: (() => {
|
|
205
|
+
const file = workspaceFileTabs.find((item) => `file:${item.key}` === tab.key);
|
|
206
|
+
const target = file ? createWorkspaceFilePanelTarget(file, { workingDir: sessionWorkingDir, projectRoot: sessionProjectRoot })
|
|
207
|
+
: tab.sessionKey ? { kind: 'chat-session', title: tab.title, url: buildSessionPanelUrl(tab.sessionKey), resourceUri: buildSessionPanelUrl(tab.sessionKey), historyPolicy: 'none' as const } : tab.kind !== 'side-chat-draft' ? { kind: 'workspace', title: tab.title, url: `nextclaw://workspace?${new URLSearchParams({ session: sessionKey ?? '', page: tab.kind })}`, historyPolicy: 'none' as const } : null;
|
|
208
|
+
return target ? [...pageActions(pageResourceFromTarget(target), 'workspace'), ...(tab.menuGroups ?? [])] : tab.menuGroups;
|
|
209
|
+
})(),
|
|
210
|
+
onMoveGlobal: tab.kind === 'file' ? () => presenter.chatThreadManager.moveFileToGlobal(tab.key.slice('file:'.length), { workingDir: sessionWorkingDir, projectRoot: sessionProjectRoot }, getAppPresenter().docBrowserManager)
|
|
211
|
+
: tab.kind === 'child-session' && tab.sessionKey ? () => {
|
|
212
|
+
sessionSurfaceManager.dock({ sessionKey: tab.sessionKey!, title: tab.title }, getAppPresenter().docBrowserManager);
|
|
213
|
+
tab.onClose?.();
|
|
214
|
+
} : undefined,
|
|
215
|
+
onFloat: tab.kind === 'child-session' && tab.sessionKey ? () => {
|
|
216
|
+
sessionSurfaceManager.open({ sessionKey: tab.sessionKey!, title: tab.title });
|
|
217
|
+
tab.onClose?.();
|
|
218
|
+
} : undefined,
|
|
219
|
+
}))}
|
|
207
220
|
canGoBack={canGoBackInNavigationHistory(workspaceHistory)}
|
|
208
221
|
canGoForward={canGoForwardInNavigationHistory(workspaceHistory)}
|
|
209
|
-
isMaximized={isContainerMaximized}
|
|
210
222
|
onGoBack={presenter.chatThreadManager.goBackWorkspacePanel}
|
|
211
223
|
onGoForward={presenter.chatThreadManager.goForwardWorkspacePanel}
|
|
212
224
|
onRefreshFile={refreshActiveFile}
|
|
213
|
-
|
|
214
|
-
displayMode === "docked"
|
|
215
|
-
? () => setIsMaximized((value) => !value)
|
|
216
|
-
: undefined
|
|
217
|
-
}
|
|
218
|
-
onClose={presenter.chatThreadManager.closeWorkspacePanel}
|
|
225
|
+
|
|
219
226
|
/>
|
|
227
|
+
}
|
|
228
|
+
>
|
|
220
229
|
|
|
221
|
-
<div className="flex min-h-0 flex-1 flex-col bg-
|
|
230
|
+
<div className="flex min-h-0 flex-1 flex-col bg-card">
|
|
222
231
|
<ChatSessionWorkspacePanelContent
|
|
223
232
|
activeSelection={activeSelection}
|
|
224
233
|
childSessionTabs={resolvedChildTabs}
|
|
@@ -232,6 +241,6 @@ export function ChatSessionWorkspacePanel({
|
|
|
232
241
|
sessionWorkingDir={sessionWorkingDir}
|
|
233
242
|
/>
|
|
234
243
|
</div>
|
|
235
|
-
</
|
|
244
|
+
</WorkbenchSurface>
|
|
236
245
|
);
|
|
237
246
|
}
|
|
@@ -2,6 +2,7 @@ import { ChevronRight, GitBranch, MessageSquarePlus } from 'lucide-react';
|
|
|
2
2
|
|
|
3
3
|
import { usePresenter } from '@/features/chat/components/providers/chat-presenter.provider';
|
|
4
4
|
import type { ResolvedChildSessionTab } from '@/features/chat/features/ncp/hooks/use-ncp-child-session-tabs-view';
|
|
5
|
+
import { SessionRunBadge } from '@/features/chat/features/session/components/session-run-badge';
|
|
5
6
|
import { ChatSessionMoreActionsMenu } from '@/features/chat/features/session/components/session-header/chat-session-more-actions-menu';
|
|
6
7
|
import { t } from '@/shared/lib/i18n';
|
|
7
8
|
|
|
@@ -52,7 +53,10 @@ export function ChatSessionChildSessions({
|
|
|
52
53
|
<GitBranch className="h-4 w-4" />
|
|
53
54
|
</span>
|
|
54
55
|
<span className="min-w-0 flex-1">
|
|
55
|
-
<span className="
|
|
56
|
+
<span className="flex min-w-0 items-center gap-1.5 text-sm font-medium text-gray-900">
|
|
57
|
+
<span className="truncate">{tab.title}</span>
|
|
58
|
+
{tab.runStatus ? <SessionRunBadge status={tab.runStatus} /> : null}
|
|
59
|
+
</span>
|
|
56
60
|
{tab.projectName || tab.sessionTypeLabel ? (
|
|
57
61
|
<span className="mt-0.5 block truncate text-xs text-gray-500">
|
|
58
62
|
{[tab.sessionTypeLabel, tab.projectName].filter(Boolean).join(' · ')}
|
|
@@ -63,6 +67,7 @@ export function ChatSessionChildSessions({
|
|
|
63
67
|
</button>
|
|
64
68
|
<ChatSessionMoreActionsMenu
|
|
65
69
|
sessionKey={tab.sessionKey}
|
|
70
|
+
sessionTitle={tab.title}
|
|
66
71
|
triggerSize="sm"
|
|
67
72
|
triggerTone="strong"
|
|
68
73
|
className="absolute right-2 top-1/2 -translate-y-1/2 bg-white opacity-100 md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100"
|
package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Check,
|
|
7
7
|
Folder,
|
|
8
8
|
FolderOpen,
|
|
9
|
-
|
|
9
|
+
MoreVertical,
|
|
10
10
|
X,
|
|
11
11
|
} from 'lucide-react';
|
|
12
12
|
import type {
|
|
@@ -429,7 +429,7 @@ export function WorkspaceDirectoryTreeEntry({
|
|
|
429
429
|
<ContextMenuTrigger>
|
|
430
430
|
<IconActionButton
|
|
431
431
|
className="mr-1 opacity-0 pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100 data-[context-menu-open]:pointer-events-auto data-[context-menu-open]:opacity-100"
|
|
432
|
-
icon={<
|
|
432
|
+
icon={<MoreVertical className="h-3.5 w-3.5" />}
|
|
433
433
|
label={t('chatWorkspaceMoreActionsFor').replace('{name}', entry.name)}
|
|
434
434
|
size="sm"
|
|
435
435
|
tooltipSide="left"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChevronsUp, FilePlus2, FolderPlus,
|
|
1
|
+
import { ChevronsUp, FilePlus2, FolderPlus, MoreVertical, RefreshCw } from 'lucide-react';
|
|
2
2
|
import { IconActionButton } from '@/shared/components/ui/actions/icon-action-button';
|
|
3
3
|
import { ContextMenuTrigger } from '@/shared/components/ui/context-menu/context-menu';
|
|
4
4
|
import { t } from '@/shared/lib/i18n';
|
|
@@ -54,7 +54,7 @@ export function WorkspaceProjectFilesToolbar({
|
|
|
54
54
|
/>
|
|
55
55
|
<ContextMenuTrigger>
|
|
56
56
|
<IconActionButton
|
|
57
|
-
icon={<
|
|
57
|
+
icon={<MoreVertical className="h-4 w-4" />}
|
|
58
58
|
label={t('chatWorkspaceRootMoreActions')}
|
|
59
59
|
size="sm"
|
|
60
60
|
/>
|
|
@@ -257,6 +257,33 @@ describe("fixed workspace tabs", () => {
|
|
|
257
257
|
});
|
|
258
258
|
});
|
|
259
259
|
|
|
260
|
+
it("projects child running state onto both the collection and child tabs", () => {
|
|
261
|
+
const tabs = buildWorkspaceTabsViewModel({
|
|
262
|
+
hasSession: true,
|
|
263
|
+
resolvedChildTabs: [
|
|
264
|
+
createChildTab({ runStatus: "running" }),
|
|
265
|
+
createChildTab({ sessionKey: "child-2" }),
|
|
266
|
+
],
|
|
267
|
+
activeSideChatDraft: null,
|
|
268
|
+
closedWorkspaceTabEntries: [],
|
|
269
|
+
workspaceFileTabs: [],
|
|
270
|
+
activeSelection: { kind: "overview" },
|
|
271
|
+
optimisticReadAtBySessionKey: {},
|
|
272
|
+
onSelectSession: vi.fn(),
|
|
273
|
+
onSelectFile: vi.fn(),
|
|
274
|
+
onOpenFileViewer: vi.fn(),
|
|
275
|
+
onCloseTab: vi.fn(),
|
|
276
|
+
onSelectOverview: vi.fn(),
|
|
277
|
+
onSelectChildSessions: vi.fn(),
|
|
278
|
+
onSelectProjectFiles: vi.fn(),
|
|
279
|
+
onSelectCronJobs: vi.fn(),
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
expect(tabs.find((tab) => tab.kind === "child-sessions")?.runStatus).toBe("running");
|
|
283
|
+
expect(tabs.find((tab) => tab.key === "child:child-1")?.runStatus).toBe("running");
|
|
284
|
+
expect(tabs.find((tab) => tab.key === "child:child-2")?.runStatus).toBeUndefined();
|
|
285
|
+
});
|
|
286
|
+
|
|
260
287
|
describe("buildWorkspaceTabsViewModel", () => {
|
|
261
288
|
beforeEach(() => setLanguage("en"));
|
|
262
289
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { expect, it } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
createWorkspaceFilePanelTarget,
|
|
4
|
+
readWorkspaceFilePanelView,
|
|
5
|
+
resolveFileResourceTarget,
|
|
6
|
+
} from "@/features/chat/features/workspace/utils/workspace-file-panel-route.utils";
|
|
7
|
+
import { DocBrowserManager } from "@/shared/components/doc-browser/managers/doc-browser.manager";
|
|
8
|
+
import { WorkbenchSurfaceManager } from "@/shared/components/workbench/managers/workbench-surface.manager";
|
|
9
|
+
import { useDocBrowserStore } from "@/shared/components/doc-browser/stores/doc-browser.store";
|
|
10
|
+
import { RightPanelResourceRouteResolver } from "@/features/right-panel-resources";
|
|
11
|
+
|
|
12
|
+
it("carries source context and diff data through global open, dedupe and reload", async () => {
|
|
13
|
+
const file = {
|
|
14
|
+
key: "source::diff::src/a.ts",
|
|
15
|
+
parentSessionKey: "source",
|
|
16
|
+
path: "src/a.ts",
|
|
17
|
+
viewMode: "diff" as const,
|
|
18
|
+
fullLines: [
|
|
19
|
+
{ kind: "add" as const, text: "const result = 1;", newLineNumber: 1 },
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
const target = createWorkspaceFilePanelTarget(file, {
|
|
23
|
+
workingDir: "/project/a",
|
|
24
|
+
projectRoot: "/project",
|
|
25
|
+
});
|
|
26
|
+
const manager = new DocBrowserManager(
|
|
27
|
+
new WorkbenchSurfaceManager(),
|
|
28
|
+
new RightPanelResourceRouteResolver(),
|
|
29
|
+
);
|
|
30
|
+
manager.openTarget(target, { newTab: true, placement: "docked" });
|
|
31
|
+
const before = useDocBrowserStore.getState().snapshot;
|
|
32
|
+
manager.openTarget(target, { newTab: true });
|
|
33
|
+
expect(useDocBrowserStore.getState().snapshot.tabs.length).toBe(
|
|
34
|
+
before.tabs.length,
|
|
35
|
+
);
|
|
36
|
+
await useDocBrowserStore.persist.rehydrate();
|
|
37
|
+
const state = useDocBrowserStore.getState().snapshot;
|
|
38
|
+
const restored = readWorkspaceFilePanelView(
|
|
39
|
+
state.tabs.find((tab) => tab.id === state.activeTabId)!,
|
|
40
|
+
);
|
|
41
|
+
expect(restored).toMatchObject({
|
|
42
|
+
workingDir: "/project/a",
|
|
43
|
+
projectRoot: "/project",
|
|
44
|
+
file,
|
|
45
|
+
});
|
|
46
|
+
expect(target.url).not.toContain("const result");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("resolves native file URIs using the source context and preserves precise location", () => {
|
|
50
|
+
const target = resolveFileResourceTarget(
|
|
51
|
+
"nextclaw://file/workspace/docs/readme.md?view=source&line=12&column=3",
|
|
52
|
+
{ workingDir: "/source-project", sessionKey: "source" },
|
|
53
|
+
)!;
|
|
54
|
+
expect(target.viewState).toMatchObject({
|
|
55
|
+
workingDir: "/source-project",
|
|
56
|
+
file: {
|
|
57
|
+
path: "docs/readme.md",
|
|
58
|
+
line: 12,
|
|
59
|
+
column: 3,
|
|
60
|
+
previewViewer: "source",
|
|
61
|
+
parentSessionKey: "source",
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
const restored = readWorkspaceFilePanelView({
|
|
65
|
+
...target,
|
|
66
|
+
currentUrl: target.url,
|
|
67
|
+
} as never);
|
|
68
|
+
expect(restored?.file.line).toBe(12);
|
|
69
|
+
expect(
|
|
70
|
+
resolveFileResourceTarget("nextclaw://file/workspace/docs/a.md"),
|
|
71
|
+
).toBeNull();
|
|
72
|
+
expect(
|
|
73
|
+
resolveFileResourceTarget(
|
|
74
|
+
"nextclaw://file/workspace/docs/a.md?base=%2Fexplicit",
|
|
75
|
+
{ workingDir: "/other" },
|
|
76
|
+
)?.viewState,
|
|
77
|
+
).toMatchObject({ workingDir: "/explicit" });
|
|
78
|
+
expect(
|
|
79
|
+
resolveFileResourceTarget("nextclaw://file/absolute/tmp/a.md")?.viewState,
|
|
80
|
+
).toMatchObject({ workingDir: null, file: { path: "/tmp/a.md" } });
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("rejects traversal and malformed file scopes without changing resource identity", () => {
|
|
84
|
+
for (const uri of [
|
|
85
|
+
"nextclaw://file/unknown/a.md",
|
|
86
|
+
"nextclaw://file/workspace/%2e%2e%2fprivate",
|
|
87
|
+
"nextclaw://file/workspace/a%5Cb",
|
|
88
|
+
"nextclaw://file/workspace/",
|
|
89
|
+
]) {
|
|
90
|
+
expect(
|
|
91
|
+
resolveFileResourceTarget(uri, { workingDir: "/source" }),
|
|
92
|
+
).toBeNull();
|
|
93
|
+
}
|
|
94
|
+
});
|
package/src/features/chat/features/workspace/utils/chat-workspace-file-tab-persistence.utils.ts
CHANGED
|
@@ -70,6 +70,7 @@ export function normalizePersistedWorkspaceFileTab(
|
|
|
70
70
|
patchText: normalizeOptionalText(value.patchText),
|
|
71
71
|
oldStartLine: normalizeOptionalNumber(value.oldStartLine),
|
|
72
72
|
newStartLine: normalizeOptionalNumber(value.newStartLine),
|
|
73
|
+
fullLines: Array.isArray(value.fullLines) ? value.fullLines.filter((line) => line && ['context', 'add', 'remove'].includes(line.kind) && typeof line.text === 'string' && (line.oldLineNumber === undefined || Number.isFinite(line.oldLineNumber)) && (line.newLineNumber === undefined || Number.isFinite(line.newLineNumber))) : undefined,
|
|
73
74
|
};
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -94,6 +95,7 @@ export function toPersistedWorkspaceFileTab(
|
|
|
94
95
|
patchText: tab.patchText,
|
|
95
96
|
oldStartLine: tab.oldStartLine,
|
|
96
97
|
newStartLine: tab.newStartLine,
|
|
98
|
+
fullLines: tab.fullLines,
|
|
97
99
|
};
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -82,3 +82,18 @@ export function reparentWorkspaceFileTab(tab: ChatWorkspaceFileTab, parentSessio
|
|
|
82
82
|
parentSessionKey: normalizedParentSessionKey,
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
export function createWorkspaceFileViewerTab(sourceTab: ChatWorkspaceFileTab, viewer: 'source' | 'rendered'): ChatWorkspaceFileTab | null {
|
|
87
|
+
return createWorkspaceFileTab({
|
|
88
|
+
path: sourceTab.path,
|
|
89
|
+
label: sourceTab.label ?? undefined,
|
|
90
|
+
viewMode: 'preview',
|
|
91
|
+
previewViewer: viewer,
|
|
92
|
+
line: sourceTab.line ?? undefined,
|
|
93
|
+
column: sourceTab.column ?? undefined,
|
|
94
|
+
params: sourceTab.params ?? undefined,
|
|
95
|
+
rawText: sourceTab.rawText ?? undefined,
|
|
96
|
+
contentUrl: sourceTab.contentUrl ?? undefined,
|
|
97
|
+
mimeType: sourceTab.mimeType ?? undefined,
|
|
98
|
+
}, sourceTab.parentSessionKey);
|
|
99
|
+
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from "@/features/chat/features/workspace/utils/chat-workspace-file-viewer.utils";
|
|
16
16
|
import { areWorkspaceNavigationEntriesEqual } from "@/features/chat/features/workspace/utils/chat-thread-workspace-session.utils";
|
|
17
17
|
import { resolveWorkspaceRelativePath } from "@/shared/lib/session-project";
|
|
18
|
+
import type { SessionRunStatus } from "@/features/chat/types/session-run-status.types";
|
|
18
19
|
|
|
19
20
|
export type WorkspaceSelection =
|
|
20
21
|
| {
|
|
@@ -55,6 +56,7 @@ export type WorkspaceTabViewModel = {
|
|
|
55
56
|
sessionKey?: string | null;
|
|
56
57
|
fileName?: string | null;
|
|
57
58
|
showUnreadDot?: boolean;
|
|
59
|
+
runStatus?: SessionRunStatus;
|
|
58
60
|
viewMode?: "preview" | "diff";
|
|
59
61
|
isRenderedPreview?: boolean;
|
|
60
62
|
alternateViewerAction?: {
|
|
@@ -63,6 +65,8 @@ export type WorkspaceTabViewModel = {
|
|
|
63
65
|
onSelect: () => void;
|
|
64
66
|
} | null;
|
|
65
67
|
onAddToChat?: () => void;
|
|
68
|
+
onMoveGlobal?: () => void;
|
|
69
|
+
onFloat?: () => void;
|
|
66
70
|
onSelect: () => void;
|
|
67
71
|
onClose?: () => void;
|
|
68
72
|
menuLabel?: string;
|
|
@@ -190,6 +194,7 @@ type WorkspaceTabsViewModelParams = {
|
|
|
190
194
|
function buildWorkspacePageTabs({
|
|
191
195
|
activeSelection,
|
|
192
196
|
hasSession,
|
|
197
|
+
resolvedChildTabs,
|
|
193
198
|
onSelectChildSessions,
|
|
194
199
|
onSelectCronJobs,
|
|
195
200
|
onSelectOverview,
|
|
@@ -199,6 +204,7 @@ function buildWorkspacePageTabs({
|
|
|
199
204
|
WorkspaceTabsViewModelParams,
|
|
200
205
|
| "activeSelection"
|
|
201
206
|
| "hasSession"
|
|
207
|
+
| "resolvedChildTabs"
|
|
202
208
|
| "onSelectChildSessions"
|
|
203
209
|
| "onSelectCronJobs"
|
|
204
210
|
| "onSelectOverview"
|
|
@@ -220,6 +226,9 @@ function buildWorkspacePageTabs({
|
|
|
220
226
|
title: t("chatWorkspaceChildSessions"),
|
|
221
227
|
tooltip: t("chatWorkspaceChildSessions"),
|
|
222
228
|
active: activeSelection?.kind === "child-sessions",
|
|
229
|
+
runStatus: resolvedChildTabs.some((tab) => tab.runStatus === "running")
|
|
230
|
+
? "running"
|
|
231
|
+
: undefined,
|
|
223
232
|
onSelect: onSelectChildSessions,
|
|
224
233
|
},
|
|
225
234
|
{
|
|
@@ -279,6 +288,7 @@ export function buildWorkspaceTabsViewModel(
|
|
|
279
288
|
const workspacePages = buildWorkspacePageTabs({
|
|
280
289
|
activeSelection,
|
|
281
290
|
hasSession,
|
|
291
|
+
resolvedChildTabs,
|
|
282
292
|
onSelectChildSessions,
|
|
283
293
|
onSelectCronJobs,
|
|
284
294
|
onSelectOverview,
|
|
@@ -340,6 +350,7 @@ export function buildWorkspaceTabsViewModel(
|
|
|
340
350
|
readAt: effectiveReadAt,
|
|
341
351
|
runStatus: tab.runStatus,
|
|
342
352
|
}),
|
|
353
|
+
runStatus: tab.runStatus,
|
|
343
354
|
onSelect: () => onSelectSession(tab.sessionKey),
|
|
344
355
|
onClose: () => onCloseTab({
|
|
345
356
|
kind: "child-session",
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { createWorkspaceFileTab } from "./chat-workspace-file-tab.utils";
|
|
2
|
+
import type { ChatWorkspaceFileTab } from "@/features/chat/stores/chat-thread.store";
|
|
3
|
+
import {
|
|
4
|
+
normalizePersistedWorkspaceFileTab,
|
|
5
|
+
toPersistedWorkspaceFileTab,
|
|
6
|
+
} from "./chat-workspace-file-tab-persistence.utils";
|
|
7
|
+
import type {
|
|
8
|
+
DocBrowserRouteTarget,
|
|
9
|
+
DocBrowserTab,
|
|
10
|
+
} from "@/shared/components/doc-browser/types/doc-browser.types";
|
|
11
|
+
|
|
12
|
+
export const WORKSPACE_FILE_PANEL_KIND = "workspace-file";
|
|
13
|
+
export type WorkspaceFileViewContext = {
|
|
14
|
+
workingDir: string | null;
|
|
15
|
+
projectRoot: string | null;
|
|
16
|
+
};
|
|
17
|
+
export type WorkspaceFileView = WorkspaceFileViewContext & {
|
|
18
|
+
file: ChatWorkspaceFileTab;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function createWorkspaceFilePanelTarget(
|
|
22
|
+
file: ChatWorkspaceFileTab,
|
|
23
|
+
context: WorkspaceFileViewContext,
|
|
24
|
+
): DocBrowserRouteTarget {
|
|
25
|
+
const query = new URLSearchParams({
|
|
26
|
+
key: file.key,
|
|
27
|
+
path: file.path,
|
|
28
|
+
base: context.workingDir ?? "",
|
|
29
|
+
parent: file.parentSessionKey ?? "",
|
|
30
|
+
view: file.viewMode,
|
|
31
|
+
viewer: file.previewViewer ?? "",
|
|
32
|
+
line: String(file.line ?? ""),
|
|
33
|
+
column: String(file.column ?? ""),
|
|
34
|
+
});
|
|
35
|
+
const url = `nextclaw://workspace-file?${query}`;
|
|
36
|
+
return {
|
|
37
|
+
kind: WORKSPACE_FILE_PANEL_KIND,
|
|
38
|
+
title: file.label || file.path.split("/").pop() || file.path,
|
|
39
|
+
url,
|
|
40
|
+
resourceUri: url,
|
|
41
|
+
dedupeKey: url,
|
|
42
|
+
historyPolicy: "none",
|
|
43
|
+
viewState: {
|
|
44
|
+
...context,
|
|
45
|
+
file: toPersistedWorkspaceFileTab(file),
|
|
46
|
+
} satisfies WorkspaceFileView,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function readWorkspaceFilePanelView(
|
|
51
|
+
tab: DocBrowserTab,
|
|
52
|
+
): WorkspaceFileView | null {
|
|
53
|
+
let value = tab.viewState;
|
|
54
|
+
if (!value) {
|
|
55
|
+
try {
|
|
56
|
+
const uri = new URL(tab.resourceUri ?? tab.currentUrl);
|
|
57
|
+
const path = uri.searchParams.get("path");
|
|
58
|
+
// A diff is a historical snapshot; a bare URI cannot substitute current file content.
|
|
59
|
+
if (
|
|
60
|
+
uri.hostname !== "workspace-file" ||
|
|
61
|
+
!path ||
|
|
62
|
+
uri.searchParams.get("view") === "diff"
|
|
63
|
+
)
|
|
64
|
+
return null;
|
|
65
|
+
value = {
|
|
66
|
+
workingDir: uri.searchParams.get("base") || null,
|
|
67
|
+
projectRoot: null,
|
|
68
|
+
file: {
|
|
69
|
+
key: uri.searchParams.get("key") || path,
|
|
70
|
+
path,
|
|
71
|
+
parentSessionKey: uri.searchParams.get("parent") || null,
|
|
72
|
+
viewMode: "preview",
|
|
73
|
+
line: Number(uri.searchParams.get("line")) || null,
|
|
74
|
+
column: Number(uri.searchParams.get("column")) || null,
|
|
75
|
+
previewViewer: uri.searchParams.get("viewer") || undefined,
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
} catch {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (
|
|
83
|
+
!value ||
|
|
84
|
+
typeof value !== "object" ||
|
|
85
|
+
!("file" in value) ||
|
|
86
|
+
!("workingDir" in value) ||
|
|
87
|
+
!("projectRoot" in value)
|
|
88
|
+
)
|
|
89
|
+
return null;
|
|
90
|
+
const file = normalizePersistedWorkspaceFileTab(value.file);
|
|
91
|
+
if (
|
|
92
|
+
!file ||
|
|
93
|
+
(value.workingDir !== null && typeof value.workingDir !== "string") ||
|
|
94
|
+
(value.projectRoot !== null && typeof value.projectRoot !== "string")
|
|
95
|
+
)
|
|
96
|
+
return null;
|
|
97
|
+
return { file, workingDir: value.workingDir, projectRoot: value.projectRoot };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Resolve public file links with explicit source context; never borrow another conversation's cwd. */
|
|
101
|
+
export function resolveFileResourceTarget(
|
|
102
|
+
uri: string,
|
|
103
|
+
context?: { workingDir?: string | null; sessionKey?: string | null },
|
|
104
|
+
): DocBrowserRouteTarget | null {
|
|
105
|
+
const parsed = new URL(uri);
|
|
106
|
+
if (parsed.protocol !== "nextclaw:" || parsed.hostname !== "file")
|
|
107
|
+
return null;
|
|
108
|
+
const [scope, ...segments] = parsed.pathname
|
|
109
|
+
.split("/")
|
|
110
|
+
.filter(Boolean)
|
|
111
|
+
.map(decodeURIComponent);
|
|
112
|
+
if (
|
|
113
|
+
!segments.length ||
|
|
114
|
+
segments.some(
|
|
115
|
+
(segment) =>
|
|
116
|
+
segment === ".." || segment.includes("\\") || segment.includes("/"),
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
return null;
|
|
120
|
+
const path = segments.join("/");
|
|
121
|
+
const base = parsed.searchParams.get("base") || context?.workingDir || null;
|
|
122
|
+
if (scope !== "absolute" && (scope !== "workspace" || !base?.startsWith("/")))
|
|
123
|
+
return null;
|
|
124
|
+
const viewer =
|
|
125
|
+
parsed.searchParams.get("view") || parsed.searchParams.get("viewer");
|
|
126
|
+
const positive = (name: string) => {
|
|
127
|
+
const value = Number(parsed.searchParams.get(name));
|
|
128
|
+
return Number.isSafeInteger(value) && value > 0 ? value : undefined;
|
|
129
|
+
};
|
|
130
|
+
const file = createWorkspaceFileTab(
|
|
131
|
+
{
|
|
132
|
+
path: scope === "absolute" ? "/" + path : path,
|
|
133
|
+
viewMode: "preview",
|
|
134
|
+
previewViewer:
|
|
135
|
+
viewer === "source" || viewer === "rendered" ? viewer : undefined,
|
|
136
|
+
line: positive("line"),
|
|
137
|
+
column: positive("column"),
|
|
138
|
+
},
|
|
139
|
+
context?.sessionKey ?? null,
|
|
140
|
+
);
|
|
141
|
+
return file
|
|
142
|
+
? createWorkspaceFilePanelTarget(file, {
|
|
143
|
+
workingDir: scope === "workspace" ? base : null,
|
|
144
|
+
projectRoot: null,
|
|
145
|
+
})
|
|
146
|
+
: null;
|
|
147
|
+
}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
export {
|
|
2
|
+
buildSessionPath,
|
|
3
|
+
buildSessionPanelUrl,
|
|
4
|
+
CHAT_SESSION_PANEL_KIND,
|
|
5
|
+
parseSessionKeyFromPanelUrl,
|
|
6
|
+
parseSessionKeyFromRoute,
|
|
7
|
+
CHAT_DRAFT_SESSION_PATH,
|
|
8
|
+
} from "./features/session/utils/chat-session-route.utils";
|
|
1
9
|
export { ChatConversationPanel } from "./components/conversation/chat-conversation-panel";
|
|
2
10
|
export { ChatConversationWorkspaceSection } from "./components/conversation/chat-conversation-workspace-section";
|
|
3
11
|
export { ChatSidebar } from "./components/layout/chat-sidebar";
|
|
4
12
|
export { ChatPresenterProvider } from "./components/providers/chat-presenter.provider";
|
|
13
|
+
export { ChatRuntimeProvider } from "./components/providers/chat-runtime.provider";
|
|
14
|
+
export { CHAT_SESSION_PANEL_RENDERERS } from './features/conversation/components/session-conversation-panel-tab';
|
|
5
15
|
export { usePresenter } from "./components/providers/chat-presenter.provider";
|
|
6
16
|
export { ChatPresenter } from "./presenters/chat.presenter";
|
|
7
17
|
export { ChatDraftIntentManager } from "./managers/chat-draft-intent.manager";
|
|
8
18
|
export { ChatComposerIntentManager } from "./managers/chat-composer-intent.manager";
|
|
9
19
|
export { ChatCompletionNotificationManager } from "./managers/chat-completion-notification.manager";
|
|
10
|
-
|
|
11
|
-
buildSessionPath,
|
|
12
|
-
CHAT_DRAFT_SESSION_PATH,
|
|
13
|
-
} from "./features/session/utils/chat-session-route.utils";
|
|
20
|
+
|
|
14
21
|
export { useChatSessionListStore } from "./stores/chat-session-list.store";
|
|
15
22
|
export { useChatThreadStore } from "./stores/chat-thread.store";
|
|
16
23
|
export { useChatMessageLayoutStore } from "./stores/chat-message-layout.store";
|
|
@@ -23,3 +30,12 @@ export {
|
|
|
23
30
|
type ChatSessionTypeOption,
|
|
24
31
|
} from "./features/session-type/utils/chat-session-type.utils";
|
|
25
32
|
export { ChatVoiceShortcutControl } from './features/conversation/components/chat-voice-shortcut-control';
|
|
33
|
+
|
|
34
|
+
export type { ChatThreadManager } from './managers/chat-thread.manager';
|
|
35
|
+
export { useFloatingSessionStore } from './stores/floating-session.store';
|
|
36
|
+
export { sessionSurfaceManager } from './managers/session-surface.manager';
|
|
37
|
+
export { useInfiniteNcpSessions } from './features/ncp/hooks/use-ncp-session-queries';
|
|
38
|
+
export { ChatSessionWorkspaceFilePreview } from './features/workspace/components/chat-session-workspace-file-preview';
|
|
39
|
+
export { createWorkspaceFileTab, createWorkspaceFileViewerTab } from './features/workspace/utils/chat-workspace-file-tab.utils';
|
|
40
|
+
export { WORKSPACE_FILE_PANEL_KIND, resolveFileResourceTarget, createWorkspaceFilePanelTarget, readWorkspaceFilePanelView } from './features/workspace/utils/workspace-file-panel-route.utils';
|
|
41
|
+
export { resolveAlternateWorkspaceFileViewer } from './features/workspace/utils/chat-workspace-file-viewer.utils';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { sessionSurfaceManager } from '@/features/chat/managers/session-surface.manager';
|
|
1
2
|
import {
|
|
2
3
|
NCP_INTERNAL_VISIBILITY_METADATA_KEY,
|
|
3
4
|
NcpEventType,
|
|
@@ -8,6 +9,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
|
8
9
|
import { ChatCompletionNotificationManager } from "@/features/chat/managers/chat-completion-notification.manager";
|
|
9
10
|
import { buildSessionPath } from "@/features/chat/features/session/utils/chat-session-route.utils";
|
|
10
11
|
import { useChatQueryStore } from "@/features/chat/stores/ncp-chat-query.store";
|
|
12
|
+
import { useFloatingSessionStore } from '@/features/chat/stores/floating-session.store';
|
|
11
13
|
|
|
12
14
|
const mocks = vi.hoisted(() => ({
|
|
13
15
|
eventHandler: null as ((event: NcpEndpointEvent) => void) | null,
|
|
@@ -98,7 +100,13 @@ describe("ChatCompletionNotificationManager", () => {
|
|
|
98
100
|
description: "The requested research is complete.",
|
|
99
101
|
href: buildSessionPath("session-background"),
|
|
100
102
|
ariaLabel: "Open the new reply in Quarterly research",
|
|
103
|
+
action: { label: 'Chat in a floating window', onClick: expect.any(Function) },
|
|
101
104
|
});
|
|
105
|
+
show.mock.calls[0][0].action.onClick();
|
|
106
|
+
expect(useFloatingSessionStore.getState().session).toEqual({
|
|
107
|
+
sessionKey: 'session-background', title: 'Quarterly research',
|
|
108
|
+
});
|
|
109
|
+
sessionSurfaceManager.close();
|
|
102
110
|
});
|
|
103
111
|
|
|
104
112
|
it("suppresses messages completed in any visible session, including later replays", () => {
|
|
@@ -74,9 +74,14 @@ describe('ChatThreadManager workspace pages', () => {
|
|
|
74
74
|
|
|
75
75
|
manager.toggleWorkspacePanel('parent-session-1');
|
|
76
76
|
expect(useChatThreadStore.getState().snapshot).toMatchObject({
|
|
77
|
-
workspacePanelParentKey:
|
|
78
|
-
activeWorkspacePanelKind:
|
|
77
|
+
workspacePanelParentKey: 'parent-session-1',
|
|
78
|
+
activeWorkspacePanelKind: 'overview',
|
|
79
|
+
workspacePanelHidden: true,
|
|
79
80
|
});
|
|
81
|
+
const history = useChatThreadStore.getState().snapshot.workspaceNavigationHistory;
|
|
82
|
+
manager.toggleWorkspacePanel('parent-session-1');
|
|
83
|
+
expect(useChatThreadStore.getState().snapshot.workspacePanelHidden).toBe(false);
|
|
84
|
+
expect(useChatThreadStore.getState().snapshot.workspaceNavigationHistory).toEqual(history);
|
|
80
85
|
});
|
|
81
86
|
|
|
82
87
|
it('opens project files for a draft without exposing session-only pages', () => {
|