@nextclaw/ui 0.25.4 → 0.26.1
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 +61 -0
- package/dist/.vite/manifest.json +1158 -1392
- package/dist/assets/{abnfDiagram-VRR7QNED-DX_u5BBX.js → abnfDiagram-VRR7QNED-Dcw10Yt1.js} +1 -1
- package/dist/assets/account-panel-ZM2qzKF4.js +1 -0
- package/dist/assets/{aiden0z-pptx-renderer.es-C-E9e5yB.js → aiden0z-pptx-renderer.es--oNqetPA.js} +1 -1
- package/dist/assets/api-Cjq-o1VN.js +20 -0
- package/dist/assets/app-presenter-provider-C02YPoMr.js +124 -0
- package/dist/assets/appearance-settings-page-B4zouKzg.js +1 -0
- package/dist/assets/{arc-Cxwa624o.js → arc-DBRedCax.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-CvnC-LeA.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-D8mCj0H1.js → architectureDiagram-ZJ3FMSHR-Dufhtuv-.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-CbGC1IHl.js → blockDiagram-677ZJIJ3-BUk0vtJ7.js} +1 -1
- package/dist/assets/{book-open-xqEj1OLE.js → book-open-AteA89HX.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-BQhGC1Vc.js → c4Diagram-LMCZKHZV-CxDcVE9p.js} +1 -1
- package/dist/assets/card-BLXvBstA.js +1 -0
- package/dist/assets/channel-CpMstUPF.js +1 -0
- package/dist/assets/channels-list-page-fj8kMo-T.js +8 -0
- package/dist/assets/chunk-2Q5K7J3B-Djp3VF0s.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-B74ZZwYG.js → chunk-32BRIVSS-DSF3KElA.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-BvmxW_f_.js → chunk-52WLFC77-Costxzr3.js} +1 -1
- package/dist/assets/{chunk-5FCAYU7R-DQvBRnwL.js → chunk-5FCAYU7R-rhqzGGZo.js} +1 -1
- package/dist/assets/{chunk-5HE753X5-CDIH0_y3.js → chunk-5HE753X5-BsEsmIao.js} +1 -1
- package/dist/assets/{chunk-5JV3BV7I-CcevlKd-.js → chunk-5JV3BV7I-Dqw_DCoN.js} +1 -1
- package/dist/assets/{chunk-5TONJI2A-_3dxVdnY.js → chunk-5TONJI2A-Cft82fp8.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-pGO5vvo-.js → chunk-5VM5RSS4-DqNHn9Dl.js} +1 -1
- package/dist/assets/{chunk-7BUUIJ7U-DEKF5uAN.js → chunk-7BUUIJ7U-A5SBEMYY.js} +1 -1
- package/dist/assets/{chunk-BIQX33UG-CjBFgq2r.js → chunk-BIQX33UG-1Ng3mTrH.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-e_K9OGTz.js → chunk-C7G6YPKG-DRJEy8ZI.js} +1 -1
- package/dist/assets/{chunk-CQNSW5MT-C2IiHyHz.js → chunk-CQNSW5MT-Bydv_J3J.js} +1 -1
- package/dist/assets/{chunk-CYSBUYHQ-DCC6KmGp.js → chunk-CYSBUYHQ-HkMIg12u.js} +1 -1
- package/dist/assets/{chunk-EMLP6XTP-BYGgekQ0.js → chunk-EMLP6XTP-C5ndDvm3.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-FGcwuVsA.js → chunk-EX3LRPZG-DzeloZRo.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-CV3Ih_Os.js → chunk-FWX5IMBZ-n_2_CLTQ.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-CXpq_hfV.js → chunk-HOUHSVGY-kx_slvu3.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-CZIpjupq.js → chunk-ICXQ74PX-sQLMURqL.js} +1 -1
- package/dist/assets/{chunk-JG7HCLWE-CdgwBpW7.js → chunk-JG7HCLWE-CMUn5Elc.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BPjAZpOQ.js → chunk-JWPE2WC7-Cra3s-Uk.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-DbJDm8to.js → chunk-MOJQB5TN-umcrg5Bi.js} +1 -1
- package/dist/assets/{chunk-MOZMSUNE-BUa1fqKn.js → chunk-MOZMSUNE-BnljD1ig.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-CtnzLgRu.js → chunk-OGEWGWER-BXx5pQjU.js} +1 -1
- package/dist/assets/{chunk-OSBZ3O6U-fUgdpTUM.js → chunk-OSBZ3O6U-D-1qfdWu.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-CtDWZT9-.js → chunk-PUDLZKDR-DLzX78LC.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-BxnK2qxr.js → chunk-Q4XR5HBZ-DTK-rtW6.js} +1 -1
- package/dist/assets/{chunk-QBLGF6JB-CH4UKoCF.js → chunk-QBLGF6JB-CsFeIGfr.js} +1 -1
- package/dist/assets/{chunk-R7FJI6CG-BxwFoF1v.js → chunk-R7FJI6CG-4xNYUeng.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-DpHAmq7O.js → chunk-RYQCIY6F-DJiHiTE5.js} +1 -1
- package/dist/assets/{chunk-U6XO7XAA-BjH2VUHU.js → chunk-U6XO7XAA-BVYkauHz.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DKJZ3HGj.js → chunk-V7JOEXUC-BsazE8cS.js} +1 -1
- package/dist/assets/chunk-VAUOI2AC-BrbiIC1Q.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-Cf-o2GtI.js → chunk-VR4S4FIN-7RoZQffO.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-zeNXGm20.js → chunk-WYO6CB5R-DEuS6N1R.js} +3 -3
- package/dist/assets/chunk-XXDRQBXY-Cx9N40wF.js +1 -0
- package/dist/assets/{chunk-YOTPTUD7-Ck87Kqxe.js → chunk-YOTPTUD7-9KBrosZL.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-BbfK6Bfd.js → chunk-ZGVPDNZ5-IYgN9f5A.js} +1 -1
- package/dist/assets/{chunk-ZIRB5QZD-BDpzh4Yl.js → chunk-ZIRB5QZD-BUo0-zcp.js} +1 -1
- package/dist/assets/{circle-dashed-CU3yApvP.js → circle-dashed-LSYZTzM7.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-DFN1v3PQ.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-DRvglADa.js +1 -0
- package/dist/assets/client-DudCRJw4.js +1 -0
- package/dist/assets/config-split-page-G7Kt2BnV.js +1 -0
- package/dist/assets/confirm-dialog-DShT64F6.js +1 -0
- package/dist/assets/context-menu-rd7b_kVD.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CQfMxKCT.js → cose-bilkent-JH36ORCC-DhqbC1fR.js} +1 -1
- package/dist/assets/createLucideIcon-D7hvIHV-.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-DXUGnpJH.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-CxFTiC-p.js → cynefinDiagram-TSTJHNR4-C-TBRi5V.js} +1 -1
- package/dist/assets/{dagre-CaBNMcB1.js → dagre-CrgsRasE.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-S_7Hc7bI.js → dagre-VKFMJZFB-BmafJymp.js} +1 -1
- package/dist/assets/desktop-capabilities-page-CzqzFZUY.js +1 -0
- package/dist/assets/desktop-update-config-CgeQ0Ffo.js +1 -0
- package/dist/assets/{diagram-FQU43EPY-C7zENvFb.js → diagram-FQU43EPY-BoOMwa6D.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-DqYTCqZA.js → diagram-G47NLZAW-Le7N6Uym.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-BfSJtXRc.js → diagram-NH7WQ7WH-Fbpj3-MO.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CFO-j67H.js → diagram-OA4YK3LP-D3QuGGuu.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-DBQDbTaJ.js → diagram-WEI45ONY-Cxu1uiN6.js} +1 -1
- package/dist/assets/dialog-C7glmAQJ.js +5 -0
- package/dist/assets/doc-browser-context-BlhBAOLH.js +1 -0
- package/dist/assets/doc-browser-dBiR9Qi0.js +1 -0
- package/dist/assets/{docx-preview-B4-aDfvO.js → docx-preview-CkU2psnd.js} +1 -1
- package/dist/assets/download-BYgECE0n.js +1 -0
- package/dist/assets/{ebnfDiagram-CCIWWBDH-CfDNIXFN.js → ebnfDiagram-CCIWWBDH-CCAjuQM6.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-D95rFXMM.js → erDiagram-Q63AITRT-BuzUAq-d.js} +1 -1
- package/dist/assets/es2015-CsjAAQ6X.js +41 -0
- package/dist/assets/eventmodeling-45OFAUF4-ZBfVS3ZC.js +1 -0
- package/dist/assets/extensions-qYL-NpL3.js +1 -0
- package/dist/assets/{eye-C84inPcV.js → eye-BBuTzJ53.js} +1 -1
- package/dist/assets/flowDiagram-23GEKE2U-CqdsKk6x.js +1 -0
- package/dist/assets/form-actions-CLGWO52v.js +1 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-Bawg0P0r.js → ganttDiagram-NO4QXBWP-cJmWVY8F.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-fHYFd9Es.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-BbKh9nbL.js → gitGraphDiagram-IHSO6WYX-F58o-vtP.js} +1 -1
- package/dist/assets/{i18n-20rSH40D.js → i18n-qBGEbcW6.js} +2 -2
- package/dist/assets/info-DKCQHKI2-CSaOL_bb.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-DPffZXYh.js → infoDiagram-FWYZ7A6U-Gt59b83C.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-CBMsLwZ2.js → ishikawaDiagram-FXEZZL3T-1u4IAj1I.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-Mz5U4OzU.js → journeyDiagram-5HDEW3XC-CCQsfV-5.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-FXZq2k19.js → kanban-definition-HUTT4EX6-vlB6O_Zn.js} +1 -1
- package/dist/assets/katex-B4FQSo9k.js +1 -0
- package/dist/assets/keyboard-shortcuts-settings-page-B-wK_6zG.js +1 -0
- package/dist/assets/{line-BZwCgT9K.js → line-D_bHubTL.js} +1 -1
- package/dist/assets/{linear-CTe9mKUw.js → linear-ChlwuS5y.js} +1 -1
- package/dist/assets/loader-circle-BA7EMkih.js +1 -0
- package/dist/assets/login-page-Cd84lpVV.js +1 -0
- package/dist/assets/login-page-VdMyNkFf.js +1 -0
- package/dist/assets/main-CR0SrTBf.js +2 -0
- package/dist/assets/main-DXH6EdXI.css +1 -0
- package/dist/assets/main-i18n-catalog.config-Btp_OowF.js +1 -0
- package/dist/assets/{map-Ci48ZwAp.js → map-oGHTsIu8.js} +1 -1
- package/dist/assets/mcp-marketplace-page-jacRwiI-.js +1 -0
- package/dist/assets/{mermaid-parser.core-CzPD3U_z.js → mermaid-parser.core-CuRe1ZG4.js} +2 -2
- package/dist/assets/{mermaid.core-geIMNPbV.js → mermaid.core-u4YCFKRf.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-xqlKxsr_.js → mindmap-definition-LN4V7U3C-DeJAQYTu.js} +1 -1
- package/dist/assets/model-config-page-D0DQlSDa.js +1 -0
- package/dist/assets/navigation-history-CzErJuPG.js +1 -0
- package/dist/assets/navigation-link-32iM1-e6.js +3 -0
- package/dist/assets/{ordinal-MxnX8yhv.js → ordinal-C6JFfkKN.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-D-YFTczs.js +1 -0
- package/dist/assets/panel-app-CC0bVSu4.js +1 -0
- package/dist/assets/panel-app-i18n-catalog.config-LUSBp5Ce.js +1 -0
- package/dist/assets/panelStandalone-C9EKaApN.js +2 -0
- package/dist/assets/{pegDiagram-2B236MQR-D50MFTN1.js → pegDiagram-2B236MQR-nVMkxShH.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-VEnYu9s5.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-CpA13oiC.js → pieDiagram-ENE6RG2P-8aUH44QZ.js} +1 -1
- package/dist/assets/privacy-settings-page-Bxxx12OO.js +1 -0
- package/dist/assets/projects-D56yAPNT.js +1 -0
- package/dist/assets/provider-models-C3frdXeW.js +1 -0
- package/dist/assets/provider-scoped-model-input-CYetrPYZ.js +1 -0
- package/dist/assets/providers-config-page-DESB1h8g.js +1 -0
- package/dist/assets/{puzzle-D6gulz7u.js → puzzle-CWHfFyYN.js} +1 -1
- package/dist/assets/pwa-CiGUjpcd.js +1 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-CYCgaj4l.js → quadrantDiagram-ABIIQ3AL-EY8hpFv8.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-BFNIekC1.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-lVqJ3Hak.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-DYaefdFC.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-CTAk6lVq.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-Cob294tg.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-4LKDGlXN.js → railroadDiagram-RFXS5EU6-CNhcIeji.js} +1 -1
- package/dist/assets/{refresh-cw-h9Xq3LY3.js → refresh-cw-y3L6PyLt.js} +1 -1
- package/dist/assets/remote-DiGFV8nP.js +1 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-CxNOU0JH.js → requirementDiagram-TGXJPOKE-D8Dcs-Rt.js} +1 -1
- package/dist/assets/{rotate-cw-B6xm41Wn.js → rotate-cw-CNE9qSHi.js} +1 -1
- package/dist/assets/runtime-config-page-5o98T-TD.js +1 -0
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DbCBDe2S.js → sankeyDiagram-HTMAVEWB-HTrb6aa-.js} +1 -1
- package/dist/assets/{save-fff_WpY2.js → save-B0p5a0ET.js} +1 -1
- package/dist/assets/search-config-page-CpGcnIzi.js +1 -0
- package/dist/assets/secrets-config-page-C4VTiW3r.js +3 -0
- package/dist/assets/security-config-C5-RQVpS.js +1 -0
- package/dist/assets/select-CctTN205.js +1 -0
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-DA6W2BS_.js → sequenceDiagram-DBY2YBRQ-6f_4X16Y.js} +1 -1
- package/dist/assets/service-apps-panel-CKE5HKNY.js +1 -0
- package/dist/assets/{settings-2-CE3ELQyk.js → settings-2-EPflrNk6.js} +1 -1
- package/dist/assets/{sizeCapture-X5ZJPWSS-T_q_d_VW.js → sizeCapture-X5ZJPWSS-Ck9rsuwL.js} +1 -1
- package/dist/assets/{src-CYpUlx-4.js → src-C8AUg09O.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-mi8z2G0a.js → stateDiagram-2N3HPSRC-Cm33MLHu.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BrNv-raG.js +1 -0
- package/dist/assets/status-dot-CensgJZC.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-DkBEhWE4.js → swimlanes-5IMT3BWC-B107vmvM.js} +2 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-ntcxaPXp.js +8 -0
- package/dist/assets/tag-chip-Bjzb4-qW.js +1 -0
- package/dist/assets/theme-provider-hlle7Skk.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-BoFmqBw1.js → timeline-definition-FHXFAJF6-CJEoAj33.js} +1 -1
- package/dist/assets/trash-2-C5KH5Rw9.js +1 -0
- package/dist/assets/treeView-QDETBFTQ-DbFmr-gw.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-C8aY96pi.js +1 -0
- package/dist/assets/use-config-CPl_F79t.js +1 -0
- package/dist/assets/use-desktop-capabilities-CEg9-DrQ.js +1 -0
- package/dist/assets/use-viewport-layout-CPZUmTPi.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-BlZ3Or5U.js → vennDiagram-L72KCM5P-DzsUHk5I.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-D8d6DbbJ.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-yDfr33i3.js → wardleyDiagram-EHGQE667-1NfFs5ua.js} +1 -1
- package/dist/assets/x--xxUvHKW.js +1 -0
- package/dist/assets/{xychartDiagram-FW5EYKEG-mIXwIGAQ.js → xychartDiagram-FW5EYKEG-Ci8AI3Qo.js} +1 -1
- package/dist/index.html +38 -54
- package/dist/panel-standalone.html +11 -15
- package/package.json +8 -8
- package/src/app/components/layout/__tests__/app-layout.test.tsx +7 -0
- package/src/app/components/layout/__tests__/sidebar.layout.test.tsx +36 -16
- package/src/app/components/layout/app-layout.tsx +18 -46
- package/src/app/components/layout/sidebar-items.tsx +27 -18
- package/src/app/components/layout/sidebar-rail.styles.ts +11 -2
- package/src/app/components/layout/sidebar.tsx +3 -2
- package/src/app/configs/__tests__/app-navigation.config.test.ts +4 -0
- package/src/app/configs/app-navigation.config.ts +41 -86
- package/src/app/configs/page-resource-renderers.config.ts +13 -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 +5 -2
- package/src/features/agents/components/agents-page.tsx +9 -4
- 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 +5 -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 +31 -64
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +8 -5
- 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/chat-voice-input-panel.tsx +3 -2
- 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/__tests__/use-chat-voice-input.test.tsx +4 -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 +35 -47
- package/src/features/chat/features/message/components/chat-message-list.container.tsx +6 -10
- package/src/features/chat/features/message/hooks/use-chat-inline-token-actions.ts +7 -3
- package/src/features/chat/features/message/utils/__tests__/chat-message-process-summary.utils.test.ts +52 -6
- package/src/features/chat/features/message/utils/chat-message-process-summary.utils.ts +22 -37
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-project-groups.test.tsx +1 -1
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-session-item.test.tsx +21 -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 +4 -37
- 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 +18 -7
- 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 +10 -2
- package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +20 -17
- package/src/features/chat/features/session/components/session-header/chat-session-header-menu-item.tsx +4 -4
- package/src/features/chat/features/session/components/session-header/chat-session-more-actions-menu.tsx +18 -5
- 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/chat-voice-input.manager.ts +5 -3
- 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-thread.store.ts +7 -1
- package/src/features/chat/stores/floating-session.store.ts +11 -0
- package/src/features/chat/utils/chat-voice-permissions.utils.test.ts +12 -1
- package/src/features/chat/utils/chat-voice-permissions.utils.ts +6 -1
- 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 +14 -8
- package/src/features/inbox/components/inbox-reader-dialog.test.tsx +3 -0
- package/src/features/inbox/components/inbox-reader-dialog.tsx +6 -1
- package/src/features/inbox/pages/inbox-page.test.ts +3 -0
- package/src/features/inbox/pages/inbox-page.tsx +12 -4
- 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 +13 -4
- package/src/features/panel-apps/components/__tests__/panel-app-toolbar.test.tsx +13 -5
- package/src/features/panel-apps/components/panel-app-list-item.tsx +1 -1
- package/src/features/panel-apps/components/panel-app-main-sidebar-menu-item.tsx +5 -38
- package/src/features/panel-apps/components/panel-app-toolbar.tsx +7 -7
- 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 +183 -0
- package/src/features/right-panel-resources/components/__tests__/system-object-resource.test.tsx +42 -0
- package/src/features/right-panel-resources/components/page-resource-actions-menu.tsx +53 -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 +119 -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 +190 -0
- package/src/features/right-panel-resources/index.ts +21 -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 +6 -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/features/system-status/components/__tests__/desktop-update-config.test.tsx +40 -0
- package/src/features/system-status/components/desktop-update-config.tsx +19 -1
- package/src/platforms/desktop/components/__tests__/desktop-app-shell.test.tsx +2 -0
- package/src/platforms/desktop/components/desktop-app-shell.tsx +3 -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 +3 -4
- package/src/platforms/mobile/components/mobile-bottom-nav.tsx +7 -7
- package/src/platforms/mobile/components/mobile-settings-shell.tsx +8 -3
- 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 +105 -1
- package/src/shared/components/ui/context-menu/context-menu-items.tsx +173 -0
- package/src/shared/components/ui/context-menu/context-menu.tsx +99 -112
- package/src/shared/components/ui/dialog.tsx +4 -0
- package/src/shared/components/ui/overlays/sheet.tsx +4 -0
- package/src/shared/components/ui/popover.tsx +10 -4
- 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 +46 -1
- package/src/shared/lib/i18n/locales/en-US/core.json +3 -1
- package/src/shared/lib/i18n/locales/en-US/desktop-update.json +1 -0
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +1 -1
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +46 -1
- package/src/shared/lib/i18n/locales/zh-CN/core.json +11 -9
- package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +1 -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/transport/__tests__/browser-realtime-recovery.service.test.ts +27 -2
- package/src/shared/lib/transport/__tests__/local-transport.service.test.ts +20 -0
- package/src/shared/lib/transport/__tests__/remote.transport.test.ts +26 -0
- package/src/shared/lib/transport/browser-realtime-recovery.service.ts +32 -5
- package/src/shared/lib/transport/local-transport.service.ts +1 -6
- package/src/shared/lib/transport/remote-transport.service.ts +22 -1
- package/src/shared/lib/ui-document-title/index.ts +1 -0
- package/dist/assets/account-panel-BW4GbzQd.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-CBZ_-ewx.js +0 -115
- package/dist/assets/appearance-settings-page-C-uZ2Wkf.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-CScSXYS4.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-DMNmwcJE.js +0 -2
- package/dist/assets/main-i18n-catalog.config-DZ-5ollN.js +0 -1
- 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-B39rJPj8.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-Voql-cvx.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-CzqfYjFx.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-BekqL5nA.js +0 -1
- package/dist/assets/runtime-config-page-BH9uF4u_.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-desktop-capabilities-BkuRd2cY.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-BV9OtnO8.js} +0 -0
- /package/dist/assets/{chunk-KEIR6QF5-CuZFOa6q.js → chunk-KEIR6QF5-Cx-8EJ4_.js} +0 -0
- /package/dist/assets/{chunk-Y2CYZVJY-Frut-1TF.js → chunk-Y2CYZVJY-Dy1ufvjf.js} +0 -0
- /package/dist/assets/{config-hints-B_C9DAp5.js → config-hints-DbmiyTKg.js} +0 -0
- /package/dist/assets/{cytoscape.esm-BibuhnZD.js → cytoscape.esm-CSCjuT4Z.js} +0 -0
- /package/dist/assets/{defaultLocale-q7sRUXPc.js → defaultLocale-DWTiNsbT.js} +0 -0
- /package/dist/assets/{dist-DhMddrrH.js → dist-BVCSkfWY.js} +0 -0
- /package/dist/assets/{graphlib-BM63WsW3.js → graphlib-B1yb1Wl8.js} +0 -0
- /package/dist/assets/{host-capabilities-B107nwS3.js → host-capabilities-DuIFVsvM.js} +0 -0
- /package/dist/assets/{init-CRMkf9sL.js → init-BF6GH5oe.js} +0 -0
- /package/dist/assets/{jszip.min-6thm2J_a.js → jszip.min-D12teKzP.js} +0 -0
- /package/dist/assets/{katex-B26hhTOT.js → katex-CsAM73R9.js} +0 -0
- /package/dist/assets/{middleware-0o3JF3tS.js → middleware-B--6mAUM.js} +0 -0
- /package/dist/assets/{path-BFMmafCM.js → path-C56XkznJ.js} +0 -0
- /package/dist/assets/{rough.esm-5Tjchx1D.js → rough.esm-CGfeEbtE.js} +0 -0
- /package/dist/assets/{xlsx-BC8ibjXK.js → xlsx-sds5nUpL.js} +0 -0
|
@@ -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', () => {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { WorkbenchSurfaceManager } from '@/shared/components/workbench/managers/workbench-surface.manager';
|
|
2
|
+
import { beforeEach, expect, it } from 'vitest';
|
|
3
|
+
import { sessionSurfaceManager } from '@/features/chat/managers/session-surface.manager';
|
|
4
|
+
import { useFloatingSessionStore } from '@/features/chat/stores/floating-session.store';
|
|
5
|
+
import { useDocBrowserStore } from '@/shared/components/doc-browser/stores/doc-browser.store';
|
|
6
|
+
import { DocBrowserManager } from '@/shared/components/doc-browser/managers/doc-browser.manager';
|
|
7
|
+
import { createDefaultDocBrowserState } from '@/shared/components/doc-browser/utils/doc-browser-state.utils';
|
|
8
|
+
import { RightPanelResourceRouteResolver } from '@/features/right-panel-resources';
|
|
9
|
+
import { parseSessionKeyFromPanelUrl } from '@/features/chat/features/session/utils/chat-session-route.utils';
|
|
10
|
+
|
|
11
|
+
const docBrowser = new DocBrowserManager(new WorkbenchSurfaceManager(), new RightPanelResourceRouteResolver());
|
|
12
|
+
const session = { sessionKey: 'session:中文/path', title: 'Review' };
|
|
13
|
+
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
sessionSurfaceManager.close();
|
|
16
|
+
useDocBrowserStore.getState().setSnapshot(createDefaultDocBrowserState());
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('docks and deduplicates a session without replacing unrelated tabs', () => {
|
|
20
|
+
docBrowser.open('nextclaw://apps', { newTab: true });
|
|
21
|
+
const existingIds = useDocBrowserStore.getState().snapshot.tabs.map(tab => tab.id);
|
|
22
|
+
docBrowser.toggleMode();
|
|
23
|
+
sessionSurfaceManager.open(session);
|
|
24
|
+
sessionSurfaceManager.dock(session, docBrowser);
|
|
25
|
+
const state = useDocBrowserStore.getState().snapshot;
|
|
26
|
+
const tab = state.tabs.find(item => item.id === state.activeTabId)!;
|
|
27
|
+
expect(new WorkbenchSurfaceManager().get('global-resources').placement).toBe('docked');
|
|
28
|
+
expect(state.isOpen).toBe(true);
|
|
29
|
+
expect(tab.kind).toBe('chat-session');
|
|
30
|
+
expect(tab.title).toBe(session.title);
|
|
31
|
+
expect(parseSessionKeyFromPanelUrl(tab.currentUrl)).toBe(session.sessionKey);
|
|
32
|
+
expect(state.tabs.map(item => item.id)).toEqual(expect.arrayContaining(existingIds));
|
|
33
|
+
expect(useFloatingSessionStore.getState().session).toBeNull();
|
|
34
|
+
sessionSurfaceManager.dock(session, docBrowser);
|
|
35
|
+
expect(useDocBrowserStore.getState().snapshot.tabs).toHaveLength(state.tabs.length);
|
|
36
|
+
sessionSurfaceManager.popOut(tab, docBrowser);
|
|
37
|
+
expect(useFloatingSessionStore.getState().session).toEqual(session);
|
|
38
|
+
expect(useDocBrowserStore.getState().snapshot.tabs.map(item => item.id)).toEqual(existingIds);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('keeps an unrelated floating session when docking another session', () => {
|
|
42
|
+
sessionSurfaceManager.open(session);
|
|
43
|
+
sessionSurfaceManager.dock({ sessionKey: 'other', title: 'Other' }, docBrowser);
|
|
44
|
+
expect(useFloatingSessionStore.getState().session).toEqual(session);
|
|
45
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { sessionSurfaceManager } from '@/features/chat/managers/session-surface.manager';
|
|
1
2
|
import {
|
|
2
3
|
isHiddenNcpMessage,
|
|
3
4
|
NcpEventType,
|
|
@@ -146,6 +147,10 @@ export class ChatCompletionNotificationManager {
|
|
|
146
147
|
title,
|
|
147
148
|
description: preview || t("chatBackgroundReplyFallbackPreview"),
|
|
148
149
|
href: buildSessionPath(sessionId),
|
|
150
|
+
action: {
|
|
151
|
+
label: t('chatFloatingExpand'),
|
|
152
|
+
onClick: () => sessionSurfaceManager.open({ sessionKey: sessionId, title }),
|
|
153
|
+
},
|
|
149
154
|
ariaLabel: t("chatBackgroundReplyOpenAriaLabel").replace("{title}", title),
|
|
150
155
|
});
|
|
151
156
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CHAT_CONVERSATION_EXCERPT_TOKEN_KIND,
|
|
3
3
|
CHAT_UI_RESOURCE_TOKEN_KIND,
|
|
4
|
+
CHAT_SYSTEM_OBJECT_TOKEN_KIND,
|
|
5
|
+
readSystemObjectResolvedReference,
|
|
6
|
+
type SystemObjectResolvedReference,
|
|
4
7
|
CHAT_WORKSPACE_DIRECTORY_TOKEN_KIND,
|
|
5
8
|
CHAT_WORKSPACE_EXCERPT_TOKEN_KIND,
|
|
6
9
|
CHAT_WORKSPACE_FILE_TOKEN_KIND,
|
|
@@ -43,7 +46,13 @@ export type ChatComposerUiResourceReferenceIntent = ChatComposerReferenceIntentB
|
|
|
43
46
|
reference: ChatUiResourceReference;
|
|
44
47
|
};
|
|
45
48
|
|
|
49
|
+
export type ChatComposerSystemObjectReferenceIntent = ChatComposerReferenceIntentBase & {
|
|
50
|
+
kind: typeof CHAT_SYSTEM_OBJECT_TOKEN_KIND;
|
|
51
|
+
reference: SystemObjectResolvedReference;
|
|
52
|
+
};
|
|
53
|
+
|
|
46
54
|
export type ChatComposerReferenceIntent =
|
|
55
|
+
| ChatComposerSystemObjectReferenceIntent
|
|
47
56
|
| ChatComposerFileReferenceIntent
|
|
48
57
|
| ChatComposerDirectoryReferenceIntent
|
|
49
58
|
| ChatComposerExcerptReferenceIntent
|
|
@@ -51,6 +60,7 @@ export type ChatComposerReferenceIntent =
|
|
|
51
60
|
| ChatComposerUiResourceReferenceIntent;
|
|
52
61
|
|
|
53
62
|
type ChatComposerReferenceRequest =
|
|
63
|
+
| Omit<ChatComposerSystemObjectReferenceIntent, 'id'>
|
|
54
64
|
| Omit<ChatComposerFileReferenceIntent, 'id'>
|
|
55
65
|
| Omit<ChatComposerDirectoryReferenceIntent, 'id'>
|
|
56
66
|
| Omit<ChatComposerExcerptReferenceIntent, 'id'>
|
|
@@ -179,6 +189,12 @@ export class ChatComposerIntentManager {
|
|
|
179
189
|
});
|
|
180
190
|
};
|
|
181
191
|
|
|
192
|
+
requestSystemObjectReference = (params: { targetSessionKey: string | null; reference: SystemObjectResolvedReference }) => {
|
|
193
|
+
const reference = readSystemObjectResolvedReference(params.reference);
|
|
194
|
+
if (!reference) return;
|
|
195
|
+
this.publish({ kind: CHAT_SYSTEM_OBJECT_TOKEN_KIND, targetSessionKey: params.targetSessionKey, tokenKey: reference.uri, label: reference.label, reference });
|
|
196
|
+
};
|
|
197
|
+
|
|
182
198
|
requestUiResourceReference = (params: {
|
|
183
199
|
targetSessionKey: string | null;
|
|
184
200
|
reference: ChatUiResourceReference;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DocBrowserManager } from '@/shared/components/doc-browser/managers/doc-browser.manager';
|
|
2
|
+
import { createWorkspaceFilePanelTarget, type WorkspaceFileViewContext } from '@/features/chat/features/workspace/utils/workspace-file-panel-route.utils';
|
|
1
3
|
import { appQueryClient } from '@/app-query-client';
|
|
2
4
|
import { deleteNcpSession as deleteNcpSessionApi, deleteNcpSessionSummaryInQueryClient } from '@/shared/lib/api';
|
|
3
5
|
import { toast } from 'sonner';
|
|
@@ -40,6 +42,7 @@ import {
|
|
|
40
42
|
} from '@/features/chat/features/workspace/utils/chat-workspace-file-viewer.utils';
|
|
41
43
|
import {
|
|
42
44
|
createWorkspaceFileTab,
|
|
45
|
+
createWorkspaceFileViewerTab,
|
|
43
46
|
upsertWorkspaceFileTab,
|
|
44
47
|
} from '@/features/chat/features/workspace/utils/chat-workspace-file-tab.utils';
|
|
45
48
|
import {
|
|
@@ -148,13 +151,14 @@ export class ChatThreadManager {
|
|
|
148
151
|
);
|
|
149
152
|
useChatThreadStore.getState().setSnapshot({
|
|
150
153
|
...patch,
|
|
154
|
+
workspacePanelHidden: false,
|
|
151
155
|
closedWorkspaceTabEntries,
|
|
152
156
|
workspaceNavigationHistory: [...history.entries],
|
|
153
157
|
workspaceNavigationHistoryIndex: history.index,
|
|
154
158
|
});
|
|
155
159
|
};
|
|
156
160
|
|
|
157
|
-
|
|
161
|
+
openWorkspacePage = (
|
|
158
162
|
rawParentSessionKey: string | null,
|
|
159
163
|
kind: 'overview' | 'child-sessions' | 'project-files' | 'cron' | 'continuous-attention',
|
|
160
164
|
) => {
|
|
@@ -184,7 +188,10 @@ export class ChatThreadManager {
|
|
|
184
188
|
const normalizedSessionKey = sessionKey?.trim() || null;
|
|
185
189
|
const { snapshot } = useChatThreadStore.getState();
|
|
186
190
|
if (snapshot.workspacePanelParentKey === normalizedSessionKey && snapshot.activeWorkspacePanelKind) {
|
|
187
|
-
|
|
191
|
+
if (snapshot.workspacePanelHidden) {
|
|
192
|
+
useChatThreadStore.getState().setSnapshot({ workspacePanelHidden: false });
|
|
193
|
+
this.onWorkspacePanelOpened?.();
|
|
194
|
+
} else this.closeWorkspacePanel();
|
|
188
195
|
return;
|
|
189
196
|
}
|
|
190
197
|
if (normalizedSessionKey) {
|
|
@@ -327,6 +334,13 @@ export class ChatThreadManager {
|
|
|
327
334
|
this.activateWorkspaceFileTab(nextTab);
|
|
328
335
|
};
|
|
329
336
|
|
|
337
|
+
moveFileToGlobal = (fileKey: string, context: WorkspaceFileViewContext, docBrowser: DocBrowserManager): void => {
|
|
338
|
+
const file = useChatThreadStore.getState().snapshot.workspaceFileTabs.find((item) => item.key === fileKey);
|
|
339
|
+
if (!file) return;
|
|
340
|
+
docBrowser.openTarget(createWorkspaceFilePanelTarget(file, context), { newTab: true, placement: 'docked' });
|
|
341
|
+
this.closeWorkspaceTab({ kind: 'file', key: file.key });
|
|
342
|
+
};
|
|
343
|
+
|
|
330
344
|
openWorkspaceFileViewer = (fileKey: string, viewer?: ChatWorkspaceFileViewer) => {
|
|
331
345
|
const sourceTab = useChatThreadStore
|
|
332
346
|
.getState()
|
|
@@ -338,21 +352,7 @@ export class ChatThreadManager {
|
|
|
338
352
|
if (!nextViewer) {
|
|
339
353
|
return;
|
|
340
354
|
}
|
|
341
|
-
const nextTab =
|
|
342
|
-
{
|
|
343
|
-
path: sourceTab.path,
|
|
344
|
-
label: sourceTab.label ?? undefined,
|
|
345
|
-
viewMode: 'preview',
|
|
346
|
-
previewViewer: nextViewer,
|
|
347
|
-
line: sourceTab.line ?? undefined,
|
|
348
|
-
column: sourceTab.column ?? undefined,
|
|
349
|
-
params: sourceTab.params ?? undefined,
|
|
350
|
-
rawText: sourceTab.rawText ?? undefined,
|
|
351
|
-
contentUrl: sourceTab.contentUrl ?? undefined,
|
|
352
|
-
mimeType: sourceTab.mimeType ?? undefined,
|
|
353
|
-
},
|
|
354
|
-
sourceTab.parentSessionKey,
|
|
355
|
-
);
|
|
355
|
+
const nextTab = createWorkspaceFileViewerTab(sourceTab, nextViewer);
|
|
356
356
|
if (nextTab) {
|
|
357
357
|
this.activateWorkspaceFileTab(nextTab, sourceTab.key);
|
|
358
358
|
}
|
|
@@ -486,16 +486,7 @@ export class ChatThreadManager {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
closeWorkspacePanel = () => {
|
|
489
|
-
useChatThreadStore.getState().setSnapshot({
|
|
490
|
-
workspacePanelParentKey: null,
|
|
491
|
-
activeWorkspacePanelKind: null,
|
|
492
|
-
activeChildSessionKey: null,
|
|
493
|
-
activeSideChatDraft: null,
|
|
494
|
-
activeWorkspaceFileKey: null,
|
|
495
|
-
closedWorkspaceTabEntries: [],
|
|
496
|
-
workspaceNavigationHistory: [],
|
|
497
|
-
workspaceNavigationHistoryIndex: 0,
|
|
498
|
-
});
|
|
489
|
+
useChatThreadStore.getState().setSnapshot({ workspacePanelHidden: true });
|
|
499
490
|
};
|
|
500
491
|
|
|
501
492
|
openSessionCronPanel = (sessionKey: string) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ChatComposerDictationSession } from '@nextclaw/agent-chat-ui';
|
|
2
|
-
import { checkMicrophoneAccess, classifyMicrophoneError } from '@/features/chat/utils/chat-voice-permissions.utils';
|
|
2
|
+
import { checkMicrophoneAccess, classifyMicrophoneError, isMicrophoneSecureContext } from '@/features/chat/utils/chat-voice-permissions.utils';
|
|
3
3
|
|
|
4
4
|
export type VoicePhase = 'idle' | 'ready' | 'starting' | 'recording' | 'stopping' | 'error';
|
|
5
|
-
export type VoiceError = 'unsupported' | 'permission' | 'service-denied' | 'no-device' | 'device-busy' | 'network' | 'audio-capture' | 'no-speech' | 'interrupted' | 'timeout' | 'failed';
|
|
5
|
+
export type VoiceError = 'insecure-context' | 'unsupported' | 'permission' | 'service-denied' | 'no-device' | 'device-busy' | 'network' | 'audio-capture' | 'no-speech' | 'interrupted' | 'timeout' | 'failed';
|
|
6
6
|
export type VoiceSnapshot = { phase: VoicePhase; text: string; interim: string; seconds: number; error: VoiceError | null };
|
|
7
7
|
export type SpeechRecognitionLike = {
|
|
8
8
|
lang: string;
|
|
@@ -38,7 +38,8 @@ export class ChatVoiceInputManager {
|
|
|
38
38
|
private draft: ChatComposerDictationSession | null = null;
|
|
39
39
|
|
|
40
40
|
constructor(private readonly createRecognition = createBrowserRecognition,
|
|
41
|
-
private readonly checkMicrophone = checkMicrophoneAccess
|
|
41
|
+
private readonly checkMicrophone = checkMicrophoneAccess,
|
|
42
|
+
private readonly isSecureContext = isMicrophoneSecureContext) {}
|
|
42
43
|
|
|
43
44
|
getSnapshot = (): VoiceSnapshot => this.snapshot;
|
|
44
45
|
subscribe = (listener: () => void): (() => void) => {
|
|
@@ -70,6 +71,7 @@ export class ChatVoiceInputManager {
|
|
|
70
71
|
this.draft = draft;
|
|
71
72
|
this.update({ ...initialSnapshot(), phase: 'starting' });
|
|
72
73
|
try {
|
|
74
|
+
if (!this.isSecureContext()) { this.fail('insecure-context'); return; }
|
|
73
75
|
const recognition = this.createRecognition();
|
|
74
76
|
if (!recognition) { this.fail('unsupported'); return; }
|
|
75
77
|
this.recognition = recognition;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { workbenchSurfaceManager } from '@/shared/components/workbench/managers/workbench-surface.manager';
|
|
2
|
+
import { GLOBAL_WORKBENCH_SURFACE, SESSION_WORKBENCH_SURFACE } from '@/shared/components/workbench/types/workbench-surface.types';
|
|
3
|
+
import { useFloatingSessionStore, type FloatingSession } from '@/features/chat/stores/floating-session.store';
|
|
4
|
+
import type { DocBrowserManager } from '@/shared/components/doc-browser/managers/doc-browser.manager';
|
|
5
|
+
import type { DocBrowserTab } from '@/shared/components/doc-browser/types/doc-browser.types';
|
|
6
|
+
import { buildSessionPanelUrl, CHAT_SESSION_PANEL_KIND, parseSessionKeyFromPanelUrl } from '@/features/chat/features/session/utils/chat-session-route.utils';
|
|
7
|
+
|
|
8
|
+
class SessionSurfaceManager {
|
|
9
|
+
open = (session: FloatingSession): void => {
|
|
10
|
+
useFloatingSessionStore.setState({ session });
|
|
11
|
+
workbenchSurfaceManager.place(SESSION_WORKBENCH_SURFACE, 'floating');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
minimize = (): void => {
|
|
15
|
+
workbenchSurfaceManager.minimize(SESSION_WORKBENCH_SURFACE);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
restore = (): void => {
|
|
19
|
+
workbenchSurfaceManager.restore(SESSION_WORKBENCH_SURFACE);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
close = (): void => {
|
|
23
|
+
useFloatingSessionStore.setState({ session: null });
|
|
24
|
+
workbenchSurfaceManager.place(SESSION_WORKBENCH_SURFACE, 'floating');
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
dock = (session: FloatingSession, docBrowser: DocBrowserManager): void => {
|
|
28
|
+
workbenchSurfaceManager.place(GLOBAL_WORKBENCH_SURFACE, 'docked');
|
|
29
|
+
docBrowser.open(buildSessionPanelUrl(session.sessionKey), {
|
|
30
|
+
kind: CHAT_SESSION_PANEL_KIND,
|
|
31
|
+
title: session.title,
|
|
32
|
+
newTab: true,
|
|
33
|
+
dedupeKey: buildSessionPanelUrl(session.sessionKey),
|
|
34
|
+
});
|
|
35
|
+
if (useFloatingSessionStore.getState().session?.sessionKey === session.sessionKey) this.close();
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
popOut = (tab: DocBrowserTab, docBrowser: DocBrowserManager): void => {
|
|
39
|
+
const sessionKey = parseSessionKeyFromPanelUrl(tab.currentUrl);
|
|
40
|
+
if (!sessionKey) return;
|
|
41
|
+
this.open({ sessionKey, title: tab.title });
|
|
42
|
+
docBrowser.closeTab(tab.id);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const sessionSurfaceManager = new SessionSurfaceManager();
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { sessionSurfaceManager } from '@/features/chat/managers/session-surface.manager';
|
|
1
2
|
import { act, render, screen, waitFor } from '@testing-library/react';
|
|
2
3
|
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
|
3
4
|
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
4
5
|
|
|
5
6
|
import { AppPresenterProvider } from '@/app/components/app-presenter-provider';
|
|
7
|
+
import { ChatRuntimeProvider } from '@/features/chat/components/providers/chat-runtime.provider';
|
|
6
8
|
import { NcpChatPage } from '@/features/chat/pages/ncp-chat-page';
|
|
7
9
|
import { buildSessionPath } from '@/features/chat/features/session/utils/chat-session-route.utils';
|
|
8
10
|
import { useChatThreadStore } from '@/features/chat/stores/chat-thread.store';
|
|
@@ -19,6 +21,7 @@ const mocks = vi.hoisted(() => ({
|
|
|
19
21
|
vi.mock('@/app/presenters/app.presenter', () => ({
|
|
20
22
|
getAppPresenter: () => ({
|
|
21
23
|
docBrowserManager: {},
|
|
24
|
+
pageResourceManager: { bindWorkspace: vi.fn() },
|
|
22
25
|
chatDraftIntentManager: {
|
|
23
26
|
consumePending: mocks.consumePending,
|
|
24
27
|
markConsumed: mocks.markConsumed,
|
|
@@ -56,8 +59,13 @@ vi.mock('@/features/chat/features/ncp/hooks/use-ui-show-content-event', () => ({
|
|
|
56
59
|
useUiShowContentEvent: () => undefined,
|
|
57
60
|
}));
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
vi.mock('@/features/chat/features/conversation/components/floating-session-conversation', () => ({
|
|
63
|
+
FloatingSessionConversation: () => null,
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
describe('Shared chat runtime and page boundary', () => {
|
|
60
67
|
beforeEach(() => {
|
|
68
|
+
sessionSurfaceManager.close();
|
|
61
69
|
mocks.syncVisibleSessions.mockReset();
|
|
62
70
|
mocks.useChatSessionSync.mockReset();
|
|
63
71
|
useChatThreadStore.getState().setSnapshot({
|
|
@@ -70,9 +78,9 @@ describe('NcpChatPage render boundary', () => {
|
|
|
70
78
|
it('creates its chat presenter from the global app presenter provider', () => {
|
|
71
79
|
render(
|
|
72
80
|
<MemoryRouter initialEntries={['/chat']}>
|
|
73
|
-
<AppPresenterProvider>
|
|
81
|
+
<AppPresenterProvider><ChatRuntimeProvider>
|
|
74
82
|
<NcpChatPage view="chat" />
|
|
75
|
-
</AppPresenterProvider>
|
|
83
|
+
</ChatRuntimeProvider></AppPresenterProvider>
|
|
76
84
|
</MemoryRouter>,
|
|
77
85
|
);
|
|
78
86
|
|
|
@@ -89,17 +97,19 @@ describe('NcpChatPage render boundary', () => {
|
|
|
89
97
|
});
|
|
90
98
|
const view = render(
|
|
91
99
|
<MemoryRouter initialEntries={[sessionPath]}>
|
|
92
|
-
<AppPresenterProvider>
|
|
100
|
+
<AppPresenterProvider><ChatRuntimeProvider>
|
|
93
101
|
<Routes>
|
|
94
102
|
<Route path="/chat/:sessionId?" element={<NcpChatPage view="chat" />} />
|
|
95
103
|
</Routes>
|
|
96
|
-
</AppPresenterProvider>
|
|
104
|
+
</ChatRuntimeProvider></AppPresenterProvider>
|
|
97
105
|
</MemoryRouter>,
|
|
98
106
|
);
|
|
99
107
|
|
|
100
108
|
expect(mocks.syncVisibleSessions).toHaveBeenCalledWith([
|
|
101
109
|
'session-background',
|
|
102
110
|
'session-child',
|
|
111
|
+
undefined,
|
|
112
|
+
null,
|
|
103
113
|
]);
|
|
104
114
|
|
|
105
115
|
act(() => {
|
|
@@ -111,9 +121,17 @@ describe('NcpChatPage render boundary', () => {
|
|
|
111
121
|
expect(mocks.syncVisibleSessions).toHaveBeenLastCalledWith([
|
|
112
122
|
'session-background',
|
|
113
123
|
null,
|
|
124
|
+
undefined,
|
|
125
|
+
null,
|
|
114
126
|
]);
|
|
115
127
|
});
|
|
116
128
|
|
|
129
|
+
act(() => {
|
|
130
|
+
sessionSurfaceManager.open({ sessionKey: 'session-float', title: 'Float' });
|
|
131
|
+
});
|
|
132
|
+
expect(mocks.syncVisibleSessions).toHaveBeenLastCalledWith(['session-background', null, 'session-float', null]);
|
|
133
|
+
act(() => sessionSurfaceManager.minimize());
|
|
134
|
+
expect(mocks.syncVisibleSessions).toHaveBeenLastCalledWith(['session-background', null, null, null]);
|
|
117
135
|
view.unmount();
|
|
118
136
|
expect(mocks.syncVisibleSessions).toHaveBeenLastCalledWith([]);
|
|
119
137
|
});
|