@nextclaw/ui 0.12.9 → 0.12.10
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/assets/ChannelsList-M9FTK1Ak.js +8 -0
- package/dist/assets/DocBrowser-CH7-GxlL.js +1 -0
- package/dist/assets/{DocBrowser-6ReNjvzF.js → DocBrowser-DMfr0Oow.js} +1 -1
- package/dist/assets/{DocBrowserContext-B6SpA7Qs.js → DocBrowserContext-BXydqby-.js} +1 -1
- package/dist/assets/{LogoBadge-ByNLYg65.js → LogoBadge-hO7tY7hE.js} +1 -1
- package/dist/assets/ModelConfig-CNIgLf0e.js +1 -0
- package/dist/assets/{ProviderScopedModelInput-Da7khnBA.js → ProviderScopedModelInput-B3HWP4oz.js} +1 -1
- package/dist/assets/ProvidersList-CHjMnRhX.js +1 -0
- package/dist/assets/RuntimeConfig-psp8nMSG.js +1 -0
- package/dist/assets/SearchConfig-CSoKip1f.js +1 -0
- package/dist/assets/{SecretsConfig-D281Rotl.js → SecretsConfig-MEt6MjuD.js} +2 -2
- package/dist/assets/SessionsConfig-DifCiXwR.js +2 -0
- package/dist/assets/{app-query-client-VnFElj4E.js → app-query-client-9jNewezV.js} +1 -1
- package/dist/assets/{book-open-BdcxxoQu.js → book-open-DzdUViDm.js} +1 -1
- package/dist/assets/chat-page-CLp0UV0Y.js +58 -0
- package/dist/assets/chat-session-display-DsYHx0RZ.js +1 -0
- package/dist/assets/{chunk-JZWAC4HX-DK5HPmIK.js → chunk-JZWAC4HX-C5dEc8hV.js} +1 -1
- package/dist/assets/{client-_i4MU2bB.js → client-C-8fH7-c.js} +1 -1
- package/dist/assets/{config-DtIQwrHF.js → config-CBScxsdV.js} +1 -1
- package/dist/assets/config-split-page-BUout_Ak.js +1 -0
- package/dist/assets/{createLucideIcon-BSeTgkZW.js → createLucideIcon-dy5ie7Ox.js} +1 -1
- package/dist/assets/desktop-update-config-2BS6BMkW.js +1 -0
- package/dist/assets/{dist-ccBFUi-o.js → dist-BruyLa92.js} +1 -1
- package/dist/assets/{dist-6TrrnPCR.js → dist-Cy7_j6hA.js} +1 -1
- package/dist/assets/{download-BhDxnyvU.js → download-BD0ETkB-.js} +1 -1
- package/dist/assets/{external-link-BgErLCNT.js → external-link-kZSAO8nT.js} +1 -1
- package/dist/assets/{hash-Bl7dr_UG.js → hash-BHJC2Ovu.js} +1 -1
- package/dist/assets/{i18n-eDHeDY0n.js → i18n-CpTZLchQ.js} +1 -1
- package/dist/assets/index-mW8W2FUu.css +1 -0
- package/dist/assets/index-zDZfXoI4.js +6 -0
- package/dist/assets/{infiniteQueryBehavior-ZDS92Qpp.js → infiniteQueryBehavior-CyER9hv0.js} +1 -1
- package/dist/assets/loader-circle-Bc2gCU33.js +1 -0
- package/dist/assets/{logos-x89HbrZ4.js → logos-B7gRObP8.js} +1 -1
- package/dist/assets/marketplace-page-3qVMnF3d.js +1 -0
- package/dist/assets/marketplace-page-BhFIeQzI.js +49 -0
- package/dist/assets/mcp-marketplace-page-DYfteJ1D.js +40 -0
- package/dist/assets/{page-layout-vZnghcFy.js → page-layout-0UcO9H9Z.js} +1 -1
- package/dist/assets/play-CKDjSQFL.js +1 -0
- package/dist/assets/plus-CG0QrVY_.js +1 -0
- package/dist/assets/{refresh-ccw-DT98i__E.js → refresh-ccw-COVhNHtN.js} +1 -1
- package/dist/assets/{refresh-cw-C47QSEwg.js → refresh-cw-Bcv40SXy.js} +1 -1
- package/dist/assets/remote-access-page-CWHG-sug.js +1 -0
- package/dist/assets/{rotate-cw-JtFzpNn6.js → rotate-cw-oHMKJMC8.js} +1 -1
- package/dist/assets/{save-3S6-H3Xw.js → save-EqJPOF0G.js} +1 -1
- package/dist/assets/search-BCAlB8nz.js +1 -0
- package/dist/assets/security-config-Slh0Mayz.js +1 -0
- package/dist/assets/select-CVz0t7MF.js +41 -0
- package/dist/assets/setting-row-CbVHAuQt.js +1 -0
- package/dist/assets/skeleton-D5rdKvzy.js +1 -0
- package/dist/assets/{status-dot-vbanNPFU.js → status-dot-DpPtVzQT.js} +1 -1
- package/dist/assets/{switch-BsLtHOH-.js → switch-CM29eCAR.js} +1 -1
- package/dist/assets/{tabs-custom-D3HYMt6k.js → tabs-custom-YcZUWn3o.js} +1 -1
- package/dist/assets/tag-chip-DMXdnLcj.js +1 -0
- package/dist/assets/{trash-2-G48scll7.js → trash-2-mJT6oWa2.js} +1 -1
- package/dist/assets/{use-infinite-scroll-loader-DkNhD-42.js → use-infinite-scroll-loader-DJ1L81Dz.js} +1 -1
- package/dist/assets/{useConfirmDialog-BkvTN-vd.js → useConfirmDialog-BsVuqu1x.js} +1 -1
- package/dist/assets/{useMutation-CBWjE2uj.js → useMutation-CNcz2fgt.js} +1 -1
- package/dist/assets/x-Czwxm82I.js +1 -0
- package/dist/index.html +22 -22
- package/dist/runtime-icons/claude.ico +0 -0
- package/dist/runtime-icons/codex-openai.svg +6 -0
- package/dist/runtime-icons/hermes-agent.png +0 -0
- package/package.json +6 -6
- package/public/runtime-icons/claude.ico +0 -0
- package/public/runtime-icons/codex-openai.svg +6 -0
- package/public/runtime-icons/hermes-agent.png +0 -0
- package/src/account/components/account-panel.tsx +217 -97
- package/src/account/managers/account.manager.ts +3 -2
- package/src/api/chat-session-type.types.ts +7 -0
- package/src/api/runtime-control.types.ts +8 -0
- package/src/api/types.ts +8 -0
- package/src/app.tsx +221 -57
- package/src/components/agents/agent-dialogs.tsx +499 -0
- package/src/components/agents/agents-page.test.tsx +238 -0
- package/src/components/agents/agents-page.tsx +435 -0
- package/src/components/chat/ChatSidebar.tsx +11 -35
- package/src/components/chat/chat-conversation-panel.test.tsx +20 -0
- package/src/components/chat/chat-conversation-panel.tsx +83 -13
- package/src/components/chat/chat-page-shell.tsx +19 -13
- package/src/components/chat/chat-session-type-option-item.test.tsx +46 -0
- package/src/components/chat/chat-session-type-option-item.tsx +68 -0
- package/src/components/chat/chat-session-workspace-file-preview.test.tsx +87 -0
- package/src/components/chat/chat-session-workspace-file-preview.tsx +14 -43
- package/src/components/chat/chat-session-workspace-panel-nav.tsx +8 -2
- package/src/components/chat/chat-sidebar-project-groups.tsx +11 -36
- package/src/components/chat/ncp/__tests__/ncp-session-adapter.cancelled-tool.test.ts +77 -0
- package/src/components/chat/ncp/ncp-chat-page.tsx +2 -0
- package/src/components/chat/ncp/ncp-session-adapter.test.ts +1 -0
- package/src/components/chat/ncp/ncp-session-adapter.ts +3 -0
- package/src/components/chat/ncp/page/ncp-chat-derived-state.ts +10 -4
- package/src/components/chat/stores/chat-input.store.ts +2 -1
- package/src/components/chat/stores/chat-thread.store.ts +3 -1
- package/src/components/chat/useChatSessionTypeState.ts +10 -1
- package/src/components/chat/workspace/chat-session-workspace-file-breadcrumbs.tsx +86 -0
- package/src/components/common/BrandHeader.tsx +3 -1
- package/src/components/common/session-context-icon.tsx +15 -2
- package/src/components/common/{TagInput.tsx → tag-input.tsx} +25 -17
- package/src/components/config/ChannelForm.test.tsx +89 -3
- package/src/components/config/ChannelForm.tsx +157 -188
- package/src/components/config/ChannelsList.test.tsx +163 -119
- package/src/components/config/ChannelsList.tsx +90 -101
- package/src/components/config/ProviderForm.tsx +108 -146
- package/src/components/config/ProvidersList.tsx +100 -123
- package/src/components/config/SearchConfig.tsx +423 -393
- package/src/components/config/channel-form-fields-section.tsx +70 -37
- package/src/components/config/config-split-page.tsx +109 -0
- package/src/components/config/provider-enabled-field.tsx +17 -10
- package/src/components/config/runtime-control-card.test.tsx +56 -0
- package/src/components/config/runtime-control-card.tsx +25 -0
- package/src/components/config/runtime-presence-card.tsx +93 -79
- package/src/components/layout/AppLayout.tsx +25 -37
- package/src/components/layout/app-layout.test.tsx +46 -14
- package/src/components/layout/runtime-status-entry.test.tsx +157 -0
- package/src/components/layout/runtime-status-entry.tsx +143 -0
- package/src/components/marketplace/marketplace-detail-doc.ts +93 -0
- package/src/components/marketplace/marketplace-list-card.tsx +288 -0
- package/src/components/marketplace/marketplace-page-data.ts +129 -0
- package/src/components/marketplace/marketplace-page.test.tsx +339 -0
- package/src/components/marketplace/marketplace-page.tsx +596 -0
- package/src/components/marketplace/mcp/mcp-marketplace-card.tsx +128 -0
- package/src/components/marketplace/mcp/mcp-marketplace-dialogs.tsx +191 -0
- package/src/components/marketplace/mcp/mcp-marketplace-doc.ts +152 -0
- package/src/components/marketplace/mcp/mcp-marketplace-page.test.tsx +223 -0
- package/src/components/marketplace/mcp/mcp-marketplace-page.tsx +414 -0
- package/src/components/remote/remote-access-page.test.tsx +105 -0
- package/src/components/remote/remote-access-page.tsx +248 -0
- package/src/components/ui/notice-card.tsx +129 -0
- package/src/components/ui/setting-row.tsx +51 -0
- package/src/components/ui/tag-chip.tsx +39 -0
- package/src/components/ui/textarea.tsx +19 -0
- package/src/hooks/useConfig.ts +2 -1
- package/src/index.css +24 -0
- package/src/lib/app-resource-uri.test.ts +20 -0
- package/src/lib/app-resource-uri.ts +29 -0
- package/src/lib/i18n.remote.ts +1 -1
- package/src/lib/i18n.runtime-control.ts +31 -0
- package/src/lib/i18n.ts +5 -8
- package/src/lib/session-context.utils.test.ts +71 -0
- package/src/lib/session-context.utils.ts +28 -3
- package/src/lib/session-project/workspace-file-breadcrumb.test.ts +83 -0
- package/src/lib/session-project/workspace-file-breadcrumb.ts +188 -0
- package/dist/assets/ChannelsList-Ita2Zm1_.js +0 -8
- package/dist/assets/DocBrowser-BNwbPHf4.js +0 -1
- package/dist/assets/MarketplacePage-CjX2MWww.js +0 -1
- package/dist/assets/MarketplacePage-D0sDlYX4.js +0 -49
- package/dist/assets/McpMarketplacePage-BGKJm1sJ.js +0 -40
- package/dist/assets/ModelConfig-BzZenCH-.js +0 -1
- package/dist/assets/ProvidersList-BbVzRxjY.js +0 -1
- package/dist/assets/RemoteAccessPage-BaDH_X1Q.js +0 -1
- package/dist/assets/RuntimeConfig-F_XKGgLm.js +0 -1
- package/dist/assets/SearchConfig-BGkzXQP-.js +0 -1
- package/dist/assets/SessionsConfig-ChHQ7M5c.js +0 -2
- package/dist/assets/chat-page-Doe0yTtB.js +0 -58
- package/dist/assets/chat-session-display-cw78aiI_.js +0 -1
- package/dist/assets/config-layout-CHs0mAaR.js +0 -1
- package/dist/assets/desktop-update-config-Dpcf4BKG.js +0 -1
- package/dist/assets/index-CF9xve0E.js +0 -6
- package/dist/assets/index-FgA52VBt.css +0 -1
- package/dist/assets/loader-circle-ACM1s51e.js +0 -1
- package/dist/assets/play-CFUwCA2E.js +0 -1
- package/dist/assets/plus-rYsv72JG.js +0 -1
- package/dist/assets/popover-Bg1VoTZ6.js +0 -1
- package/dist/assets/search-3kFR_zh9.js +0 -1
- package/dist/assets/security-config-BWaiARNk.js +0 -1
- package/dist/assets/select-DJ2MUjBB.js +0 -41
- package/dist/assets/skeleton-ByQepn0M.js +0 -1
- package/dist/assets/x-ByDbItbq.js +0 -1
- package/src/components/agents/AgentDialogs.tsx +0 -400
- package/src/components/agents/AgentsPage.test.tsx +0 -217
- package/src/components/agents/AgentsPage.tsx +0 -352
- package/src/components/config/config-layout.ts +0 -10
- package/src/components/marketplace/MarketplacePage.test.tsx +0 -322
- package/src/components/marketplace/MarketplacePage.tsx +0 -827
- package/src/components/marketplace/mcp/McpMarketplacePage.test.tsx +0 -208
- package/src/components/marketplace/mcp/McpMarketplacePage.tsx +0 -580
- package/src/components/remote/RemoteAccessPage.test.tsx +0 -103
- package/src/components/remote/RemoteAccessPage.tsx +0 -144
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
4
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
5
|
-
import { AgentsPage } from '@/components/agents/AgentsPage';
|
|
6
|
-
import { useChatInputStore } from '@/components/chat/stores/chat-input.store';
|
|
7
|
-
import { useChatSessionListStore } from '@/components/chat/stores/chat-session-list.store';
|
|
8
|
-
import { setLanguage } from '@/lib/i18n';
|
|
9
|
-
|
|
10
|
-
const mocks = vi.hoisted(() => ({
|
|
11
|
-
createAgent: vi.fn(),
|
|
12
|
-
updateAgent: vi.fn(),
|
|
13
|
-
deleteAgent: vi.fn(),
|
|
14
|
-
sessionTypesQuery: {
|
|
15
|
-
data: {
|
|
16
|
-
defaultType: 'native',
|
|
17
|
-
options: [
|
|
18
|
-
{ value: 'native', label: 'Native', ready: true },
|
|
19
|
-
{ value: 'codex', label: 'Codex', ready: true },
|
|
20
|
-
{ value: 'claude', label: 'Claude Code', ready: false, reasonMessage: 'Configure Claude Code first.' }
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
agentsQuery: {
|
|
25
|
-
data: {
|
|
26
|
-
agents: [
|
|
27
|
-
{
|
|
28
|
-
id: 'main',
|
|
29
|
-
displayName: 'Main',
|
|
30
|
-
description: '系统默认入口与总控协作者。',
|
|
31
|
-
builtIn: true,
|
|
32
|
-
model: 'openai/gpt-5.1',
|
|
33
|
-
workspace: '~/.nextclaw/workspace',
|
|
34
|
-
avatarUrl: null
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 'researcher',
|
|
38
|
-
displayName: 'Researcher',
|
|
39
|
-
description: '负责调研、信息筛选与结论提炼。',
|
|
40
|
-
builtIn: false,
|
|
41
|
-
model: 'openai/gpt-5.2',
|
|
42
|
-
runtime: 'codex',
|
|
43
|
-
workspace: '~/.nextclaw/workspace/agents/researcher',
|
|
44
|
-
avatarUrl: null
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
isLoading: false
|
|
49
|
-
},
|
|
50
|
-
configQuery: {
|
|
51
|
-
data: {
|
|
52
|
-
agents: {
|
|
53
|
-
defaults: {
|
|
54
|
-
model: 'openai/gpt-5.1',
|
|
55
|
-
workspace: '~/.nextclaw/workspace'
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
providers: {
|
|
59
|
-
openai: {
|
|
60
|
-
enabled: true,
|
|
61
|
-
apiKeySet: true,
|
|
62
|
-
models: ['gpt-5.1', 'gpt-5.2']
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
configMetaQuery: {
|
|
68
|
-
data: {
|
|
69
|
-
providers: [
|
|
70
|
-
{
|
|
71
|
-
name: 'openai',
|
|
72
|
-
displayName: 'OpenAI',
|
|
73
|
-
modelPrefix: 'openai',
|
|
74
|
-
defaultModels: ['openai/gpt-5.1', 'openai/gpt-5.2'],
|
|
75
|
-
keywords: [],
|
|
76
|
-
envKey: 'OPENAI_API_KEY'
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}));
|
|
82
|
-
|
|
83
|
-
vi.mock('@/hooks/agents/useAgents', () => ({
|
|
84
|
-
useAgents: () => mocks.agentsQuery,
|
|
85
|
-
useCreateAgent: () => ({
|
|
86
|
-
mutateAsync: mocks.createAgent,
|
|
87
|
-
isPending: false
|
|
88
|
-
}),
|
|
89
|
-
useUpdateAgent: () => ({
|
|
90
|
-
mutateAsync: mocks.updateAgent,
|
|
91
|
-
isPending: false
|
|
92
|
-
}),
|
|
93
|
-
useDeleteAgent: () => ({
|
|
94
|
-
mutate: mocks.deleteAgent,
|
|
95
|
-
isPending: false
|
|
96
|
-
})
|
|
97
|
-
}));
|
|
98
|
-
|
|
99
|
-
vi.mock('@/hooks/useConfig', () => ({
|
|
100
|
-
useConfig: () => mocks.configQuery,
|
|
101
|
-
useConfigMeta: () => mocks.configMetaQuery
|
|
102
|
-
}));
|
|
103
|
-
|
|
104
|
-
vi.mock('@/hooks/use-ncp-chat-session-types', () => ({
|
|
105
|
-
useNcpChatSessionTypes: () => mocks.sessionTypesQuery
|
|
106
|
-
}));
|
|
107
|
-
|
|
108
|
-
describe('AgentsPage', () => {
|
|
109
|
-
beforeEach(() => {
|
|
110
|
-
setLanguage('zh');
|
|
111
|
-
mocks.createAgent.mockReset();
|
|
112
|
-
mocks.updateAgent.mockReset();
|
|
113
|
-
mocks.deleteAgent.mockReset();
|
|
114
|
-
if (!HTMLElement.prototype.hasPointerCapture) {
|
|
115
|
-
HTMLElement.prototype.hasPointerCapture = () => false;
|
|
116
|
-
}
|
|
117
|
-
if (!HTMLElement.prototype.setPointerCapture) {
|
|
118
|
-
HTMLElement.prototype.setPointerCapture = () => {};
|
|
119
|
-
}
|
|
120
|
-
if (!HTMLElement.prototype.releasePointerCapture) {
|
|
121
|
-
HTMLElement.prototype.releasePointerCapture = () => {};
|
|
122
|
-
}
|
|
123
|
-
useChatInputStore.setState({
|
|
124
|
-
snapshot: {
|
|
125
|
-
...useChatInputStore.getState().snapshot,
|
|
126
|
-
pendingSessionType: 'native',
|
|
127
|
-
pendingProjectRoot: '/tmp/demo-project',
|
|
128
|
-
pendingProjectRootSessionKey: 'draft-session'
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
useChatSessionListStore.setState({
|
|
132
|
-
snapshot: {
|
|
133
|
-
...useChatSessionListStore.getState().snapshot,
|
|
134
|
-
selectedAgentId: 'main',
|
|
135
|
-
selectedSessionKey: 'session-1'
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
it('renders the agents workspace in Chinese and keeps core actions visible', async () => {
|
|
141
|
-
const user = userEvent.setup();
|
|
142
|
-
|
|
143
|
-
render(
|
|
144
|
-
<MemoryRouter>
|
|
145
|
-
<AgentsPage />
|
|
146
|
-
</MemoryRouter>
|
|
147
|
-
);
|
|
148
|
-
|
|
149
|
-
expect(screen.getByText('Agent 管理台')).toBeTruthy();
|
|
150
|
-
expect(screen.getByText('让每个 Agent 都像真正的协作者一样存在')).toBeTruthy();
|
|
151
|
-
expect(screen.getByText('全部 Agent')).toBeTruthy();
|
|
152
|
-
expect(screen.getAllByText('主目录').length).toBeGreaterThan(0);
|
|
153
|
-
expect(screen.getAllByRole('button', { name: '开始对话' })).toHaveLength(2);
|
|
154
|
-
expect(screen.getAllByRole('button', { name: '编辑' })).toHaveLength(2);
|
|
155
|
-
expect(screen.getByText('负责调研、信息筛选与结论提炼。')).toBeTruthy();
|
|
156
|
-
expect(screen.queryByText('专属 Agent 身份,可沉淀自己的记忆、技能与角色风格。')).toBeNull();
|
|
157
|
-
expect(screen.queryByText('Agent Gallery')).toBeNull();
|
|
158
|
-
|
|
159
|
-
await user.click(screen.getAllByRole('button', { name: '编辑' })[1]);
|
|
160
|
-
|
|
161
|
-
expect(screen.getByText('编辑 Agent 身份')).toBeTruthy();
|
|
162
|
-
expect(screen.getByText('主目录保持不变')).toBeTruthy();
|
|
163
|
-
expect(screen.getByDisplayValue('Researcher')).toBeTruthy();
|
|
164
|
-
expect(screen.getByDisplayValue('负责调研、信息筛选与结论提炼。').tagName).toBe('TEXTAREA');
|
|
165
|
-
expect(screen.getByDisplayValue('gpt-5.2')).toBeTruthy();
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
it('uses a runtime dropdown instead of manual text input when editing an agent', async () => {
|
|
169
|
-
const user = userEvent.setup();
|
|
170
|
-
|
|
171
|
-
render(
|
|
172
|
-
<MemoryRouter>
|
|
173
|
-
<AgentsPage />
|
|
174
|
-
</MemoryRouter>
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
await user.click(screen.getAllByRole('button', { name: '编辑' })[1]);
|
|
178
|
-
|
|
179
|
-
const runtimeTrigger = screen.getByRole('combobox', { name: 'Runtime' });
|
|
180
|
-
expect(screen.queryByPlaceholderText('Runtime(如 native 或 codex,可选)')).toBeNull();
|
|
181
|
-
expect(runtimeTrigger.textContent).toContain('Codex');
|
|
182
|
-
expect(screen.queryByText('跟随默认 Runtime')).toBeNull();
|
|
183
|
-
|
|
184
|
-
await user.click(runtimeTrigger);
|
|
185
|
-
await user.click(screen.getByRole('option', { name: 'Codex' }));
|
|
186
|
-
await user.click(screen.getByRole('button', { name: '保存编辑' }));
|
|
187
|
-
|
|
188
|
-
expect(mocks.updateAgent).toHaveBeenCalledWith({
|
|
189
|
-
agentId: 'researcher',
|
|
190
|
-
data: {
|
|
191
|
-
displayName: 'Researcher',
|
|
192
|
-
description: '负责调研、信息筛选与结论提炼。',
|
|
193
|
-
avatar: '',
|
|
194
|
-
model: 'openai/gpt-5.2',
|
|
195
|
-
runtime: 'codex'
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
it('starts a draft chat with the agent runtime as the pending session type', async () => {
|
|
201
|
-
const user = userEvent.setup();
|
|
202
|
-
|
|
203
|
-
render(
|
|
204
|
-
<MemoryRouter>
|
|
205
|
-
<AgentsPage />
|
|
206
|
-
</MemoryRouter>
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
await user.click(screen.getAllByRole('button', { name: '开始对话' })[1]);
|
|
210
|
-
|
|
211
|
-
expect(useChatSessionListStore.getState().snapshot.selectedAgentId).toBe('researcher');
|
|
212
|
-
expect(useChatSessionListStore.getState().snapshot.selectedSessionKey).toBeNull();
|
|
213
|
-
expect(useChatInputStore.getState().snapshot.pendingSessionType).toBe('codex');
|
|
214
|
-
expect(useChatInputStore.getState().snapshot.pendingProjectRoot).toBeNull();
|
|
215
|
-
expect(useChatInputStore.getState().snapshot.pendingProjectRootSessionKey).toBeNull();
|
|
216
|
-
});
|
|
217
|
-
});
|
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import { useMemo, useState } from 'react';
|
|
2
|
-
import { useNavigate } from 'react-router-dom';
|
|
3
|
-
import { useCreateAgent, useDeleteAgent, useAgents, useUpdateAgent } from '@/hooks/agents/useAgents';
|
|
4
|
-
import { useConfig, useConfigMeta } from '@/hooks/useConfig';
|
|
5
|
-
import type { AgentProfileView } from '@/api/types';
|
|
6
|
-
import {
|
|
7
|
-
AgentCreateDialog,
|
|
8
|
-
AgentEditDialog,
|
|
9
|
-
type AgentCreateFormState,
|
|
10
|
-
type AgentEditFormState
|
|
11
|
-
} from '@/components/agents/AgentDialogs';
|
|
12
|
-
import {
|
|
13
|
-
buildSessionTypeOptions,
|
|
14
|
-
normalizeSessionType,
|
|
15
|
-
resolveAgentRuntimeSessionType,
|
|
16
|
-
resolveSessionTypeLabel
|
|
17
|
-
} from '@/components/chat/useChatSessionTypeState';
|
|
18
|
-
import { useChatInputStore } from '@/components/chat/stores/chat-input.store';
|
|
19
|
-
import { useChatSessionListStore } from '@/components/chat/stores/chat-session-list.store';
|
|
20
|
-
import { AgentAvatar } from '@/components/common/AgentAvatar';
|
|
21
|
-
import { Button } from '@/components/ui/button';
|
|
22
|
-
import { Card, CardContent } from '@/components/ui/card';
|
|
23
|
-
import { useNcpChatSessionTypes } from '@/hooks/use-ncp-chat-session-types';
|
|
24
|
-
import { PageLayout } from '@/components/layout/page-layout';
|
|
25
|
-
import { t } from '@/lib/i18n';
|
|
26
|
-
import { buildProviderModelCatalog } from '@/lib/provider-models';
|
|
27
|
-
import { cn } from '@/lib/utils';
|
|
28
|
-
import { Bot, House, MessageCircle, Pencil, Plus, ShieldCheck, Sparkles, Trash2 } from 'lucide-react';
|
|
29
|
-
|
|
30
|
-
const CARD_TONES = [
|
|
31
|
-
{
|
|
32
|
-
strip: 'bg-[#efc37a]',
|
|
33
|
-
chip: 'border-[#f2d7a7] bg-[#fff8eb] text-[#8d5a18]'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
strip: 'bg-[#8fd4c0]',
|
|
37
|
-
chip: 'border-[#bde6da] bg-[#effbf7] text-[#156653]'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
strip: 'bg-[#b7c9fb]',
|
|
41
|
-
chip: 'border-[#d7e2ff] bg-[#f4f7ff] text-[#2d4d8f]'
|
|
42
|
-
}
|
|
43
|
-
] as const;
|
|
44
|
-
|
|
45
|
-
function resolveAgentTone(index: number, builtIn: boolean) {
|
|
46
|
-
if (builtIn) {
|
|
47
|
-
return {
|
|
48
|
-
strip: 'bg-[#e6b765]',
|
|
49
|
-
chip: 'border-[#f2d19c] bg-[#fff8ec] text-[#90550d]'
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return CARD_TONES[index % CARD_TONES.length];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function AgentsPage() {
|
|
56
|
-
const navigate = useNavigate();
|
|
57
|
-
const agentsQuery = useAgents();
|
|
58
|
-
const configQuery = useConfig();
|
|
59
|
-
const configMetaQuery = useConfigMeta();
|
|
60
|
-
const sessionTypesQuery = useNcpChatSessionTypes();
|
|
61
|
-
const createAgent = useCreateAgent();
|
|
62
|
-
const updateAgent = useUpdateAgent();
|
|
63
|
-
const deleteAgent = useDeleteAgent();
|
|
64
|
-
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
|
|
65
|
-
const [editingAgent, setEditingAgent] = useState<AgentProfileView | null>(null);
|
|
66
|
-
const setSessionListSnapshot = useChatSessionListStore((state) => state.setSnapshot);
|
|
67
|
-
|
|
68
|
-
const agents = useMemo(() => agentsQuery.data?.agents ?? [], [agentsQuery.data?.agents]);
|
|
69
|
-
const sortedAgents = useMemo(
|
|
70
|
-
() =>
|
|
71
|
-
[...agents].sort(
|
|
72
|
-
(left, right) =>
|
|
73
|
-
Number(Boolean(right.builtIn)) - Number(Boolean(left.builtIn)) ||
|
|
74
|
-
left.id.localeCompare(right.id)
|
|
75
|
-
),
|
|
76
|
-
[agents]
|
|
77
|
-
);
|
|
78
|
-
const providerCatalog = useMemo(
|
|
79
|
-
() => buildProviderModelCatalog({ config: configQuery.data, meta: configMetaQuery.data, onlyConfigured: true }),
|
|
80
|
-
[configMetaQuery.data, configQuery.data]
|
|
81
|
-
);
|
|
82
|
-
const runtimeOptions = useMemo(
|
|
83
|
-
() => buildSessionTypeOptions(sessionTypesQuery.data?.options ?? []),
|
|
84
|
-
[sessionTypesQuery.data?.options]
|
|
85
|
-
);
|
|
86
|
-
const defaultRuntime = useMemo(
|
|
87
|
-
() => normalizeSessionType(sessionTypesQuery.data?.defaultType ?? 'native'),
|
|
88
|
-
[sessionTypesQuery.data?.defaultType]
|
|
89
|
-
);
|
|
90
|
-
const defaultRuntimeLabel = useMemo(
|
|
91
|
-
() => runtimeOptions.find((option) => option.value === defaultRuntime)?.label ?? resolveSessionTypeLabel(defaultRuntime),
|
|
92
|
-
[defaultRuntime, runtimeOptions]
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const handleCreate = async (form: AgentCreateFormState) => {
|
|
96
|
-
await createAgent.mutateAsync({
|
|
97
|
-
data: {
|
|
98
|
-
id: form.id,
|
|
99
|
-
...(form.displayName.trim() ? { displayName: form.displayName.trim() } : {}),
|
|
100
|
-
...(form.description.trim() ? { description: form.description.trim() } : {}),
|
|
101
|
-
...(form.avatar.trim() ? { avatar: form.avatar.trim() } : {}),
|
|
102
|
-
...(form.home.trim() ? { home: form.home.trim() } : {}),
|
|
103
|
-
...(form.model.trim() ? { model: form.model.trim() } : {}),
|
|
104
|
-
...(form.runtime.trim() ? { runtime: form.runtime.trim() } : {})
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
setIsCreateDialogOpen(false);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const handleStartEdit = (agent: AgentProfileView) => {
|
|
111
|
-
setEditingAgent(agent);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
const handleUpdate = async (agentId: string, form: AgentEditFormState) => {
|
|
115
|
-
await updateAgent.mutateAsync({
|
|
116
|
-
agentId,
|
|
117
|
-
data: {
|
|
118
|
-
displayName: form.displayName,
|
|
119
|
-
description: form.description,
|
|
120
|
-
avatar: form.avatar,
|
|
121
|
-
model: form.model,
|
|
122
|
-
...(form.runtime.trim() ? { runtime: form.runtime.trim() } : { runtime: "" })
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
setEditingAgent(null);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const startChatWithAgent = (agent: AgentProfileView) => {
|
|
129
|
-
setSessionListSnapshot({
|
|
130
|
-
selectedAgentId: agent.id,
|
|
131
|
-
selectedSessionKey: null
|
|
132
|
-
});
|
|
133
|
-
useChatInputStore.getState().setSnapshot({
|
|
134
|
-
pendingSessionType: resolveAgentRuntimeSessionType(agent, defaultRuntime),
|
|
135
|
-
pendingProjectRoot: null,
|
|
136
|
-
pendingProjectRootSessionKey: null
|
|
137
|
-
});
|
|
138
|
-
navigate('/chat');
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
return (
|
|
142
|
-
<PageLayout className="space-y-5">
|
|
143
|
-
<section className="relative overflow-hidden rounded-[28px] border border-[#f0d6aa] bg-[linear-gradient(135deg,#fff7ea_0%,#fff9f1_32%,#f2fbff_100%)] px-5 py-5 sm:px-6">
|
|
144
|
-
<div className="absolute inset-y-0 right-0 w-[46%] bg-[radial-gradient(circle_at_top_right,rgba(255,215,163,0.52),transparent_54%)]" />
|
|
145
|
-
<div className="absolute -bottom-10 left-8 h-32 w-32 rounded-full bg-[#ffe6c0]/55 blur-3xl" />
|
|
146
|
-
<div className="relative grid gap-5 xl:grid-cols-[minmax(0,1fr)_320px] xl:items-center">
|
|
147
|
-
<div className="max-w-3xl space-y-3">
|
|
148
|
-
<div className="inline-flex items-center gap-2 rounded-full border border-white/70 bg-white/80 px-3 py-1 text-[11px] font-semibold tracking-[0.16em] text-[#9b6118]">
|
|
149
|
-
<Sparkles className="h-3.5 w-3.5" />
|
|
150
|
-
{t('agentsHeroEyebrow')}
|
|
151
|
-
</div>
|
|
152
|
-
<div className="space-y-2">
|
|
153
|
-
<h1 className="max-w-2xl text-[30px] font-semibold leading-tight tracking-[-0.05em] text-[#2f2212] sm:text-[38px]">
|
|
154
|
-
{t('agentsHeroTitle')}
|
|
155
|
-
</h1>
|
|
156
|
-
<p className="max-w-2xl text-sm leading-6 text-[#6d5841] sm:text-[15px] sm:leading-7">
|
|
157
|
-
{t('agentsHeroDescription')}
|
|
158
|
-
</p>
|
|
159
|
-
</div>
|
|
160
|
-
<div className="pt-1">
|
|
161
|
-
<div className="inline-flex items-center gap-3 rounded-2xl border border-[#f2d5a4] bg-white/82 px-3 py-2 text-[#7a4d12] shadow-[0_14px_30px_rgba(167,117,47,0.07)]">
|
|
162
|
-
<span className="text-[11px] font-semibold tracking-[0.14em]">
|
|
163
|
-
{t('agentsOverviewTotal')}
|
|
164
|
-
</span>
|
|
165
|
-
<span className="text-xl font-semibold tracking-[-0.04em] text-[#1f2937]">
|
|
166
|
-
{agents.length}
|
|
167
|
-
</span>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
<div className="flex shrink-0 flex-col gap-3">
|
|
172
|
-
<Button
|
|
173
|
-
type="button"
|
|
174
|
-
className="h-10 rounded-2xl bg-[#1f5c4d] px-5 text-sm font-semibold text-white hover:bg-[#184d40]"
|
|
175
|
-
onClick={() => setIsCreateDialogOpen(true)}
|
|
176
|
-
>
|
|
177
|
-
<Plus className="mr-2 h-4 w-4" />
|
|
178
|
-
{t('agentsCreateButton')}
|
|
179
|
-
</Button>
|
|
180
|
-
<div className="rounded-2xl border border-white/70 bg-white/72 px-4 py-3 text-xs leading-6 text-[#6d5841] shadow-[0_18px_40px_rgba(167,117,47,0.08)]">
|
|
181
|
-
{t('agentsCreateDialogHint')}
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</section>
|
|
186
|
-
|
|
187
|
-
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
|
|
188
|
-
{agentsQuery.isLoading ? (
|
|
189
|
-
<Card className="md:col-span-2 xl:col-span-3 border-dashed border-[#d9dce3] bg-white/70">
|
|
190
|
-
<CardContent className="py-14 text-center text-sm text-gray-500">
|
|
191
|
-
{t('agentsLoading')}
|
|
192
|
-
</CardContent>
|
|
193
|
-
</Card>
|
|
194
|
-
) : sortedAgents.length === 0 ? (
|
|
195
|
-
<Card className="md:col-span-2 xl:col-span-3 overflow-hidden border-dashed border-[#d9dce3] bg-[linear-gradient(135deg,#fff7ea_0%,#f4fbff_100%)]">
|
|
196
|
-
<CardContent className="flex min-h-[240px] flex-col items-center justify-center px-6 py-14 text-center">
|
|
197
|
-
<div className="mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-white/80 shadow-[0_18px_44px_rgba(0,0,0,0.08)]">
|
|
198
|
-
<Bot className="h-8 w-8 text-[#d39a3b]" />
|
|
199
|
-
</div>
|
|
200
|
-
<div className="text-lg font-semibold text-[#2f2212]">{t('agentsEmpty')}</div>
|
|
201
|
-
<p className="mt-2 max-w-md text-sm leading-6 text-[#78644d]">
|
|
202
|
-
{t('agentsEmptyDescription')}
|
|
203
|
-
</p>
|
|
204
|
-
<Button
|
|
205
|
-
type="button"
|
|
206
|
-
className="mt-5 rounded-2xl bg-[#1f5c4d] px-5 text-white hover:bg-[#184d40]"
|
|
207
|
-
onClick={() => setIsCreateDialogOpen(true)}
|
|
208
|
-
>
|
|
209
|
-
<Plus className="mr-2 h-4 w-4" />
|
|
210
|
-
{t('agentsCreateButton')}
|
|
211
|
-
</Button>
|
|
212
|
-
</CardContent>
|
|
213
|
-
</Card>
|
|
214
|
-
) : (
|
|
215
|
-
sortedAgents.map((agent, index) => {
|
|
216
|
-
const tone = resolveAgentTone(index, Boolean(agent.builtIn));
|
|
217
|
-
const runtimeValue = agent.runtime?.trim() || agent.engine?.trim() || '';
|
|
218
|
-
const runtimeLabel = runtimeValue
|
|
219
|
-
? runtimeOptions.find((option) => option.value === normalizeSessionType(runtimeValue))?.label ??
|
|
220
|
-
resolveSessionTypeLabel(runtimeValue)
|
|
221
|
-
: defaultRuntimeLabel;
|
|
222
|
-
return (
|
|
223
|
-
<Card
|
|
224
|
-
key={agent.id}
|
|
225
|
-
className="overflow-hidden border border-gray-200 bg-white shadow-sm transition-shadow duration-200 hover:shadow-md"
|
|
226
|
-
>
|
|
227
|
-
<div className={cn('h-1.5 w-full', tone.strip)} />
|
|
228
|
-
<CardContent className="flex h-full flex-col gap-4 px-4 py-4">
|
|
229
|
-
<div className="flex items-start gap-3">
|
|
230
|
-
<AgentAvatar
|
|
231
|
-
agentId={agent.id}
|
|
232
|
-
displayName={agent.displayName}
|
|
233
|
-
avatarUrl={agent.avatarUrl}
|
|
234
|
-
className="h-11 w-11 shrink-0"
|
|
235
|
-
/>
|
|
236
|
-
<div className="min-w-0 flex-1 space-y-1 pt-0.5">
|
|
237
|
-
<div className="flex flex-wrap items-center gap-2">
|
|
238
|
-
<div className="truncate text-lg font-semibold tracking-[-0.03em] text-[#1f2937]">
|
|
239
|
-
{agent.displayName?.trim() || agent.id}
|
|
240
|
-
</div>
|
|
241
|
-
{agent.builtIn ? (
|
|
242
|
-
<span
|
|
243
|
-
className={cn(
|
|
244
|
-
'inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium',
|
|
245
|
-
tone.chip
|
|
246
|
-
)}
|
|
247
|
-
>
|
|
248
|
-
<ShieldCheck className="h-3 w-3" />
|
|
249
|
-
{t('agentsCardBuiltInTag')}
|
|
250
|
-
</span>
|
|
251
|
-
) : null}
|
|
252
|
-
</div>
|
|
253
|
-
<div className="text-[11px] font-medium uppercase tracking-[0.18em] text-[#94a3b8]">
|
|
254
|
-
@{agent.id}
|
|
255
|
-
</div>
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<p className="text-sm leading-6 text-[#64748b]">
|
|
260
|
-
{agent.description?.trim() ||
|
|
261
|
-
(agent.builtIn
|
|
262
|
-
? t('agentsCardBuiltInSummary')
|
|
263
|
-
: t('agentsCardCustomSummary'))}
|
|
264
|
-
</p>
|
|
265
|
-
|
|
266
|
-
<div className="mt-auto flex flex-col gap-4">
|
|
267
|
-
<div>
|
|
268
|
-
<div className="flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[#94a3b8]">
|
|
269
|
-
<Sparkles className="h-3.5 w-3.5" />
|
|
270
|
-
{t('agentsCardRuntimeLabel')}
|
|
271
|
-
</div>
|
|
272
|
-
<div className="mt-1.5 text-sm leading-6 text-[#475569]">
|
|
273
|
-
{runtimeLabel}
|
|
274
|
-
</div>
|
|
275
|
-
</div>
|
|
276
|
-
|
|
277
|
-
<div className="border-t border-gray-100 pt-3">
|
|
278
|
-
<div className="flex items-center gap-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[#94a3b8]">
|
|
279
|
-
<House className="h-3.5 w-3.5" />
|
|
280
|
-
{t('agentsCardHomeLabel')}
|
|
281
|
-
</div>
|
|
282
|
-
<div className="mt-1.5 break-all text-sm leading-6 text-[#475569]">
|
|
283
|
-
{agent.workspace ?? '-'}
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
|
|
287
|
-
<div className="flex flex-wrap items-center gap-2">
|
|
288
|
-
<Button
|
|
289
|
-
type="button"
|
|
290
|
-
className="h-9 rounded-xl bg-[#1f5c4d] px-4 text-white hover:bg-[#184d40]"
|
|
291
|
-
onClick={() => startChatWithAgent(agent)}
|
|
292
|
-
>
|
|
293
|
-
<MessageCircle className="mr-2 h-4 w-4" />
|
|
294
|
-
{t('agentsCardStartChat')}
|
|
295
|
-
</Button>
|
|
296
|
-
<Button
|
|
297
|
-
type="button"
|
|
298
|
-
variant="ghost"
|
|
299
|
-
className="h-8 rounded-xl px-3 text-xs text-[#7b8794] hover:bg-[#f3f4f6] hover:text-[#475569]"
|
|
300
|
-
onClick={() => handleStartEdit(agent)}
|
|
301
|
-
disabled={updateAgent.isPending}
|
|
302
|
-
>
|
|
303
|
-
<Pencil className="mr-1.5 h-3.5 w-3.5" />
|
|
304
|
-
{t('agentsEditAction')}
|
|
305
|
-
</Button>
|
|
306
|
-
{!agent.builtIn ? (
|
|
307
|
-
<Button
|
|
308
|
-
type="button"
|
|
309
|
-
variant="ghost"
|
|
310
|
-
className="h-8 rounded-xl px-3 text-xs text-[#7b8794] hover:bg-[#f3f4f6] hover:text-[#475569]"
|
|
311
|
-
onClick={() => deleteAgent.mutate({ agentId: agent.id })}
|
|
312
|
-
disabled={deleteAgent.isPending}
|
|
313
|
-
>
|
|
314
|
-
<Trash2 className="mr-1.5 h-3.5 w-3.5" />
|
|
315
|
-
{t('agentsRemoveAction')}
|
|
316
|
-
</Button>
|
|
317
|
-
) : null}
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
</CardContent>
|
|
321
|
-
</Card>
|
|
322
|
-
);
|
|
323
|
-
})
|
|
324
|
-
)}
|
|
325
|
-
</div>
|
|
326
|
-
|
|
327
|
-
<AgentCreateDialog
|
|
328
|
-
open={isCreateDialogOpen}
|
|
329
|
-
pending={createAgent.isPending}
|
|
330
|
-
providerCatalog={providerCatalog}
|
|
331
|
-
runtimeOptions={runtimeOptions}
|
|
332
|
-
defaultRuntime={defaultRuntime}
|
|
333
|
-
onOpenChange={setIsCreateDialogOpen}
|
|
334
|
-
onSubmit={handleCreate}
|
|
335
|
-
/>
|
|
336
|
-
|
|
337
|
-
<AgentEditDialog
|
|
338
|
-
agent={editingAgent}
|
|
339
|
-
pending={updateAgent.isPending}
|
|
340
|
-
providerCatalog={providerCatalog}
|
|
341
|
-
runtimeOptions={runtimeOptions}
|
|
342
|
-
defaultRuntime={defaultRuntime}
|
|
343
|
-
onOpenChange={(open) => {
|
|
344
|
-
if (!open && !updateAgent.isPending) {
|
|
345
|
-
setEditingAgent(null);
|
|
346
|
-
}
|
|
347
|
-
}}
|
|
348
|
-
onSubmit={handleUpdate}
|
|
349
|
-
/>
|
|
350
|
-
</PageLayout>
|
|
351
|
-
);
|
|
352
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const CONFIG_SPLIT_GRID_CLASS = 'grid min-h-0 grid-cols-1 gap-5 xl:grid-cols-[340px_minmax(0,1fr)]';
|
|
2
|
-
|
|
3
|
-
export const CONFIG_SIDEBAR_CARD_CLASS =
|
|
4
|
-
'flex min-h-[520px] min-h-0 min-w-0 flex-col overflow-hidden rounded-2xl border border-gray-200/70 bg-white shadow-card xl:h-[calc(100vh-180px)] xl:min-h-[600px] xl:max-h-[860px]';
|
|
5
|
-
|
|
6
|
-
export const CONFIG_DETAIL_CARD_CLASS =
|
|
7
|
-
'flex min-h-[520px] min-h-0 min-w-0 flex-col overflow-hidden rounded-2xl border border-gray-200/70 bg-white shadow-card xl:h-[calc(100vh-180px)] xl:min-h-[600px] xl:max-h-[860px]';
|
|
8
|
-
|
|
9
|
-
export const CONFIG_EMPTY_DETAIL_CARD_CLASS =
|
|
10
|
-
'flex min-h-[520px] min-w-0 items-center justify-center overflow-hidden rounded-2xl border border-gray-200/70 bg-white px-6 text-center xl:h-[calc(100vh-180px)] xl:min-h-[600px] xl:max-h-[860px]';
|