fix agent tools

This commit is contained in:
jxxghp
2025-11-17 09:28:18 +08:00
parent 6d5a85b144
commit b7d121c58f
7 changed files with 19 additions and 34 deletions

View File

@@ -38,6 +38,12 @@ class MoviePilotTool(BaseTool, metaclass=ABCMeta):
agent_message = await self._callback_handler.get_message()
if agent_message:
await self.send_tool_message(agent_message)
# 发送执行工具说明
explanation = kwargs.get("explanation")
if explanation:
if not explanation.startswith("正在"):
explanation = "正在" + explanation
await self.send_tool_message(f"{explanation} ...")
return await self.run(**kwargs)
@abstractmethod