@@ -216,7 +216,7 @@ export class LanceDbIndex implements CodebaseIndex {
216
216
let needToCreateTable = ! existingTables . includes ( tableName ) ;
217
217
218
218
const addComputedLanceDbRows = async (
219
- pathAndCacheKey : PathAndCacheKey ,
219
+ pathAndCacheKeys : PathAndCacheKey [ ] ,
220
220
computedRows : LanceDbRow [ ] ,
221
221
) => {
222
222
// Create table if needed, add computed rows
@@ -236,7 +236,7 @@ export class LanceDbIndex implements CodebaseIndex {
236
236
}
237
237
238
238
// Mark item complete
239
- await markComplete ( [ pathAndCacheKey ] , IndexResultType . Compute ) ;
239
+ await markComplete ( pathAndCacheKeys , IndexResultType . Compute ) ;
240
240
} ;
241
241
242
242
// Check remote cache
@@ -285,7 +285,7 @@ export class LanceDbIndex implements CodebaseIndex {
285
285
) ;
286
286
}
287
287
288
- await addComputedLanceDbRows ( { cacheKey, path } , rows ) ;
288
+ await addComputedLanceDbRows ( [ { cacheKey, path } ] , rows ) ;
289
289
}
290
290
291
291
// Remove items that don't need to be recomputed
@@ -307,18 +307,7 @@ export class LanceDbIndex implements CodebaseIndex {
307
307
308
308
const dbRows = await this . computeRows ( results . compute ) ;
309
309
await this . insertRows ( sqlite , dbRows ) ;
310
- await Promise . all (
311
- results . compute . map ( ( result ) => {
312
- addComputedLanceDbRows (
313
- result ,
314
- dbRows . filter (
315
- ( row ) =>
316
- row . path === result . path && row . cachekey === result . cacheKey ,
317
- ) ,
318
- ) ;
319
- } ) ,
320
- ) ;
321
- await markComplete ( results . compute , IndexResultType . Compute ) ;
310
+ await addComputedLanceDbRows ( results . compute , dbRows ) ;
322
311
let accumulatedProgress = 0 ;
323
312
324
313
// Add tag - retrieve the computed info from lance sqlite cache
0 commit comments