diff --git a/src/chat/chat_loop/cycle_processor.py b/src/chat/chat_loop/cycle_processor.py index f67f7808c..e925df8d0 100644 --- a/src/chat/chat_loop/cycle_processor.py +++ b/src/chat/chat_loop/cycle_processor.py @@ -114,8 +114,10 @@ class CycleProcessor: action_type = "reply" if action_type == "reply": + # 使用 action_planner 获取的 target_message,如果为空则使用原始 message_data + actual_message = target_message or message_data await self._handle_reply_action( - message_data, available_actions, gen_task, loop_start_time, cycle_timers, thinking_id, plan_result + actual_message, available_actions, gen_task, loop_start_time, cycle_timers, thinking_id, plan_result ) else: await self._handle_other_actions( diff --git a/src/chat/chat_loop/heartFC_chat.py b/src/chat/chat_loop/heartFC_chat.py index cd6392bdc..0f6a4d554 100644 --- a/src/chat/chat_loop/heartFC_chat.py +++ b/src/chat/chat_loop/heartFC_chat.py @@ -195,7 +195,8 @@ class HeartFChatting: if self.context.loop_mode == ChatMode.FOCUS: if recent_messages: - await self.cycle_processor.observe() + for message in recent_messages: + await self.cycle_processor.observe(message) self._check_focus_exit() elif self.context.loop_mode == ChatMode.NORMAL: self._check_focus_entry(len(recent_messages))