Stream runtime status updates
This commit is contained in:
@@ -100,6 +100,9 @@ def test_stream_chat_endpoint_executes_tool_before_streaming_answer(tmp_path, mo
|
||||
body = "".join(response.iter_text())
|
||||
|
||||
assert response.status_code == 200
|
||||
assert 'event: runtime_status\ndata: {"task_id":' in body
|
||||
assert '"stage": "planning"' in body
|
||||
assert body.index('"stage": "planning"') < body.index("event: tool_call_started")
|
||||
assert "event: tool_call_started" in body
|
||||
assert "event: tool_call_finished" in body
|
||||
assert "stream tool content" in body
|
||||
@@ -172,6 +175,8 @@ def test_continue_stream_executes_approved_tool_and_streams_answer(tmp_path, mon
|
||||
|
||||
assert "event: tool_approval_requested" in initial_body
|
||||
assert response.status_code == 200
|
||||
assert '"stage": "running_tool"' in body
|
||||
assert body.index('"stage": "running_tool"') < body.index("event: tool_call_finished")
|
||||
assert "event: tool_call_finished" in body
|
||||
assert "event: content_delta" in body
|
||||
assert "continued after approval" in body
|
||||
|
||||
Reference in New Issue
Block a user