小修复

This commit is contained in:
雅诺狐
2025-08-12 22:38:26 +08:00
committed by Windpicker-owo
parent ec876d1518
commit b966a2f09c
5 changed files with 37 additions and 32 deletions

View File

@@ -364,6 +364,7 @@ async def custom_to_stream(
async def adapter_command_to_stream(
action: str,
params: dict,
platform: str,
stream_id: Optional[str] = None,
timeout: float = 30.0,
storage_message: bool = False
@@ -405,12 +406,12 @@ async def adapter_command_to_stream(
temp_user_info = UserInfo(
user_id="system",
user_nickname="System",
platform="adapter_command"
platform=platform
)
temp_chat_stream = ChatStream(
stream_id=stream_id,
platform="adapter_command",
platform=platform,
user_info=temp_user_info,
group_info=None
)

View File

@@ -1,3 +1,4 @@
import asyncio
import os
import traceback
import sys
@@ -513,7 +514,7 @@ class PluginManager:
plugin_instance.on_unload()
# 从组件注册表中移除插件的所有组件
component_registry.unregister_plugin(plugin_name)
asyncio.run(component_registry.unregister_plugin(plugin_name))
# 从已加载插件中移除
del self.loaded_plugins[plugin_name]