MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / saveEmbeddingCache

Function saveEmbeddingCache

src/core/embeddings.ts:425–428  ·  view source on GitHub ↗
(rootDir: string, cache: EmbeddingCache, fileName: string)

Source from the content-addressed store, hash-verified

423}
424
425export async function saveEmbeddingCache(rootDir: string, cache: EmbeddingCache, fileName: string): Promise<void> {
426 await ensureMcpDataDir(rootDir);
427 await writeFile(join(rootDir, CACHE_DIR, fileName), JSON.stringify(cache));
428}
429
430function formatLineRange(line: number, endLine?: number): string {
431 if (endLine && endLine > line) return `L${line}-L${endLine}`;

Callers 5

buildIdentifierIndexFunction · 0.85
semanticIdentifierSearchFunction · 0.85
saveCacheFunction · 0.85

Calls 1

ensureMcpDataDirFunction · 0.85

Tested by

no test coverage detected