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

Function removeFileScopedCacheEntries

src/tools/semantic-identifiers.ts:145–153  ·  view source on GitHub ↗
(cache: EmbeddingCache, relativePath: string)

Source from the content-addressed store, hash-verified

143}
144
145function removeFileScopedCacheEntries(cache: EmbeddingCache, relativePath: string): void {
146 const definitionPrefix = `id:${relativePath}:`;
147 const callsitePrefix = `${CALLSITE_CACHE_PREFIX}${relativePath}:`;
148 for (const key of Object.keys(cache)) {
149 if (key.startsWith(definitionPrefix) || key.startsWith(callsitePrefix)) {
150 delete cache[key];
151 }
152 }
153}
154
155async function buildIdentifierDocsForFile(rootDir: string, relativePath: string): Promise<IdentifierDoc[]> {
156 const normalized = normalizeRelativePath(relativePath);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected