修复memory-lancedb分类逻辑格式检查失败

This commit is contained in:
fan 2026-02-19 09:20:38 +08:00
parent 25185e4ea6
commit 2d12a33a7c

View File

@ -269,7 +269,9 @@ export function shouldCapture(text: string, options?: { maxChars?: number }): bo
export function detectCategory(text: string): MemoryCategory {
const lower = text.toLowerCase();
if (/prefer|preferuji|radši|nechci|like|love|hate|want|need|always|never|important/i.test(lower)) {
if (
/prefer|preferuji|radši|nechci|like|love|hate|want|need|always|never|important/i.test(lower)
) {
return "preference";
}
if (/我喜欢|我偏好|我讨厌|我不喜欢|我爱|我想要|我需要/.test(text)) {