refactor: address 5-pass audit findings for antipatterns, bottlenecks, memory efficiency, and LLM handlers

This commit is contained in:
Riz Ashraf committed 2026-10-05 21:44:10 +01:00
1 parent 626403900f
commit 924b6d09fa
30 files changed
+1120 -503

No files matched your search

+4 -1
View File
@@ -59,6 +59,9 @@ impl McpTool for ReadFileSkeletonHandler {
let mut result_skeleton = String::new();
fn extract_skeleton(node: Node, code: &str, out: &mut String, depth: usize) {
if depth > 128 {
return;
}
let kind = node.kind();
let is_structural = matches!(
@@ -106,7 +109,7 @@ impl McpTool for ReadFileSkeletonHandler {
} else if node.is_named() {
let mut cursor = node.walk();
for child in node.named_children(&mut cursor) {
extract_skeleton(child, code, out, depth);
extract_skeleton(child, code, out, depth + 1);
}
}
}