diff --git a/mcp_server/server.py b/mcp_server/server.py index bf8fc6b..f428616 100644 --- a/mcp_server/server.py +++ b/mcp_server/server.py @@ -1000,7 +1000,7 @@ def _run_semantic_indexing_background(job_id: str, kb_name: str, project_path: s Updates INDEXING_JOBS with progress. """ from app.core.tree_sitter_indexer import TreeSitterIndexer - from app.core.ingestion import ingest_directory, ingest_file + from app.core.ingestion import ingest_directory, ingest_file, should_skip_path def update_job(status: str, progress: int = 0, message: str = "", error: str = None): with INDEXING_JOBS_LOCK: @@ -1037,7 +1037,9 @@ def _run_semantic_indexing_background(job_id: str, kb_name: str, project_path: s docs_patterns = ["*.md", "*.txt", "*.rst"] doc_files = [] for pattern in docs_patterns: - doc_files.extend(Path(project_path).rglob(pattern)) + doc_files.extend( + f for f in Path(project_path).rglob(pattern) if not should_skip_path(f) + ) all_files = list(set(important_files + [str(f.relative_to(project_path)) for f in doc_files])) total_files = len(all_files) @@ -1091,7 +1093,7 @@ def _run_semantic_indexing_sync(kb_name: str, project_path: str, selective: bool Returns the final result dict. """ from app.core.tree_sitter_indexer import TreeSitterIndexer - from app.core.ingestion import ingest_directory, ingest_file + from app.core.ingestion import ingest_directory, ingest_file, should_skip_path start_time = time.time() @@ -1108,7 +1110,9 @@ def _run_semantic_indexing_sync(kb_name: str, project_path: str, selective: bool docs_patterns = ["*.md", "*.txt", "*.rst"] doc_files = [] for pattern in docs_patterns: - doc_files.extend(Path(project_path).rglob(pattern)) + doc_files.extend( + f for f in Path(project_path).rglob(pattern) if not should_skip_path(f) + ) all_files = list(set(important_files + [str(f.relative_to(project_path)) for f in doc_files]))