MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / indexPath

Function indexPath

src/context/retrieval.ts:179–182  ·  view source on GitHub ↗
(projectRoot: string, embeddingModel: string)

Source from the content-addressed store, hash-verified

177}
178
179export function indexPath(projectRoot: string, embeddingModel: string): string {
180 const hash = createHash('sha1').update(`${projectRoot}::${embeddingModel}`).digest('hex').slice(0, 16);
181 return path.join(os.homedir(), '.qodex', 'embeddings', `${hash}.json`);
182}
183
184export async function loadIndex(p: string): Promise<Index | null> {
185 try { return JSON.parse(await fs.readFile(p, 'utf-8')); } catch { return null; }

Callers 3

executeMethod · 0.85
persistIndexFunction · 0.85
retrieveRelevantFilesFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected