@nextclaw/ui 0.15.25 → 0.15.27
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 +34 -0
- package/dist/assets/{abnfDiagram-VRR7QNED-DvTjgVMf.js → abnfDiagram-VRR7QNED-BcFJp_1X.js} +1 -1
- package/dist/assets/{aiden0z-pptx-renderer.es-C1nfBAXR.js → aiden0z-pptx-renderer.es-Dp2ezlQn.js} +1 -1
- package/dist/assets/{api-FK7tikI1.js → api-a_GaOFc7.js} +6 -6
- package/dist/assets/appearance-settings-page-DlGXLgff.js +1 -0
- package/dist/assets/{arc-BvhODBXv.js → arc-CkgyPMyW.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-DO2x53FK.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-BKO9RgNS.js → architectureDiagram-ZJ3FMSHR-CMd4cIjI.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-DHpDXy7D.js → blockDiagram-677ZJIJ3-Bz3tbhet.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-BG_iQnDr.js → c4Diagram-LMCZKHZV-D9hFNAGv.js} +1 -1
- package/dist/assets/channel-nBvMaVyP.js +1 -0
- package/dist/assets/{channels-list-page-CocdcIko.js → channels-list-page-BEEk4Uc9.js} +2 -2
- package/dist/assets/chat-page-DUQXXqQm.js +1 -0
- package/dist/assets/chunk-2Q5K7J3B-CJgqFDS4.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-DR9M0LLx.js → chunk-32BRIVSS-7NrjEITq.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-698iC3BB.js → chunk-52WLFC77-viIcqj9q.js} +1 -1
- package/dist/assets/{chunk-5FCAYU7R-DikTj9Ey.js → chunk-5FCAYU7R-Vsu4J-VM.js} +1 -1
- package/dist/assets/{chunk-5HE753X5-ko0o7_q0.js → chunk-5HE753X5-C-w6CQZK.js} +1 -1
- package/dist/assets/{chunk-5JV3BV7I-CEHufhgo.js → chunk-5JV3BV7I-CuKgJQ4W.js} +1 -1
- package/dist/assets/{chunk-5TONJI2A-CGgno1cu.js → chunk-5TONJI2A-CYeiWZKb.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-DkiB4cUQ.js → chunk-5VM5RSS4-DRCbfwIn.js} +1 -1
- package/dist/assets/{chunk-7BUUIJ7U-DzptcytQ.js → chunk-7BUUIJ7U-BvydOcm3.js} +1 -1
- package/dist/assets/{chunk-BIQX33UG-DMRSQJvT.js → chunk-BIQX33UG-RlppOXKo.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-Bw1BwwuY.js → chunk-C7G6YPKG-DAizzYwr.js} +1 -1
- package/dist/assets/{chunk-CQNSW5MT-C0z6eHBk.js → chunk-CQNSW5MT-5eChJHca.js} +1 -1
- package/dist/assets/{chunk-CYSBUYHQ-ByPyAouO.js → chunk-CYSBUYHQ-YHPr53fv.js} +1 -1
- package/dist/assets/{chunk-EMLP6XTP-CJlAXWZg.js → chunk-EMLP6XTP-CK4D7Hz5.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-Dqq4zKJu.js → chunk-EX3LRPZG-BmlDFIRW.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-B0SNoCmi.js → chunk-FWX5IMBZ-D0ksHZZ9.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-DG_GJih_.js → chunk-HOUHSVGY-DPkq8FCm.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-Drxk_6bE.js → chunk-ICXQ74PX-FAatv5fC.js} +1 -1
- package/dist/assets/{chunk-JG7HCLWE-DdLFPpnd.js → chunk-JG7HCLWE-DLkIi4F7.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-B8M4G76F.js → chunk-JWPE2WC7-DawOjNE3.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-XP6FJHY_.js → chunk-MOJQB5TN-Di52TorW.js} +1 -1
- package/dist/assets/{chunk-MOZMSUNE-C_6x18Qw.js → chunk-MOZMSUNE-PfyK9w1-.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-N25BzCmG.js → chunk-OGEWGWER-C3jdH3Ty.js} +1 -1
- package/dist/assets/{chunk-OSBZ3O6U-ASDEm7y0.js → chunk-OSBZ3O6U-CecHo-f0.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-CTlvAcn7.js → chunk-PUDLZKDR-f3IJh3sN.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-Da9BWfB6.js → chunk-Q4XR5HBZ-DQFeUPxZ.js} +1 -1
- package/dist/assets/{chunk-QBLGF6JB-Bi6RpTJO.js → chunk-QBLGF6JB-BhUeG0y2.js} +1 -1
- package/dist/assets/{chunk-R7FJI6CG-DkMsSPvK.js → chunk-R7FJI6CG-C3XpZ-2u.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-DZp0eU-j.js → chunk-RYQCIY6F-CAqa5klQ.js} +1 -1
- package/dist/assets/{chunk-U6XO7XAA-vfinDSrj.js → chunk-U6XO7XAA-D_WXezeD.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-C9Nksccs.js → chunk-V7JOEXUC-CZ70oOtp.js} +1 -1
- package/dist/assets/chunk-VAUOI2AC-BGvh3yIx.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-Xv6zfwXs.js → chunk-VR4S4FIN-B7AHEYYk.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-mOJNzbWl.js → chunk-WYO6CB5R-Dn9To_OI.js} +2 -2
- package/dist/assets/chunk-XXDRQBXY-DaBxG5gs.js +1 -0
- package/dist/assets/{chunk-YOTPTUD7-1-aKSu4o.js → chunk-YOTPTUD7-BYEgRBk3.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-OJ8veMpK.js → chunk-ZGVPDNZ5-C6YtZDU0.js} +1 -1
- package/dist/assets/{chunk-ZIRB5QZD-SR_Nq_PP.js → chunk-ZIRB5QZD-DMuYtnHF.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-P6N03G2R.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-B1_uLvMv.js +1 -0
- package/dist/assets/config-split-page-ps1Aod3g.js +1 -0
- package/dist/assets/confirm-dialog-DJSUNG33.js +5 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-NjVgz2Bw.js → cose-bilkent-JH36ORCC-Bc2Ex5Y3.js} +1 -1
- package/dist/assets/cynefin-VYW2F7L2-B-H8Qp-n.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-B_17LDqD.js → cynefinDiagram-TSTJHNR4-DVysQoGz.js} +1 -1
- package/dist/assets/{dagre-CMe101gk.js → dagre-CMhQ1cAG.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-qo8nLb3B.js → dagre-VKFMJZFB-RYyWpPJZ.js} +1 -1
- package/dist/assets/desktop-update-config--zagjHic.js +1 -0
- package/dist/assets/{diagram-FQU43EPY-Ba3XIklC.js → diagram-FQU43EPY-BD6KONdF.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-CG45TcUx.js → diagram-G47NLZAW-CGB2ptRR.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-2F2HrwV-.js → diagram-NH7WQ7WH-DnkOI6cU.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CXfWH9NZ.js → diagram-OA4YK3LP-DF82RZ7P.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-CH_4yepc.js → diagram-WEI45ONY-Be2v7Ck9.js} +1 -1
- package/dist/assets/{dist-CaYdVVeO.js → dist-BkTYNzm_.js} +1 -1
- package/dist/assets/{dist-BH7W5yCi.js → dist-DkR7_Dpl.js} +1 -1
- package/dist/assets/doc-browser-DahzJEWj.js +1 -0
- package/dist/assets/doc-browser-Q67TOGVS.js +1 -0
- package/dist/assets/doc-browser-context-BQim8SqD.js +1 -0
- package/dist/assets/{docx-preview-CoM4JK7_.js → docx-preview-BqwAjrj3.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-BwiG4Ea1.js → ebnfDiagram-CCIWWBDH-CP98OYk8.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-BML3hpnQ.js → erDiagram-Q63AITRT-ZLlx8xfs.js} +1 -1
- package/dist/assets/eventmodeling-45OFAUF4-YVtShyFA.js +1 -0
- package/dist/assets/flowDiagram-23GEKE2U-BeKXabVO.js +1 -0
- package/dist/assets/{form-actions-0c0aw_bl.js → form-actions-B2-bpFie.js} +1 -1
- package/dist/assets/{ganttDiagram-NO4QXBWP-80enfWbD.js → ganttDiagram-NO4QXBWP-DXCDjHR2.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-jTSiBj-p.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-CVLqXr-b.js → gitGraphDiagram-IHSO6WYX-l2HWrTJp.js} +1 -1
- package/dist/assets/index-Ba_o5fu9.js +109 -0
- package/dist/assets/index-DSLK7zgR.css +1 -0
- package/dist/assets/info-DKCQHKI2-BIporNWb.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-Dyvs2t0i.js → infoDiagram-FWYZ7A6U-D-DjX-bn.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-sSnxDKfh.js → ishikawaDiagram-FXEZZL3T-y_Xy128F.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-D22V71Mf.js → journeyDiagram-5HDEW3XC-DJn5xYcQ.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-D3ds0p-g.js → kanban-definition-HUTT4EX6-DJVIOR21.js} +1 -1
- package/dist/assets/{line-CbyFs065.js → line-Cos7PIOj.js} +1 -1
- package/dist/assets/{linear-4DKtnZBS.js → linear-BtDLqtzF.js} +1 -1
- package/dist/assets/loader-circle-DyXZU92l.js +1 -0
- package/dist/assets/{map-CcZzEoz6.js → map-BKnQyvd0.js} +1 -1
- package/dist/assets/mcp-marketplace-page-B0dBE5CV.js +1 -0
- package/dist/assets/mcp-marketplace-page-w8panjZG.js +9 -0
- package/dist/assets/{mermaid-parser.core-DPmMOjXD.js → mermaid-parser.core-XUNZhr2W.js} +2 -2
- package/dist/assets/{mermaid.core-BSf-ddRa.js → mermaid.core-ySrvolIe.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-BUTwWPyx.js → mindmap-definition-LN4V7U3C-BypL9tei.js} +1 -1
- package/dist/assets/model-config-page-rrhFaque.js +1 -0
- package/dist/assets/{navigation-link-CVy0_kVl.js → navigation-link-mpHFXwRr.js} +2 -2
- package/dist/assets/{ordinal-BgLYtOZE.js → ordinal-CxxVWxYU.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-CuFMADV0.js +1 -0
- package/dist/assets/{pegDiagram-2B236MQR-BEu_ZBjc.js → pegDiagram-2B236MQR-D-U2KBGv.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-XUeIXhM9.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-CAwAwuBd.js → pieDiagram-ENE6RG2P-CBi3GusJ.js} +1 -1
- package/dist/assets/plus-Dhb4KuMH.js +1 -0
- package/dist/assets/provider-scoped-model-input-CFsfWEt9.js +1 -0
- package/dist/assets/providers-config-page-D-TYFZsF.js +1 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-CwE6F-_2.js → quadrantDiagram-ABIIQ3AL-H0ZuvnZL.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-D-NNGh1k.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-C67_uDaM.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-BZ8Yflnd.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-B7zO7RoK.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-R63PTgLz.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-xgLekU3B.js → railroadDiagram-RFXS5EU6-D7Y2EqSd.js} +1 -1
- package/dist/assets/react-BlXwvOLo.js +8 -0
- package/dist/assets/{refresh-cw-j2bl79Ea.js → refresh-cw-JFuyDj_P.js} +1 -1
- package/dist/assets/remote-BwVv_Qq-.js +1 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-CyVUzEX5.js → requirementDiagram-TGXJPOKE-BiXNX1NN.js} +1 -1
- package/dist/assets/rotate-cw-DjbbiIW_.js +1 -0
- package/dist/assets/runtime-config-page-Br9j9Vxe.js +1 -0
- package/dist/assets/{sankeyDiagram-HTMAVEWB-JK6bFmYB.js → sankeyDiagram-HTMAVEWB-qzDeLztW.js} +1 -1
- package/dist/assets/{save-BKNrtK81.js → save-BL8P8CLX.js} +1 -1
- package/dist/assets/{search-CkOm65W_.js → search-bZL75Pgc.js} +1 -1
- package/dist/assets/search-config-page-B3fvzMd1.js +1 -0
- package/dist/assets/secrets-config-page-ClwTxtXd.js +3 -0
- package/dist/assets/security-config-DmJw9QZA.js +1 -0
- package/dist/assets/{select-Ea7ffKCE.js → select-rUZ8nIZu.js} +2 -2
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-BR5IokXV.js → sequenceDiagram-DBY2YBRQ-BtRbPQtL.js} +1 -1
- package/dist/assets/{settings-2-CtyN3m_V.js → settings-2-BI4SCkxQ.js} +1 -1
- package/dist/assets/{sizeCapture-X5ZJPWSS-SxG_YnMA.js → sizeCapture-X5ZJPWSS-CMYvM3SL.js} +1 -1
- package/dist/assets/skeleton-CVmEPG43.js +1 -0
- package/dist/assets/{src-vgz8E_-O.js → src-Bw-mzbQb.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-DD4OoYhn.js → stateDiagram-2N3HPSRC-BJ-mFeOz.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BE-HqxOK.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-BWkFeyCT.js → swimlanes-5IMT3BWC-BsucVOO2.js} +2 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-Dr1H9LJH.js +8 -0
- package/dist/assets/{tag-chip-C9l4xsKp.js → tag-chip-BdI_yIOA.js} +1 -1
- package/dist/assets/{timeline-definition-FHXFAJF6-VTRPy6KA.js → timeline-definition-FHXFAJF6-Bicewlzo.js} +1 -1
- package/dist/assets/treeView-QDETBFTQ-npJ5dbqS.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-pYrBx6oa.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-Bvk42Pek.js → vennDiagram-L72KCM5P-BxOOnO9x.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-CmSRKLR8.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-DOFjx2s3.js → wardleyDiagram-EHGQE667-Cl7NltMv.js} +1 -1
- package/dist/assets/x-BcEayhV6.js +1 -0
- package/dist/assets/{xychartDiagram-FW5EYKEG-DY5yRTUc.js → xychartDiagram-FW5EYKEG-DiMIxQ7N.js} +1 -1
- package/dist/index.html +21 -22
- package/package.json +6 -6
- package/src/app/components/layout/app-layout.tsx +38 -2
- package/src/app/hooks/__tests__/use-app-event-consumers.test.ts +20 -0
- package/src/app/hooks/use-app-event-consumers.ts +21 -0
- package/src/app/presenters/app.presenter.ts +6 -0
- package/src/features/apps/components/__tests__/app-packages-panel.test.tsx +312 -0
- package/src/features/apps/components/__tests__/apps-panel.test.tsx +58 -0
- package/src/features/apps/components/app-artwork.tsx +49 -0
- package/src/features/apps/components/app-marketplace-catalog.tsx +332 -0
- package/src/features/apps/components/app-marketplace-cover.tsx +64 -0
- package/src/features/apps/components/app-marketplace-detail.tsx +161 -0
- package/src/features/apps/components/app-marketplace-dialog.tsx +152 -0
- package/src/features/apps/components/app-marketplace-operation.tsx +84 -0
- package/src/features/apps/components/app-package-card.tsx +417 -0
- package/src/features/apps/components/app-packages-panel.tsx +373 -0
- package/src/features/apps/components/apps-panel.tsx +31 -23
- package/src/features/apps/hooks/use-app-marketplace.test.ts +144 -0
- package/src/features/apps/hooks/use-app-marketplace.ts +65 -0
- package/src/features/apps/hooks/use-app-packages.ts +114 -0
- package/src/features/apps/index.ts +1 -0
- package/src/features/apps/managers/__tests__/app-package-operation-settlement.manager.test.ts +81 -0
- package/src/features/apps/managers/app-package-operation-settlement.manager.ts +80 -0
- package/src/features/apps/services/app-marketplace.service.ts +223 -0
- package/src/features/apps/types/app-marketplace.types.ts +75 -0
- package/src/features/chat/components/chat-sidebar-list-mode-switch.tsx +27 -4
- package/src/features/chat/components/layout/__tests__/chat-sidebar-session-area.test.tsx +36 -5
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +12 -13
- package/src/features/chat/features/conversation/components/__tests__/session-conversation-area.test.tsx +49 -1
- package/src/features/chat/features/conversation/components/__tests__/session-conversation-input.streaming.test.tsx +68 -7
- package/src/features/chat/features/conversation/components/session-conversation-area.tsx +25 -4
- package/src/features/chat/features/conversation/components/session-conversation-input.tsx +3 -0
- package/src/features/chat/features/conversation/components/session-queued-input-rows.tsx +24 -14
- package/src/features/chat/features/conversation/hooks/__tests__/use-session-conversation-controller.test.tsx +53 -0
- package/src/features/chat/features/conversation/hooks/__tests__/use-session-run-queue.test.tsx +18 -0
- package/src/features/chat/features/conversation/hooks/use-chat-composer-reference-intent.ts +4 -1
- package/src/features/chat/features/conversation/hooks/use-session-conversation-controller.ts +126 -32
- package/src/features/chat/features/conversation/hooks/use-session-run-queue.ts +12 -2
- package/src/features/chat/features/conversation/hooks/use-system-object-reference-select.ts +27 -0
- package/src/features/chat/features/conversation/utils/session-message-composer.utils.ts +5 -0
- package/src/features/chat/features/input/hooks/__tests__/use-chat-input-surface-state.test.tsx +102 -0
- package/src/features/chat/features/input/hooks/use-chat-input-surface-state.ts +71 -120
- package/src/features/chat/features/input/input-surface-plugins/__tests__/context-reference-plugin.test.ts +265 -18
- package/src/features/chat/features/input/input-surface-plugins/chat-input-product-plugin-adapters.types.ts +7 -2
- package/src/features/chat/features/input/input-surface-plugins/chat-input-product-plugin-adapters.utils.ts +124 -0
- package/src/features/chat/features/input/input-surface-plugins/context-reference-items.utils.ts +99 -15
- package/src/features/chat/features/input/input-surface-plugins/context-reference-plugin.utils.ts +143 -139
- package/src/features/chat/features/input/input-surface-plugins/panel-app-input-surface-items.utils.ts +116 -0
- package/src/features/chat/features/input/input-surface-plugins/slash-command-plugin.utils.ts +1 -1
- package/src/features/chat/features/input/utils/__tests__/chat-inline-token.utils.test.ts +84 -1
- package/src/features/chat/features/input/utils/chat-composer-token-protocol.utils.ts +10 -0
- package/src/features/chat/features/input/utils/chat-inline-token-composer.utils.ts +148 -0
- package/src/features/chat/features/input/utils/chat-inline-token.utils.ts +55 -101
- package/src/features/chat/features/input/utils/chat-system-object-reference.utils.test.ts +44 -0
- package/src/features/chat/features/input/utils/chat-system-object-reference.utils.ts +46 -0
- package/src/features/chat/features/message/hooks/use-chat-inline-token-actions.ts +8 -1
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +155 -18
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-text-selection.test.tsx +12 -8
- package/src/features/chat/features/workspace/components/chat-session-workspace-directory-browser.tsx +80 -62
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +9 -2
- package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx +83 -13
- package/src/features/chat/features/workspace/components/project-files/workspace-project-tree-view.tsx +93 -0
- package/src/features/chat/features/workspace/hooks/use-workspace-explorer-layout.ts +8 -11
- package/src/features/chat/features/workspace/hooks/use-workspace-file-actions.ts +68 -46
- package/src/features/chat/features/workspace/stores/__tests__/workspace-project-tree.store.test.ts +38 -0
- package/src/features/chat/features/workspace/stores/workspace-project-tree.store.ts +160 -0
- package/src/features/chat/index.ts +2 -1
- package/src/features/chat/managers/__tests__/chat-composer-intent.manager.test.ts +29 -0
- package/src/features/chat/managers/chat-composer-intent.manager.ts +29 -2
- package/src/features/chat/managers/chat-draft-intent.manager.ts +18 -2
- package/src/features/chat/presenters/chat.presenter.ts +2 -2
- package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +6 -0
- package/src/features/chat/stores/chat-thread.store.ts +6 -0
- package/src/features/inbox/components/inbox-reader-dialog.test.tsx +38 -5
- package/src/features/inbox/components/inbox-reader-dialog.tsx +5 -3
- package/src/features/inbox/managers/inbox.manager.test.ts +28 -3
- package/src/features/inbox/managers/inbox.manager.ts +14 -4
- package/src/features/inbox/pages/inbox-page.test.ts +121 -2
- package/src/features/inbox/pages/inbox-page.tsx +5 -3
- package/src/features/marketplace/components/__tests__/marketplace-page.test.tsx +85 -1
- package/src/features/marketplace/hooks/__tests__/use-marketplace.test.tsx +44 -1
- package/src/features/marketplace/hooks/use-marketplace-item-actions.ts +23 -2
- package/src/features/marketplace/hooks/use-marketplace.ts +10 -0
- package/src/features/marketplace/index.ts +4 -0
- package/src/features/panel-apps/components/__tests__/panel-apps-list.test.tsx +1 -1
- package/src/features/panel-apps/components/panel-apps-list.tsx +1 -6
- package/src/features/panel-apps/index.ts +5 -1
- package/src/features/panel-apps/utils/__tests__/panel-app-doc-browser.utils.test.ts +13 -6
- package/src/features/panel-apps/utils/panel-app-doc-browser.utils.tsx +6 -3
- package/src/features/right-panel-resources/index.ts +1 -0
- package/src/features/right-panel-resources/utils/__tests__/right-panel-resource-uri.utils.test.ts +34 -0
- package/src/features/right-panel-resources/utils/right-panel-resource-uri.utils.ts +36 -4
- package/src/features/service-apps/components/service-apps-panel.tsx +3 -17
- package/src/features/system-status/components/__tests__/desktop-update-config.test.tsx +20 -1
- package/src/features/system-status/components/desktop-update-config.tsx +14 -13
- package/src/features/system-status/managers/__tests__/runtime-update.manager.test.ts +99 -0
- package/src/features/system-status/managers/runtime-update.manager.ts +22 -0
- package/src/features/system-status/stores/runtime-update.store.ts +1 -0
- package/src/platforms/desktop/components/desktop-app-shell.tsx +5 -0
- package/src/platforms/mobile/components/mobile-app-shell.tsx +9 -1
- package/src/shared/components/actions/__tests__/navigation-link.test.tsx +12 -0
- package/src/shared/components/actions/navigation-link.tsx +6 -3
- package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +34 -0
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +5 -0
- package/src/shared/components/doc-browser/doc-browser.tsx +11 -1
- package/src/shared/components/doc-browser/managers/doc-browser.manager.ts +13 -0
- package/src/shared/components/ui/actions/__tests__/icon-action-button.test.tsx +15 -0
- package/src/shared/components/ui/actions/icon-action-button.tsx +4 -2
- package/src/shared/components/ui/tabs.tsx +24 -1
- package/src/shared/hooks/use-server-path-watch.ts +42 -0
- package/src/shared/hooks/use-system-object-references.ts +22 -0
- package/src/shared/lib/api/server-path/server-path.types.ts +10 -0
- package/src/shared/lib/api/types.ts +13 -0
- package/src/shared/lib/api/utils/server-path.utils.ts +10 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +17 -9
- package/src/shared/lib/i18n/locales/en-US/desktop-update.json +7 -4
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +82 -0
- package/src/shared/lib/i18n/locales/en-US/marketplace.json +3 -0
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +19 -11
- package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +7 -4
- package/src/shared/lib/i18n/locales/zh-CN/doc-browser.json +82 -0
- package/src/shared/lib/i18n/locales/zh-CN/marketplace.json +3 -0
- package/vite.config.ts +32 -1
- package/dist/assets/appearance-settings-page-BYbvl2wj.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-Bjp9jf0h.js +0 -1
- package/dist/assets/channel-5T3pdR-s.js +0 -1
- package/dist/assets/chat-page-C5E-LLVd.js +0 -1
- package/dist/assets/chunk-2Q5K7J3B-DTZ3tGfE.js +0 -1
- package/dist/assets/chunk-VAUOI2AC-HLGIHQ6k.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-Dl0m6Ni-.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-DcDnzGNX.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BKXKMzKM.js +0 -1
- package/dist/assets/config-split-page-CA_a0AJ5.js +0 -1
- package/dist/assets/confirm-dialog-CxZfenjK.js +0 -5
- package/dist/assets/cynefin-VYW2F7L2-BWg7U2UD.js +0 -1
- package/dist/assets/desktop-update-config-BEKC8Ly9.js +0 -1
- package/dist/assets/doc-browser-Cl2ldE3f.js +0 -1
- package/dist/assets/doc-browser-DXCSd63E.js +0 -1
- package/dist/assets/doc-browser-context-FDPs3gJf.js +0 -1
- package/dist/assets/eventmodeling-45OFAUF4-SB-J4tpq.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-BQ_u-eLM.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-DPxNwsFd.js +0 -1
- package/dist/assets/i18n-provider-DkITJNz8.js +0 -1
- package/dist/assets/index-CQ2LcI2p.css +0 -1
- package/dist/assets/index-CrdfvBVg.js +0 -107
- package/dist/assets/info-DKCQHKI2-DNlNGH90.js +0 -1
- package/dist/assets/loader-circle-DHtUxCIA.js +0 -1
- package/dist/assets/mcp-marketplace-page-Bc_jI5iH.js +0 -9
- package/dist/assets/mcp-marketplace-page-CzCieD9r.js +0 -1
- package/dist/assets/model-config-page-C4jw-pcj.js +0 -1
- package/dist/assets/packet-7NZHBO7P-BpeiqkBZ.js +0 -1
- package/dist/assets/pie-RZYD4A2V-Cy1yxsPd.js +0 -1
- package/dist/assets/plus-CG1RwZQq.js +0 -1
- package/dist/assets/provider-scoped-model-input-CmH4BFvc.js +0 -1
- package/dist/assets/providers-config-page-CJQjwzaw.js +0 -1
- package/dist/assets/radar-I7S5WNFK-CEcPKCj8.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-CW38eNDs.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-ByrylcXf.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-CNB6GwP-.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-x6hnqlBG.js +0 -1
- package/dist/assets/react-DjFBVA0n.js +0 -8
- package/dist/assets/remote-BIlpD3yL.js +0 -1
- package/dist/assets/rotate-cw-bKG8zH8M.js +0 -1
- package/dist/assets/runtime-config-page-B_x2Glz5.js +0 -1
- package/dist/assets/search-config-page-BaIijtmO.js +0 -1
- package/dist/assets/secrets-config-page-CJjtdFAl.js +0 -3
- package/dist/assets/security-config-DB8apj09.js +0 -1
- package/dist/assets/skeleton-Bt6zxcAB.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-ZC6dFORv.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-CRkh51Im.js +0 -8
- package/dist/assets/treeView-QDETBFTQ-Bw0DSCH7.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-DFWBFcfh.js +0 -1
- package/dist/assets/wardley-OPB4EBWU-CoWturk0.js +0 -1
- package/dist/assets/x-CowtCu9Z.js +0 -1
- /package/dist/assets/{array-NADKd9aU.js → array-BQVzeGRt.js} +0 -0
- /package/dist/assets/{chunk-KEIR6QF5-BuyuzJJL.js → chunk-KEIR6QF5-f9psyCXK.js} +0 -0
- /package/dist/assets/{chunk-Y2CYZVJY-D_B2ZRNt.js → chunk-Y2CYZVJY-D1mAU_Po.js} +0 -0
- /package/dist/assets/{config-hints-BcfVUMij.js → config-hints-nV5HPOvq.js} +0 -0
- /package/dist/assets/{cytoscape.esm-BANTlgza.js → cytoscape.esm-0uDtdD0l.js} +0 -0
- /package/dist/assets/{defaultLocale-C4_L0aEs.js → defaultLocale-DSWXGgt0.js} +0 -0
- /package/dist/assets/{dist-DAPEIJbz.js → dist--ta5rX12.js} +0 -0
- /package/dist/assets/{graphlib-ChqXg0dI.js → graphlib-CQ6QV4yP.js} +0 -0
- /package/dist/assets/{host-capabilities-D9C4CBK5.js → host-capabilities-Tk038i04.js} +0 -0
- /package/dist/assets/{init-D8wZg9xq.js → init-Y6h9jGtZ.js} +0 -0
- /package/dist/assets/{jszip.min-CkbBfwAQ.js → jszip.min-8hyJpgpx.js} +0 -0
- /package/dist/assets/{katex-TZJFa0J_.js → katex-ARhY9PS1.js} +0 -0
- /package/dist/assets/{middleware-B3k-TSmZ.js → middleware-DXsbf9xI.js} +0 -0
- /package/dist/assets/{path-DodfxcX7.js → path-10BjdyLh.js} +0 -0
- /package/dist/assets/{rough.esm-CUaa1Rbe.js → rough.esm-DxgC_14r.js} +0 -0
- /package/dist/assets/{xlsx-CxByi7bR.js → xlsx-DrDuDNAa.js} +0 -0
|
@@ -1,5 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
|
2
|
+
import { createElement } from "react";
|
|
3
|
+
import { MemoryRouter, Route, Routes, useLocation } from "react-router-dom";
|
|
4
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { CHAT_DRAFT_SESSION_PATH } from "@/features/chat";
|
|
6
|
+
import { InboxPage, resolveInboxFilter } from "@/features/inbox/pages/inbox-page";
|
|
7
|
+
import { t } from "@/shared/lib/i18n";
|
|
8
|
+
|
|
9
|
+
const mocks = vi.hoisted(() => ({
|
|
10
|
+
prepareChatReference: vi.fn(),
|
|
11
|
+
requestSystemObjectReference: vi.fn(),
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
vi.mock("@/app/components/app-presenter-provider", () => ({
|
|
15
|
+
useAppPresenter: () => ({
|
|
16
|
+
chatDraftIntentManager: {
|
|
17
|
+
requestSystemObjectReference: mocks.requestSystemObjectReference,
|
|
18
|
+
},
|
|
19
|
+
inboxManager: {
|
|
20
|
+
archive: vi.fn(),
|
|
21
|
+
delete: vi.fn(),
|
|
22
|
+
markRead: vi.fn(),
|
|
23
|
+
markUnread: vi.fn(),
|
|
24
|
+
prepareChatReference: mocks.prepareChatReference,
|
|
25
|
+
restore: vi.fn(),
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
vi.mock("@/app/hooks/use-viewport-layout", () => ({
|
|
31
|
+
useViewportLayout: () => ({ isMobile: false }),
|
|
32
|
+
}));
|
|
33
|
+
|
|
34
|
+
vi.mock("@/features/inbox/hooks/use-inbox-deliveries", () => ({
|
|
35
|
+
useInboxDeliveries: () => ({
|
|
36
|
+
data: {
|
|
37
|
+
deliveries: [{
|
|
38
|
+
id: "delivery-1",
|
|
39
|
+
title: "A considered report",
|
|
40
|
+
summary: "A concise summary",
|
|
41
|
+
content: "# Finding",
|
|
42
|
+
contentType: "markdown",
|
|
43
|
+
source: { kind: "agent", agentId: null, sessionId: null, toolCallId: null, filePath: null },
|
|
44
|
+
createdAt: "2026-08-06T00:00:00.000Z",
|
|
45
|
+
updatedAt: "2026-08-06T00:00:00.000Z",
|
|
46
|
+
presentedAt: "2026-08-06T00:01:00.000Z",
|
|
47
|
+
readAt: "2026-08-06T00:02:00.000Z",
|
|
48
|
+
archivedAt: null,
|
|
49
|
+
}],
|
|
50
|
+
},
|
|
51
|
+
isError: false,
|
|
52
|
+
}),
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
vi.mock("@/features/inbox/components/inbox-delivery-content", () => ({
|
|
56
|
+
InboxDeliveryContent: ({ content }: { content: string }) =>
|
|
57
|
+
createElement("article", null, content),
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
vi.mock("@/shared/hooks/use-confirm-dialog", () => ({
|
|
61
|
+
useConfirmDialog: () => ({
|
|
62
|
+
confirm: vi.fn(async () => true),
|
|
63
|
+
ConfirmDialog: () => null,
|
|
64
|
+
}),
|
|
65
|
+
}));
|
|
66
|
+
|
|
67
|
+
function CurrentPath() {
|
|
68
|
+
return createElement(
|
|
69
|
+
"span",
|
|
70
|
+
{ "data-testid": "current-path" },
|
|
71
|
+
useLocation().pathname,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
3
74
|
|
|
4
75
|
const readDelivery = {
|
|
5
76
|
archivedAt: null,
|
|
@@ -26,3 +97,51 @@ describe("resolveInboxFilter", () => {
|
|
|
26
97
|
expect(resolveInboxFilter([unreadDelivery], "archived")).toBe("archived");
|
|
27
98
|
});
|
|
28
99
|
});
|
|
100
|
+
|
|
101
|
+
describe("InboxPage", () => {
|
|
102
|
+
beforeEach(() => {
|
|
103
|
+
vi.clearAllMocks();
|
|
104
|
+
mocks.prepareChatReference.mockResolvedValue({
|
|
105
|
+
reference: {
|
|
106
|
+
uri: "nextclaw://objects/inbox-delivery/delivery-1",
|
|
107
|
+
label: "A considered report",
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("opens a draft with the same visible system object intent as the reader dialog", async () => {
|
|
113
|
+
render(
|
|
114
|
+
createElement(
|
|
115
|
+
MemoryRouter,
|
|
116
|
+
{ initialEntries: ["/inbox/delivery-1"] },
|
|
117
|
+
createElement(
|
|
118
|
+
Routes,
|
|
119
|
+
null,
|
|
120
|
+
createElement(Route, {
|
|
121
|
+
path: "/inbox/:deliveryId",
|
|
122
|
+
element: createElement(
|
|
123
|
+
"div",
|
|
124
|
+
null,
|
|
125
|
+
createElement(InboxPage),
|
|
126
|
+
createElement(CurrentPath),
|
|
127
|
+
),
|
|
128
|
+
}),
|
|
129
|
+
createElement(Route, {
|
|
130
|
+
path: "*",
|
|
131
|
+
element: createElement(CurrentPath),
|
|
132
|
+
}),
|
|
133
|
+
),
|
|
134
|
+
),
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
fireEvent.click(screen.getByRole("button", { name: t("inboxContinueChat") }));
|
|
138
|
+
|
|
139
|
+
await waitFor(() => {
|
|
140
|
+
expect(screen.getByTestId("current-path").textContent).toBe(CHAT_DRAFT_SESSION_PATH);
|
|
141
|
+
});
|
|
142
|
+
expect(mocks.prepareChatReference).toHaveBeenCalledWith("delivery-1");
|
|
143
|
+
expect(mocks.requestSystemObjectReference).toHaveBeenCalledWith(
|
|
144
|
+
expect.objectContaining({ uri: "nextclaw://objects/inbox-delivery/delivery-1" }),
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
@@ -5,6 +5,7 @@ import { Link, useNavigate, useParams } from "react-router-dom";
|
|
|
5
5
|
import { useAppPresenter } from "@/app/components/app-presenter-provider";
|
|
6
6
|
import { PageHeader } from "@/app/components/layout/page-layout";
|
|
7
7
|
import { useViewportLayout } from "@/app/hooks/use-viewport-layout";
|
|
8
|
+
import { CHAT_DRAFT_SESSION_PATH } from "@/features/chat";
|
|
8
9
|
import { InboxDeliveryContent } from "@/features/inbox/components/inbox-delivery-content";
|
|
9
10
|
import { useInboxDeliveries } from "@/features/inbox/hooks/use-inbox-deliveries";
|
|
10
11
|
import { Button } from "@/shared/components/ui/button";
|
|
@@ -246,7 +247,7 @@ export function InboxPage() {
|
|
|
246
247
|
const navigate = useNavigate();
|
|
247
248
|
const { deliveryId } = useParams<{ deliveryId?: string }>();
|
|
248
249
|
const { isMobile } = useViewportLayout();
|
|
249
|
-
const { inboxManager } = useAppPresenter();
|
|
250
|
+
const { chatDraftIntentManager, inboxManager } = useAppPresenter();
|
|
250
251
|
const deliveriesQuery = useInboxDeliveries();
|
|
251
252
|
const { confirm, ConfirmDialog } = useConfirmDialog();
|
|
252
253
|
const [selectedFilter, setSelectedFilter] = useState<InboxFilter | null>(null);
|
|
@@ -287,8 +288,9 @@ export function InboxPage() {
|
|
|
287
288
|
return;
|
|
288
289
|
}
|
|
289
290
|
void runAction("continue", async () => {
|
|
290
|
-
const
|
|
291
|
-
|
|
291
|
+
const { reference } = await inboxManager.prepareChatReference(activeDelivery.id);
|
|
292
|
+
chatDraftIntentManager.requestSystemObjectReference(reference);
|
|
293
|
+
navigate(CHAT_DRAFT_SESSION_PATH);
|
|
292
294
|
});
|
|
293
295
|
};
|
|
294
296
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { fireEvent, render, screen } from "@testing-library/react";
|
|
1
|
+
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
|
2
2
|
import { MarketplacePage } from "@/features/marketplace";
|
|
3
|
+
import { NextClawClientError } from "@nextclaw/client-sdk";
|
|
3
4
|
import type {
|
|
4
5
|
MarketplaceInstalledView,
|
|
5
6
|
MarketplaceItemSummary,
|
|
@@ -82,6 +83,8 @@ vi.mock("@/shared/lib/host-capabilities", () => ({
|
|
|
82
83
|
}));
|
|
83
84
|
|
|
84
85
|
vi.mock("@/features/marketplace/hooks/use-marketplace", () => ({
|
|
86
|
+
isMarketplaceSkillLocalChangesError: (error: { code?: string }) =>
|
|
87
|
+
error?.code === "MARKETPLACE_SKILL_LOCAL_CHANGES",
|
|
85
88
|
useMarketplaceItems: () => mocks.itemsQuery,
|
|
86
89
|
useMarketplaceRecentItems: () => mocks.recentItemsQuery,
|
|
87
90
|
useMarketplaceSkillScenes: () => ({
|
|
@@ -160,6 +163,43 @@ function createInstalledQuery(
|
|
|
160
163
|
};
|
|
161
164
|
}
|
|
162
165
|
|
|
166
|
+
function prepareInstalledSkillUpdate() {
|
|
167
|
+
const item = createMarketplaceItem();
|
|
168
|
+
mocks.itemsQuery = createItemsQuery({
|
|
169
|
+
data: {
|
|
170
|
+
total: 1,
|
|
171
|
+
page: 1,
|
|
172
|
+
pageSize: 20,
|
|
173
|
+
totalPages: 1,
|
|
174
|
+
sort: "relevance",
|
|
175
|
+
items: [item],
|
|
176
|
+
} satisfies MarketplaceListView,
|
|
177
|
+
});
|
|
178
|
+
mocks.installedQuery = createInstalledQuery({
|
|
179
|
+
data: {
|
|
180
|
+
type: "skill",
|
|
181
|
+
total: 1,
|
|
182
|
+
specs: [item.slug],
|
|
183
|
+
records: [{
|
|
184
|
+
type: "skill",
|
|
185
|
+
id: item.slug,
|
|
186
|
+
spec: item.slug,
|
|
187
|
+
source: "workspace",
|
|
188
|
+
origin: "marketplace",
|
|
189
|
+
catalogSlug: item.slug,
|
|
190
|
+
enabled: true,
|
|
191
|
+
}],
|
|
192
|
+
} satisfies MarketplaceInstalledView,
|
|
193
|
+
});
|
|
194
|
+
mocks.manageMutation.mutateAsync.mockRejectedValueOnce(
|
|
195
|
+
new NextClawClientError({
|
|
196
|
+
message: "Local skill files changed since install: web-search",
|
|
197
|
+
status: 409,
|
|
198
|
+
code: "MARKETPLACE_SKILL_LOCAL_CHANGES",
|
|
199
|
+
}),
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
163
203
|
describe("MarketplacePage", () => {
|
|
164
204
|
beforeEach(() => {
|
|
165
205
|
mocks.navigate.mockReset();
|
|
@@ -364,4 +404,48 @@ describe("MarketplacePage", () => {
|
|
|
364
404
|
|
|
365
405
|
expect(mocks.openExternalUrl).toHaveBeenCalledWith("https://skillhub.cn/");
|
|
366
406
|
});
|
|
407
|
+
|
|
408
|
+
it("asks before overwriting local skill changes and retries the update with force", async () => {
|
|
409
|
+
prepareInstalledSkillUpdate();
|
|
410
|
+
mocks.manageMutation.mutateAsync.mockResolvedValueOnce({});
|
|
411
|
+
mocks.confirm.mockResolvedValueOnce(true);
|
|
412
|
+
|
|
413
|
+
render(<MarketplacePage forcedType="skills" />);
|
|
414
|
+
fireEvent.click(screen.getByRole("button", { name: "Update" }));
|
|
415
|
+
|
|
416
|
+
await waitFor(() => expect(mocks.confirm).toHaveBeenCalledWith({
|
|
417
|
+
title: "Overwrite local changes and update?",
|
|
418
|
+
description: "This skill was changed after installation. Continuing replaces local changes in its skill directory with the latest marketplace version. Canceling leaves the current files unchanged.",
|
|
419
|
+
confirmLabel: "Overwrite and Update",
|
|
420
|
+
variant: "destructive",
|
|
421
|
+
}));
|
|
422
|
+
await waitFor(() => expect(mocks.manageMutation.mutateAsync).toHaveBeenCalledTimes(2));
|
|
423
|
+
expect(mocks.manageMutation.mutateAsync).toHaveBeenNthCalledWith(1, {
|
|
424
|
+
type: "skill",
|
|
425
|
+
action: "update",
|
|
426
|
+
id: "web-search",
|
|
427
|
+
spec: "web-search",
|
|
428
|
+
});
|
|
429
|
+
expect(mocks.manageMutation.mutateAsync).toHaveBeenNthCalledWith(2, {
|
|
430
|
+
type: "skill",
|
|
431
|
+
action: "update",
|
|
432
|
+
id: "web-search",
|
|
433
|
+
spec: "web-search",
|
|
434
|
+
force: true,
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
it("keeps local skill changes untouched when overwrite is canceled", async () => {
|
|
439
|
+
prepareInstalledSkillUpdate();
|
|
440
|
+
mocks.confirm.mockResolvedValueOnce(false);
|
|
441
|
+
|
|
442
|
+
render(<MarketplacePage forcedType="skills" />);
|
|
443
|
+
fireEvent.click(screen.getByRole("button", { name: "Update" }));
|
|
444
|
+
|
|
445
|
+
await waitFor(() => expect(mocks.confirm).toHaveBeenCalledTimes(1));
|
|
446
|
+
expect(mocks.manageMutation.mutateAsync).toHaveBeenCalledTimes(1);
|
|
447
|
+
expect(mocks.manageMutation.mutateAsync).not.toHaveBeenCalledWith(
|
|
448
|
+
expect.objectContaining({ force: true }),
|
|
449
|
+
);
|
|
450
|
+
});
|
|
367
451
|
});
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
2
|
-
import { renderHook, waitFor } from "@testing-library/react";
|
|
2
|
+
import { act, renderHook, waitFor } from "@testing-library/react";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import {
|
|
5
|
+
useManageMarketplaceItem,
|
|
5
6
|
useMarketplaceItems,
|
|
6
7
|
useMarketplaceRecentItems,
|
|
7
8
|
} from "@/features/marketplace/hooks/use-marketplace";
|
|
9
|
+
import { NextClawClientError } from "@nextclaw/client-sdk";
|
|
8
10
|
import type { MarketplaceListView } from "@/shared/lib/api";
|
|
9
11
|
|
|
10
12
|
const mocks = vi.hoisted(() => ({
|
|
11
13
|
fetchMarketplaceItems: vi.fn(),
|
|
14
|
+
manageMarketplaceItem: vi.fn(),
|
|
15
|
+
toastError: vi.fn(),
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
vi.mock("sonner", () => ({
|
|
19
|
+
toast: {
|
|
20
|
+
error: mocks.toastError,
|
|
21
|
+
success: vi.fn(),
|
|
22
|
+
},
|
|
12
23
|
}));
|
|
13
24
|
|
|
14
25
|
vi.mock("@/shared/lib/api", async () => {
|
|
@@ -16,6 +27,7 @@ vi.mock("@/shared/lib/api", async () => {
|
|
|
16
27
|
return {
|
|
17
28
|
...(actual as object),
|
|
18
29
|
fetchMarketplaceItems: mocks.fetchMarketplaceItems,
|
|
30
|
+
manageMarketplaceItem: mocks.manageMarketplaceItem,
|
|
19
31
|
};
|
|
20
32
|
});
|
|
21
33
|
|
|
@@ -132,3 +144,34 @@ describe("useMarketplaceItems", () => {
|
|
|
132
144
|
});
|
|
133
145
|
});
|
|
134
146
|
});
|
|
147
|
+
|
|
148
|
+
describe("useManageMarketplaceItem", () => {
|
|
149
|
+
beforeEach(() => {
|
|
150
|
+
mocks.manageMarketplaceItem.mockReset();
|
|
151
|
+
mocks.toastError.mockReset();
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it("leaves local-change conflicts for the explicit overwrite confirmation", async () => {
|
|
155
|
+
const conflict = new NextClawClientError({
|
|
156
|
+
message: "Local skill files changed since install: web-search",
|
|
157
|
+
status: 409,
|
|
158
|
+
code: "MARKETPLACE_SKILL_LOCAL_CHANGES",
|
|
159
|
+
});
|
|
160
|
+
mocks.manageMarketplaceItem.mockRejectedValueOnce(conflict);
|
|
161
|
+
|
|
162
|
+
const { result } = renderHook(() => useManageMarketplaceItem(), {
|
|
163
|
+
wrapper: createWrapper(),
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
await act(async () => {
|
|
167
|
+
await expect(result.current.mutateAsync({
|
|
168
|
+
type: "skill",
|
|
169
|
+
action: "update",
|
|
170
|
+
id: "web-search",
|
|
171
|
+
spec: "web-search",
|
|
172
|
+
})).rejects.toBe(conflict);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
expect(mocks.toastError).not.toHaveBeenCalled();
|
|
176
|
+
});
|
|
177
|
+
});
|
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
MarketplaceManageAction,
|
|
5
5
|
} from "@/shared/lib/api";
|
|
6
6
|
import {
|
|
7
|
+
isMarketplaceSkillLocalChangesError,
|
|
7
8
|
useInstallMarketplaceItem,
|
|
8
9
|
useManageMarketplaceItem,
|
|
9
10
|
} from "@/features/marketplace/hooks/use-marketplace";
|
|
@@ -76,12 +77,32 @@ export function useMarketplaceItemActions() {
|
|
|
76
77
|
setManagingTargets((previous) => new Map(previous).set(targetId, action));
|
|
77
78
|
|
|
78
79
|
try {
|
|
79
|
-
|
|
80
|
+
const request = {
|
|
80
81
|
type: record.type,
|
|
81
82
|
action,
|
|
82
83
|
id: targetId,
|
|
83
84
|
spec: record.spec,
|
|
84
|
-
}
|
|
85
|
+
} as const;
|
|
86
|
+
try {
|
|
87
|
+
await manageMutation.mutateAsync(request);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
if (action !== "update" || !isMarketplaceSkillLocalChangesError(error)) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const confirmed = await confirm({
|
|
93
|
+
title: t("marketplaceUpdateConflictTitle"),
|
|
94
|
+
description: t("marketplaceUpdateConflictDescription"),
|
|
95
|
+
confirmLabel: t("marketplaceUpdateConflictConfirm"),
|
|
96
|
+
variant: "destructive",
|
|
97
|
+
});
|
|
98
|
+
if (!confirmed) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
await manageMutation.mutateAsync({
|
|
102
|
+
...request,
|
|
103
|
+
force: true,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
85
106
|
} finally {
|
|
86
107
|
setManagingTargets((previous) => {
|
|
87
108
|
const next = new Map(previous);
|
|
@@ -24,8 +24,15 @@ import type {
|
|
|
24
24
|
} from '@/shared/lib/api';
|
|
25
25
|
import { collapseMarketplaceListPages } from '@/features/marketplace/utils/marketplace-list-pages.utils';
|
|
26
26
|
import { useMemo } from 'react';
|
|
27
|
+
import { NextClawClientError } from '@nextclaw/client-sdk';
|
|
27
28
|
|
|
28
29
|
const MARKETPLACE_BACKGROUND_REFRESH_MS = 30_000;
|
|
30
|
+
export const MARKETPLACE_SKILL_LOCAL_CHANGES_ERROR_CODE = 'MARKETPLACE_SKILL_LOCAL_CHANGES';
|
|
31
|
+
|
|
32
|
+
export function isMarketplaceSkillLocalChangesError(error: unknown): boolean {
|
|
33
|
+
return error instanceof NextClawClientError
|
|
34
|
+
&& error.code === MARKETPLACE_SKILL_LOCAL_CHANGES_ERROR_CODE;
|
|
35
|
+
}
|
|
29
36
|
|
|
30
37
|
export function useMarketplaceItems(params: MarketplaceListParams) {
|
|
31
38
|
const query = useInfiniteQuery({
|
|
@@ -209,6 +216,9 @@ export function useManageMarketplaceItem() {
|
|
|
209
216
|
toast.success(result.message || fallback);
|
|
210
217
|
},
|
|
211
218
|
onError: (error: Error) => {
|
|
219
|
+
if (isMarketplaceSkillLocalChangesError(error)) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
212
222
|
toast.error(error.message || t('marketplaceOperationFailed'));
|
|
213
223
|
}
|
|
214
224
|
});
|
|
@@ -3,6 +3,10 @@ export { McpMarketplacePage } from './components/mcp/mcp-marketplace-page';
|
|
|
3
3
|
export {
|
|
4
4
|
MARKETPLACE_DETAIL_DOC_BROWSER_RENDERERS,
|
|
5
5
|
} from './components/marketplace-detail-doc';
|
|
6
|
+
export {
|
|
7
|
+
buildLocaleFallbacks,
|
|
8
|
+
pickLocalizedText,
|
|
9
|
+
} from './components/marketplace-localization';
|
|
6
10
|
export {
|
|
7
11
|
useInstallMarketplaceItem,
|
|
8
12
|
useManageMarketplaceItem,
|
|
@@ -134,7 +134,7 @@ describe('PanelAppsList', () => {
|
|
|
134
134
|
|
|
135
135
|
expect(screen.getByText('Demo Panel')).toBeTruthy();
|
|
136
136
|
|
|
137
|
-
await user.click(screen.getByRole('
|
|
137
|
+
await user.click(screen.getByRole('tab', { name: 'Favorites' }));
|
|
138
138
|
|
|
139
139
|
expect(screen.getByText('No panel apps in this view')).toBeTruthy();
|
|
140
140
|
expect(screen.queryByText('Create your first panel app')).toBeNull();
|
|
@@ -14,10 +14,8 @@ import { t } from '@/shared/lib/i18n';
|
|
|
14
14
|
const EMPTY_PANEL_APP_ENTRIES: PanelAppEntryView[] = [];
|
|
15
15
|
|
|
16
16
|
export function PanelAppsList({
|
|
17
|
-
headerContent,
|
|
18
17
|
onOpenPanelApp,
|
|
19
18
|
}: {
|
|
20
|
-
headerContent?: ReactNode;
|
|
21
19
|
onOpenPanelApp: (entry: PanelAppEntryView) => void;
|
|
22
20
|
}) {
|
|
23
21
|
const panelApps = usePanelApps();
|
|
@@ -95,11 +93,8 @@ export function PanelAppsList({
|
|
|
95
93
|
|
|
96
94
|
return (
|
|
97
95
|
<div className="flex h-full min-h-0 flex-col bg-card text-card-foreground">
|
|
98
|
-
<div className="flex items-center justify-
|
|
96
|
+
<div className="flex min-h-12 shrink-0 items-center justify-end gap-2 border-b border-border/70 px-4 py-2">
|
|
99
97
|
<div className="flex min-w-0 items-center gap-1.5">
|
|
100
|
-
{headerContent ?? (
|
|
101
|
-
<div className="truncate text-sm font-semibold text-foreground">{t('panelAppsTitle')}</div>
|
|
102
|
-
)}
|
|
103
98
|
{panelApps.data?.panelsPath ? (
|
|
104
99
|
<TooltipProvider delayDuration={250}>
|
|
105
100
|
<Tooltip>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { PanelAppsList } from './components/panel-apps-list';
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
useGrantPanelAppClient,
|
|
4
|
+
usePanelApps,
|
|
5
|
+
useRecordPanelAppOpened,
|
|
6
|
+
} from './hooks/use-panel-apps';
|
|
3
7
|
export { PanelAppBridgeManager } from './managers/panel-app-bridge.manager';
|
|
4
8
|
export { findPanelAppEntryByDisplayId } from './utils/panel-app-entry-match.utils';
|
|
5
9
|
export { PANEL_APP_IFRAME_SANDBOX, focusPanelAppIframe } from './utils/panel-app-iframe.utils';
|
|
@@ -4,9 +4,16 @@ import {
|
|
|
4
4
|
} from '@/features/panel-apps/utils/panel-app-doc-browser.utils';
|
|
5
5
|
|
|
6
6
|
describe('panel app doc browser URL helpers', () => {
|
|
7
|
-
it('uses the root apps URL for the
|
|
8
|
-
expect(createAppsPanelUrl('
|
|
9
|
-
expect(getAppsPanelTabFromUrl('nextclaw://apps')).toBe('
|
|
7
|
+
it('uses the root apps URL for the package library', () => {
|
|
8
|
+
expect(createAppsPanelUrl('apps')).toBe('nextclaw://apps');
|
|
9
|
+
expect(getAppsPanelTabFromUrl('nextclaw://apps')).toBe('apps');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('round-trips the developer panel apps tab', () => {
|
|
13
|
+
const url = createAppsPanelUrl('panel-apps');
|
|
14
|
+
|
|
15
|
+
expect(url).toBe('nextclaw://apps?tab=panel-apps');
|
|
16
|
+
expect(getAppsPanelTabFromUrl(url)).toBe('panel-apps');
|
|
10
17
|
});
|
|
11
18
|
|
|
12
19
|
it('round-trips the service apps tab through the hidden apps URL', () => {
|
|
@@ -16,8 +23,8 @@ describe('panel app doc browser URL helpers', () => {
|
|
|
16
23
|
expect(getAppsPanelTabFromUrl(url)).toBe('service-apps');
|
|
17
24
|
});
|
|
18
25
|
|
|
19
|
-
it('falls back to
|
|
20
|
-
expect(getAppsPanelTabFromUrl('nextclaw://apps?tab=unknown')).toBe('
|
|
21
|
-
expect(getAppsPanelTabFromUrl('not a url')).toBe('
|
|
26
|
+
it('falls back to the package library for unknown URL state', () => {
|
|
27
|
+
expect(getAppsPanelTabFromUrl('nextclaw://apps?tab=unknown')).toBe('apps');
|
|
28
|
+
expect(getAppsPanelTabFromUrl('not a url')).toBe('apps');
|
|
22
29
|
});
|
|
23
30
|
});
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
RIGHT_PANEL_APPS_URL,
|
|
11
11
|
RIGHT_PANEL_HOME_TAB_KIND,
|
|
12
12
|
RIGHT_PANEL_PANEL_APP_TAB_KIND,
|
|
13
|
+
RIGHT_PANEL_PANEL_APPS_URL,
|
|
13
14
|
RIGHT_PANEL_SERVICE_APPS_URL,
|
|
14
15
|
RightPanelResourceHomePage,
|
|
15
16
|
} from '@/features/right-panel-resources';
|
|
@@ -18,14 +19,16 @@ import { PANEL_APP_IFRAME_SANDBOX, focusPanelAppIframe } from './panel-app-ifram
|
|
|
18
19
|
|
|
19
20
|
export const APPS_TAB_KIND = RIGHT_PANEL_APPS_TAB_KIND;
|
|
20
21
|
export const PANEL_APP_TAB_KIND = RIGHT_PANEL_PANEL_APP_TAB_KIND;
|
|
21
|
-
const DEFAULT_APPS_PANEL_TAB: AppsPanelTab = '
|
|
22
|
+
const DEFAULT_APPS_PANEL_TAB: AppsPanelTab = 'apps';
|
|
22
23
|
|
|
23
24
|
function isAppsPanelTab(value: unknown): value is AppsPanelTab {
|
|
24
|
-
return value === 'panel-apps' || value === 'service-apps';
|
|
25
|
+
return value === 'apps' || value === 'panel-apps' || value === 'service-apps';
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export function createAppsPanelUrl(tab: AppsPanelTab = DEFAULT_APPS_PANEL_TAB): string {
|
|
28
|
-
|
|
29
|
+
if (tab === 'panel-apps') return RIGHT_PANEL_PANEL_APPS_URL;
|
|
30
|
+
if (tab === 'service-apps') return RIGHT_PANEL_SERVICE_APPS_URL;
|
|
31
|
+
return RIGHT_PANEL_APPS_URL;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
export function getAppsPanelTabFromUrl(url: string): AppsPanelTab {
|
package/src/features/right-panel-resources/utils/__tests__/right-panel-resource-uri.utils.test.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import type { PanelAppEntryView } from '@/shared/lib/api';
|
|
3
3
|
import {
|
|
4
|
+
createChatUiResourceReferenceFromTab,
|
|
4
5
|
createPanelAppContentPath,
|
|
5
6
|
createPanelAppResourceUri,
|
|
6
7
|
createPanelAppRightPanelResourceTarget,
|
|
@@ -26,6 +27,39 @@ function createPanelAppEntry(overrides: Partial<PanelAppEntryView> = {}): PanelA
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
describe('right-panel-resource uri utils', () => {
|
|
30
|
+
it('creates a stable chat reference for an addressable panel tab', () => {
|
|
31
|
+
expect(createChatUiResourceReferenceFromTab({
|
|
32
|
+
id: 'panel-demo',
|
|
33
|
+
kind: 'panel-app',
|
|
34
|
+
title: 'Demo App',
|
|
35
|
+
currentUrl: '/api/panel-apps/demo/content',
|
|
36
|
+
resourceUri: 'nextclaw://panel-app/demo',
|
|
37
|
+
contentParams: { itemId: 'note-1' },
|
|
38
|
+
history: ['/api/panel-apps/demo/content'],
|
|
39
|
+
historyIndex: 0,
|
|
40
|
+
navVersion: 0,
|
|
41
|
+
})).toEqual({
|
|
42
|
+
uri: 'nextclaw://panel-app/demo',
|
|
43
|
+
resourceKind: 'panel-app',
|
|
44
|
+
title: 'Demo App',
|
|
45
|
+
currentUrl: '/api/panel-apps/demo/content',
|
|
46
|
+
contentParams: { itemId: 'note-1' },
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('does not create chat references for empty browser tabs', () => {
|
|
51
|
+
expect(createChatUiResourceReferenceFromTab({
|
|
52
|
+
id: 'home',
|
|
53
|
+
kind: 'home',
|
|
54
|
+
title: 'Start Page',
|
|
55
|
+
currentUrl: 'nextclaw://new-tab',
|
|
56
|
+
resourceUri: 'nextclaw://new-tab',
|
|
57
|
+
history: ['nextclaw://new-tab'],
|
|
58
|
+
historyIndex: 0,
|
|
59
|
+
navVersion: 0,
|
|
60
|
+
})).toBeNull();
|
|
61
|
+
});
|
|
62
|
+
|
|
29
63
|
it('builds matching external panel app resource and content URLs', () => {
|
|
30
64
|
expect(createPanelAppResourceUri('demo', '/tmp/demo.panel')).toBe(
|
|
31
65
|
'nextclaw://panel-app/demo?path=%2Ftmp%2Fdemo.panel',
|
|
@@ -1,24 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readChatUiResourceReference,
|
|
3
|
+
type ChatUiResourceReference,
|
|
4
|
+
} from '@nextclaw/shared';
|
|
1
5
|
import type { PanelAppEntryView } from '@/shared/lib/api';
|
|
2
6
|
import type { DocBrowserDockIcon } from '@/shared/components/doc-browser';
|
|
7
|
+
import type { DocBrowserTab } from '@/shared/components/doc-browser/doc-browser-context';
|
|
3
8
|
import type { RightPanelResourceTarget } from '@/features/right-panel-resources/types/right-panel-resource.types';
|
|
4
9
|
|
|
5
10
|
export const RIGHT_PANEL_HOME_TAB_KIND = 'home';
|
|
6
11
|
export const RIGHT_PANEL_HOME_URL = 'nextclaw://new-tab';
|
|
7
12
|
export const RIGHT_PANEL_APPS_TAB_KIND = 'apps';
|
|
8
13
|
export const RIGHT_PANEL_APPS_URL = 'nextclaw://apps';
|
|
14
|
+
export const RIGHT_PANEL_PANEL_APPS_URL = `${RIGHT_PANEL_APPS_URL}?tab=panel-apps`;
|
|
9
15
|
export const RIGHT_PANEL_SERVICE_APPS_URL = `${RIGHT_PANEL_APPS_URL}?tab=service-apps`;
|
|
10
16
|
export const RIGHT_PANEL_PANEL_APP_TAB_KIND = 'panel-app';
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
const NON_REFERENCEABLE_RESOURCE_URIS = new Set([
|
|
19
|
+
RIGHT_PANEL_HOME_URL,
|
|
20
|
+
'about:blank',
|
|
21
|
+
]);
|
|
13
22
|
|
|
14
|
-
|
|
23
|
+
export function createChatUiResourceReferenceFromTab(
|
|
24
|
+
tab: DocBrowserTab,
|
|
25
|
+
): ChatUiResourceReference | null {
|
|
26
|
+
const uri = tab.resourceUri?.trim() || tab.currentUrl.trim();
|
|
27
|
+
const currentUrl = tab.currentUrl.trim();
|
|
28
|
+
if (!uri || !currentUrl || NON_REFERENCEABLE_RESOURCE_URIS.has(uri)) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return readChatUiResourceReference({
|
|
32
|
+
uri,
|
|
33
|
+
resourceKind: tab.kind,
|
|
34
|
+
title: tab.title.trim() || uri,
|
|
35
|
+
currentUrl,
|
|
36
|
+
...(tab.contentParams
|
|
37
|
+
? { contentParams: structuredClone(tab.contentParams) }
|
|
38
|
+
: {}),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type RightPanelAppsTab = 'apps' | 'panel-apps' | 'service-apps';
|
|
43
|
+
|
|
44
|
+
const DEFAULT_RIGHT_PANEL_APPS_TAB: RightPanelAppsTab = 'apps';
|
|
15
45
|
|
|
16
46
|
function isRightPanelAppsTab(value: unknown): value is RightPanelAppsTab {
|
|
17
|
-
return value === 'panel-apps' || value === 'service-apps';
|
|
47
|
+
return value === 'apps' || value === 'panel-apps' || value === 'service-apps';
|
|
18
48
|
}
|
|
19
49
|
|
|
20
50
|
export function createRightPanelAppsUrl(tab: RightPanelAppsTab = DEFAULT_RIGHT_PANEL_APPS_TAB): string {
|
|
21
|
-
|
|
51
|
+
if (tab === 'panel-apps') return RIGHT_PANEL_PANEL_APPS_URL;
|
|
52
|
+
if (tab === 'service-apps') return RIGHT_PANEL_SERVICE_APPS_URL;
|
|
53
|
+
return RIGHT_PANEL_APPS_URL;
|
|
22
54
|
}
|
|
23
55
|
|
|
24
56
|
export function getRightPanelAppsTabFromUrl(url: string): RightPanelAppsTab {
|