Commit Graph

7 Commits

Author SHA1 Message Date
Windpicker-owo
8149731925 修复代码格式和文件名大小写问题 2025-08-31 20:50:17 +08:00
minecraft1024a
65fee5458a refactor(energy): 移除is_sleeping方法对wakeup_manager的依赖
将`schedule_manager.is_sleeping`的调用从`is_sleeping(self.context.wakeup_manager)`修改为`is_sleeping()`,以解耦对`wakeup_manager`的直接依赖。

同时,在`napcat_adapter_plugin`中将`enable_plugin`的默认值修改为`False`。
2025-08-29 20:04:05 +08:00
minecraft1024a
a485aaf4ad 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.
2025-08-29 13:56:24 +08:00
minecraft1024a
ecf2df27fa feat(chat): implement sleep pressure and insomnia system
This commit introduces a new sleep pressure and insomnia system to simulate more realistic character behavior.

Key features include:
- **Sleep Pressure**: A new metric that accumulates with each action the bot takes and decreases during scheduled sleep times.
- **Insomnia Mechanic**: When a sleep period begins, the system checks the current sleep pressure. Low pressure can lead to a higher chance of "insomnia," causing the bot to stay awake. There is also a small chance for random insomnia.
- **Insomnia State**: During insomnia, the bot enters a special state for a configurable duration. It can trigger unique proactive thoughts related to being unable to sleep, and its mood is adjusted accordingly.
- **Configuration**: All parameters, such as insomnia probability, duration, and pressure thresholds, are fully configurable.
2025-08-27 21:02:21 +08:00
minecraft1024a
e3cedd54ff style(chat): 统一 chat_loop 模块 logger 命名并添加业务注释
将各子模块 logger 由 hfc.* 缩减为统一 "hfc"

涉及的子模块:
- cycle_tracker / energy_manager / hfc_utils / proactive_thinker / response_handler
2025-08-21 15:32:57 +08:00
Furina-1013-create
4c51f59c96 为拆分heartFC_chat后的几个文件 添加亿点注释 2025-08-21 14:55:58 +08:00
minecraft1024a
9c3b750328 refactor(chat): 重构HeartFChatting为模块化架构
将原本超长的heartFC_chat.py拆分为6个功能内聚的子模块:
- hfc_context:上下文数据容器
- cycle_tracker:循环状态记录
- energy_manager:能量值独立管理
- proactive_thinker:主动思考逻辑抽离
- cycle_processor:单次循环处理器
- response_handler / normal_mode_handler:响应策略

删除冗余常量、错误样板及旧逻辑;大幅减少类体积;降低耦合度,提升可维护性。
2025-08-21 14:27:12 +08:00