fix(agent): isolate web and storage blocking I/O

This commit is contained in:
InfinityPacer
2026-08-23 13:06:30 +08:00
parent 43c173a0e7
commit d11c2fb301
7 changed files with 558 additions and 56 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import asyncio
import inspect
import json
import threading
from abc import ABCMeta, abstractmethod
@@ -646,7 +647,9 @@ class MoviePilotTool(BaseTool, metaclass=ABCMeta):
self._channel == NotificationChannel.WebAgent.value
and callable(callback)
):
callback(message)
callback_result = callback(message)
if inspect.isawaitable(callback_result):
await callback_result
return
if not self._channel or not self._source: