From f59dffbf37917f2007938580c79e2ed13bd66283 Mon Sep 17 00:00:00 2001 From: Jerrypluay Date: Mon, 24 Nov 2025 13:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(apps/ai.js):=20correct=20key?= =?UTF-8?q?word=20matching=20to=20use=20event=20message=20instead=20of=20u?= =?UTF-8?q?ser=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ai.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ai.js b/apps/ai.js index fb4d141..c9a8798 100644 --- a/apps/ai.js +++ b/apps/ai.js @@ -180,7 +180,7 @@ async function processMessage(userMessage, e, aiConfig) { * @returns {Promise<[{type: string, data: string}]>} */ async function handleKeywordMode(userMessage, e) { - const matchResult = await KeywordMatcher.matchKeywords(userMessage, 'ai'); + const matchResult = await KeywordMatcher.matchKeywords(e.msg, 'ai'); if (matchResult && matchResult.matched) { return [ @@ -214,7 +214,7 @@ async function handleMixMode(userMessage, e, aiConfig) { logger.info('[crystelf-ai] 消息过长,使用ai回复'); return await callAiForResponse(userMessage, e, aiConfig); } else { - const matchResult = await KeywordMatcher.matchKeywords(userMessage, 'ai'); + const matchResult = await KeywordMatcher.matchKeywords(e.msg, 'ai'); if (matchResult && matchResult.matched) { const session = SessionManager.createOrGetSession(e.group_id, e.user_id, e); const historyLen = aiConfig.chatHistory;