feat:允许关闭FOCUS模式

This commit is contained in:
SengokuCola
2025-04-29 20:38:12 +08:00
parent 315b0490fe
commit dec2e4f442
5 changed files with 126 additions and 22 deletions

View File

@@ -264,6 +264,13 @@ class SubHeartflowManager:
current_state = self.mai_state_info.get_current_state()
focused_limit = current_state.get_focused_chat_max_num()
# --- 新增:检查是否允许进入 FOCUS 模式 --- #
if not global_config.allow_focus_mode:
if int(time.time()) % 60 == 0: # 每60秒输出一次日志避免刷屏
logger.debug(f"{log_prefix} 配置不允许进入 FOCUSED 状态 (allow_focus_mode=False)")
return # 如果不允许,直接返回
# --- 结束新增 ---
logger.debug(f"{log_prefix} 当前状态 ({current_state.value}) 开始尝试提升到FOCUSED状态")
if int(time.time()) % 20 == 0: # 每20秒输出一次