Repository navigation
fix(converters): preserve user image attachments across adjacent message merging - #286
Open
AhmedAttia3 wants to merge 1 commit into
Open
AhmedAttia3 wants to merge 1 commit into
AhmedAttia3 wants to merge 1 commit into
Conversation
…age merging When adjacent user messages are merged (e.g. tool result followed by user message with images), merge_adjacent_messages combined text and tool results but discarded detached user images lists. Merges images lists in order without mutating caller input lists, preserving tool results and image counts. Added unit test coverage for core, OpenAI, and Anthropic converters; updated English and Russian ARCHITECTURE.md.
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
During tool continuation flows, a tool result message is often followed immediately by a user message containing image attachments (
image_urldata URLs). Inconverters_core.py::merge_adjacent_messages, adjacent user messages were merged by combining text andtool_results, butimageslists on subsequent user messages were omitted, dropping multi-modal images from the generated Kiro payload.Fix
Merge user
imageslists in order inmerge_adjacent_messageswithout list-alias mutation (last.images = list(last.images) + list(msg.images)), preserving tool calls, tool results, and image counts across merged adjacent user messages.Tests & Verification
test_converters_core.py,test_converters_openai.py,test_converters_anthropic.py).list(last.images) + list(msg.images)).view_imageflows against live Kiro backend; image descriptions succeeded and verified.