Skip to content

Commit 672165b

Browse files
committed
feat(doc_loader): include source files in documentation processing
Allows source code files generated by rustdoc (e.g., in the 'src/' subdirectory) to be included in the list of documents processed for embeddings. This enables querying the actual source code content via the semantic search mechanism.
1 parent 423f1f8 commit 672165b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/doc_loader.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,12 @@ fn process_documentation_directory(docs_path: &Path) -> Result<Vec<Document>, Do
192192
continue;
193193
}
194194

195-
// Also ignore files within source code view directories (e.g., `doc/src/...`)
196-
// Check the first path (they should share the problematic component if any)
197-
if paths.first().map_or(false, |p| p.components().any(|comp| comp.as_os_str() == OsStr::new("src"))) {
198-
eprintln!("[DEBUG] Ignoring file in src view: {}", paths.first().unwrap().display());
199-
continue;
200-
}
195+
// // Also ignore files within source code view directories (e.g., `doc/src/...`) // Commented out to include source files
196+
// // Check the first path (they should share the problematic component if any)
197+
// if paths.first().map_or(false, |p| p.components().any(|comp| comp.as_os_str() == OsStr::new("src"))) {
198+
// eprintln!("[DEBUG] Ignoring file in src view: {}", paths.first().unwrap().display());
199+
// continue;
200+
// }
201201

202202

203203
if paths.len() == 1 {

0 commit comments

Comments
 (0)