@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
package/src/features/chat/features/conversation/hooks/__tests__/use-chat-voice-input.test.tsx
CHANGED
|
@@ -201,6 +201,10 @@ describe('dictation lifecycle', () => {
|
|
|
201
201
|
expect(manager.getSnapshot().error).toBe('timeout');
|
|
202
202
|
});
|
|
203
203
|
it('handles unsupported APIs and thrown starts', async () => {
|
|
204
|
+
const insecure = new ChatVoiceInputManager(() => recognition, async () => null, () => false);
|
|
205
|
+
insecure.start('en', 'one', draft);
|
|
206
|
+
expect(insecure.getSnapshot().error).toBe('insecure-context');
|
|
207
|
+
expect(recognition.start).not.toHaveBeenCalled();
|
|
204
208
|
const unsupported = new ChatVoiceInputManager(() => null);
|
|
205
209
|
unsupported.start('en', 'one', draft);
|
|
206
210
|
expect(unsupported.getSnapshot().error).toBe('unsupported');
|
|
@@ -3,6 +3,7 @@ import { type ChatInputBarHandle } from '@nextclaw/agent-chat-ui';
|
|
|
3
3
|
import {
|
|
4
4
|
CHAT_CONVERSATION_EXCERPT_TOKEN_KIND,
|
|
5
5
|
CHAT_UI_RESOURCE_TOKEN_KIND,
|
|
6
|
+
CHAT_SYSTEM_OBJECT_TOKEN_KIND,
|
|
6
7
|
CHAT_WORKSPACE_EXCERPT_TOKEN_KIND,
|
|
7
8
|
} from '@nextclaw/shared';
|
|
8
9
|
|
|
@@ -42,7 +43,7 @@ export function useChatComposerReferenceIntent(params: {
|
|
|
42
43
|
role: intent.role,
|
|
43
44
|
excerpt: intent.excerpt,
|
|
44
45
|
}
|
|
45
|
-
: intent.kind === CHAT_UI_RESOURCE_TOKEN_KIND
|
|
46
|
+
: (intent.kind === CHAT_UI_RESOURCE_TOKEN_KIND || intent.kind === CHAT_SYSTEM_OBJECT_TOKEN_KIND)
|
|
46
47
|
? { reference: intent.reference }
|
|
47
48
|
: undefined,
|
|
48
49
|
});
|
package/src/features/chat/features/message/components/__tests__/chat-inline-panel-app-card.test.tsx
CHANGED
|
@@ -32,7 +32,8 @@ vi.mock("@/app/presenters/app.presenter", () => ({
|
|
|
32
32
|
}),
|
|
33
33
|
}));
|
|
34
34
|
|
|
35
|
-
vi.mock("@/features/panel-apps", () => ({
|
|
35
|
+
vi.mock("@/features/panel-apps", async (importOriginal) => ({
|
|
36
|
+
...await importOriginal<object>(),
|
|
36
37
|
PANEL_APP_IFRAME_SANDBOX:
|
|
37
38
|
"allow-scripts allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-downloads allow-pointer-lock allow-presentation",
|
|
38
39
|
findPanelAppEntryByDisplayId: (
|
|
@@ -147,3 +147,6 @@ it("keeps a new session's empty first assistant draft in the awaiting state", ()
|
|
|
147
147
|
);
|
|
148
148
|
expect(assistantDraftRender?.isSending).toBe(true);
|
|
149
149
|
});
|
|
150
|
+
|
|
151
|
+
vi.mock("react-router-dom", async (importOriginal) => ({ ...(await importOriginal<object>()), useNavigate: () => vi.fn() }));
|
|
152
|
+
vi.mock("@/app/components/app-presenter-provider", () => ({ useAppPresenter: () => ({ pageResourceManager: { resolve: vi.fn(), open: vi.fn() } }) }));
|
|
@@ -168,3 +168,6 @@ it("shows an error when a persisted v1 skill is no longer resolvable", async ()
|
|
|
168
168
|
));
|
|
169
169
|
expect(captures.openFilePreview).not.toHaveBeenCalled();
|
|
170
170
|
});
|
|
171
|
+
|
|
172
|
+
vi.mock("react-router-dom", async (importOriginal) => ({ ...(await importOriginal<object>()), useNavigate: () => vi.fn() }));
|
|
173
|
+
vi.mock("@/app/components/app-presenter-provider", () => ({ useAppPresenter: () => ({ pageResourceManager: { resolve: vi.fn(), open: vi.fn() } }) }));
|
package/src/features/chat/features/message/components/__tests__/chat-message-list.container.test.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import type { ChatMessageListProps } from "@nextclaw/agent-chat-ui";
|
|
|
10
10
|
import { beforeEach, expect, it, vi } from "vitest";
|
|
11
11
|
import { ChatMessageListContainer as RuntimeChatMessageListContainer } from "@/features/chat/features/message/components/chat-message-list.container";
|
|
12
12
|
import { useChatQueryStore } from "@/features/chat/stores/ncp-chat-query.store";
|
|
13
|
+
import type * as I18nModule from "@/shared/lib/i18n";
|
|
13
14
|
|
|
14
15
|
type AgentChatUiModule = {
|
|
15
16
|
ChatMessageList: ComponentType<ChatMessageListProps>;
|
|
@@ -112,10 +113,15 @@ vi.mock("@/app/components/i18n-provider", () => ({
|
|
|
112
113
|
useI18n: () => ({ language: captures.language }),
|
|
113
114
|
}));
|
|
114
115
|
|
|
115
|
-
vi.mock("@/shared/lib/i18n", () =>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
vi.mock("@/shared/lib/i18n", async (importOriginal) => {
|
|
117
|
+
const actual = await importOriginal<typeof I18nModule>();
|
|
118
|
+
return {
|
|
119
|
+
...actual,
|
|
120
|
+
formatDateTime: (value: string) => `formatted:${value}`,
|
|
121
|
+
t: (key: string) => key.startsWith("chatProcessDuration") || (captures.language === "zh" && key.startsWith("chatProcessSummary"))
|
|
122
|
+
? actual.t(key, captures.language === "zh" ? "zh" : "en") : key,
|
|
123
|
+
};
|
|
124
|
+
});
|
|
119
125
|
|
|
120
126
|
vi.mock(
|
|
121
127
|
"@/features/chat/features/workspace/components/chat-session-workspace-file-preview",
|
|
@@ -325,51 +331,30 @@ it("adds a completed assistant process summary without inventing a duration", ()
|
|
|
325
331
|
});
|
|
326
332
|
});
|
|
327
333
|
|
|
328
|
-
it("
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
role: "assistant",
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
},
|
|
334
|
+
it("renders a minimal Chinese history summary and still expands its process", () => {
|
|
335
|
+
captures.language = "zh";
|
|
336
|
+
captures.renderActualChatMessageList = true;
|
|
337
|
+
const message: NcpMessage = {
|
|
338
|
+
id: "assistant-minimal-summary", sessionId: "session-1", role: "assistant", status: "final",
|
|
339
|
+
timestamp: "2026-03-31T10:02:07.000Z",
|
|
340
|
+
lifecycle: { startedAt: "2026-03-31T10:00:00.000Z", endedAt: "2026-03-31T10:02:07.000Z" },
|
|
341
|
+
metadata: { nextclawUiHistoryToolPayloadSummary: {
|
|
342
|
+
toolCallCount: 67, toolNames: ["tool_schema", "projects_list", "project_work_list"],
|
|
343
|
+
} },
|
|
339
344
|
parts: [
|
|
340
|
-
{
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
type: "tool-invocation",
|
|
346
|
-
toolCallId: "tool-1",
|
|
347
|
-
toolName: "exec_command",
|
|
348
|
-
state: "result",
|
|
349
|
-
args: '{"cmd":"git status"}',
|
|
350
|
-
result: "clean",
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
type: "text",
|
|
354
|
-
text: "Done.",
|
|
355
|
-
},
|
|
345
|
+
{ type: "reasoning", text: "核对项目详情" },
|
|
346
|
+
{ type: "tool-invocation", toolCallId: "tool-1", toolName: "projects_list", state: "result" },
|
|
347
|
+
{ type: "text", text: "项目已整理" },
|
|
356
348
|
],
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
);
|
|
365
|
-
|
|
366
|
-
const renderedMessages =
|
|
367
|
-
captures.renders[captures.renders.length - 1]?.messages ?? [];
|
|
368
|
-
expect(renderedMessages[0]).toMatchObject({
|
|
369
|
-
processSummary: {
|
|
370
|
-
label: "chatProcessSummaryProcessed 3m 51s",
|
|
371
|
-
},
|
|
372
|
-
});
|
|
349
|
+
};
|
|
350
|
+
render(<ChatMessageListContainer messages={[message]} isSending={false} />);
|
|
351
|
+
const summary = screen.getByRole("button", { name: "已处理 2分钟7秒" });
|
|
352
|
+
expect(summary.getAttribute("aria-expanded")).toBe("false");
|
|
353
|
+
expect(screen.queryByText(/67|tool_schema|project_work_list/)).toBeNull();
|
|
354
|
+
expect(screen.getByText("项目已整理")).toBeTruthy();
|
|
355
|
+
fireEvent.click(summary);
|
|
356
|
+
expect(summary.getAttribute("aria-expanded")).toBe("true");
|
|
357
|
+
expect(screen.getByRole("button", { name: "projects list" })).toBeTruthy();
|
|
373
358
|
});
|
|
374
359
|
|
|
375
360
|
it("keeps unavailable ai usage in metadata but out of the footer", () => {
|
|
@@ -891,3 +876,6 @@ it("shows edit only while the latest user message is actually editable", () => {
|
|
|
891
876
|
);
|
|
892
877
|
expect(busyUserMessage).not.toHaveProperty("actions");
|
|
893
878
|
});
|
|
879
|
+
|
|
880
|
+
vi.mock("react-router-dom", async (importOriginal) => ({ ...(await importOriginal<object>()), useNavigate: () => vi.fn() }));
|
|
881
|
+
vi.mock("@/app/components/app-presenter-provider", () => ({ useAppPresenter: () => ({ pageResourceManager: { resolve: vi.fn(), open: vi.fn() } }) }));
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
import { useChatMessageActions } from "@/features/chat/features/message/hooks/use-chat-message-actions";
|
|
67
67
|
import { useChatInlineTokenActions } from "@/features/chat/features/message/hooks/use-chat-inline-token-actions";
|
|
68
68
|
import { buildServerPathContentUrl } from "@/shared/lib/api";
|
|
69
|
-
import { formatDateTime,
|
|
69
|
+
import { formatDateTime, t, type I18nLanguage } from "@/shared/lib/i18n";
|
|
70
70
|
import { cn } from "@/shared/lib/utils";
|
|
71
71
|
import type { SessionMessageToolPayloadState } from "@/features/chat/features/ncp/hooks/use-ncp-session-message-history";
|
|
72
72
|
import { ChatMessageObservationEvent } from "@/features/chat/features/message/components/chat-message-observation-event";
|
|
@@ -96,7 +96,7 @@ class ChatMessageViewModelAdapter {
|
|
|
96
96
|
private readonly cache = new WeakMap<
|
|
97
97
|
NcpMessage,
|
|
98
98
|
{
|
|
99
|
-
language:
|
|
99
|
+
language: I18nLanguage;
|
|
100
100
|
processSummaryLabel: string | null;
|
|
101
101
|
executionPresentationKey: string | null;
|
|
102
102
|
triggerDetailsKey: string | null;
|
|
@@ -108,7 +108,7 @@ class ChatMessageViewModelAdapter {
|
|
|
108
108
|
continuationRunning: boolean;
|
|
109
109
|
executionLabels: ReturnType<typeof buildChatMessageExecutionLabels>;
|
|
110
110
|
triggerLabels: ReturnType<typeof buildChatMessageTriggerLabels>;
|
|
111
|
-
language:
|
|
111
|
+
language: I18nLanguage;
|
|
112
112
|
processedLabel: string;
|
|
113
113
|
rawMessages: readonly NcpMessage[];
|
|
114
114
|
texts: ReturnType<typeof buildChatMessageAdapterTexts>;
|
|
@@ -120,13 +120,9 @@ class ChatMessageViewModelAdapter {
|
|
|
120
120
|
const processSummary = buildChatMessageProcessSummary({
|
|
121
121
|
message,
|
|
122
122
|
processedLabel,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
if (toolNames.length === 0) return countLabel;
|
|
127
|
-
const separator = language === "zh" ? "、" : ", ";
|
|
128
|
-
return `${countLabel} · ${toolNames.join(separator)}`;
|
|
129
|
-
},
|
|
123
|
+
language,
|
|
124
|
+
failedLabel: t("chatProcessSummaryError", language),
|
|
125
|
+
stoppedLabel: t("chatProcessSummaryStopped", language),
|
|
130
126
|
});
|
|
131
127
|
const processSummaryLabel = processSummary?.label ?? null;
|
|
132
128
|
const executionPresentation = buildChatMessageExecutionPresentation({
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { useNavigate } from 'react-router-dom';
|
|
1
2
|
import { useCallback } from "react";
|
|
2
3
|
import type { ChatInlineTokenViewModel } from "@nextclaw/agent-chat-ui";
|
|
3
4
|
import {
|
|
4
5
|
CHAT_PROJECT_TOKEN_KIND,
|
|
5
6
|
CHAT_UI_RESOURCE_TOKEN_KIND,
|
|
7
|
+
CHAT_SYSTEM_OBJECT_TOKEN_KIND,
|
|
6
8
|
CHAT_WORKSPACE_EXCERPT_TOKEN_KIND,
|
|
7
9
|
} from "@nextclaw/shared";
|
|
8
10
|
import { toast } from "sonner";
|
|
@@ -23,12 +25,14 @@ export function useChatInlineTokenActions(params: {
|
|
|
23
25
|
}) {
|
|
24
26
|
const { selectedSession, sessionKey } = params;
|
|
25
27
|
const presenter = usePresenter();
|
|
28
|
+
const navigate = useNavigate();
|
|
26
29
|
const appPresenter = useAppPresenter();
|
|
27
30
|
const projectRoot = selectedSession?.projectRoot ?? selectedSession?.workingDir;
|
|
28
31
|
|
|
29
32
|
const handleInlineTokenClick = useCallback((token: ChatInlineTokenViewModel) => {
|
|
30
|
-
if (token.kind === CHAT_UI_RESOURCE_TOKEN_KIND && "key" in token) {
|
|
31
|
-
appPresenter.
|
|
33
|
+
if ((token.kind === CHAT_UI_RESOURCE_TOKEN_KIND || token.kind === CHAT_SYSTEM_OBJECT_TOKEN_KIND) && "key" in token) {
|
|
34
|
+
const page = appPresenter.pageResourceManager.resolve(token.key);
|
|
35
|
+
if (page) appPresenter.pageResourceManager.open(page, 'default', navigate);
|
|
32
36
|
return;
|
|
33
37
|
}
|
|
34
38
|
if (token.kind === "panel_app" && "key" in token) {
|
|
@@ -105,7 +109,7 @@ export function useChatInlineTokenActions(params: {
|
|
|
105
109
|
previewViewer: "rendered",
|
|
106
110
|
});
|
|
107
111
|
}).catch(() => toast.error(t("chatSkillPreviewUnavailable")));
|
|
108
|
-
}, [appPresenter
|
|
112
|
+
}, [appPresenter, navigate, presenter, projectRoot, selectedSession?.projectRoot, sessionKey]);
|
|
109
113
|
|
|
110
114
|
const handleAttachmentOpen = useCallback((file: {
|
|
111
115
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NcpEventType, type NcpMessage } from "@nextclaw/ncp";
|
|
1
|
+
import { createUnavailableNcpAiExecutionMetadata, NcpEventType, type NcpMessage } from "@nextclaw/ncp";
|
|
2
2
|
import { DefaultNcpAgentConversationStateManager } from "@nextclaw/ncp-toolkit";
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { buildChatMessageProcessSummary } from "@/features/chat/features/message/utils/chat-message-process-summary.utils";
|
|
@@ -29,6 +29,13 @@ const baseAssistantMessage = {
|
|
|
29
29
|
],
|
|
30
30
|
} satisfies NcpMessage;
|
|
31
31
|
|
|
32
|
+
const summaryLabels = {
|
|
33
|
+
processedLabel: "已处理",
|
|
34
|
+
failedLabel: "处理失败",
|
|
35
|
+
stoppedLabel: "已停止",
|
|
36
|
+
language: "zh" as const,
|
|
37
|
+
};
|
|
38
|
+
|
|
32
39
|
describe("buildChatMessageProcessSummary", () => {
|
|
33
40
|
it("shows elapsed time from the real completed-message then run-finished event sequence", async () => {
|
|
34
41
|
const manager = new DefaultNcpAgentConversationStateManager();
|
|
@@ -44,12 +51,13 @@ describe("buildChatMessageProcessSummary", () => {
|
|
|
44
51
|
},
|
|
45
52
|
]);
|
|
46
53
|
const message = manager.getSnapshot().messages[0]!;
|
|
47
|
-
expect(buildChatMessageProcessSummary({
|
|
54
|
+
expect(buildChatMessageProcessSummary({ ...summaryLabels, message })?.label).toBe("已处理 3分钟51秒");
|
|
48
55
|
});
|
|
49
56
|
|
|
50
57
|
it("does not invent duration when lifecycle timing is absent", () => {
|
|
51
58
|
expect(
|
|
52
59
|
buildChatMessageProcessSummary({
|
|
60
|
+
...summaryLabels,
|
|
53
61
|
message: baseAssistantMessage,
|
|
54
62
|
processedLabel: "Processed",
|
|
55
63
|
}),
|
|
@@ -61,6 +69,8 @@ describe("buildChatMessageProcessSummary", () => {
|
|
|
61
69
|
it("derives duration from lifecycle startedAt and endedAt", () => {
|
|
62
70
|
expect(
|
|
63
71
|
buildChatMessageProcessSummary({
|
|
72
|
+
...summaryLabels,
|
|
73
|
+
language: "en",
|
|
64
74
|
message: {
|
|
65
75
|
...baseAssistantMessage,
|
|
66
76
|
lifecycle: {
|
|
@@ -77,6 +87,7 @@ describe("buildChatMessageProcessSummary", () => {
|
|
|
77
87
|
|
|
78
88
|
it("stays free of tool-activity semantics", () => {
|
|
79
89
|
const summary = buildChatMessageProcessSummary({
|
|
90
|
+
...summaryLabels,
|
|
80
91
|
message: baseAssistantMessage,
|
|
81
92
|
processedLabel: "Processed",
|
|
82
93
|
});
|
|
@@ -85,8 +96,9 @@ describe("buildChatMessageProcessSummary", () => {
|
|
|
85
96
|
expect(summary?.label.toLowerCase()).not.toContain("read");
|
|
86
97
|
});
|
|
87
98
|
|
|
88
|
-
it("
|
|
99
|
+
it("keeps deferred history summaries identical to fully loaded messages", () => {
|
|
89
100
|
const summary = buildChatMessageProcessSummary({
|
|
101
|
+
...summaryLabels,
|
|
90
102
|
message: {
|
|
91
103
|
...baseAssistantMessage,
|
|
92
104
|
metadata: {
|
|
@@ -97,12 +109,46 @@ describe("buildChatMessageProcessSummary", () => {
|
|
|
97
109
|
},
|
|
98
110
|
},
|
|
99
111
|
processedLabel: "Processed",
|
|
100
|
-
formatDeferredToolSummary: (count, names) =>
|
|
101
|
-
`${count} tool calls · ${names.join(", ")}`,
|
|
102
112
|
});
|
|
103
113
|
|
|
104
114
|
expect(summary?.label).toBe(
|
|
105
|
-
"Processed
|
|
115
|
+
"Processed",
|
|
106
116
|
);
|
|
107
117
|
});
|
|
118
|
+
|
|
119
|
+
it.each([
|
|
120
|
+
[0, "0秒"], [7, "7秒"], [127, "2分钟7秒"],
|
|
121
|
+
[3600, "1小时"], [3720, "1小时2分钟"],
|
|
122
|
+
])("localizes a %i-second duration without separators", (seconds, expected) => {
|
|
123
|
+
const startedAt = "2026-03-31T10:00:00.000Z";
|
|
124
|
+
const message: NcpMessage = {
|
|
125
|
+
...baseAssistantMessage,
|
|
126
|
+
lifecycle: { startedAt, endedAt: new Date(Date.parse(startedAt) + seconds * 1000).toISOString() },
|
|
127
|
+
};
|
|
128
|
+
expect(buildChatMessageProcessSummary({ ...summaryLabels, message })?.label).toBe(`已处理 ${expected}`);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it.each(["pending", "streaming"] as const)("does not label %s messages as processed", (status) => {
|
|
132
|
+
expect(buildChatMessageProcessSummary({
|
|
133
|
+
...summaryLabels, message: { ...baseAssistantMessage, status },
|
|
134
|
+
})).toBeUndefined();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it.each([
|
|
138
|
+
["failed", "处理失败"], ["aborted", "已停止"], ["completed", "已处理"],
|
|
139
|
+
] as const)("uses the recorded %s outcome", (outcome, expected) => {
|
|
140
|
+
const message: NcpMessage = {
|
|
141
|
+
...baseAssistantMessage,
|
|
142
|
+
metadata: { ai_execution: createUnavailableNcpAiExecutionMetadata({
|
|
143
|
+
runId: "run-1", runtimeId: "native", model: "test", requestedModel: null, outcome,
|
|
144
|
+
}) },
|
|
145
|
+
};
|
|
146
|
+
expect(buildChatMessageProcessSummary({ ...summaryLabels, message })?.label).toBe(expected);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it("shows failure for an error message without execution metadata", () => {
|
|
150
|
+
expect(buildChatMessageProcessSummary({
|
|
151
|
+
...summaryLabels, message: { ...baseAssistantMessage, status: "error" },
|
|
152
|
+
})?.label).toBe("处理失败");
|
|
153
|
+
});
|
|
108
154
|
});
|
|
@@ -1,29 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { readNcpAiExecutionMetadata, type NcpMessage } from "@nextclaw/ncp";
|
|
2
2
|
import type { ChatMessageProcessSummarySource } from "@/features/chat/types/chat-message.types";
|
|
3
|
+
import { t, type I18nLanguage } from "@/shared/lib/i18n";
|
|
3
4
|
|
|
4
5
|
type BuildChatMessageProcessSummaryParams = {
|
|
5
6
|
message: NcpMessage;
|
|
6
7
|
processedLabel: string;
|
|
7
|
-
|
|
8
|
+
failedLabel: string;
|
|
9
|
+
stoppedLabel: string;
|
|
10
|
+
language: I18nLanguage;
|
|
8
11
|
};
|
|
9
12
|
|
|
10
|
-
const UI_HISTORY_TOOL_PAYLOAD_SUMMARY_METADATA_KEY =
|
|
11
|
-
"nextclawUiHistoryToolPayloadSummary";
|
|
12
|
-
|
|
13
|
-
function readDeferredToolSummary(
|
|
14
|
-
message: NcpMessage,
|
|
15
|
-
): { toolCallCount: number; toolNames: string[] } | null {
|
|
16
|
-
const value = message.metadata?.[UI_HISTORY_TOOL_PAYLOAD_SUMMARY_METADATA_KEY];
|
|
17
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
18
|
-
const record = value as Record<string, unknown>;
|
|
19
|
-
const { toolCallCount } = record;
|
|
20
|
-
if (!Number.isInteger(toolCallCount) || (toolCallCount as number) <= 0) return null;
|
|
21
|
-
const toolNames = Array.isArray(record.toolNames)
|
|
22
|
-
? record.toolNames.filter((name): name is string => typeof name === "string" && name.trim().length > 0)
|
|
23
|
-
: [];
|
|
24
|
-
return { toolCallCount: toolCallCount as number, toolNames };
|
|
25
|
-
}
|
|
26
|
-
|
|
27
13
|
function isAssistantProcessPart(part: NcpMessage["parts"][number]): boolean {
|
|
28
14
|
return part.type === "reasoning" || part.type === "tool-invocation";
|
|
29
15
|
}
|
|
@@ -62,7 +48,7 @@ function hasCollapsibleAssistantProcess(message: NcpMessage): boolean {
|
|
|
62
48
|
);
|
|
63
49
|
}
|
|
64
50
|
|
|
65
|
-
function formatLifecycleDuration(message: NcpMessage): string | null {
|
|
51
|
+
function formatLifecycleDuration(message: NcpMessage, language: I18nLanguage): string | null {
|
|
66
52
|
const startedAt = message.lifecycle?.startedAt;
|
|
67
53
|
const endedAt = message.lifecycle?.endedAt;
|
|
68
54
|
if (!startedAt || !endedAt) {
|
|
@@ -77,13 +63,13 @@ function formatLifecycleDuration(message: NcpMessage): string | null {
|
|
|
77
63
|
const hours = Math.floor(totalSeconds / 3600);
|
|
78
64
|
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
|
79
65
|
const seconds = totalSeconds % 60;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
66
|
+
const key = hours > 0
|
|
67
|
+
? (minutes > 0 ? "chatProcessDurationHoursMinutes" : "chatProcessDurationHours")
|
|
68
|
+
: (minutes > 0 ? "chatProcessDurationMinutesSeconds" : "chatProcessDurationSeconds");
|
|
69
|
+
return t(key, language)
|
|
70
|
+
.replace("{hours}", String(hours))
|
|
71
|
+
.replace("{minutes}", String(minutes))
|
|
72
|
+
.replace("{seconds}", String(seconds));
|
|
87
73
|
}
|
|
88
74
|
|
|
89
75
|
/**
|
|
@@ -92,22 +78,21 @@ function formatLifecycleDuration(message: NcpMessage): string | null {
|
|
|
92
78
|
* and must not be mixed into this summary.
|
|
93
79
|
*/
|
|
94
80
|
export function buildChatMessageProcessSummary({
|
|
95
|
-
|
|
81
|
+
failedLabel,
|
|
82
|
+
stoppedLabel,
|
|
96
83
|
message,
|
|
97
84
|
processedLabel,
|
|
85
|
+
language,
|
|
98
86
|
}: BuildChatMessageProcessSummaryParams): ChatMessageProcessSummarySource | undefined {
|
|
99
87
|
if (!hasCollapsibleAssistantProcess(message)) {
|
|
100
88
|
return undefined;
|
|
101
89
|
}
|
|
102
|
-
const duration = formatLifecycleDuration(message);
|
|
103
|
-
const
|
|
104
|
-
const
|
|
90
|
+
const duration = formatLifecycleDuration(message, language);
|
|
91
|
+
const outcome = readNcpAiExecutionMetadata(message.metadata)?.outcome;
|
|
92
|
+
const statusLabel = message.status === "error" || outcome === "failed"
|
|
93
|
+
? failedLabel
|
|
94
|
+
: outcome === "aborted" ? stoppedLabel : processedLabel;
|
|
105
95
|
return {
|
|
106
|
-
label:
|
|
107
|
-
? `${baseLabel} · ${formatDeferredToolSummary(
|
|
108
|
-
deferredToolSummary.toolCallCount,
|
|
109
|
-
deferredToolSummary.toolNames,
|
|
110
|
-
)}`
|
|
111
|
-
: baseLabel,
|
|
96
|
+
label: duration ? `${statusLabel} ${duration}` : statusLabel,
|
|
112
97
|
};
|
|
113
98
|
}
|
package/src/features/chat/features/session/components/__tests__/chat-sidebar-project-groups.test.tsx
CHANGED
|
@@ -113,7 +113,7 @@ describe("ChatSidebarProjectGroups", () => {
|
|
|
113
113
|
const projectRow = projectLink.parentElement?.parentElement;
|
|
114
114
|
expect(container.firstElementChild?.className).toBe("space-y-0.5");
|
|
115
115
|
expect(projectRow?.className).toContain("h-8");
|
|
116
|
-
expect(projectRow?.className).toContain("hover:bg-gray-200/
|
|
116
|
+
expect(projectRow?.className).toContain("hover:bg-[hsl(var(--gray-200)/0.6)]");
|
|
117
117
|
const projectContent = projectLink.parentElement;
|
|
118
118
|
expect(projectContent?.classList.contains("pr-14")).toBe(false);
|
|
119
119
|
expect(projectContent?.className).toContain("group-hover/project:pr-20");
|
package/src/features/chat/features/session/components/__tests__/chat-sidebar-session-item.test.tsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { sessionSurfaceManager } from '@/features/chat/managers/session-surface.manager';
|
|
1
2
|
import { render, screen, within } from "@testing-library/react";
|
|
2
3
|
import userEvent from "@testing-library/user-event";
|
|
3
4
|
import { beforeEach, expect, it, vi } from "vitest";
|
|
4
5
|
import { ChatSidebarSessionItem } from "@/features/chat/features/session/components/chat-sidebar-session-item";
|
|
6
|
+
import { useFloatingSessionStore } from '@/features/chat/stores/floating-session.store';
|
|
5
7
|
|
|
6
8
|
const mocks = vi.hoisted(() => ({
|
|
7
9
|
copyText: vi.fn(),
|
|
@@ -20,6 +22,7 @@ vi.mock("sonner", () => ({
|
|
|
20
22
|
}));
|
|
21
23
|
|
|
22
24
|
beforeEach(() => {
|
|
25
|
+
sessionSurfaceManager.close();
|
|
23
26
|
mocks.copyText.mockReset();
|
|
24
27
|
mocks.copyText.mockResolvedValue(true);
|
|
25
28
|
mocks.deleteSession.mockReset();
|
|
@@ -81,6 +84,16 @@ it("shows session actions only on hover or when an action owns focus", () => {
|
|
|
81
84
|
expect(screen.getByRole("button", { name: "More actions" })).toBeTruthy();
|
|
82
85
|
});
|
|
83
86
|
|
|
87
|
+
it("opens any sidebar session as a floating conversation", async () => {
|
|
88
|
+
const user = userEvent.setup();
|
|
89
|
+
await user.click(screen.getByRole('button', { name: 'More actions' }));
|
|
90
|
+
await user.click(screen.getByRole('menuitem', { name: 'Layout and position' }));
|
|
91
|
+
await user.click(screen.getByRole('menuitem', { name: 'Open in floating window' }));
|
|
92
|
+
expect(useFloatingSessionStore.getState().session).toEqual({
|
|
93
|
+
sessionKey: 'session:current', title: 'Current Task',
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
84
97
|
it("copies the sidebar session ID from the more-actions menu", async () => {
|
|
85
98
|
const user = userEvent.setup();
|
|
86
99
|
|
|
@@ -121,3 +134,11 @@ it("shows session context from the row on hover", async () => {
|
|
|
121
134
|
expect(within(tooltip).getByText("2")).toBeTruthy();
|
|
122
135
|
expect(within(tooltip).getByText("3")).toBeTruthy();
|
|
123
136
|
});
|
|
137
|
+
|
|
138
|
+
vi.mock("react-router-dom", async (importOriginal) => ({ ...(await importOriginal<object>()), useNavigate: () => vi.fn(), useLocation: () => ({ pathname: '/chat', search: '' }) }));
|
|
139
|
+
vi.mock("@/features/panel-apps/hooks/use-panel-apps", () => ({ usePanelApps: () => ({ data: { entries: [] } }), useUpdatePanelAppPreferences: () => ({ mutate: vi.fn() }) }));
|
|
140
|
+
vi.mock("@/app/components/app-presenter-provider", async () => {
|
|
141
|
+
const { PageResourceManager } = await import("@/features/right-panel-resources/managers/page-resource.manager");
|
|
142
|
+
const app = { docBrowserManager: { openTarget: vi.fn() }, chatComposerIntentManager: { requestUiResourceReference: vi.fn() } };
|
|
143
|
+
return { useAppPresenter: () => ({ ...app, pageResourceManager: new PageResourceManager(app as never) }) };
|
|
144
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Pencil, Pin, Trash2 } from 'lucide-react';
|
|
2
|
+
import { AgentAvatar } from '@/shared/components/common/agent-avatar';
|
|
3
|
+
import { ChatSessionMoreActionsMenu } from '@/features/chat/features/session/components/session-header/chat-session-more-actions-menu';
|
|
4
|
+
import { ChatSessionHeaderMenuItem } from '@/features/chat/features/session/components/session-header/chat-session-header-menu-item';
|
|
5
|
+
import { SessionRunBadge } from './session-run-badge';
|
|
6
|
+
import type { ChatSidebarSessionItemProps } from './chat-sidebar-session-item';
|
|
7
|
+
import { t } from '@/shared/lib/i18n';
|
|
8
|
+
import { cn } from '@/shared/lib/utils';
|
|
9
|
+
|
|
10
|
+
const SESSION_AVATAR_COLORS = [
|
|
11
|
+
'bg-blue-100 text-blue-800 [html[data-theme-appearance=dark]_&]:bg-blue-950 [html[data-theme-appearance=dark]_&]:text-blue-200',
|
|
12
|
+
'bg-emerald-100 text-emerald-800 [html[data-theme-appearance=dark]_&]:bg-emerald-950 [html[data-theme-appearance=dark]_&]:text-emerald-200',
|
|
13
|
+
'bg-violet-100 text-violet-800 [html[data-theme-appearance=dark]_&]:bg-violet-950 [html[data-theme-appearance=dark]_&]:text-violet-200',
|
|
14
|
+
'bg-amber-100 text-amber-800 [html[data-theme-appearance=dark]_&]:bg-amber-950 [html[data-theme-appearance=dark]_&]:text-amber-200',
|
|
15
|
+
'bg-rose-100 text-rose-800 [html[data-theme-appearance=dark]_&]:bg-rose-950 [html[data-theme-appearance=dark]_&]:text-rose-200',
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
function sessionAvatarColor(sessionKey: string): string {
|
|
19
|
+
let hash = 0;
|
|
20
|
+
for (const character of sessionKey) hash = (hash * 31 + character.charCodeAt(0)) | 0;
|
|
21
|
+
return SESSION_AVATAR_COLORS[Math.abs(hash) % SESSION_AVATAR_COLORS.length];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Mobile presentation of the same session entry and actions used by the sidebar. */
|
|
25
|
+
export function ChatMobileSessionRow(props: ChatSidebarSessionItemProps) {
|
|
26
|
+
const { sessionKey, title, previewText, trailingText, agentId, agentLabel,
|
|
27
|
+
agentAvatarUrl, showUnreadDot, runStatus, isPinned, onSelect,
|
|
28
|
+
onStartEditing, onTogglePinned, onDelete } = props;
|
|
29
|
+
return (
|
|
30
|
+
<div className="relative flex min-w-0 items-center">
|
|
31
|
+
<button type="button" onClick={onSelect} className="flex min-h-[76px] min-w-0 flex-1 items-center gap-3 py-3 pl-4 pr-1 text-left active:bg-muted">
|
|
32
|
+
<span className="relative shrink-0">
|
|
33
|
+
{agentAvatarUrl || (agentId && agentId.toLowerCase() !== 'main') ? (
|
|
34
|
+
<AgentAvatar agentId={agentId || 'main'} displayName={agentLabel} avatarUrl={agentAvatarUrl} className="h-12 w-12 rounded-xl text-lg" />
|
|
35
|
+
) : (
|
|
36
|
+
<span aria-hidden="true" className={cn('flex h-12 w-12 items-center justify-center rounded-xl text-base font-medium', sessionAvatarColor(sessionKey))}>
|
|
37
|
+
{Array.from(title.trim()).slice(0, 2).join('')}
|
|
38
|
+
</span>
|
|
39
|
+
)}
|
|
40
|
+
{showUnreadDot ? <span aria-label={t('chatSessionUnread')} className="absolute -right-1 -top-1 h-3 w-3 rounded-full border-2 border-background bg-primary" /> : null}
|
|
41
|
+
</span>
|
|
42
|
+
<span className="flex min-w-0 flex-1 flex-col gap-1">
|
|
43
|
+
<span className="flex min-w-0 items-center gap-2">
|
|
44
|
+
<span className="min-w-0 flex-1 truncate text-[16px] font-medium leading-6 text-foreground">{title}</span>
|
|
45
|
+
<span className="shrink-0 text-[11px] text-muted-foreground">{trailingText}</span>
|
|
46
|
+
</span>
|
|
47
|
+
<span className="flex min-w-0 items-center gap-1.5">
|
|
48
|
+
{runStatus ? <SessionRunBadge status={runStatus} /> : null}
|
|
49
|
+
{isPinned ? <Pin aria-label={t('chatSidebarUnpinSession')} className="h-3 w-3 shrink-0 text-muted-foreground" /> : null}
|
|
50
|
+
<span className="min-w-0 truncate text-[13px] leading-5 text-muted-foreground">{previewText}</span>
|
|
51
|
+
</span>
|
|
52
|
+
</span>
|
|
53
|
+
</button>
|
|
54
|
+
<ChatSessionMoreActionsMenu sessionKey={sessionKey} sessionTitle={title} className="h-11 w-9 shrink-0 rounded-none text-muted-foreground">
|
|
55
|
+
<ChatSessionHeaderMenuItem icon={Pin} label={t(isPinned ? 'chatSidebarUnpinSession' : 'chatSidebarPinSession')} onClick={onTogglePinned} />
|
|
56
|
+
<ChatSessionHeaderMenuItem icon={Pencil} label={t('edit')} onClick={onStartEditing} />
|
|
57
|
+
<ChatSessionHeaderMenuItem icon={Trash2} label={t('delete')} onClick={onDelete} destructive />
|
|
58
|
+
</ChatSessionMoreActionsMenu>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|