Skip to main content

populate_markdown_docs

Function populate_markdown_docs 

Source
pub async fn populate_markdown_docs(
    conn: &Connection,
    config: &EmbeddingsConfig,
    repo_root: &Path,
    head_commit: Option<&str>,
    db_path: Option<&Path>,
) -> Result<PopulateStats>
Expand description

Embed all eligible markdown files in the workspace.

Eligible files:

  • SUMMARY.md, CLAUDE.md, README.md in the repo root
  • Any *.md under docs/

Each file is chunked by heading sections. Existing doc embeddings for the same paths are replaced via the UNIQUE constraint on (source_type, source_path, source_id).