Skip to content

Commit fae9390

Browse files
authored
🤖 fix: move ai-tokenizer to dependencies (#212)
## Problem `ai-tokenizer` was in `devDependencies` but is imported at runtime in `src/utils/main/tokenizer.ts`. This caused "Cannot find module 'ai-tokenizer'" errors in production Electron builds since devDependencies are excluded from the packaged app. ## Solution Moved `ai-tokenizer` from `devDependencies` to `dependencies` in package.json. _Generated with `cmux`_
1 parent df4c863 commit fae9390

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bun.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@emotion/react": "^11.14.0",
1313
"@emotion/styled": "^11.14.1",
1414
"ai": "^5.0.56",
15+
"ai-tokenizer": "^1.0.3",
1516
"cmdk": "^1.0.0",
1617
"crc-32": "^1.2.2",
1718
"diff": "^8.0.2",
@@ -54,7 +55,6 @@
5455
"@typescript-eslint/eslint-plugin": "^8.44.1",
5556
"@typescript-eslint/parser": "^8.44.1",
5657
"@vitejs/plugin-react": "^4.0.0",
57-
"ai-tokenizer": "^1.0.3",
5858
"concurrently": "^8.2.0",
5959
"dotenv": "^17.2.3",
6060
"electron": "^38.2.1",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
"undici": "^7.16.0",
6161
"write-file-atomic": "^6.0.0",
6262
"zod": "^4.1.11",
63-
"zod-to-json-schema": "^3.24.6"
63+
"zod-to-json-schema": "^3.24.6",
64+
"ai-tokenizer": "^1.0.3"
6465
},
6566
"devDependencies": {
6667
"@eslint/js": "^9.36.0",
@@ -79,7 +80,6 @@
7980
"@typescript-eslint/eslint-plugin": "^8.44.1",
8081
"@typescript-eslint/parser": "^8.44.1",
8182
"@vitejs/plugin-react": "^4.0.0",
82-
"ai-tokenizer": "^1.0.3",
8383
"concurrently": "^8.2.0",
8484
"dotenv": "^17.2.3",
8585
"electron": "^38.2.1",

0 commit comments

Comments
 (0)