refactor(config): rename wakeup_system to sleep_system for clarity

This commit refactors the entire "wakeup system" to be named "sleep system". This change provides a more intuitive and accurate name for the functionality, which manages the AI's sleep cycles, sleep pressure, and related behaviors like insomnia and flexible sleep schedules.

The renaming has been applied consistently across all relevant files, including:
- Configuration models (`WakeUpSystemConfig` -> `SleepSystemConfig`)
- Configuration files (`bot_config_template.toml`)
- Core application logic that references these configurations.

Additionally, flexible sleep and pre-sleep notification settings have been moved from the `ScheduleConfig` to the new `SleepSystemConfig` to centralize all sleep-related parameters.
This commit is contained in:
minecraft1024a
2025-08-29 13:56:24 +08:00
committed by Windpicker-owo
parent 1dbf14c096
commit 0d072f5059
7 changed files with 56 additions and 69 deletions

View File

@@ -98,7 +98,7 @@ class EnergyManager:
if is_sleeping:
# 睡眠中:减少睡眠压力
decay_per_10s = global_config.wakeup_system.sleep_pressure_decay_rate / 6
decay_per_10s = global_config.sleep_system.sleep_pressure_decay_rate / 6
self.context.sleep_pressure -= decay_per_10s
self.context.sleep_pressure = max(self.context.sleep_pressure, 0)
self._log_sleep_pressure_change("睡眠压力释放")
@@ -145,7 +145,7 @@ class EnergyManager:
"""
在执行动作后增加睡眠压力
"""
increment = global_config.wakeup_system.sleep_pressure_increment
increment = global_config.sleep_system.sleep_pressure_increment
self.context.sleep_pressure += increment
self.context.sleep_pressure = min(self.context.sleep_pressure, 100.0) # 设置一个100的上限
self._log_sleep_pressure_change("执行动作,睡眠压力累积")