@@ -16,7 +16,7 @@ import * as Diff from 'diff';
1616// import { Buffer } from 'buffer'; // Buffer is global in Node.js
1717import { configService , logger } from "./config-service" ;
1818// import { generateEmbedding } from "./ollama"; // We will use llmProvider.generateEmbedding() instead.
19- import { v5 as uuidv5 } from 'uuid' ; // Import uuidv5
19+ import { v4 as uuidv4 } from 'uuid' ; // Import uuidv4
2020import nodeFs from 'fs' ; // Standard fs for isomorphic-git functions requiring it
2121import { batchUpsertVectors } from './qdrant' ;
2222
@@ -37,9 +37,6 @@ export interface CommitDetail {
3737 changedFiles : CommitChange [ ] ;
3838}
3939
40- // Define a namespace for UUID generation (this can be any valid UUID)
41- const CODECOMPASS_NAMESPACE = 'f1a2b3c4-d5e6-7890-1234-567890abcdef' ;
42-
4340export async function validateGitRepository ( repoPath : string ) : Promise < boolean > {
4441 try {
4542 const gitdir = path . join ( repoPath , ".git" ) ;
@@ -187,8 +184,7 @@ export async function indexRepository(qdrantClient: QdrantClient, repoPath: stri
187184 // Embed the preprocessed chunk
188185 const embedding = await llmProvider . generateEmbedding ( chunkContent ) ; // Use llmProvider
189186 // Generate UUID for pointId
190- const idContentFileChunk = `file:${ repoPath } :${ filepath } :chunk:${ i } ` ;
191- const pointId = uuidv5 ( idContentFileChunk , CODECOMPASS_NAMESPACE ) ;
187+ const pointId = uuidv4 ( ) ;
192188
193189 const payload : FileChunkPayload = {
194190 dataType : 'file_chunk' ,
@@ -573,7 +569,7 @@ async function indexCommitsAndDiffs(
573569 continue ;
574570 }
575571 // Generate commit ID first
576- const commitPointId = uuidv5 ( `commit: ${ String ( repoPath ) } : ${ String ( commit . oid ) } ` , CODECOMPASS_NAMESPACE ) ;
572+ const commitPointId = uuidv4 ( ) ;
577573 const commitPayload : CommitInfoPayload = { // Define payload before embedding attempt
578574 dataType : 'commit_info' ,
579575 commit_oid : commit . oid ,
@@ -625,7 +621,7 @@ async function indexCommitsAndDiffs(
625621 continue ;
626622 }
627623 // Generate diff ID first
628- const diffPointId = uuidv5 ( `diff: ${ String ( repoPath ) } : ${ String ( commit . oid ) } : ${ String ( changedFile . path ) } :chunk: ${ i } ` , CODECOMPASS_NAMESPACE ) ;
624+ const diffPointId = uuidv4 ( ) ;
629625 const diffPayload : DiffChunkPayload = { // Define payload before embedding
630626 dataType : 'diff_chunk' ,
631627 commit_oid : commit . oid ,
0 commit comments