🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-06-14 07:03:25 +00:00
parent e15a9b29ff
commit 538c3ae3f2
9 changed files with 77 additions and 75 deletions

View File

@@ -182,7 +182,9 @@ class NormalChat:
interested_rate=interest_value * self.willing_amplifier,
)
except Exception as e:
logger.error(f"[{self.stream_name}] 处理兴趣消息{msg_id}时出错: {e}\n{traceback.format_exc()}")
logger.error(
f"[{self.stream_name}] 处理兴趣消息{msg_id}时出错: {e}\n{traceback.format_exc()}"
)
finally:
self.interest_dict.pop(msg_id, None)

View File

@@ -323,14 +323,16 @@ class NormalChatActionModifier:
# 统计1分钟内的回复数量
recent_reply_count = sum(1 for reply in recent_replies if reply["time"] > one_minute_ago)
print(f"recent_reply_count: {recent_reply_count}")
print(f"reply_threshold: {reply_threshold}")
should_switch = recent_reply_count > reply_threshold
if should_switch:
logger.debug(f"{self.log_prefix} 检测到1分钟内回复数量({recent_reply_count})大于{reply_threshold}满足切换到focus模式条件")
logger.debug(
f"{self.log_prefix} 检测到1分钟内回复数量({recent_reply_count})大于{reply_threshold}满足切换到focus模式条件"
)
return should_switch
def get_available_actions_count(self) -> int: