Commit Graph

6 Commits

Author SHA1 Message Date
Windpicker-owo
0e4ba5f852 refactor(mood): 支持 DatabaseMessages 类型并改进时间处理逻辑
扩展 update_mood_by_message 方法参数类型,使其支持 MessageRecv 和 DatabaseMessages 两种消息类型。重构时间获取逻辑,通过类型检查分别处理不同消息对象的时间字段,提高代码健壮性和可复用性。
2025-09-23 23:19:55 +08:00
Windpicker-owo
c9b712d8fa refactor(prompt): 重构并统一提示词系统
- 删除旧的智能提示词系统(smart_prompt.py)和相关参数模块(prompt_parameters.py)
- 将 prompt_builder.py 重命名为 prompt.py 并精简功能
- 更新所有模块的导入路径从 `src.chat.utils.prompt_builder` 到 `src.chat.utils.prompt`
- 统一提示词构建接口,使用新的 PromptContext 替代 SmartPromptParameters
- 移除重复和冗余代码,简化系统架构

BREAKING CHANGE: 旧的 SmartPrompt 系统已被完全移除,所有相关模块需要改用新的统一 Prompt 系统
2025-09-06 00:10:54 +08:00
Windpicker-owo
8149731925 修复代码格式和文件名大小写问题 2025-08-31 20:50:17 +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
4f7836ae0c feat(sleep): 引入休眠阶段消息唤醒机制与愤怒情绪模式
- 扩展日程休眠逻辑,支持在睡眠时段通过@/私聊唤醒
- 新增 WakeUpManager 持续追踪唤醒阈值并触发愤怒状态
- MoodManager 中追加“被吵醒”情绪标识与愤怒提示模板
- HeartFChat 主循环集成唤醒处理管线,兼容原逻辑
- 配置中心开放阈值、衰减、持续时间等可调参数

此举允许机器人即便在“睡觉”时也能被重要消息强行“闹醒”,并以生气口吻做出回应,提升拟人化交互体验。
2025-08-21 16:19:34 +08:00
雅诺狐
2d4745cd58 初始化 2025-08-11 19:34:18 +08:00