Commit Graph
2 Commits
Author SHA1 Message Date
kelaocai 0f527a3c45 fix(ranking): prevent crash in keyword multi-color mode for unknown types
getKeywordColor() indexed KEYWORD_COLORS with indexOf() result, which
returns -1 for types not present in currentKeywords (e.g. the
server-generated '其他' aggregate in typeDistribution). KEYWORD_COLORS[-1]
is undefined, so reading .wrapBg threw a TypeError when enabling
multi-color mode. Fall back to a stable keyword hash for unknown types.
2026-08-02 21:49:41 +08:00
kelaocai d48745f00b fix(cli): declare sqlite-vec and @huggingface/transformers as runtime dependencies
The CLI tsup build inlines @openchatlab/node-runtime into dist chunks.
Both sqlite-vec and @huggingface/transformers load platform-specific
native packages at runtime (sqlite-vec-linux-arm64, onnxruntime-node,
sharp), so inlining them breaks global/npm and Docker installs of
chatlab-cli: the bundled chunks reference native packages that were
never installed, and configuring the semantic index vector model fails
with HTTP 500 (Cannot find package 'sqlite-vec-linux-arm64').

Declare both packages as chatlab-cli dependencies and mark them as tsup
external so they are installed from npm with their native bindings,
matching how better-sqlite3 and @node-rs/jieba are already handled.
2026-08-01 11:33:41 +08:00