feat(sleep): 引入多样化的失眠触发机制

重构了失眠系统,引入了两种新的失眠触发机制:
1.  **低睡眠压力失眠**:当睡后检查时睡眠压力低于设定阈值,将触发失眠。
2.  **随机失眠**:在睡眠压力正常的情况下,仍有一定概率随机触发失眠。

同时,移除了原有的 `post_sleep_insomnia` 特定情绪,并调整了相关配置项,使失眠原因的传递和处理更加灵活。
This commit is contained in:
minecraft1024a
2025-09-06 13:55:57 +08:00
parent 0b1d365fce
commit 614f8064ba
4 changed files with 14 additions and 16 deletions

View File

@@ -222,11 +222,6 @@ willing_mode = "classical" # 回复意愿模式 —— 经典模式classical
[tool]
enable_tool = true # 是否在普通聊天中启用工具
[tool.history]
enable_history = true # 是否启用工具调用历史记录
enable_prompt_history = true # 是否在提示词中加入工具历史记录
max_history = 5 # 每个会话最多保留的历史记录数
[mood]
enable_mood = true # 是否启用情绪系统
mood_update_threshold = 1 # 情绪更新阈值,越高,更新越慢
@@ -443,8 +438,6 @@ enable_insomnia_system = false # 是否启用失眠系统
sleep_pressure_threshold = 30.0
# 进入“深度睡眠”的睡眠压力阈值
deep_sleep_threshold = 80.0
# 压力不足时的失眠基础概率 (0.0 to 1.0)
insomnia_chance_low_pressure = 0.6
# 压力正常时的失眠基础概率 (0.0 to 1.0)
insomnia_chance_normal_pressure = 0.1
# 每次AI执行动作后增加的睡眠压力值