Skip to main content

render

Function render 

Source
pub fn render(
    graph: &RepoGraph,
    max_tokens: usize,
    focus: Option<usize>,
) -> String
Expand description

Render a budget-constrained overview of the repository.

Files are sorted by PageRank (or topic-sensitive rank if focus is Some). Output uses four tiers of decreasing detail:

  • Tier 0 (top 10%): full path, rank, callers/callees, signatures with scopes
  • Tier 1 (next 20%): full path, rank, signatures
  • Tier 2 (next 40%): full path, rank, definition names and kinds
  • Tier 3 (bottom 30%): file path only

Stops accumulating output when the estimated token count exceeds max_tokens.