diff --git a/core/indexing/LanceDbIndex.ts b/core/indexing/LanceDbIndex.ts index 198232a95..f7f1e6ecc 100644 --- a/core/indexing/LanceDbIndex.ts +++ b/core/indexing/LanceDbIndex.ts @@ -268,14 +268,6 @@ export class LanceDbIndex implements CodebaseIndex { const dbRows = await this.computeRows(results.compute); await this.insertRows(sqlite, dbRows); - await Promise.all( - results.compute.map((item) => { - addComputedLanceDbRows( - item, - dbRows.filter((row) => row.path === item.path), - ); - }), - ); await markComplete(results.compute, IndexResultType.Compute); let accumulatedProgress = 0; @@ -481,9 +473,10 @@ export class LanceDbIndex implements CodebaseIndex { { cause: err }, ), ); + } else { + resolve(); } }); - resolve(); }); }); } diff --git a/core/indexing/chunk/ChunkCodebaseIndex.ts b/core/indexing/chunk/ChunkCodebaseIndex.ts index 008f90c62..0e866b3bf 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.ts @@ -133,7 +133,6 @@ export class ChunkCodebaseIndex implements CodebaseIndex { } } - private async createTables(db: DatabaseConnection) { await db.exec(`CREATE TABLE IF NOT EXISTS chunks ( id INTEGER PRIMARY KEY AUTOINCREMENT, @@ -201,9 +200,10 @@ export class ChunkCodebaseIndex implements CodebaseIndex { db.db.exec("COMMIT", (err: Error | null) => { if (err) { reject(new Error("error while committing insert chunks transaction", { cause: err })); + } else { + resolve(); } }); - resolve(); }); }); }