refactor(mood): 移除与唤醒愤怒和失眠相关的状态管理

删除了 `ChatMood` 类中的 `is_angry_from_wakeup` 属性,并移除了 `MoodManager` 中所有与之相关的方法,包括:
- `reset_mood_by_chat_id`
- `set_angry_from_wakeup`
- `clear_angry_from_wakeup`
- `start_insomnia`
- `stop_insomnia`
- `get_angry_prompt_addition`

这些逻辑现在由更通用的状态机和动作系统处理,简化了情绪模块的职责,使其更专注于核心情绪值的管理。
This commit is contained in:
minecraft1024a
2025-10-31 21:13:54 +08:00
parent 26ba4c3643
commit 0ffcae4d44
2 changed files with 1 additions and 52 deletions

View File

@@ -1172,18 +1172,11 @@ class DefaultReplyer:
chat_id = chat_stream.stream_id
person_info_manager = get_person_info_manager()
is_group_chat = bool(chat_stream.group_info)
mood_prompt = ""
if global_config.mood.enable_mood:
chat_mood = mood_manager.get_mood_by_chat_id(chat_id)
mood_prompt = chat_mood.mood_state
# 检查是否有愤怒状态的补充提示词
angry_prompt_addition = mood_manager.get_angry_prompt_addition(chat_id)
if angry_prompt_addition:
mood_prompt = f"{mood_prompt}{angry_prompt_addition}"
else:
mood_prompt = ""
if reply_to:
# 兼容旧的reply_to
sender, target = self._parse_reply_target(reply_to)