私聊不再可能退出focus模式,修复focus退出阈值反向计算的BUG

This commit is contained in:
A0000Xz
2025-07-11 19:32:18 +08:00
committed by GitHub
parent ef1ac55fe0
commit 9dfc15e61c

View File

@@ -459,7 +459,7 @@ class HeartFChatting:
logger.debug(f"{self.log_prefix} 从action_data中获取系统命令: {command}") logger.debug(f"{self.log_prefix} 从action_data中获取系统命令: {command}")
# 新增:消息计数和疲惫检查 # 新增:消息计数和疲惫检查
if action == "reply" and success: if action == "reply" and success and self.chat_stream.context.message.message_info.group_info:
self._message_count += 1 self._message_count += 1
current_threshold = self._get_current_fatigue_threshold() current_threshold = self._get_current_fatigue_threshold()
logger.info( logger.info(
@@ -501,7 +501,7 @@ class HeartFChatting:
Returns: Returns:
int: 当前的疲惫阈值 int: 当前的疲惫阈值
""" """
return max(10, int(30 / global_config.chat.exit_focus_threshold)) return max(10, int(30 * global_config.chat.exit_focus_threshold))
def get_message_count_info(self) -> dict: def get_message_count_info(self) -> dict:
"""获取消息计数信息 """获取消息计数信息