Commit 8e8f7ef
committed
Fix: Correct message part ordering in A2A history
The previous logic iterated through session events in reverse and then
reversed the resulting list of parts. This caused incorrect ordering for
multi-part messages generated by `_present_other_agent_message`.
Specifically, introductory text like "For context:" was appearing after
the content it was meant to introduce.
This change simplifies the implementation by removing both reversals. It now
processes events in chronological order, ensuring all message parts are
appended in the correct sequence.
Signed-off-by: Eran Cohen <eranco@redhat.com>1 parent 955632c commit 8e8f7ef
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
0 commit comments