-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.mjs
More file actions
30 lines (24 loc) · 914 Bytes
/
test.mjs
File metadata and controls
30 lines (24 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { CodeKnowledgeMapGenerator } from './dist/index.js';
import { AnalysisConfig } from './dist/types.js';
const config = {
targetPath: '/Users/wangshihao/.openclaw/workspace',
outputPath: './test-output',
format: 'markdown',
includeTests: false,
excludePatterns: ['node_modules', '.git'],
aiModel: 'gpt-4'
};
async function test() {
console.log('🧪 开始测试 CodeKnowledgeMapGenerator...');
try {
const generator = new CodeKnowledgeMapGenerator(config);
const result = await generator.generate();
console.log('✅ 测试成功!');
console.log(`📊 生成文件数: ${result.generatedFiles.length}`);
console.log(`📈 处理时间: ${result.processingTime}ms`);
console.log(`📁 输出目录: ${result.outputPath}`);
} catch (error) {
console.error('❌ 测试失败:', error instanceof Error ? error.message : String(error));
}
}
test();