Skip to main content

generate_summary

Function generate_summary 

Source
pub fn generate_summary(chunk: &CodeChunk) -> String
Expand description

Generate a text summary for a code chunk, suitable for embedding.

The summary combines:

  • The chunk kind and name
  • The function/method signature
  • Documentation comments
  • Key structural information

This produces a more semantically meaningful text than just the raw source code, improving embedding quality for semantic search.