🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -6,7 +6,7 @@ from src.common.logger import get_module_logger
|
|||||||
from .chat_observer import ChatObserver
|
from .chat_observer import ChatObserver
|
||||||
from .chat_states import NotificationHandler, NotificationType, Notification
|
from .chat_states import NotificationHandler, NotificationType, Notification
|
||||||
from src.plugins.utils.chat_message_builder import build_readable_messages
|
from src.plugins.utils.chat_message_builder import build_readable_messages
|
||||||
import traceback # 导入 traceback 用于调试
|
import traceback # 导入 traceback 用于调试
|
||||||
|
|
||||||
logger = get_module_logger("observation_info")
|
logger = get_module_logger("observation_info")
|
||||||
|
|
||||||
@@ -25,19 +25,19 @@ class ObservationInfoHandler(NotificationHandler):
|
|||||||
# 将 private_name 存储在 handler 实例中
|
# 将 private_name 存储在 handler 实例中
|
||||||
self.private_name = private_name
|
self.private_name = private_name
|
||||||
|
|
||||||
async def handle_notification(self, notification: Notification): # 添加类型提示
|
async def handle_notification(self, notification: Notification): # 添加类型提示
|
||||||
# 获取通知类型和数据
|
# 获取通知类型和数据
|
||||||
notification_type = notification.type
|
notification_type = notification.type
|
||||||
data = notification.data
|
data = notification.data
|
||||||
|
|
||||||
try: # 添加错误处理块
|
try: # 添加错误处理块
|
||||||
if notification_type == NotificationType.NEW_MESSAGE:
|
if notification_type == NotificationType.NEW_MESSAGE:
|
||||||
# 处理新消息通知
|
# 处理新消息通知
|
||||||
# logger.debug(f"[私聊][{self.private_name}]收到新消息通知data: {data}") # 可以在需要时取消注释
|
# logger.debug(f"[私聊][{self.private_name}]收到新消息通知data: {data}") # 可以在需要时取消注释
|
||||||
message_id = data.get("message_id")
|
message_id = data.get("message_id")
|
||||||
processed_plain_text = data.get("processed_plain_text")
|
processed_plain_text = data.get("processed_plain_text")
|
||||||
detailed_plain_text = data.get("detailed_plain_text")
|
detailed_plain_text = data.get("detailed_plain_text")
|
||||||
user_info_dict = data.get("user_info") # 先获取字典
|
user_info_dict = data.get("user_info") # 先获取字典
|
||||||
time_value = data.get("time")
|
time_value = data.get("time")
|
||||||
|
|
||||||
# 确保 user_info 是字典类型再创建 UserInfo 对象
|
# 确保 user_info 是字典类型再创建 UserInfo 对象
|
||||||
@@ -46,30 +46,32 @@ class ObservationInfoHandler(NotificationHandler):
|
|||||||
try:
|
try:
|
||||||
user_info = UserInfo.from_dict(user_info_dict)
|
user_info = UserInfo.from_dict(user_info_dict)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"[私聊][{self.private_name}]从字典创建 UserInfo 时出错: {e}, 字典内容: {user_info_dict}")
|
logger.error(
|
||||||
|
f"[私聊][{self.private_name}]从字典创建 UserInfo 时出错: {e}, 字典内容: {user_info_dict}"
|
||||||
|
)
|
||||||
# 可以选择在这里返回或记录错误,避免后续代码出错
|
# 可以选择在这里返回或记录错误,避免后续代码出错
|
||||||
return
|
return
|
||||||
elif user_info_dict is not None:
|
elif user_info_dict is not None:
|
||||||
logger.warning(f"[私聊][{self.private_name}]收到的 user_info 不是预期的字典类型: {type(user_info_dict)}")
|
logger.warning(
|
||||||
|
f"[私聊][{self.private_name}]收到的 user_info 不是预期的字典类型: {type(user_info_dict)}"
|
||||||
|
)
|
||||||
# 根据需要处理非字典情况,这里暂时返回
|
# 根据需要处理非字典情况,这里暂时返回
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
"message_id": message_id,
|
"message_id": message_id,
|
||||||
"processed_plain_text": processed_plain_text,
|
"processed_plain_text": processed_plain_text,
|
||||||
"detailed_plain_text": detailed_plain_text,
|
"detailed_plain_text": detailed_plain_text,
|
||||||
"user_info": user_info_dict, # 存储原始字典或 UserInfo 对象,取决于你的 update_from_message 如何处理
|
"user_info": user_info_dict, # 存储原始字典或 UserInfo 对象,取决于你的 update_from_message 如何处理
|
||||||
"time": time_value,
|
"time": time_value,
|
||||||
}
|
}
|
||||||
# 传递 UserInfo 对象(如果成功创建)或原始字典
|
# 传递 UserInfo 对象(如果成功创建)或原始字典
|
||||||
await self.observation_info.update_from_message(message, user_info) # 修改:传递 user_info 对象
|
await self.observation_info.update_from_message(message, user_info) # 修改:传递 user_info 对象
|
||||||
|
|
||||||
|
|
||||||
elif notification_type == NotificationType.COLD_CHAT:
|
elif notification_type == NotificationType.COLD_CHAT:
|
||||||
# 处理冷场通知
|
# 处理冷场通知
|
||||||
is_cold = data.get("is_cold", False)
|
is_cold = data.get("is_cold", False)
|
||||||
await self.observation_info.update_cold_chat_status(is_cold, time.time()) # 修改:改为 await 调用
|
await self.observation_info.update_cold_chat_status(is_cold, time.time()) # 修改:改为 await 调用
|
||||||
|
|
||||||
elif notification_type == NotificationType.ACTIVE_CHAT:
|
elif notification_type == NotificationType.ACTIVE_CHAT:
|
||||||
# 处理活跃通知 (通常由 COLD_CHAT 的反向状态处理)
|
# 处理活跃通知 (通常由 COLD_CHAT 的反向状态处理)
|
||||||
@@ -97,18 +99,17 @@ class ObservationInfoHandler(NotificationHandler):
|
|||||||
if len(self.observation_info.unprocessed_messages) < original_count:
|
if len(self.observation_info.unprocessed_messages) < original_count:
|
||||||
logger.info(f"[私聊][{self.private_name}]移除了未处理的消息 (ID: {message_id})")
|
logger.info(f"[私聊][{self.private_name}]移除了未处理的消息 (ID: {message_id})")
|
||||||
|
|
||||||
|
|
||||||
elif notification_type == NotificationType.USER_JOINED:
|
elif notification_type == NotificationType.USER_JOINED:
|
||||||
# 处理用户加入通知 (如果适用私聊场景)
|
# 处理用户加入通知 (如果适用私聊场景)
|
||||||
user_id = data.get("user_id")
|
user_id = data.get("user_id")
|
||||||
if user_id:
|
if user_id:
|
||||||
self.observation_info.active_users.add(str(user_id)) # 确保是字符串
|
self.observation_info.active_users.add(str(user_id)) # 确保是字符串
|
||||||
|
|
||||||
elif notification_type == NotificationType.USER_LEFT:
|
elif notification_type == NotificationType.USER_LEFT:
|
||||||
# 处理用户离开通知 (如果适用私聊场景)
|
# 处理用户离开通知 (如果适用私聊场景)
|
||||||
user_id = data.get("user_id")
|
user_id = data.get("user_id")
|
||||||
if user_id:
|
if user_id:
|
||||||
self.observation_info.active_users.discard(str(user_id)) # 确保是字符串
|
self.observation_info.active_users.discard(str(user_id)) # 确保是字符串
|
||||||
|
|
||||||
elif notification_type == NotificationType.ERROR:
|
elif notification_type == NotificationType.ERROR:
|
||||||
# 处理错误通知
|
# 处理错误通知
|
||||||
@@ -117,7 +118,7 @@ class ObservationInfoHandler(NotificationHandler):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"[私聊][{self.private_name}]处理通知时发生错误: {e}")
|
logger.error(f"[私聊][{self.private_name}]处理通知时发生错误: {e}")
|
||||||
logger.error(traceback.format_exc()) # 打印详细堆栈信息
|
logger.error(traceback.format_exc()) # 打印详细堆栈信息
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -125,12 +126,12 @@ class ObservationInfo:
|
|||||||
"""决策信息类,用于收集和管理来自chat_observer的通知信息"""
|
"""决策信息类,用于收集和管理来自chat_observer的通知信息"""
|
||||||
|
|
||||||
# --- 修改:添加 private_name 字段 ---
|
# --- 修改:添加 private_name 字段 ---
|
||||||
private_name: str = field(init=True) # 让 dataclass 的 __init__ 接收 private_name
|
private_name: str = field(init=True) # 让 dataclass 的 __init__ 接收 private_name
|
||||||
|
|
||||||
# data_list
|
# data_list
|
||||||
chat_history: List[Dict[str, Any]] = field(default_factory=list) # 修改:明确类型为 Dict
|
chat_history: List[Dict[str, Any]] = field(default_factory=list) # 修改:明确类型为 Dict
|
||||||
chat_history_str: str = ""
|
chat_history_str: str = ""
|
||||||
unprocessed_messages: List[Dict[str, Any]] = field(default_factory=list) # 修改:明确类型为 Dict
|
unprocessed_messages: List[Dict[str, Any]] = field(default_factory=list) # 修改:明确类型为 Dict
|
||||||
active_users: Set[str] = field(default_factory=set)
|
active_users: Set[str] = field(default_factory=set)
|
||||||
|
|
||||||
# data
|
# data
|
||||||
@@ -144,14 +145,14 @@ class ObservationInfo:
|
|||||||
bot_id: Optional[str] = None
|
bot_id: Optional[str] = None
|
||||||
chat_history_count: int = 0
|
chat_history_count: int = 0
|
||||||
new_messages_count: int = 0
|
new_messages_count: int = 0
|
||||||
cold_chat_start_time: Optional[float] = None # 用于计算冷场持续时间
|
cold_chat_start_time: Optional[float] = None # 用于计算冷场持续时间
|
||||||
cold_chat_duration: float = 0.0 # 缓存计算结果
|
cold_chat_duration: float = 0.0 # 缓存计算结果
|
||||||
|
|
||||||
# state
|
# state
|
||||||
is_typing: bool = False # 可能表示对方正在输入
|
is_typing: bool = False # 可能表示对方正在输入
|
||||||
# has_unread_messages: bool = False # 这个状态可以通过 new_messages_count > 0 判断
|
# has_unread_messages: bool = False # 这个状态可以通过 new_messages_count > 0 判断
|
||||||
is_cold_chat: bool = False
|
is_cold_chat: bool = False
|
||||||
changed: bool = False # 用于标记状态是否有变化,以便外部模块决定是否重新规划
|
changed: bool = False # 用于标记状态是否有变化,以便外部模块决定是否重新规划
|
||||||
|
|
||||||
# #spec (暂时注释掉,如果不需要)
|
# #spec (暂时注释掉,如果不需要)
|
||||||
# meta_plan_trigger: bool = False
|
# meta_plan_trigger: bool = False
|
||||||
@@ -159,7 +160,7 @@ class ObservationInfo:
|
|||||||
# --- 修改:移除 __post_init__ 的参数 ---
|
# --- 修改:移除 __post_init__ 的参数 ---
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
"""初始化后创建handler并进行必要的设置"""
|
"""初始化后创建handler并进行必要的设置"""
|
||||||
self.chat_observer: Optional[ChatObserver] = None # 添加类型提示
|
self.chat_observer: Optional[ChatObserver] = None # 添加类型提示
|
||||||
self.handler = ObservationInfoHandler(self, self.private_name)
|
self.handler = ObservationInfoHandler(self, self.private_name)
|
||||||
|
|
||||||
def bind_to_chat_observer(self, chat_observer: ChatObserver):
|
def bind_to_chat_observer(self, chat_observer: ChatObserver):
|
||||||
@@ -188,11 +189,11 @@ class ObservationInfo:
|
|||||||
logger.info(f"[私聊][{self.private_name}]成功绑定到 ChatObserver")
|
logger.info(f"[私聊][{self.private_name}]成功绑定到 ChatObserver")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"[私聊][{self.private_name}]绑定到 ChatObserver 时出错: {e}")
|
logger.error(f"[私聊][{self.private_name}]绑定到 ChatObserver 时出错: {e}")
|
||||||
self.chat_observer = None # 绑定失败,重置
|
self.chat_observer = None # 绑定失败,重置
|
||||||
|
|
||||||
def unbind_from_chat_observer(self):
|
def unbind_from_chat_observer(self):
|
||||||
"""解除与chat_observer的绑定"""
|
"""解除与chat_observer的绑定"""
|
||||||
if self.chat_observer and hasattr(self.chat_observer, 'notification_manager'): # 增加检查
|
if self.chat_observer and hasattr(self.chat_observer, "notification_manager"): # 增加检查
|
||||||
try:
|
try:
|
||||||
self.chat_observer.notification_manager.unregister_handler(
|
self.chat_observer.notification_manager.unregister_handler(
|
||||||
target="observation_info", notification_type=NotificationType.NEW_MESSAGE, handler=self.handler
|
target="observation_info", notification_type=NotificationType.NEW_MESSAGE, handler=self.handler
|
||||||
@@ -207,12 +208,11 @@ class ObservationInfo:
|
|||||||
logger.info(f"[私聊][{self.private_name}]成功从 ChatObserver 解绑")
|
logger.info(f"[私聊][{self.private_name}]成功从 ChatObserver 解绑")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"[私聊][{self.private_name}]从 ChatObserver 解绑时出错: {e}")
|
logger.error(f"[私聊][{self.private_name}]从 ChatObserver 解绑时出错: {e}")
|
||||||
finally: # 确保 chat_observer 被重置
|
finally: # 确保 chat_observer 被重置
|
||||||
self.chat_observer = None
|
self.chat_observer = None
|
||||||
else:
|
else:
|
||||||
logger.warning(f"[私聊][{self.private_name}]尝试解绑时 ChatObserver 不存在或无效")
|
logger.warning(f"[私聊][{self.private_name}]尝试解绑时 ChatObserver 不存在或无效")
|
||||||
|
|
||||||
|
|
||||||
# 修改:update_from_message 接收 UserInfo 对象
|
# 修改:update_from_message 接收 UserInfo 对象
|
||||||
async def update_from_message(self, message: Dict[str, Any], user_info: Optional[UserInfo]):
|
async def update_from_message(self, message: Dict[str, Any], user_info: Optional[UserInfo]):
|
||||||
"""从消息更新信息
|
"""从消息更新信息
|
||||||
@@ -235,39 +235,37 @@ class ObservationInfo:
|
|||||||
self.cold_chat_start_time = None
|
self.cold_chat_start_time = None
|
||||||
self.cold_chat_duration = 0.0
|
self.cold_chat_duration = 0.0
|
||||||
|
|
||||||
|
|
||||||
if user_info:
|
if user_info:
|
||||||
sender_id = str(user_info.user_id) # 确保是字符串
|
sender_id = str(user_info.user_id) # 确保是字符串
|
||||||
self.last_message_sender = sender_id
|
self.last_message_sender = sender_id
|
||||||
# 更新发言时间
|
# 更新发言时间
|
||||||
if sender_id == self.bot_id:
|
if sender_id == self.bot_id:
|
||||||
self.last_bot_speak_time = message_time
|
self.last_bot_speak_time = message_time
|
||||||
else:
|
else:
|
||||||
self.last_user_speak_time = message_time
|
self.last_user_speak_time = message_time
|
||||||
self.active_users.add(sender_id) # 用户发言则认为其活跃
|
self.active_users.add(sender_id) # 用户发言则认为其活跃
|
||||||
else:
|
else:
|
||||||
logger.warning(f"[私聊][{self.private_name}]处理消息更新时缺少有效的 UserInfo 对象, message_id: {message_id}")
|
logger.warning(
|
||||||
self.last_message_sender = None # 发送者未知
|
f"[私聊][{self.private_name}]处理消息更新时缺少有效的 UserInfo 对象, message_id: {message_id}"
|
||||||
|
)
|
||||||
|
self.last_message_sender = None # 发送者未知
|
||||||
|
|
||||||
# 将原始消息字典添加到未处理列表
|
# 将原始消息字典添加到未处理列表
|
||||||
self.unprocessed_messages.append(message)
|
self.unprocessed_messages.append(message)
|
||||||
self.new_messages_count = len(self.unprocessed_messages) # 直接用列表长度
|
self.new_messages_count = len(self.unprocessed_messages) # 直接用列表长度
|
||||||
|
|
||||||
# logger.debug(f"[私聊][{self.private_name}]消息更新: last_time={self.last_message_time}, new_count={self.new_messages_count}")
|
# logger.debug(f"[私聊][{self.private_name}]消息更新: last_time={self.last_message_time}, new_count={self.new_messages_count}")
|
||||||
self.update_changed() # 标记状态已改变
|
self.update_changed() # 标记状态已改变
|
||||||
else:
|
else:
|
||||||
# 如果消息时间戳不是最新的,可能不需要处理,或者记录一个警告
|
# 如果消息时间戳不是最新的,可能不需要处理,或者记录一个警告
|
||||||
pass
|
pass
|
||||||
# logger.warning(f"[私聊][{self.private_name}]收到过时或无效时间戳的消息: ID={message_id}, time={message_time}")
|
# logger.warning(f"[私聊][{self.private_name}]收到过时或无效时间戳的消息: ID={message_id}, time={message_time}")
|
||||||
|
|
||||||
|
|
||||||
def update_changed(self):
|
def update_changed(self):
|
||||||
"""标记状态已改变,并重置标记"""
|
"""标记状态已改变,并重置标记"""
|
||||||
# logger.debug(f"[私聊][{self.private_name}]状态标记为已改变 (changed=True)")
|
# logger.debug(f"[私聊][{self.private_name}]状态标记为已改变 (changed=True)")
|
||||||
self.changed = True
|
self.changed = True
|
||||||
|
|
||||||
|
|
||||||
async def update_cold_chat_status(self, is_cold: bool, current_time: float):
|
async def update_cold_chat_status(self, is_cold: bool, current_time: float):
|
||||||
"""更新冷场状态
|
"""更新冷场状态
|
||||||
|
|
||||||
@@ -275,25 +273,26 @@ class ObservationInfo:
|
|||||||
is_cold: 是否处于冷场状态
|
is_cold: 是否处于冷场状态
|
||||||
current_time: 当前时间戳
|
current_time: 当前时间戳
|
||||||
"""
|
"""
|
||||||
if is_cold != self.is_cold_chat: # 仅在状态变化时更新
|
if is_cold != self.is_cold_chat: # 仅在状态变化时更新
|
||||||
self.is_cold_chat = is_cold
|
self.is_cold_chat = is_cold
|
||||||
if is_cold:
|
if is_cold:
|
||||||
# 进入冷场状态
|
# 进入冷场状态
|
||||||
self.cold_chat_start_time = self.last_message_time or current_time # 从最后消息时间开始算,或从当前时间开始
|
self.cold_chat_start_time = (
|
||||||
|
self.last_message_time or current_time
|
||||||
|
) # 从最后消息时间开始算,或从当前时间开始
|
||||||
logger.info(f"[私聊][{self.private_name}]进入冷场状态,开始时间: {self.cold_chat_start_time}")
|
logger.info(f"[私聊][{self.private_name}]进入冷场状态,开始时间: {self.cold_chat_start_time}")
|
||||||
else:
|
else:
|
||||||
# 结束冷场状态
|
# 结束冷场状态
|
||||||
if self.cold_chat_start_time:
|
if self.cold_chat_start_time:
|
||||||
self.cold_chat_duration = current_time - self.cold_chat_start_time
|
self.cold_chat_duration = current_time - self.cold_chat_start_time
|
||||||
logger.info(f"[私聊][{self.private_name}]结束冷场状态,持续时间: {self.cold_chat_duration:.2f} 秒")
|
logger.info(f"[私聊][{self.private_name}]结束冷场状态,持续时间: {self.cold_chat_duration:.2f} 秒")
|
||||||
self.cold_chat_start_time = None # 重置开始时间
|
self.cold_chat_start_time = None # 重置开始时间
|
||||||
self.update_changed() # 状态变化,标记改变
|
self.update_changed() # 状态变化,标记改变
|
||||||
|
|
||||||
# 即使状态没变,如果是冷场状态,也更新持续时间
|
# 即使状态没变,如果是冷场状态,也更新持续时间
|
||||||
if self.is_cold_chat and self.cold_chat_start_time:
|
if self.is_cold_chat and self.cold_chat_start_time:
|
||||||
self.cold_chat_duration = current_time - self.cold_chat_start_time
|
self.cold_chat_duration = current_time - self.cold_chat_start_time
|
||||||
|
|
||||||
|
|
||||||
def get_active_duration(self) -> float:
|
def get_active_duration(self) -> float:
|
||||||
"""获取当前活跃时长 (距离最后一条消息的时间)
|
"""获取当前活跃时长 (距离最后一条消息的时间)
|
||||||
|
|
||||||
@@ -327,11 +326,11 @@ class ObservationInfo:
|
|||||||
async def clear_unprocessed_messages(self):
|
async def clear_unprocessed_messages(self):
|
||||||
"""将未处理消息移入历史记录,并更新相关状态"""
|
"""将未处理消息移入历史记录,并更新相关状态"""
|
||||||
if not self.unprocessed_messages:
|
if not self.unprocessed_messages:
|
||||||
return # 没有未处理消息,直接返回
|
return # 没有未处理消息,直接返回
|
||||||
|
|
||||||
# logger.debug(f"[私聊][{self.private_name}]处理 {len(self.unprocessed_messages)} 条未处理消息...")
|
# logger.debug(f"[私聊][{self.private_name}]处理 {len(self.unprocessed_messages)} 条未处理消息...")
|
||||||
# 将未处理消息添加到历史记录中 (确保历史记录有长度限制,避免无限增长)
|
# 将未处理消息添加到历史记录中 (确保历史记录有长度限制,避免无限增长)
|
||||||
max_history_len = 100 # 示例:最多保留100条历史记录
|
max_history_len = 100 # 示例:最多保留100条历史记录
|
||||||
self.chat_history.extend(self.unprocessed_messages)
|
self.chat_history.extend(self.unprocessed_messages)
|
||||||
if len(self.chat_history) > max_history_len:
|
if len(self.chat_history) > max_history_len:
|
||||||
self.chat_history = self.chat_history[-max_history_len:]
|
self.chat_history = self.chat_history[-max_history_len:]
|
||||||
@@ -344,12 +343,11 @@ class ObservationInfo:
|
|||||||
replace_bot_name=True,
|
replace_bot_name=True,
|
||||||
merge_messages=False,
|
merge_messages=False,
|
||||||
timestamp_mode="relative",
|
timestamp_mode="relative",
|
||||||
read_mark=0.0, # read_mark 可能需要根据逻辑调整
|
read_mark=0.0, # read_mark 可能需要根据逻辑调整
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"[私聊][{self.private_name}]构建聊天记录字符串时出错: {e}")
|
logger.error(f"[私聊][{self.private_name}]构建聊天记录字符串时出错: {e}")
|
||||||
self.chat_history_str = "[构建聊天记录出错]" # 提供错误提示
|
self.chat_history_str = "[构建聊天记录出错]" # 提供错误提示
|
||||||
|
|
||||||
|
|
||||||
# 清空未处理消息列表和计数
|
# 清空未处理消息列表和计数
|
||||||
# cleared_count = len(self.unprocessed_messages)
|
# cleared_count = len(self.unprocessed_messages)
|
||||||
@@ -357,7 +355,7 @@ class ObservationInfo:
|
|||||||
self.new_messages_count = 0
|
self.new_messages_count = 0
|
||||||
# self.has_unread_messages = False # 这个状态可以通过 new_messages_count 判断
|
# self.has_unread_messages = False # 这个状态可以通过 new_messages_count 判断
|
||||||
|
|
||||||
self.chat_history_count = len(self.chat_history) # 更新历史记录总数
|
self.chat_history_count = len(self.chat_history) # 更新历史记录总数
|
||||||
# logger.debug(f"[私聊][{self.private_name}]已处理 {cleared_count} 条消息,当前历史记录 {self.chat_history_count} 条。")
|
# logger.debug(f"[私聊][{self.private_name}]已处理 {cleared_count} 条消息,当前历史记录 {self.chat_history_count} 条。")
|
||||||
|
|
||||||
self.update_changed() # 状态改变
|
self.update_changed() # 状态改变
|
||||||
|
|||||||
Reference in New Issue
Block a user