MCPcopy
hub / github.com/continuedev/continue / update

Method update

core/indexing/TestCodebaseIndex.ts:28–55  ·  view source on GitHub ↗
(
    tag: IndexTag,
    results: RefreshIndexResults,
    markComplete: MarkCompleteCallback,
    repoName: string | undefined,
  )

Source from the content-addressed store, hash-verified

26 }
27
28 async *update(
29 tag: IndexTag,
30 results: RefreshIndexResults,
31 markComplete: MarkCompleteCallback,
32 repoName: string | undefined,
33 ): AsyncGenerator<IndexingProgressUpdate, any, unknown> {
34 const db = await SqliteDb.get();
35 await TestCodebaseIndex._createTables(db);
36
37 for (const item of [...results.compute, ...results.addTag]) {
38 await db.run(
39 "INSERT INTO test_index (path, branch, directory) VALUES (?, ?, ?)",
40 [item.path, tag.branch, tag.directory],
41 );
42 }
43
44 for (const item of [...results.del, ...results.removeTag]) {
45 await db.run(
46 "DELETE FROM test_index WHERE path = ? AND branch = ? AND directory = ?",
47 [item.path, tag.branch, tag.directory],
48 );
49 }
50
51 await markComplete(results.compute, IndexResultType.Compute);
52 await markComplete(results.addTag, IndexResultType.AddTag);
53 await markComplete(results.del, IndexResultType.Delete);
54 await markComplete(results.removeTag, IndexResultType.RemoveTag);
55 }
56
57 async getIndexedFilesForTags(tags: IndexTag[]): Promise<string[]> {
58 const db = await SqliteDb.get();

Callers

nothing calls this directly

Calls 4

markCompleteFunction · 0.85
getMethod · 0.65
runMethod · 0.65
_createTablesMethod · 0.45

Tested by

no test coverage detected