feat(consultation): unify server-distributed agents without fixed roles

This commit is contained in:
brother7 committed 2026-09-24 11:56:42 +08:00
1 parent 248776d855
commit 8a157be4f6
35 files changed
+625 -668

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@ test.beforeAll(async () => {
server = await createServer({ configFile: false, cacheDir: 'node_modules/.vite-teacher-discussion', resolve: { alias: { '@': resolve('src') } }, esbuild: { jsx: 'automatic' }, server: { host: '127.0.0.1', port: 0 }, plugins: [{
name: 'isolated-discussion-test', enforce: 'pre',
load(id) {
if (id.endsWith('/src/lib/coding-teacher.ts')) return "export { teacherApi, teacherTopicsPath } from '/tests/e2e/fixtures/teacher-discussion-api.ts';";
if (id.endsWith('/src/lib/coding-teacher.ts')) return "export { teacherApi, teacherTopicsPath, legacyTopicBase } from '/tests/e2e/fixtures/teacher-discussion-api.ts';";
if (id.endsWith('/src/stores/auth.ts')) return 'export const useAuthStore = selector => selector({user:{userId:"fixture"}});';
},
configureServer(vite) { vite.middlewares.use((req, res, next) => {
@@ -25,7 +25,7 @@ for (const width of [319, 508]) for (const kind of ['ordinary', 'ideas', 'struct
await page.setViewportSize({ width: 1180, height: 800 });
const errors: string[] = []; page.on('pageerror', error => errors.push(error.message));
await page.goto(`${url}?kind=${kind}&width=${width}`);
const input = page.getByRole('textbox', { name: '向老师提问' });
const input = page.getByRole('textbox', { name: '向智能体提问' });
await expect(input).toBeEnabled();
const tool = page.getByTestId('teacher-discussion');
if (kind === 'ordinary') {