优化AI触发条件,确保只有对方发送的文字消息才会触发AI处理,提升消息处理逻辑的准确性。

This commit is contained in:
超级老白兔
2025-11-28 16:50:30 +08:00
parent 23de3cac7e
commit 72626e3367
2 changed files with 5 additions and 1 deletions

3
Moncter/weChat.ts Normal file
View File

@@ -0,0 +1,3 @@

View File

@@ -845,9 +845,10 @@ export const useWeChatStore = create<WeChatState>()(
currentMessages: [...state.currentMessages, message],
}));
// 只有文字消息才触发AImsgType === 1
// 只有文字消息才触发AImsgType === 1且必须是对方发送的消息isSend !== true
if (
message.msgType === 1 &&
!message.isSend &&
[1, 2].includes((currentContract as any).aiType || 0)
) {
console.log("📨 收到新消息准备触发AI");