From 248eea20bb2926b664c6ca6006dcb43eeb6247ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Mon, 12 May 2025 22:06:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=BF=83=E6=B5=81=E7=A5=9E=E7=A7=98?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/heart_flow/sub_heartflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/heart_flow/sub_heartflow.py b/src/heart_flow/sub_heartflow.py index e2a36dbd..5be0d73c 100644 --- a/src/heart_flow/sub_heartflow.py +++ b/src/heart_flow/sub_heartflow.py @@ -250,7 +250,7 @@ class SubHeartflow: elif new_state == ChatState.ABSENT: logger.info(f"{log_prefix} 进入 ABSENT 状态,停止所有聊天活动...") - await self.clear_interest_dict() + self.clear_interest_dict() await self._stop_normal_chat() await self._stop_heart_fc_chat() From b2b43c140f5b947a54def45627bcc698a0c5f610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Mon, 12 May 2025 22:15:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A5=9E=E7=A7=98bug=20x?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/heartFC_chat/normal_chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/heartFC_chat/normal_chat.py b/src/plugins/heartFC_chat/normal_chat.py index e921f85c..be05f4d7 100644 --- a/src/plugins/heartFC_chat/normal_chat.py +++ b/src/plugins/heartFC_chat/normal_chat.py @@ -352,6 +352,8 @@ class NormalChat: # --- 新增:处理初始高兴趣消息的私有方法 --- async def _process_initial_interest_messages(self): """处理启动时存在于 interest_dict 中的高兴趣消息。""" + if not self.interest_dict: + return # 如果 interest_dict 为 None或空,直接返回 items_to_process = list(self.interest_dict.items()) if not items_to_process: return # 没有初始消息,直接返回