Skip to main content

build_doc

Function build_doc 

Source
pub async fn build_doc(
    vault: &NoteVault,
    path: &VaultPath,
    hash: u64,
) -> Result<Option<WireDoc>, VaultError>
Expand description

Builds the wire document for a note: its canonical path, content hash, and heading sections pulled from the index. Returns None when the note has no indexable sections — an empty note is not RAG content, so it is never pushed (this keeps both backends from perpetually re-pushing chunkless notes, since only one of them records a hash for them server-side).