MCPcopy Create free account
hub / github.com/VectifyAI/PageIndex / print_tree

Function print_tree

pageindex/utils.py:699–705  ·  view source on GitHub ↗
(tree, indent=0)

Source from the content-addressed store, hash-verified

697 return mapping
698
699def print_tree(tree, indent=0):
700 for node in tree:
701 summary = node.get('summary') or node.get('prefix_summary', '')
702 summary_str = f" — {summary[:60]}..." if summary else ""
703 print(' ' * indent + f"[{node.get('node_id', '?')}] {node.get('title', '')}{summary_str}")
704 if node.get('nodes'):
705 print_tree(node['nodes'], indent + 1)
706
707def print_wrapped(text, width=100):
708 for line in text.splitlines():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected