From 991b03921bd2382d19816680ff8eb169142daefe Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 17 Oct 2026 07:29:41 +0800 Subject: [PATCH] fix(types): require coroutine web agent tasks --- app/application/messaging/agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/application/messaging/agent.py b/app/application/messaging/agent.py index 386531f58..c2937b63e 100644 --- a/app/application/messaging/agent.py +++ b/app/application/messaging/agent.py @@ -15,6 +15,7 @@ from typing import ( AsyncIterator, Awaitable, Callable, + Coroutine, Optional, Protocol, Union, @@ -51,7 +52,7 @@ _WEB_AGENT_BACKGROUND_TASKS: set[asyncio.Task[object]] = set() def create_web_agent_background_task( - coroutine: Awaitable[object], + coroutine: Coroutine[Any, Any, object], ) -> asyncio.Task[object]: """登记 Web Agent 后台任务,使应用关闭时可以统一收口。""" task = cast(