Update AgentExecutionStartedEvent to use task_prompt

- Modify test_events.py to use task_prompt instead of inputs
- Simplify event input validation in test case
- Align with recent event system refactoring
This commit is contained in:
Lorenze Jay
2025-02-18 14:35:12 -08:00
parent 4dc258a590
commit d368efdeda

View File

@@ -206,16 +206,11 @@ def test_agent_emits_execution_started_and_completed_events():
assert received_events[0].agent == base_agent
assert received_events[0].task == base_task
assert received_events[0].tools == []
assert received_events[0].inputs == {
"ask_for_human_input": False,
"input": "Just say hi\n"
"\n"
"This is the expected criteria for your final answer: hi\n"
"you MUST return the actual complete content as the final answer, not a "
"summary.",
"tool_names": "",
"tools": "",
}
assert isinstance(received_events[0].task_prompt, str)
assert (
received_events[0].task_prompt
== "Just say hi\n\nThis is the expected criteria for your final answer: hi\nyou MUST return the actual complete content as the final answer, not a summary."
)
assert isinstance(received_events[0].timestamp, datetime)
assert received_events[0].type == "agent_execution_started"
assert isinstance(received_events[1].timestamp, datetime)