Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions refactron/rag/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def __init__(
)

self.parser = CodeParser()
from refactron.rag.chunker import CodeChunker
self.chunker = CodeChunker(self.parser)

def index_repository(
self, repo_path: Optional[Path] = None, summarize: bool = False
Expand Down Expand Up @@ -171,11 +173,8 @@ def _index_file(self, file_path: Path, summarize: bool = False) -> List[CodeChun
Returns:
List of code chunks that were indexed
"""
from refactron.rag.chunker import CodeChunker

# Chunk the file (parser is called inside chunker)
chunker = CodeChunker(self.parser)
chunks = chunker.chunk_file(file_path)
chunks = self.chunker.chunk_file(file_path)

if summarize and self.llm_client:
for chunk in chunks:
Expand Down
Loading