Commit f3ced9c
committed
fix(agent): await endExecution in onAgentLoopEnd for streaming mode
In streaming mode, onAgentLoopEnd called endExecution() as fire-and-forget
(.catch() without await), so the cleanup handler that sends the
agent_run_end event could complete after the method returned. This caused
the Web UI to never receive the termination signal, leaving it stuck in
a spinning state.
Properly await endExecution() to ensure the agent_run_end event is sent
before the streaming promise chain completes.
Closes #10611 parent 239b654 commit f3ced9c
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
620 | 622 | | |
621 | | - | |
| 623 | + | |
622 | 624 | | |
623 | 625 | | |
624 | 626 | | |
| |||
0 commit comments