mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(cli): avoid installing local embedding runtime
This commit is contained in:
1 parent
d48745f00b
commit
93fc26fb83
3 files changed
+4
-7
No files matched your search
@@ -50,7 +50,6 @@
|
||||
"@fastify/static": "^9.1.3",
|
||||
"@earendil-works/pi-agent-core": "0.74.2",
|
||||
"@earendil-works/pi-ai": "0.74.2",
|
||||
"@huggingface/transformers": "^4.2.0",
|
||||
"@modelcontextprotocol/sdk": "^1.12.1",
|
||||
"better-sqlite3": "^12.4.6",
|
||||
"commander": "^13.1.0",
|
||||
|
||||
@@ -24,9 +24,10 @@ export default defineConfig({
|
||||
noExternal: [/^@openchatlab\/(?!parser-native)/, 'chatlab-mcp', 'stream-json'],
|
||||
// parser-native 是本地构建的可选 Rust 内核:不打包也不声明依赖,
|
||||
// 运行时 require 失败会自动回退 TS 解析器。
|
||||
// sqlite-vec / @huggingface/transformers 依赖按平台分发的原生包(sqlite-vec-*、onnxruntime-node、sharp),
|
||||
// 必须作为真实依赖随 npm 安装,不能内联进 bundle
|
||||
external: ['better-sqlite3', '@node-rs/jieba', 'sqlite-vec', '@huggingface/transformers', '@openchatlab/parser-native'],
|
||||
// sqlite-vec resolves its platform extension through sqlite-vec-* and must remain an external production dependency.
|
||||
// Keep Transformers bundled until CLI local embeddings have an on-demand runtime;
|
||||
// externalizing it makes every CLI installation pull the full ONNX runtime.
|
||||
external: ['better-sqlite3', '@node-rs/jieba', 'sqlite-vec', '@openchatlab/parser-native'],
|
||||
banner: {
|
||||
js: [
|
||||
"import { createRequire as __createRequire } from 'module';",
|
||||
|
||||
Generated
-3
@@ -162,9 +162,6 @@ importers:
|
||||
'@fastify/static':
|
||||
specifier: ^9.1.3
|
||||
version: 9.1.3
|
||||
'@huggingface/transformers':
|
||||
specifier: ^4.2.0
|
||||
version: 4.2.0
|
||||
'@modelcontextprotocol/sdk':
|
||||
specifier: ^1.12.1
|
||||
version: 1.29.0(zod@3.25.76)
|
||||
|
||||
Reference in new issue
Block a user