feat: migrate chat orchestration to deep langgraph workers
This commit is contained in:
@@ -250,15 +250,14 @@ def test_home_request_calls_memory_middleware(client):
|
||||
token = make_jwt("power", user_id=USER_ID)
|
||||
session_id = str(uuid.uuid4())
|
||||
|
||||
async def _mock_stream(user_id, message, context, reg=None):
|
||||
async def _mock_stream(user_id, message, context):
|
||||
# Verify memory context was injected
|
||||
assert context.get("core_memory") == {"tz": "UTC"}
|
||||
yield "task_agent", ""
|
||||
yield "task_agent", '{"type": "text", "content": "Done"}'
|
||||
yield "token", "Done"
|
||||
|
||||
with (
|
||||
patch("app.api.routes.device_ws.MemoryMiddleware", _MockMiddleware),
|
||||
patch("app.api.routes.device_ws.orchestrate_v3_stream", side_effect=_mock_stream),
|
||||
patch("app.api.routes.device_ws.run_home_stream", side_effect=_mock_stream),
|
||||
):
|
||||
with client.websocket_connect(f"/api/v1/ws/device?token={token}") as ws:
|
||||
ws.send_text(json.dumps({
|
||||
|
||||
Reference in New Issue
Block a user