🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -199,8 +199,8 @@ class ExpressionLearner:
|
|||||||
# 使用二次函数插值:在0-30天之间从0衰减到0.01
|
# 使用二次函数插值:在0-30天之间从0衰减到0.01
|
||||||
# 使用简单的二次函数:y = a * x^2
|
# 使用简单的二次函数:y = a * x^2
|
||||||
# 当x=30时,y=0.01,所以 a = 0.01 / (30^2) = 0.01 / 900
|
# 当x=30时,y=0.01,所以 a = 0.01 / (30^2) = 0.01 / 900
|
||||||
a = 0.01 / (DECAY_DAYS ** 2)
|
a = 0.01 / (DECAY_DAYS**2)
|
||||||
decay = a * (time_diff_days ** 2)
|
decay = a * (time_diff_days**2)
|
||||||
|
|
||||||
return min(0.01, decay)
|
return min(0.01, decay)
|
||||||
|
|
||||||
|
|||||||
@@ -431,6 +431,8 @@ class SubHeartflow:
|
|||||||
if is_cooling:
|
if is_cooling:
|
||||||
remaining_time = cooldown_duration - elapsed_since_exit
|
remaining_time = cooldown_duration - elapsed_since_exit
|
||||||
remaining_minutes = remaining_time / 60
|
remaining_minutes = remaining_time / 60
|
||||||
logger.debug(f"[{self.log_prefix}] focus冷却中,剩余时间: {remaining_minutes:.1f}分钟 (阈值: {global_config.chat.auto_focus_threshold})")
|
logger.debug(
|
||||||
|
f"[{self.log_prefix}] focus冷却中,剩余时间: {remaining_minutes:.1f}分钟 (阈值: {global_config.chat.auto_focus_threshold})"
|
||||||
|
)
|
||||||
|
|
||||||
return is_cooling
|
return is_cooling
|
||||||
|
|||||||
Reference in New Issue
Block a user