Skip to content

Commit cf8c1d9

Browse files
committed
remove fallback case
1 parent d29b77a commit cf8c1d9

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

packages/code-map/src/init-node.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,15 @@ export async function initTreeSitterForNode(): Promise<void> {
3434
const dir = hereDir()
3535

3636
// Try shared WASM directory first (new approach to avoid duplication)
37-
const sharedWasms = [
38-
path.join(dir, '..', 'wasm', 'tree-sitter.wasm'),
39-
path.join(dir, 'wasm', 'tree-sitter.wasm'),
40-
]
37+
const sharedWasm = path.join(dir, '..', 'wasm', 'tree-sitter.wasm')
4138

4239
// Use locateFile to override where the runtime looks for tree-sitter.wasm
4340
await Parser.init({
4441
locateFile: (name: string, scriptDir: string) => {
4542
if (name === 'tree-sitter.wasm') {
46-
for (const sharedWasm of sharedWasms) {
47-
// First try shared WASM directory (new approach)
48-
if (fs.existsSync(sharedWasm)) {
49-
return sharedWasm
50-
}
43+
// First try shared WASM directory (new approach)
44+
if (fs.existsSync(sharedWasm)) {
45+
return sharedWasm
5146
}
5247
// Fallback to script directory
5348
const fallback = path.join(scriptDir, name)

sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@codebuff/sdk",
33
"private": false,
4-
"version": "0.3.12",
4+
"version": "0.3.13",
55
"description": "Official SDK for Codebuff — AI coding agent & framework",
66
"license": "Apache-2.0",
77
"type": "module",

0 commit comments

Comments
 (0)