mirror of https://github.com/Mai-with-u/MaiBot.git
fix:修复focus下也会切换的问题
parent
14d9f3b2bd
commit
b7faf8bed3
|
|
@ -107,6 +107,7 @@ class NoReplyAction(BaseAction):
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
elapsed_time = current_time - start_time
|
elapsed_time = current_time - start_time
|
||||||
|
|
||||||
|
if global_config.chat.chat_mode == "auto":
|
||||||
# 检查是否超时
|
# 检查是否超时
|
||||||
if elapsed_time >= self._max_timeout:
|
if elapsed_time >= self._max_timeout:
|
||||||
logger.info(f"{self.log_prefix} 达到最大等待时间{self._max_timeout}秒,退出专注模式")
|
logger.info(f"{self.log_prefix} 达到最大等待时间{self._max_timeout}秒,退出专注模式")
|
||||||
|
|
@ -120,6 +121,7 @@ class NoReplyAction(BaseAction):
|
||||||
)
|
)
|
||||||
return True, exit_reason
|
return True, exit_reason
|
||||||
|
|
||||||
|
|
||||||
# **新增**:检查回复频率,决定是否退出专注模式
|
# **新增**:检查回复频率,决定是否退出专注模式
|
||||||
should_exit_focus = await self._check_frequency_and_exit_focus(current_time)
|
should_exit_focus = await self._check_frequency_and_exit_focus(current_time)
|
||||||
if should_exit_focus:
|
if should_exit_focus:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue