🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -30,7 +30,6 @@ from src.chat.utils.chat_message_builder import (
|
||||
get_raw_msg_before_timestamp_with_chat,
|
||||
num_new_messages_since,
|
||||
)
|
||||
from src.person_info.relationship_manager import get_relationship_manager
|
||||
|
||||
willing_manager = get_willing_manager()
|
||||
|
||||
@@ -779,17 +778,11 @@ class NormalChat:
|
||||
logger.debug(f"[{self.stream_name}] 额外动作处理完成: {self.action_type}")
|
||||
|
||||
if not response_set or (
|
||||
self.enable_planner
|
||||
and self.action_type not in ["no_action"]
|
||||
and not self.is_parallel_action
|
||||
self.enable_planner and self.action_type not in ["no_action"] and not self.is_parallel_action
|
||||
):
|
||||
if not response_set:
|
||||
logger.info(f"[{self.stream_name}] 模型未生成回复内容")
|
||||
elif (
|
||||
self.enable_planner
|
||||
and self.action_type not in ["no_action"]
|
||||
and not self.is_parallel_action
|
||||
):
|
||||
elif self.enable_planner and self.action_type not in ["no_action"] and not self.is_parallel_action:
|
||||
logger.info(f"[{self.stream_name}] 模型选择其他动作(非并行动作)")
|
||||
# 如果模型未生成回复,移除思考消息
|
||||
container = await message_manager.get_container(self.stream_id) # 使用 self.stream_id
|
||||
@@ -836,8 +829,6 @@ class NormalChat:
|
||||
if len(self.recent_replies) > self.max_replies_history:
|
||||
self.recent_replies = self.recent_replies[-self.max_replies_history :]
|
||||
|
||||
|
||||
|
||||
# 回复后处理
|
||||
await willing_manager.after_generate_reply_handle(message.message_info.message_id)
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ from src.chat.utils.chat_message_builder import build_readable_messages, get_raw
|
||||
from src.config.config import global_config
|
||||
import random
|
||||
import time
|
||||
from src.chat.message_receive.message_sender import message_manager
|
||||
from src.chat.message_receive.message import MessageThinking
|
||||
|
||||
logger = get_logger("normal_chat_action_modifier")
|
||||
|
||||
@@ -280,8 +278,6 @@ class NormalChatActionModifier:
|
||||
logger.debug(f"{self.log_prefix}动作 {action_name} 未匹配到任何关键词: {activation_keywords}")
|
||||
return False
|
||||
|
||||
|
||||
|
||||
def get_available_actions_count(self) -> int:
|
||||
"""获取当前可用动作数量(排除默认的no_action)"""
|
||||
current_actions = self.action_manager.get_using_actions_for_mode("normal")
|
||||
|
||||
Reference in New Issue
Block a user