@nextclaw/ui 0.12.24 → 0.12.25
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 +68 -29
- package/dist/assets/api-DGD9_Bg4.js +15 -0
- package/dist/assets/app-manager-provider-oYdeYPSv.js +1 -0
- package/dist/assets/{book-open-DDlN5MvX.js → book-open-BcnAiKde.js} +1 -1
- package/dist/assets/channels-list-page-FJDuPwU6.js +8 -0
- package/dist/assets/chat-page-D1fMNBrT.js +1 -0
- package/dist/assets/config-split-page-CcrEUtwu.js +1 -0
- package/dist/assets/cpu-DPPwMzoC.js +3 -0
- package/dist/assets/{createLucideIcon-BLMK3QUd.js → createLucideIcon-DzY6wN61.js} +1 -1
- package/dist/assets/desktop-kk7qvZ-v.js +3 -0
- package/dist/assets/desktop-update-config-CP8dFYXK.js +1 -0
- package/dist/assets/{dialog-C3D7Be0p.js → dialog-BKo0RItd.js} +1 -1
- package/dist/assets/{dist-CPlbUgwU.js → dist-CFiwgaLs.js} +1 -1
- package/dist/assets/doc-browser-CAhfnm0D.js +1 -0
- package/dist/assets/{doc-browser-context-BJuMaI3o.js → doc-browser-context-FukQHvyo.js} +1 -1
- package/dist/assets/doc-browser-p9DDNPWB.js +1 -0
- package/dist/assets/doc-browser-rZIQIjuw.js +1 -0
- package/dist/assets/download-CMM8po31.js +1 -0
- package/dist/assets/{es2015-xqN1slyW.js → es2015-BhznEEyJ.js} +1 -1
- package/dist/assets/{external-link-DwfSfTLB.js → external-link-CpEvG65F.js} +1 -1
- package/dist/assets/i18n-D1144VAA.js +1 -0
- package/dist/assets/index-D-AAMKCt.js +103 -0
- package/dist/assets/index-DnBeV2Xm.css +1 -0
- package/dist/assets/{key-round-CJ5gDAAG.js → key-round-DUq47t0P.js} +1 -1
- package/dist/assets/marketplace-page-BrCLRIc4.js +105 -0
- package/dist/assets/marketplace-page-odDpPYEs.js +1 -0
- package/dist/assets/mcp-marketplace-page-CfbOBgKK.js +1 -0
- package/dist/assets/mcp-marketplace-page-DIq_SpMe.js +40 -0
- package/dist/assets/model-config-Bc6VVnxy.js +1 -0
- package/dist/assets/{notice-card-BFDbKQDA.js → notice-card-Dr6xCwva.js} +1 -1
- package/dist/assets/play-AqrNslHI.js +1 -0
- package/dist/assets/plus-B-YHtTNC.js +1 -0
- package/dist/assets/{popover-B86Dbfhf.js → popover-BDFNiLlg.js} +1 -1
- package/dist/assets/provider-scoped-model-input-BMTp4BEH.js +1 -0
- package/dist/assets/providers-list-DN0tvISH.js +1 -0
- package/dist/assets/refresh-cw-CrbD8EkT.js +1 -0
- package/dist/assets/remote-Dr3jcfWP.js +1 -0
- package/dist/assets/{rotate-cw-BZ2JObNs.js → rotate-cw-BN9yjccP.js} +1 -1
- package/dist/assets/runtime-config-page-CRWOwBbl.js +1 -0
- package/dist/assets/{save-euRxl8pI.js → save-CO_4qf6b.js} +1 -1
- package/dist/assets/{search-CLd7m0M7.js → search-CRtQwr-h.js} +1 -1
- package/dist/assets/search-config-C4c1yZSP.js +1 -0
- package/dist/assets/secrets-config-zAF30YfO.js +3 -0
- package/dist/assets/{select-CJ0wbo3D.js → select-BUTwE_lC.js} +1 -1
- package/dist/assets/{setting-row-D1Yygqp7.js → setting-row-BavcnXw1.js} +1 -1
- package/dist/assets/settings-MWL2SMyk.js +1 -0
- package/dist/assets/{sparkles-DVfeSVJQ.js → sparkles-BmgOD4nY.js} +1 -1
- package/dist/assets/{status-dot-ChvPCib9.js → status-dot-l3kPFdq_.js} +1 -1
- package/dist/assets/{tabs-custom-Hia_ong0.js → tabs-custom-D48zdZoc.js} +1 -1
- package/dist/assets/{tag-chip-FrkmkT8r.js → tag-chip-Dm2Lqnpu.js} +1 -1
- package/dist/assets/use-config-Cyv5IuSt.js +1 -0
- package/dist/assets/use-infinite-scroll-loader-Cvz8ZteY.js +1 -0
- package/dist/assets/x-BeyYA_h6.js +1 -0
- package/dist/index.html +29 -40
- package/package.json +9 -9
- package/src/app/components/layout/sidebar.layout.test.tsx +2 -4
- package/src/app/components/theme-provider.tsx +1 -0
- package/src/app/configs/app-navigation.config.ts +0 -6
- package/src/app/index.tsx +4 -7
- package/src/features/agents/components/agents-page.test.tsx +25 -15
- package/src/features/agents/components/agents-page.tsx +133 -172
- package/src/features/channels/components/config/channel-form.test.tsx +1 -0
- package/src/features/channels/components/config/channel-form.tsx +4 -3
- package/src/features/channels/components/config/weixin-channel-auth-section.test.tsx +38 -1
- package/src/features/channels/components/config/weixin-channel-auth-section.tsx +137 -40
- package/src/features/channels/index.ts +1 -1
- package/src/features/channels/utils/channel-form-fields.utils.test.ts +26 -0
- package/src/features/channels/utils/channel-form-fields.utils.ts +32 -18
- package/src/features/chat/components/chat-session-workspace-panel-nav.tsx +23 -4
- package/src/features/chat/components/chat-session-workspace-panel.tsx +34 -2
- package/src/features/chat/components/chat-sidebar-session-item.tsx +9 -3
- package/src/features/chat/components/conversation/chat-conversation-header.test.tsx +71 -0
- package/src/features/chat/components/conversation/chat-conversation-header.tsx +6 -0
- package/src/features/chat/components/conversation/chat-conversation-panel.test.tsx +181 -61
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +54 -23
- package/src/features/chat/components/conversation/session-header/chat-session-header-actions.test.tsx +24 -0
- package/src/features/chat/components/conversation/session-header/chat-session-header-actions.tsx +26 -5
- package/src/features/chat/components/layout/chat-sidebar-utility-menu.tsx +174 -0
- package/src/features/chat/components/layout/chat-sidebar.test.tsx +45 -8
- package/src/features/chat/components/layout/chat-sidebar.tsx +29 -46
- package/src/features/chat/components/providers/chat-presenter.provider.tsx +2 -0
- package/src/features/chat/components/workspace/session-cron-job-content.tsx +103 -0
- package/src/features/chat/hooks/use-ncp-agent-runtime.test.tsx +14 -0
- package/src/features/chat/hooks/use-ncp-chat-page-data.test.tsx +70 -0
- package/src/features/chat/hooks/use-ncp-chat-page-data.ts +1 -1
- package/src/features/chat/hooks/use-ncp-child-session-tabs-view.ts +2 -8
- package/src/features/chat/hooks/use-ncp-session-list-view.ts +1 -2
- package/src/features/chat/managers/chat-session-list.manager.test.ts +7 -9
- package/src/features/chat/managers/chat-session-list.manager.ts +5 -10
- package/src/features/chat/managers/ncp-chat-input.manager.test.ts +0 -2
- package/src/features/chat/managers/ncp-chat-presenter.manager.ts +6 -0
- package/src/features/chat/managers/ncp-chat-thread.manager.test.ts +52 -1
- package/src/features/chat/managers/ncp-chat-thread.manager.ts +21 -0
- package/src/features/chat/pages/ncp-chat-page.tsx +5 -4
- package/src/features/chat/stores/chat-session-list.store.ts +0 -2
- package/src/features/chat/stores/chat-thread.store.ts +4 -0
- package/src/features/chat/utils/chat-session-display.utils.test.ts +83 -1
- package/src/features/chat/utils/chat-session-display.utils.ts +73 -0
- package/src/features/chat/utils/ncp-session-adapter.utils.test.ts +22 -0
- package/src/features/chat/utils/ncp-session-adapter.utils.ts +32 -0
- package/src/features/marketplace/components/curated-shelves/marketplace-curated-scene-route.test.tsx +235 -0
- package/src/features/marketplace/components/curated-shelves/marketplace-curated-shelves.config.ts +162 -0
- package/src/features/marketplace/components/curated-shelves/marketplace-curated-shelves.tsx +355 -0
- package/src/features/marketplace/components/curated-shelves/marketplace-shelf-card.tsx +118 -0
- package/src/features/marketplace/components/detail-doc/marketplace-detail-doc-renderer.ts +201 -0
- package/src/features/marketplace/components/detail-doc/marketplace-detail-doc.test.ts +40 -0
- package/src/features/marketplace/components/marketplace-catalog-grid.tsx +114 -0
- package/src/features/marketplace/components/marketplace-detail-doc.ts +73 -24
- package/src/features/marketplace/components/marketplace-item-icon.tsx +45 -0
- package/src/features/marketplace/components/marketplace-list-card.tsx +177 -93
- package/src/features/marketplace/components/marketplace-page-detail.test.tsx +9 -2
- package/src/features/marketplace/components/marketplace-page-parts.tsx +1 -1
- package/src/features/marketplace/components/marketplace-page.test.tsx +25 -6
- package/src/features/marketplace/components/marketplace-page.tsx +154 -132
- package/src/features/marketplace/hooks/use-marketplace-curated-scene-route.ts +97 -0
- package/src/features/marketplace/hooks/use-marketplace.ts +59 -3
- package/src/features/system-status/components/config/runtime-agent-list-card.tsx +4 -8
- package/src/features/system-status/components/config/runtime-binding-list-card.tsx +5 -7
- package/src/features/system-status/components/config/runtime-config-editor.tsx +1 -19
- package/src/features/system-status/components/config/runtime-entry-list-card.tsx +10 -11
- package/src/features/system-status/components/config/runtime-settings-card.tsx +15 -23
- package/src/features/system-status/components/runtime-control-card.test.tsx +8 -6
- package/src/features/system-status/components/runtime-control-card.tsx +7 -6
- package/src/features/system-status/pages/runtime-config-page.test.tsx +19 -9
- package/src/features/system-status/pages/runtime-config-page.tsx +2 -3
- package/src/features/system-status/utils/runtime-config-agent.utils.ts +4 -4
- package/src/features/system-status/utils/system-status.utils.ts +31 -6
- package/src/index.css +8 -0
- package/src/platforms/desktop/components/desktop-app-shell.test.tsx +67 -0
- package/src/platforms/desktop/components/desktop-app-shell.tsx +46 -18
- package/src/platforms/desktop/components/desktop-window-chrome.tsx +30 -0
- package/src/platforms/desktop/index.ts +6 -0
- package/src/platforms/desktop/types/desktop-update.types.ts +3 -0
- package/src/platforms/desktop/utils/desktop-host.utils.ts +56 -0
- package/src/shared/components/common/brand-header.tsx +36 -16
- package/src/shared/components/config/provider-form-support.ts +2 -22
- package/src/shared/components/cron-config.tsx +12 -58
- package/src/shared/components/doc-browser/doc-browser.tsx +4 -4
- package/src/shared/components/ui/select.tsx +19 -7
- package/src/shared/lib/api/channel-auth.types.ts +1 -0
- package/src/shared/lib/api/ncp-session.types.ts +9 -0
- package/src/shared/lib/api/types.ts +12 -1
- package/src/shared/lib/api/utils/marketplace.utils.ts +7 -1
- package/src/shared/lib/cron/cron-job-view.utils.ts +59 -0
- package/src/shared/lib/cron/index.ts +1 -0
- package/src/shared/lib/i18n/{channel-auth.ts → channel-auth.constants.ts} +31 -0
- package/src/shared/lib/i18n/chat-labels.utils.ts +3 -2
- package/src/shared/lib/i18n/index.ts +20 -59
- package/src/shared/lib/i18n/{runtime-control.ts → runtime-control-labels.utils.ts} +30 -1
- package/src/shared/lib/provider-models/index.test.ts +39 -0
- package/src/shared/lib/provider-models/index.ts +1 -3
- package/src/shared/lib/ui-document-title/index.ts +0 -1
- package/tsconfig.json +1 -0
- package/vite.config.ts +1 -1
- package/vitest.config.ts +1 -1
- package/dist/assets/api-D2xRKmZd.js +0 -15
- package/dist/assets/app-manager-provider-CNaZboG4.js +0 -1
- package/dist/assets/app-navigation.config-Ihhrrt--.js +0 -1
- package/dist/assets/channels-list-page-p26lgxLk.js +0 -8
- package/dist/assets/chat-Dkh2qtuz.js +0 -61
- package/dist/assets/chat-page-DoTmE2wx.js +0 -1
- package/dist/assets/chunk-JZWAC4HX-Kydj4yEz.js +0 -3
- package/dist/assets/config-split-page-DIOCjj2Q.js +0 -1
- package/dist/assets/desktop-update-config-DlpzDfKM.js +0 -1
- package/dist/assets/doc-browser-C8FM5fC0.js +0 -1
- package/dist/assets/doc-browser-RJUOL_GO.js +0 -1
- package/dist/assets/doc-browser-p82AdNO-.js +0 -1
- package/dist/assets/folder-CeJKPx5P.js +0 -1
- package/dist/assets/hash-BqxRTZW5.js +0 -1
- package/dist/assets/i18n-DnTGDIRw.js +0 -1
- package/dist/assets/index-D8MKmXtO.css +0 -1
- package/dist/assets/index-pBvbJ5Mt.js +0 -2
- package/dist/assets/loader-circle-fd-vQKtW.js +0 -1
- package/dist/assets/logo-badge-KAe-7d8c.js +0 -1
- package/dist/assets/logos-C4sYP1Vl.js +0 -1
- package/dist/assets/marketplace-page-Cql0kDi-.js +0 -1
- package/dist/assets/marketplace-page-m4P5g_Ht.js +0 -49
- package/dist/assets/mcp-marketplace-page-9WVKl1m1.js +0 -1
- package/dist/assets/mcp-marketplace-page-ByzBQZcx.js +0 -40
- package/dist/assets/message-square-z_osm9c0.js +0 -1
- package/dist/assets/model-config-Dbr_0APb.js +0 -1
- package/dist/assets/play-Dv6Nr1Ew.js +0 -1
- package/dist/assets/plus-D8eKFY7h.js +0 -1
- package/dist/assets/provider-scoped-model-input-DFm6N2f7.js +0 -1
- package/dist/assets/providers-list-BJcLOjun.js +0 -1
- package/dist/assets/refresh-ccw-ByVwmnN_.js +0 -1
- package/dist/assets/refresh-cw-PcqoYB3K.js +0 -1
- package/dist/assets/remote-BOxo9iwd.js +0 -1
- package/dist/assets/runtime-config-page-CjLhnbSl.js +0 -1
- package/dist/assets/search-config-J4Htco-P.js +0 -1
- package/dist/assets/secrets-config-CUdERjco.js +0 -3
- package/dist/assets/sessions-config-page-DpK991fs.js +0 -2
- package/dist/assets/settings-drbWqzA4.js +0 -1
- package/dist/assets/skeleton-BK1SOSRA.js +0 -1
- package/dist/assets/theme-provider-0hxjiPc_.js +0 -2
- package/dist/assets/tooltip-Cj4yA0gH.js +0 -1
- package/dist/assets/trash-2-CBsHCfqq.js +0 -1
- package/dist/assets/use-config-38Ur-89i.js +0 -1
- package/dist/assets/use-confirm-dialog-DPQThaeU.js +0 -1
- package/dist/assets/use-infinite-scroll-loader-5Gf1xQi7.js +0 -1
- package/dist/assets/use-viewport-layout-D1XzKeip.js +0 -1
- package/dist/assets/x-CM-XDMpk.js +0 -1
- package/src/features/chat/components/config/sessions-config-detail-pane.tsx +0 -244
- package/src/features/chat/pages/sessions-config-page.test.tsx +0 -152
- package/src/features/chat/pages/sessions-config-page.tsx +0 -192
- /package/dist/assets/{config-hints-MogHYQ8G.js → config-hints-BNfpOL4J.js} +0 -0
package/dist/index.html
CHANGED
|
@@ -78,46 +78,35 @@
|
|
|
78
78
|
})();
|
|
79
79
|
</script>
|
|
80
80
|
<title>NextClaw</title>
|
|
81
|
-
<script type="module" crossorigin src="/assets/index-
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/i18n-
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/select-
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
89
|
-
<link rel="modulepreload" crossorigin href="/assets/x-
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/dialog-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
104
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
105
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
109
|
-
<link rel="
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/use-viewport-layout-D1XzKeip.js">
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/logo-badge-KAe-7d8c.js">
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-BK1SOSRA.js">
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/chat-Dkh2qtuz.js">
|
|
114
|
-
<link rel="modulepreload" crossorigin href="/assets/key-round-CJ5gDAAG.js">
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/message-square-z_osm9c0.js">
|
|
116
|
-
<link rel="modulepreload" crossorigin href="/assets/app-navigation.config-Ihhrrt--.js">
|
|
117
|
-
<link rel="modulepreload" crossorigin href="/assets/notice-card-BFDbKQDA.js">
|
|
118
|
-
<link rel="modulepreload" crossorigin href="/assets/status-dot-ChvPCib9.js">
|
|
119
|
-
<link rel="modulepreload" crossorigin href="/assets/app-manager-provider-CNaZboG4.js">
|
|
120
|
-
<link rel="stylesheet" crossorigin href="/assets/index-D8MKmXtO.css">
|
|
81
|
+
<script type="module" crossorigin src="/assets/index-D-AAMKCt.js"></script>
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/i18n-D1144VAA.js">
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DzY6wN61.js">
|
|
84
|
+
<link rel="modulepreload" crossorigin href="/assets/cpu-DPPwMzoC.js">
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/api-DGD9_Bg4.js">
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/es2015-BhznEEyJ.js">
|
|
87
|
+
<link rel="modulepreload" crossorigin href="/assets/select-BUTwE_lC.js">
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-CFiwgaLs.js">
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/x-BeyYA_h6.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/dialog-BKo0RItd.js">
|
|
91
|
+
<link rel="modulepreload" crossorigin href="/assets/popover-BDFNiLlg.js">
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/search-CRtQwr-h.js">
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/book-open-BcnAiKde.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/download-CMM8po31.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/key-round-DUq47t0P.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/notice-card-Dr6xCwva.js">
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/status-dot-l3kPFdq_.js">
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/app-manager-provider-oYdeYPSv.js">
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/settings-MWL2SMyk.js">
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/refresh-cw-CrbD8EkT.js">
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/sparkles-BmgOD4nY.js">
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/external-link-CpEvG65F.js">
|
|
103
|
+
<link rel="modulepreload" crossorigin href="/assets/plus-B-YHtTNC.js">
|
|
104
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-context-FukQHvyo.js">
|
|
105
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-rZIQIjuw.js">
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-CAhfnm0D.js">
|
|
107
|
+
<link rel="modulepreload" crossorigin href="/assets/use-config-Cyv5IuSt.js">
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/desktop-kk7qvZ-v.js">
|
|
109
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DnBeV2Xm.css">
|
|
121
110
|
</head>
|
|
122
111
|
|
|
123
112
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/ui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.25",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"tailwind-merge": "^2.5.4",
|
|
29
29
|
"zod": "^3.23.8",
|
|
30
30
|
"zustand": "^5.0.2",
|
|
31
|
-
"@nextclaw/agent-chat": "0.1.
|
|
32
|
-
"@nextclaw/agent-chat-ui": "0.3.
|
|
33
|
-
"@nextclaw/client-sdk": "0.1.
|
|
34
|
-
"@nextclaw/ncp": "0.5.
|
|
35
|
-
"@nextclaw/ncp-http-agent-client": "0.3.
|
|
36
|
-
"@nextclaw/ncp-react": "0.4.
|
|
37
|
-
"@nextclaw/server": "0.12.
|
|
38
|
-
"@nextclaw/shared": "0.1.
|
|
31
|
+
"@nextclaw/agent-chat": "0.1.15",
|
|
32
|
+
"@nextclaw/agent-chat-ui": "0.3.17",
|
|
33
|
+
"@nextclaw/client-sdk": "0.1.5",
|
|
34
|
+
"@nextclaw/ncp": "0.5.10",
|
|
35
|
+
"@nextclaw/ncp-http-agent-client": "0.3.22",
|
|
36
|
+
"@nextclaw/ncp-react": "0.4.30",
|
|
37
|
+
"@nextclaw/server": "0.12.17",
|
|
38
|
+
"@nextclaw/shared": "0.1.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@testing-library/react": "^16.3.0",
|
|
@@ -2,6 +2,7 @@ import { render, screen, within } from '@testing-library/react';
|
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import { describe, expect, it, vi } from 'vitest';
|
|
4
4
|
import { Sidebar } from '@/app/components/layout/sidebar';
|
|
5
|
+
import type * as RemoteFeature from '@/features/remote';
|
|
5
6
|
|
|
6
7
|
const mocks = vi.hoisted(() => ({
|
|
7
8
|
openAccountPanel: vi.fn(),
|
|
@@ -31,9 +32,7 @@ vi.mock('@/app/components/app-manager-provider', () => ({
|
|
|
31
32
|
}));
|
|
32
33
|
|
|
33
34
|
vi.mock('@/features/remote', async () => {
|
|
34
|
-
const actual = await vi.importActual<typeof
|
|
35
|
-
'@/features/remote'
|
|
36
|
-
);
|
|
35
|
+
const actual = await vi.importActual<typeof RemoteFeature>('@/features/remote');
|
|
37
36
|
return {
|
|
38
37
|
...actual,
|
|
39
38
|
useRemoteStatus: () => mocks.remoteStatus
|
|
@@ -116,7 +115,6 @@ describe('Sidebar', () => {
|
|
|
116
115
|
'Updates',
|
|
117
116
|
'Remote Access',
|
|
118
117
|
'Security',
|
|
119
|
-
'Sessions',
|
|
120
118
|
'Secrets',
|
|
121
119
|
'Cron Jobs',
|
|
122
120
|
'Plugins',
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
BrainCircuit,
|
|
6
6
|
Cpu,
|
|
7
7
|
Download,
|
|
8
|
-
History,
|
|
9
8
|
KeyRound,
|
|
10
9
|
Languages,
|
|
11
10
|
MessageCircle,
|
|
@@ -126,11 +125,6 @@ export function getSettingsNavItems(
|
|
|
126
125
|
label: translate("security"),
|
|
127
126
|
icon: Shield,
|
|
128
127
|
},
|
|
129
|
-
{
|
|
130
|
-
target: "/sessions",
|
|
131
|
-
label: translate("sessions"),
|
|
132
|
-
icon: History,
|
|
133
|
-
},
|
|
134
128
|
{
|
|
135
129
|
target: "/secrets",
|
|
136
130
|
label: translate("secrets"),
|
package/src/app/index.tsx
CHANGED
|
@@ -47,9 +47,6 @@ const DesktopUpdateConfigPage = lazy(async () => ({
|
|
|
47
47
|
const SecurityConfigPage = lazy(async () => ({
|
|
48
48
|
default: (await import("@/components/config/security-config")).SecurityConfig,
|
|
49
49
|
}));
|
|
50
|
-
const SessionsConfigPage = lazy(async () => ({
|
|
51
|
-
default: (await import("@/components/config/SessionsConfig")).SessionsConfig,
|
|
52
|
-
}));
|
|
53
50
|
const SecretsConfigPage = lazy(async () => ({
|
|
54
51
|
default: (await import("@/components/config/SecretsConfig")).SecretsConfig,
|
|
55
52
|
}));
|
|
@@ -109,6 +106,10 @@ const protectedRouteDefinitions: ProtectedRouteDefinition[] = [
|
|
|
109
106
|
path: "/skills",
|
|
110
107
|
element: createLazyElement(<ChatPage view="skills" />),
|
|
111
108
|
},
|
|
109
|
+
{
|
|
110
|
+
path: "/skills/scenes/:scene",
|
|
111
|
+
element: createLazyElement(<ChatPage view="skills" />),
|
|
112
|
+
},
|
|
112
113
|
{
|
|
113
114
|
path: "/cron",
|
|
114
115
|
element: createLazyElement(<ChatPage view="cron" />),
|
|
@@ -145,10 +146,6 @@ const protectedRouteDefinitions: ProtectedRouteDefinition[] = [
|
|
|
145
146
|
path: "/security",
|
|
146
147
|
element: createLazyElement(<SecurityConfigPage />),
|
|
147
148
|
},
|
|
148
|
-
{
|
|
149
|
-
path: "/sessions",
|
|
150
|
-
element: createLazyElement(<SessionsConfigPage />),
|
|
151
|
-
},
|
|
152
149
|
{
|
|
153
150
|
path: "/secrets",
|
|
154
151
|
element: createLazyElement(<SecretsConfigPage />),
|
|
@@ -3,6 +3,7 @@ import userEvent from "@testing-library/user-event";
|
|
|
3
3
|
import { MemoryRouter } from "react-router-dom";
|
|
4
4
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
5
|
import { AgentsPage } from "@/features/agents";
|
|
6
|
+
import type * as ChatFeature from "@/features/chat";
|
|
6
7
|
import {
|
|
7
8
|
ChatPresenterProvider,
|
|
8
9
|
NcpChatPresenter,
|
|
@@ -112,7 +113,7 @@ vi.mock("@/shared/hooks/use-config", () => ({
|
|
|
112
113
|
}));
|
|
113
114
|
|
|
114
115
|
vi.mock("@/features/chat", async (importOriginal) => {
|
|
115
|
-
const actual = await importOriginal<typeof
|
|
116
|
+
const actual = await importOriginal<typeof ChatFeature>();
|
|
116
117
|
return {
|
|
117
118
|
...actual,
|
|
118
119
|
useNcpChatSessionTypes: () => mocks.sessionTypesQuery,
|
|
@@ -148,6 +149,7 @@ describe("AgentsPage", () => {
|
|
|
148
149
|
useChatInputStore.setState({
|
|
149
150
|
snapshot: {
|
|
150
151
|
...useChatInputStore.getState().snapshot,
|
|
152
|
+
draft: "",
|
|
151
153
|
pendingSessionType: "native",
|
|
152
154
|
pendingProjectRoot: "/tmp/demo-project",
|
|
153
155
|
pendingProjectRootSessionKey: "draft-session",
|
|
@@ -158,7 +160,6 @@ describe("AgentsPage", () => {
|
|
|
158
160
|
...useChatSessionListStore.getState().snapshot,
|
|
159
161
|
selectedAgentId: "main",
|
|
160
162
|
selectedSessionKey: "session-1",
|
|
161
|
-
draftSessionKey: "stale-draft-session",
|
|
162
163
|
},
|
|
163
164
|
});
|
|
164
165
|
useChatThreadStore.setState({
|
|
@@ -169,26 +170,37 @@ describe("AgentsPage", () => {
|
|
|
169
170
|
});
|
|
170
171
|
});
|
|
171
172
|
|
|
172
|
-
it("renders the agents workspace in Chinese and keeps
|
|
173
|
+
it("renders the agents workspace in Chinese and keeps management actions in a compact menu", async () => {
|
|
173
174
|
const user = userEvent.setup();
|
|
174
175
|
|
|
175
176
|
renderAgentsPage();
|
|
176
177
|
|
|
177
178
|
expect(screen.getByText("Agent 管理台")).toBeTruthy();
|
|
178
|
-
expect(
|
|
179
|
-
screen.getByText("让每个 Agent 都像真正的协作者一样存在"),
|
|
180
|
-
).toBeTruthy();
|
|
181
|
-
expect(screen.getByText("全部 Agent")).toBeTruthy();
|
|
182
|
-
expect(screen.getAllByText("主目录").length).toBeGreaterThan(0);
|
|
179
|
+
expect(screen.getByText("~/.nextclaw/workspace")).toBeTruthy();
|
|
183
180
|
expect(screen.getAllByRole("button", { name: "开始对话" })).toHaveLength(2);
|
|
184
|
-
expect(screen.getAllByRole("button", { name: "
|
|
181
|
+
expect(screen.getAllByRole("button", { name: "更多操作" })).toHaveLength(2);
|
|
182
|
+
expect(screen.queryByRole("button", { name: "编辑" })).toBeNull();
|
|
185
183
|
expect(screen.getByText("负责调研、信息筛选与结论提炼。")).toBeTruthy();
|
|
186
184
|
expect(
|
|
187
185
|
screen.queryByText("专属 Agent 身份,可沉淀自己的记忆、技能与角色风格。"),
|
|
188
186
|
).toBeNull();
|
|
189
187
|
expect(screen.queryByText("Agent Gallery")).toBeNull();
|
|
190
188
|
|
|
191
|
-
await user.click(screen.
|
|
189
|
+
await user.click(screen.getByRole("button", { name: "新增 Agent" }));
|
|
190
|
+
|
|
191
|
+
expect(useChatSessionListStore.getState().snapshot.selectedAgentId).toBe(
|
|
192
|
+
"main",
|
|
193
|
+
);
|
|
194
|
+
expect(useChatSessionListStore.getState().snapshot.selectedSessionKey).toBeNull();
|
|
195
|
+
expect(useChatThreadStore.getState().snapshot.sessionKey).toBeNull();
|
|
196
|
+
expect(useChatInputStore.getState().snapshot.draft).toContain(
|
|
197
|
+
"请帮我创建一个新的 Agent",
|
|
198
|
+
);
|
|
199
|
+
expect(mocks.createAgent).not.toHaveBeenCalled();
|
|
200
|
+
expect(screen.queryByText("创建新的 Agent 身份")).toBeNull();
|
|
201
|
+
|
|
202
|
+
await user.click(screen.getAllByRole("button", { name: "更多操作" })[1]);
|
|
203
|
+
await user.click(screen.getByRole("button", { name: "编辑" }));
|
|
192
204
|
|
|
193
205
|
expect(screen.getByText("编辑 Agent 身份")).toBeTruthy();
|
|
194
206
|
expect(screen.getByText("主目录保持不变")).toBeTruthy();
|
|
@@ -204,7 +216,8 @@ describe("AgentsPage", () => {
|
|
|
204
216
|
|
|
205
217
|
renderAgentsPage();
|
|
206
218
|
|
|
207
|
-
await user.click(screen.getAllByRole("button", { name: "
|
|
219
|
+
await user.click(screen.getAllByRole("button", { name: "更多操作" })[1]);
|
|
220
|
+
await user.click(screen.getByRole("button", { name: "编辑" }));
|
|
208
221
|
|
|
209
222
|
const runtimeTrigger = screen.getByRole("combobox", { name: "Runtime" });
|
|
210
223
|
expect(
|
|
@@ -241,10 +254,7 @@ describe("AgentsPage", () => {
|
|
|
241
254
|
"researcher",
|
|
242
255
|
);
|
|
243
256
|
expect(sessionListSnapshot.selectedSessionKey).toBeNull();
|
|
244
|
-
expect(
|
|
245
|
-
expect(useChatThreadStore.getState().snapshot.sessionKey).toBe(
|
|
246
|
-
sessionListSnapshot.draftSessionKey,
|
|
247
|
-
);
|
|
257
|
+
expect(useChatThreadStore.getState().snapshot.sessionKey).toBeNull();
|
|
248
258
|
expect(useChatInputStore.getState().snapshot.pendingSessionType).toBe(
|
|
249
259
|
"codex",
|
|
250
260
|
);
|