#3679 - Fixes packaging to include correct tiktoken.wasm (lite) (#3697)

- also, additions to .gitignore and .vscodeignore to prevent the IntelliJ .idea and .qodo folders from being included for git and packaging.
This commit is contained in:
vagadiya 2025-05-17 21:53:33 +01:00 committed by hannesrudolph
parent a4f5bbec4c
commit eeaae4e517
4 changed files with 17 additions and 2 deletions

4
.gitignore vendored
View file

@ -36,3 +36,7 @@ logs
# Vite development
.vite-port
# IntelliJ and Qodo plugin folders
.idea/
.qodo/

View file

@ -68,3 +68,7 @@ assets/docs/**
# Include .env file for telemetry
!.env
# Ignore IntelliJ and Qodo plugin folders
.idea/**
.qodo/**

View file

@ -34,10 +34,17 @@ const copyWasmFiles = {
// tiktoken WASM file
fs.copyFileSync(
path.join(nodeModulesDir, "tiktoken", "tiktoken_bg.wasm"),
path.join(nodeModulesDir, "tiktoken", "lite", "tiktoken_bg.wasm"),
path.join(distDir, "tiktoken_bg.wasm"),
)
// Also copy to the workers directory
fs.mkdirSync(path.join(distDir, "workers"), { recursive: true })
fs.copyFileSync(
path.join(nodeModulesDir, "tiktoken", "lite", "tiktoken_bg.wasm"),
path.join(distDir, "workers", "tiktoken_bg.wasm"),
)
// Main tree-sitter WASM file
fs.copyFileSync(
path.join(nodeModulesDir, "web-tree-sitter", "tree-sitter.wasm"),

View file

@ -21,5 +21,5 @@
"useUnknownInCatchVariables": false
},
"include": ["src/**/*", "scripts/**/*", ".changeset/**/*"],
"exclude": ["node_modules", ".vscode-test", "webview-ui"]
"exclude": ["node_modules", ".vscode-test", "webview-ui", ".idea", ".qodo"]
}