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:
committed by
Windpicker-owo
parent
e5974f7045
commit
0ca5623961
@@ -1176,19 +1176,12 @@ class DefaultReplyer:
|
||||
chat_stream = self.chat_stream
|
||||
chat_id = chat_stream.stream_id
|
||||
person_info_manager = get_person_info_manager()
|
||||
is_group_chat = self.is_group_chat
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user