mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T14:58:11Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
64e895090f
commit
14fa22fdaa
1 file changed
+12
-2
@@ -584,11 +584,21 @@ export function assessOverallRisk(files: DiffFile[], fileRisks: FileRisk[]): Ove
|
||||
return { overall, score: Math.min(100, Math.round(weightedScore)), breakdown };
|
||||
}
|
||||
|
||||
// Singleton classifier instance for reuse
|
||||
let classifierInstance: DiffClassifier | null = null;
|
||||
|
||||
function getClassifier(): DiffClassifier {
|
||||
if (!classifierInstance) {
|
||||
classifierInstance = new DiffClassifier();
|
||||
}
|
||||
return classifierInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Classify a diff based on files
|
||||
* Classify a diff based on files (uses singleton classifier)
|
||||
*/
|
||||
export function classifyDiff(files: DiffFile[]): DiffClassification {
|
||||
const classifier = new DiffClassifier();
|
||||
const classifier = getClassifier();
|
||||
const fileDiffs: FileDiff[] = files.map(f => ({
|
||||
path: f.path,
|
||||
hunks: [],
|
||||
|
||||
Reference in new issue
Block a user