compute_chunk_hash

Function compute_chunk_hash 

Source
pub fn compute_chunk_hash(
    text: &str,
    leading_trivia: &[String],
    trailing_trivia: &[String],
) -> String
Expand description

Compute blake3 hash of chunk content for incremental indexing This enables us to detect which chunks have changed and only re-embed those

Hashes all fields that affect the chunk’s display and meaning:

  • text: the main chunk content
  • leading_trivia: doc comments and comments before the chunk
  • trailing_trivia: comments after the chunk