Skip to content

Commit

Permalink
Merge pull request #380 from vkx86/dev-PR4
Browse files Browse the repository at this point in the history
Re-ordering embeddingIgnoredGlobs addition for ignore()
  • Loading branch information
rjmacarthy authored Nov 10, 2024
2 parents 341eefb + 8006aa7 commit 8d24ff3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions src/extension/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,20 @@ 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[]
)

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)
Expand Down

0 comments on commit 8d24ff3

Please sign in to comment.