diff --git a/package-lock.json b/package-lock.json index ce639046..edfefcf1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "twinny", - "version": "3.18.10", + "version": "3.18.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "twinny", - "version": "3.18.10", + "version": "3.18.11", "cpu": [ "x64", "arm64" diff --git a/package.json b/package.json index d716fe4d..2401b1d0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "twinny", "displayName": "twinny - AI Code Completion and Chat", "description": "Locally hosted AI code completion plugin for vscode", - "version": "3.18.10", + "version": "3.18.11", "icon": "assets/icon.png", "keywords": [ "code-inference", diff --git a/src/extension/embeddings.ts b/src/extension/embeddings.ts index 82339516..a7b8176f 100644 --- a/src/extension/embeddings.ts +++ b/src/extension/embeddings.ts @@ -97,6 +97,12 @@ export class EmbeddingDatabase extends Base { const ig = ignore() + const gitIgnoreFilePath = path.join(rootPath, ".gitignore") + + if (fs.existsSync(gitIgnoreFilePath)) { + ig.add(fs.readFileSync(gitIgnoreFilePath).toString()) + } + const embeddingIgnoredGlobs = this.config.get( "embeddingIgnoredGlobs", [] as string[] @@ -104,13 +110,7 @@ export class EmbeddingDatabase extends Base { ig.add(embeddingIgnoredGlobs) ig.add([".git", ".gitignore"]) - - const gitIgnoreFilePath = path.join(rootPath, ".gitignore") - - if (fs.existsSync(gitIgnoreFilePath)) { - ig.add(fs.readFileSync(gitIgnoreFilePath).toString()) - } - + for (const dirent of dirents) { const fullPath = path.join(dirPath, dirent.name) const relativePath = path.relative(rootPath, fullPath)