fix(core): minor changes to agent tool executor and lifecycle

This commit is contained in:
LIghtJUNction
2026-03-22 19:08:51 +08:00
parent b70eb4e64f
commit 95ba23c3ab
2 changed files with 3 additions and 3 deletions

View File

@@ -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",

View File

@@ -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:
"""加载事件总线和任务并初始化."""