Skip to content

Commit e7b7c55

Browse files
committed
chore: Add debug logs in indexRepository
1 parent 4533127 commit e7b7c55

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/lib/repository.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export async function validateGitRepository(repoPath: string): Promise<boolean>
5151

5252
// Index Repository
5353
export async function indexRepository(qdrantClient: QdrantClient, repoPath: string, llmProvider: LLMProvider): Promise<void> {
54+
logger.info(`[DEBUG] indexRepository: Starting for repoPath: ${repoPath}`); // Example debug log
5455
const isGitRepo = await validateGitRepository(repoPath);
5556
if (!isGitRepo) {
5657
logger.warn(`Skipping repository indexing: ${repoPath} is not a valid Git repository`);
@@ -150,6 +151,7 @@ export async function indexRepository(qdrantClient: QdrantClient, repoPath: stri
150151
let errorCount = 0;
151152

152153
for (const filepath of filteredFiles) {
154+
logger.info(`[DEBUG] indexRepository: Processing file: ${filepath}`); // Example debug log
153155
try {
154156
const fullPath = path.join(repoPath, filepath);
155157
const content = await fs.readFile(fullPath, "utf8");
@@ -225,6 +227,7 @@ export async function indexRepository(qdrantClient: QdrantClient, repoPath: stri
225227
});
226228
// Increment errorCount or handle as a separate category of error
227229
}
230+
logger.info(`[DEBUG] indexRepository: Finished for repoPath: ${repoPath}`); // Example debug log
228231

229232
logger.info(`Indexing complete: ${successCount} files indexed successfully, ${errorCount} errors`);
230233
}

0 commit comments

Comments
 (0)