fix(chat): 处理回复时优先使用target_message避免消息丢失

在循环处理器中,当ActionPlanner返回了明确要回复的目标消息时使用target_message,否则回退到原始message_data;
修正FOCUS模式下观察消息时调用observe的实参缺失问题,确保逐条处理recent_messages。
This commit is contained in:
minecraft1024a
2025-08-21 15:12:41 +08:00
parent 4c51f59c96
commit 785b3d2f2a
2 changed files with 5 additions and 2 deletions

View File

@@ -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))