fix multi-query agent workspace searches

This commit is contained in:
Hamza Ayed
2026-10-04 17:42:57 +03:00
parent b3dc6154e5
commit a62a831e90
6 changed files with 253 additions and 17 deletions
@@ -111,7 +111,7 @@ class TimeoutAndCancellationTests(unittest.IsolatedAsyncioTestCase):
await stream.aclose()
await asyncio.wait_for(cancelled.wait(), timeout=1)
async def test_idle_agent_stream_emits_keepalive_until_model_finishes(self) -> None:
async def test_idle_agent_stream_emits_heartbeat_until_model_finishes(self) -> None:
started = asyncio.Event()
cancelled = asyncio.Event()
@@ -131,8 +131,8 @@ class TimeoutAndCancellationTests(unittest.IsolatedAsyncioTestCase):
):
response = await run_agent_stream(request, user_id=database.LOCAL_USER_ID)
stream = response.body_iterator
keepalive = await asyncio.wait_for(anext(stream), timeout=1)
self.assertEqual(keepalive, ": keep-alive\n\n")
heartbeat = await asyncio.wait_for(anext(stream), timeout=1)
self.assertEqual(heartbeat, "event: heartbeat\ndata: {}\n\n")
self.assertTrue(started.is_set())
await stream.aclose()
await asyncio.wait_for(cancelled.wait(), timeout=1)