feat: 实现插件注册的分阶段接入与切换机制,优化 RPC 连接管理

This commit is contained in:
DrSmoothl
2026-03-13 15:21:40 +08:00
parent 5d30b3a908
commit 44a9e9ecd7
5 changed files with 393 additions and 87 deletions

View File

@@ -430,8 +430,10 @@ class PluginRuntimeManager:
"""
from src.services import send_service as send_api
message_type: str = args.get("message_type", "")
content = args.get("content", "")
message_type: str = args.get("message_type", "") or args.get("custom_type", "")
content = args.get("content")
if content is None:
content = args.get("data", "")
stream_id: str = args.get("stream_id", "")
if not message_type or not stream_id:
return {"success": False, "error": "缺少必要参数 message_type 或 stream_id"}