refactor: extract model tester debug panel

This commit is contained in:
Cita
2026-03-23 13:35:42 +08:00
parent 9b21ed3fed
commit 8f14540549
3 changed files with 166 additions and 96 deletions
@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
describe('ModelTester debug panel extraction', () => {
it('delegates the debug sidebar to a dedicated model-tester component', () => {
const source = readFileSync(resolve(process.cwd(), 'src/web/pages/ModelTester.tsx'), 'utf8').replace(/\r\n/g, '\n');
expect(source).toContain("import DebugPanel from './model-tester/DebugPanel.js'");
expect(source).not.toContain('时间线');
});
});