Skip to main content

format_structure_text

Function format_structure_text 

Source
pub fn format_structure_text(structure: &CodeStructure) -> String
Expand description

Format code structure for text output.

low-cleanup-bundle-v1 (L1): the previous text view emitted only top-level filenames + bare function/class names (21KB vs 523KB JSON on flask) — users could not see method bodies-of-work or signatures, so the text view was effectively useless for navigation. We now emit:

  • each file’s functions WITH (line) and full signature when known (via definitions[] if present, falling back to bare names),
  • each class WITH its inline method list pulled from method_infos, while still skipping fields the JSON consumers rely on (imports, definitions array). Result: roughly 2-3× richer than before, still text-stream friendly.