From 2af415da0e291c2c0653a5840eeb606d611f3e52 Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Tue, 19 Aug 2025 13:03:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor(chat):=20=E8=B0=83=E6=95=B4=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=80=89=E6=8B=A9=E7=9A=84=E4=BC=98=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在确定 `action_message` 时,优先使用 `target_message` 而不是 `message_data`。 这一变更优化了消息处理流程,确保在存在明确的目标消息时,系统能够正确地选择它,从而避免了潜在的逻辑冲突,使行为更加符合预期。 Co-authored-by: 雅诺狐 <212194964+foxcyber907@users.noreply.github.com> Co-authored-by: tt-P607 <68868379+tt-P607@users.noreply.github.com> --- src/chat/chat_loop/heartFC_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat/chat_loop/heartFC_chat.py b/src/chat/chat_loop/heartFC_chat.py index 212328d53..1b9343df5 100644 --- a/src/chat/chat_loop/heartFC_chat.py +++ b/src/chat/chat_loop/heartFC_chat.py @@ -644,7 +644,7 @@ class HeartFChatting: else: logger.warning(f"{self.log_prefix} 预生成的回复任务未生成有效内容") - action_message = message_data or target_message + action_message = target_message or message_data if action_type == "reply": # 等待回复生成完毕 if self.loop_mode == ChatMode.NORMAL: