Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -6,6 +6,7 @@ from src.manager.mood_manager import mood_manager # 导入情绪管理器
|
||||
from src.chat.message_receive.chat_stream import get_chat_manager
|
||||
from src.chat.message_receive.message import MessageRecv
|
||||
from src.experimental.only_message_process import MessageProcessor
|
||||
from src.chat.message_receive.storage import MessageStorage
|
||||
from src.experimental.PFC.pfc_manager import PFCManager
|
||||
from src.chat.focus_chat.heartflow_message_processor import HeartFCMessageReceiver
|
||||
from src.chat.utils.prompt_builder import Prompt, global_prompt_manager
|
||||
@@ -148,6 +149,7 @@ class ChatBot:
|
||||
|
||||
# 如果是命令且不需要继续处理,则直接返回
|
||||
if is_command and not continue_process:
|
||||
await MessageStorage.store_message(message, chat)
|
||||
logger.info(f"命令处理完成,跳过后续消息处理: {cmd_result}")
|
||||
return
|
||||
|
||||
|
||||
@@ -284,7 +284,9 @@ async def image_to_stream(image_base64: str, stream_id: str, storage_message: bo
|
||||
return await _send_to_target("image", image_base64, stream_id, "", typing=False, storage_message=storage_message)
|
||||
|
||||
|
||||
async def command_to_stream(command: Union[str, dict], stream_id: str, storage_message: bool = True) -> bool:
|
||||
async def command_to_stream(
|
||||
command: Union[str, dict], stream_id: str, storage_message: bool = True, display_message: str = ""
|
||||
) -> bool:
|
||||
"""向指定流发送命令
|
||||
|
||||
Args:
|
||||
@@ -295,7 +297,9 @@ async def command_to_stream(command: Union[str, dict], stream_id: str, storage_m
|
||||
Returns:
|
||||
bool: 是否发送成功
|
||||
"""
|
||||
return await _send_to_target("command", command, stream_id, "", typing=False, storage_message=storage_message)
|
||||
return await _send_to_target(
|
||||
"command", command, stream_id, display_message, typing=False, storage_message=storage_message
|
||||
)
|
||||
|
||||
|
||||
async def custom_to_stream(
|
||||
|
||||
@@ -322,6 +322,7 @@ class BaseAction(ABC):
|
||||
command=command_data,
|
||||
stream_id=self.chat_id,
|
||||
storage_message=storage_message,
|
||||
display_message=display_message,
|
||||
)
|
||||
|
||||
if success:
|
||||
|
||||
@@ -162,6 +162,7 @@ class BaseCommand(ABC):
|
||||
command=command_data,
|
||||
stream_id=chat_stream.stream_id,
|
||||
storage_message=storage_message,
|
||||
display_message=display_message,
|
||||
)
|
||||
|
||||
if success:
|
||||
|
||||
Reference in New Issue
Block a user