Files
xiaofanluan 7cccacdc51 feat: add repository-wide code review with feature analysis
Implement full repository review mode that detects logical features/modules
and reviews them systematically with session persistence for pause/resume
capability.

Key additions:
- RepoScanner: scans codebase and estimates tokens/cost
- FeatureAnalyzer: AI-powered detection of logical modules
- FeaturePlanner: creates review execution plan
- StateManager: persists sessions for resume capability
- RepoOrchestrator: executes feature-by-feature reviews
- MarkdownReporter: generates review reports

New CLI options: --repo, --quick, --deep, --list-sessions, --session,
--export, --path, --ignore, --plan-only, --reanalyze

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 22:58:22 +08:00

35 lines
990 B
TypeScript

// tests/feature-analyzer/types.test.ts
import { describe, it, expect } from 'vitest'
import type { FeatureDetectionResult, AnalyzerOptions } from '../../src/feature-analyzer/types.js'
describe('Feature Analyzer Types', () => {
it('should define FeatureDetectionResult', () => {
const result: FeatureDetectionResult = {
features: [
{
id: 'write',
name: 'Write Operations',
description: 'Handles insert and upsert',
entryPoints: ['src/insert.ts'],
filePatterns: ['insert', 'upsert', 'write'],
confidence: 0.9
}
],
reasoning: 'Found clear write-related files'
}
expect(result.features).toHaveLength(1)
expect(result.features[0].confidence).toBeGreaterThan(0.5)
})
it('should define AnalyzerOptions', () => {
const options: AnalyzerOptions = {
maxFeatures: 10,
minConfidence: 0.5,
sampleSize: 20
}
expect(options.maxFeatures).toBe(10)
})
})