Commit 51c2d8a
authored
fix: Event consumer should stop on input_required (#167)
Event consumer currently only stops properly for streaming events. But
for sync calls that transition to input_required state, the consumer
doesn't treat them as final events and results in queue closed
exception.
Example test:
```py
task: Task= new_task(context.message)
result = await self.agent.invoke()
message = new_agent_text_message(result)
task.status = TaskStatus(state=TaskState.input_required, message=message)
event_queue.enqueue_event(task)
```1 parent 2c4f1a7 commit 51c2d8a
File tree
2 files changed
+20
-0
lines changed- src/a2a/server/events
- tests/server/events
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
0 commit comments