🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -110,7 +110,9 @@ class NoReplyAction(BaseAction):
|
|||||||
if global_config.chat.chat_mode == "auto" and self.is_group:
|
if global_config.chat.chat_mode == "auto" and self.is_group:
|
||||||
# 检查是否超时
|
# 检查是否超时
|
||||||
if elapsed_time >= self._max_timeout or self._check_no_activity_and_exit_focus(current_time):
|
if elapsed_time >= self._max_timeout or self._check_no_activity_and_exit_focus(current_time):
|
||||||
logger.info(f"{self.log_prefix} 等待时间过久({self._max_timeout}秒)或过去10分钟完全没有发言,退出专注模式")
|
logger.info(
|
||||||
|
f"{self.log_prefix} 等待时间过久({self._max_timeout}秒)或过去10分钟完全没有发言,退出专注模式"
|
||||||
|
)
|
||||||
# 标记退出专注模式
|
# 标记退出专注模式
|
||||||
self.action_data["_system_command"] = "stop_focus_chat"
|
self.action_data["_system_command"] = "stop_focus_chat"
|
||||||
exit_reason = f"{global_config.bot.nickname}(你)等待了{self._max_timeout}秒,或完全没有说话,感觉群里没有新内容,决定退出专注模式,稍作休息"
|
exit_reason = f"{global_config.bot.nickname}(你)等待了{self._max_timeout}秒,或完全没有说话,感觉群里没有新内容,决定退出专注模式,稍作休息"
|
||||||
@@ -352,8 +354,6 @@ class NoReplyAction(BaseAction):
|
|||||||
logger.error(f"{self.log_prefix} 模型判断异常: {e},继续等待")
|
logger.error(f"{self.log_prefix} 模型判断异常: {e},继续等待")
|
||||||
last_judge_time = time.time() # 异常时也更新时间,避免频繁重试
|
last_judge_time = time.time() # 异常时也更新时间,避免频繁重试
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 每10秒输出一次等待状态
|
# 每10秒输出一次等待状态
|
||||||
logger.info(f"{self.log_prefix} 开始等待新消息...")
|
logger.info(f"{self.log_prefix} 开始等待新消息...")
|
||||||
if elapsed_time < 60:
|
if elapsed_time < 60:
|
||||||
|
|||||||
Reference in New Issue
Block a user