From 62ba8c3bfb7367501c8b58360ef2a1803a1ddc9e Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Wed, 24 Sep 2025 16:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E6=98=AF=E6=89=93=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=85=88=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/planner_actions/action_manager.py | 2 ++ src/plugin_system/apis/send_api.py | 1 + src/plugins/built_in/affinity_flow_chatter/plan_filter.py | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/src/chat/planner_actions/action_manager.py b/src/chat/planner_actions/action_manager.py index 8bfcc0143..e439f5299 100644 --- a/src/chat/planner_actions/action_manager.py +++ b/src/chat/planner_actions/action_manager.py @@ -434,6 +434,8 @@ class ChatterActionManager: # 根据新消息数量决定是否需要引用回复 reply_text = "" is_proactive_thinking = (message_data.get("message_type") == "proactive_thinking") if message_data else True + + logger.debug(f"[send_response] message_data: {message_data}") first_replied = False for reply_seg in reply_set: diff --git a/src/plugin_system/apis/send_api.py b/src/plugin_system/apis/send_api.py index 54e2ed239..63da8e28d 100644 --- a/src/plugin_system/apis/send_api.py +++ b/src/plugin_system/apis/send_api.py @@ -189,6 +189,7 @@ async def _send_to_target( # 处理回复消息 if reply_to_message: + logger.info(f"[_send_to_target] reply_to_message: {reply_to_message}") anchor_message = message_dict_to_message_recv(message_dict=reply_to_message) anchor_message.update_chat_stream(target_stream) reply_to_platform_id = ( diff --git a/src/plugins/built_in/affinity_flow_chatter/plan_filter.py b/src/plugins/built_in/affinity_flow_chatter/plan_filter.py index 349ed82ef..c1d234c28 100644 --- a/src/plugins/built_in/affinity_flow_chatter/plan_filter.py +++ b/src/plugins/built_in/affinity_flow_chatter/plan_filter.py @@ -467,6 +467,12 @@ class ChatterPlanFilter: real_message_id = target_message_dict.get("message_id") or target_message_dict.get("id") if real_message_id: action_data["target_message_id"] = real_message_id + + # 确保 action_message 中始终有 message_id 字段 + if "message_id" not in target_message_obj and "id" in target_message_obj: + target_message_obj["message_id"] = target_message_obj["id"] + + logger.info(f"[_parse_single_action] target_message_obj: {target_message_obj}") else: # 如果找不到目标消息,对于reply动作来说这是必需的,应该记录警告 if action == "reply":