Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/tools/search-codebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,7 @@ export async function handle(
callersTotal > 0 ? { covered: callersCovered, total: callersTotal } : undefined;

// --- Risk level (based on circular deps + impact breadth) ---
//TODO: Review this risk level calculation
let _riskLevel: 'low' | 'medium' | 'high' = 'low';
let riskLevel: 'low' | 'medium' | 'high' = 'low';
let cycleCount = 0;
const graphDataSource = relationships?.graph || intelligence?.internalFileGraph;
if (graphDataSource) {
Expand All @@ -523,9 +522,9 @@ export async function handle(
}
}
if (cycleCount > 0 || impactCandidates.length > 10) {
_riskLevel = 'high';
riskLevel = 'high';
} else if (impactCandidates.length > 3) {
_riskLevel = 'medium';
riskLevel = 'medium';
}

// --- Golden files (exemplar code) ---
Expand All @@ -535,8 +534,7 @@ export async function handle(
}));

// --- Confidence (index freshness) ---
// TODO: Review this confidence calculation
//const confidence = computeIndexConfidence();
const confidence = computeIndexConfidence();

// --- Failure memories (1.5x relevance boost) ---
const failureWarnings = relatedMemories
Expand Down