MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / _summarize_tree

Function _summarize_tree

codewiki/mcp/server.py:526–536  ·  view source on GitHub ↗
(tree, depth=0)

Source from the content-addressed store, hash-verified

524 module_tree = json.loads(module_tree_path.read_text(encoding="utf-8"))
525
526 def _summarize_tree(tree, depth=0):
527 lines = []
528 for name, info in tree.items():
529 indent = " " * depth
530 comp_count = len(info.get("components", []))
531 children = info.get("children", {})
532 child_count = len(children) if isinstance(children, dict) else 0
533 lines.append(f"{indent}- {name} ({comp_count} components, {child_count} children)")
534 if isinstance(children, dict) and children:
535 lines.extend(_summarize_tree(children, depth + 1))
536 return lines
537
538 summary = "\n".join(_summarize_tree(module_tree))
539 result = {

Callers 1

_legacy_get_module_treeFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected