refactor(chat): 移除旧的睡眠管理器模块
删除了位于 `src/chat/message_manager/sleep_manager/` 目录下的整个旧版睡眠管理器。该模块包含了 `sleep_manager`, `wakeup_manager`, `sleep_state` 等多个文件,其功能将被新的实现所取代。 同时,对 `context_manager.py` 中的群聊判断逻辑进行了微调,以适应新的消息结构。
This commit is contained in:
@@ -338,9 +338,7 @@ class SingleStreamContextManager:
|
||||
# 只有在第一次添加消息时才检测聊天类型,避免后续消息改变类型
|
||||
if len(self.context.unread_messages) == 1: # 只有这条消息
|
||||
# 如果消息包含群组信息,则为群聊
|
||||
if hasattr(message, "chat_info_group_id") and message.chat_info_group_id:
|
||||
self.context.chat_type = ChatType.GROUP
|
||||
elif hasattr(message, "chat_info_group_name") and message.chat_info_group_name:
|
||||
if message.chat_info.group_info:
|
||||
self.context.chat_type = ChatType.GROUP
|
||||
else:
|
||||
self.context.chat_type = ChatType.PRIVATE
|
||||
|
||||
Reference in New Issue
Block a user