fix: queued messages with only images now properly sent to UI and LLM #11026
+82
−26
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.
Related GitHub Issue
Closes: Linear issue EXT-639
Roo Code Task Context (Optional)
N/A
Description
Fixes a bug where queued messages containing only images (no text) would vanish after being dequeued without being shown in the UI or sent to the LLM.
Root cause:
processQueuedMessagescalledsubmitUserMessagewhich setsaskResponsevalues, but those values are only consumed when there is a pendingask(). When called after tool execution (no pending ask), the content was lost - this was especially problematic for image-only messages.Fix: Changed
processQueuedMessagesto directly:say("user_feedback", ...)userMessageContentarray for the next LLM requesthasText || hasImagescheck (previously the logic only worked when text was present)Test Procedure
cd src && npx vitest run core/task/__tests__/Task.spec.tsPre-Submission Checklist
Screenshots / Videos
N/A - backend logic change, no UI changes
Documentation Updates
Additional Notes
Key changes in
Task.ts:processQueuedMessages()now directly adds queued message content touserMessageContentarrayformatResponse.imageBlocks()to convert image data URLs to proper Anthropic ImageBlockParam format<user_message>tags consistent with other user feedback handlingGet in Touch
N/A - this is an automated fix from Roo Code Cloud
Important
Fixes
processQueuedMessages()inTask.tsto correctly handle image-only messages and updates tests to verify this behavior.processQueuedMessages()inTask.tsto handle image-only messages by checkinghasText || hasImages.userMessageContentusingformatResponse.imageBlocks().Task.spec.tsto verify handling of image-only messages.This description was created by
for ef66ce6. You can customize this summary. It will automatically update as commits are pushed.