Commit 8f12c5b
committed
fix(agent): send final streaming message with isComplete: true
When the LLM stream finishes, the finish_reason typically arrives in a
separate content-less chunk. Since we only send assistant_streaming_message
for chunks with content, the last streaming message always had
isComplete: false, causing the Web UI to appear stuck in streaming state.
Send a final assistant_streaming_message with isComplete: true after the
stream loop completes when content was streamed and finishReason is set.
Closes #8331 parent 239b654 commit 8f12c5b
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| |||
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| 387 | + | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
420 | 434 | | |
421 | 435 | | |
422 | 436 | | |
| |||
0 commit comments