重构事件总线和插件运行时,优化消息处理逻辑,新增 IPC 传输字典转换功能,改进组件管理协议
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import random
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import random
|
||||
import time
|
||||
|
||||
from src.chat.message_receive.chat_manager import BotChatSession, chat_manager
|
||||
@@ -260,8 +260,8 @@ class RuntimeDataCapabilityMixin:
|
||||
return {"success": False, "error": str(e)}
|
||||
|
||||
@staticmethod
|
||||
def _serialize_messages(messages: list) -> List[Dict[str, Any]]:
|
||||
result: List[Dict[str, Any]] = []
|
||||
def _serialize_messages(messages: list) -> List[Any]:
|
||||
result: List[Any] = []
|
||||
for msg in messages:
|
||||
if hasattr(msg, "model_dump"):
|
||||
result.append(msg.model_dump())
|
||||
|
||||
Reference in New Issue
Block a user