feat(TRUEREF-0023): add sqlite-vec search pipeline
This commit is contained in:
@@ -8,6 +8,7 @@ import { RepositoryMapper } from '$lib/server/mappers/repository.mapper.js';
|
||||
import { IndexingJobMapper } from '$lib/server/mappers/indexing-job.mapper.js';
|
||||
import { Repository, RepositoryEntity } from '$lib/server/models/repository.js';
|
||||
import { IndexingJob, IndexingJobEntity } from '$lib/server/models/indexing-job.js';
|
||||
import { SqliteVecStore } from '$lib/server/search/sqlite-vec.store.js';
|
||||
import { resolveGitHubId, resolveLocalId } from '$lib/server/utils/id-resolver';
|
||||
import {
|
||||
AlreadyExistsError,
|
||||
@@ -230,7 +231,11 @@ export class RepositoryService {
|
||||
const existing = this.get(id);
|
||||
if (!existing) throw new NotFoundError(`Repository ${id} not found`);
|
||||
|
||||
this.db.prepare(`DELETE FROM repositories WHERE id = ?`).run(id);
|
||||
const sqliteVecStore = new SqliteVecStore(this.db);
|
||||
this.db.transaction(() => {
|
||||
sqliteVecStore.deleteEmbeddingsForRepository(id);
|
||||
this.db.prepare(`DELETE FROM repositories WHERE id = ?`).run(id);
|
||||
})();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user