project_rag/indexer/
mod.rs

1//! Code indexing, file walking, and chunking strategies
2//!
3//! Provides functionality to walk directories, detect languages, parse AST,
4//! and chunk code files into semantically meaningful units for embedding.
5
6mod ast_parser;
7mod chunker;
8mod file_info;
9mod file_walker;
10mod language;
11mod pdf_extractor;
12
13pub use ast_parser::AstParser;
14pub use chunker::{ChunkStrategy, CodeChunker};
15pub use file_info::FileInfo;
16pub use file_walker::FileWalker;
17pub use language::detect_language;
18pub use pdf_extractor::extract_pdf_to_markdown;
19
20use crate::types::ChunkMetadata;
21
22/// Represents a code chunk ready for embedding
23#[derive(Debug, Clone)]
24pub struct CodeChunk {
25    /// The actual source code content of this chunk
26    pub content: String,
27    /// Metadata about this chunk (file path, line numbers, language, etc.)
28    pub metadata: ChunkMetadata,
29}