MCPcopy Index your code
hub / github.com/continuedev/continue / singleFileIndexOps

Method singleFileIndexOps

core/indexing/CodebaseIndexer.ts:221–239  ·  view source on GitHub ↗
(
    results: RefreshIndexResults,
    lastUpdated: PathAndCacheKey[],
    filePath: string,
  )

Source from the content-addressed store, hash-verified

219 }
220
221 private singleFileIndexOps(
222 results: RefreshIndexResults,
223 lastUpdated: PathAndCacheKey[],
224 filePath: string,
225 ): [RefreshIndexResults, PathAndCacheKey[]] {
226 const filterFn = (item: PathAndCacheKey) => item.path === filePath;
227 const compute = results.compute.filter(filterFn);
228 const del = results.del.filter(filterFn);
229 const addTag = results.addTag.filter(filterFn);
230 const removeTag = results.removeTag.filter(filterFn);
231 const newResults = {
232 compute,
233 del,
234 addTag,
235 removeTag,
236 };
237 const newLastUpdated = lastUpdated.filter(filterFn);
238 return [newResults, newLastUpdated];
239 }
240
241 public async refreshFile(
242 file: string,

Callers 1

refreshFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected