From 65ffdde112396e66315bf9dae6a7b615f87d0043 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 27 Aug 2024 12:25:53 -0700 Subject: [PATCH] more indexing fixes --- core/indexing/CodeSnippetsIndex.ts | 2 +- core/indexing/refreshIndex.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/indexing/CodeSnippetsIndex.ts b/core/indexing/CodeSnippetsIndex.ts index b6b1df7dc..00b949c72 100644 --- a/core/indexing/CodeSnippetsIndex.ts +++ b/core/indexing/CodeSnippetsIndex.ts @@ -240,7 +240,7 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex { for (let i = 0; i < results.removeTag.length; i++) { const removeTag = results.removeTag[i]; - const snippets = await db.get( + let snippets = await db.get( `SELECT id FROM code_snippets WHERE cacheKey = ? AND path = ?`, [removeTag.cacheKey, removeTag.path], diff --git a/core/indexing/refreshIndex.ts b/core/indexing/refreshIndex.ts index 3404a22d5..6800a9e8a 100644 --- a/core/indexing/refreshIndex.ts +++ b/core/indexing/refreshIndex.ts @@ -226,7 +226,7 @@ async function getAddRemoveForTag( break; case AddRemoveResultType.Add: await db.run( - "INSERT INTO tag_catalog (path, cacheKey, lastUpdated, dir, branch, artifactId) VALUES (?, ?, ?, ?, ?, ?)", + "REPLACE INTO tag_catalog (path, cacheKey, lastUpdated, dir, branch, artifactId) VALUES (?, ?, ?, ?, ?, ?)", path, cacheKey, newLastUpdatedTimestamp,