mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-20 02:55:08 +08:00
fix(core): minor changes to agent tool executor and lifecycle
This commit is contained in:
@@ -158,7 +158,7 @@ class FunctionToolExecutor(BaseFunctionToolExecutor[AstrAgentContext]):
|
||||
exc_info=True,
|
||||
)
|
||||
|
||||
asyncio.create_task(_run_in_background())
|
||||
asyncio.create_task(_run_in_background()) # noqa: RUF006
|
||||
text_content = mcp.types.TextContent(
|
||||
type="text",
|
||||
text=f"Background task submitted. task_id={task_id}",
|
||||
@@ -406,7 +406,7 @@ class FunctionToolExecutor(BaseFunctionToolExecutor[AstrAgentContext]):
|
||||
exc_info=True,
|
||||
)
|
||||
|
||||
asyncio.create_task(_run_handoff_in_background())
|
||||
asyncio.create_task(_run_handoff_in_background()) # noqa: RUF006
|
||||
|
||||
text_content = mcp.types.TextContent(
|
||||
type="text",
|
||||
|
||||
@@ -230,7 +230,7 @@ class AstrBotCoreLifecycle:
|
||||
# 初始化关闭控制面板的事件
|
||||
self.dashboard_shutdown_event = asyncio.Event()
|
||||
|
||||
asyncio.create_task(update_llm_metadata())
|
||||
asyncio.create_task(update_llm_metadata()) # noqa: RUF006
|
||||
|
||||
def _load(self) -> None:
|
||||
"""加载事件总线和任务并初始化."""
|
||||
|
||||
Reference in New Issue
Block a user