mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-16 13:11:05 +08:00
fix: implement tool execution timeout handling and improve blocking call management
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
"""插件 Agent 工具共享辅助方法"""
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import shutil
|
||||
from typing import Any, Optional
|
||||
@@ -251,7 +250,9 @@ async def install_plugin_runtime(
|
||||
SystemConfigKey.UserInstalledPlugins, install_plugins
|
||||
)
|
||||
|
||||
await asyncio.to_thread(reload_plugin_runtime, plugin_id)
|
||||
from app.agent.tools.base import run_agent_blocking
|
||||
|
||||
await run_agent_blocking("plugin", reload_plugin_runtime, plugin_id)
|
||||
return True, message or "插件安装成功", refreshed_only
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user