Add evaluation framework and fix call graph extraction
- Add evaluation test suite with TypeScript and Python fixtures - Fix MCP server to defer CodeGraph init until rootUri received - Fix call edge extraction by calling resolveReferences() after indexAll/sync - Fix glob matching for root-level files (e.g., **/*.py now matches auth.py) - Fix duplicate node extraction for methods inside classes - Update context tests to use buildContext for semantic search + graph traversal - Export unused formatter functions to fix build Evaluation results: - TypeScript: 96% precision, 79% recall, 85% F1 - Python: 99% precision, 80% recall, 85% F1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
e306114607
commit
6b672f9152
+13
-8
@@ -26,15 +26,20 @@ import { logDebug, logWarn } from '../errors';
|
||||
|
||||
/**
|
||||
* Default options for context building
|
||||
*
|
||||
* Tuned for minimal context usage while still providing useful results:
|
||||
* - Fewer nodes and code blocks by default
|
||||
* - Smaller code block size limit
|
||||
* - Shallower traversal
|
||||
*/
|
||||
const DEFAULT_BUILD_OPTIONS: Required<BuildContextOptions> = {
|
||||
maxNodes: 50,
|
||||
maxCodeBlocks: 10,
|
||||
maxCodeBlockSize: 2000,
|
||||
maxNodes: 20, // Reduced from 50 - most tasks don't need 50 symbols
|
||||
maxCodeBlocks: 5, // Reduced from 10 - only show most relevant code
|
||||
maxCodeBlockSize: 1500, // Reduced from 2000
|
||||
includeCode: true,
|
||||
format: 'markdown',
|
||||
searchLimit: 5,
|
||||
traversalDepth: 2,
|
||||
searchLimit: 3, // Reduced from 5 - fewer entry points
|
||||
traversalDepth: 1, // Reduced from 2 - shallower graph expansion
|
||||
minScore: 0.3,
|
||||
};
|
||||
|
||||
@@ -42,9 +47,9 @@ const DEFAULT_BUILD_OPTIONS: Required<BuildContextOptions> = {
|
||||
* Default options for finding relevant context
|
||||
*/
|
||||
const DEFAULT_FIND_OPTIONS: Required<FindRelevantContextOptions> = {
|
||||
searchLimit: 5,
|
||||
traversalDepth: 2,
|
||||
maxNodes: 50,
|
||||
searchLimit: 3, // Reduced from 5
|
||||
traversalDepth: 1, // Reduced from 2
|
||||
maxNodes: 20, // Reduced from 50
|
||||
minScore: 0.3,
|
||||
edgeKinds: [],
|
||||
nodeKinds: [],
|
||||
|
||||
Reference in New Issue
Block a user