Skip to content

feat(ui): display image attachments from tool results#21352

Open
neilli418 wants to merge 2 commits intoanomalyco:devfrom
neilli418:feat/tool-result-image-display
Open

feat(ui): display image attachments from tool results#21352
neilli418 wants to merge 2 commits intoanomalyco:devfrom
neilli418:feat/tool-result-image-display

Conversation

@neilli418
Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Tool results can include image attachments (typed as FilePart with an image mime type), but the UI currently doesn't display them. This PR adds clickable image thumbnails below completed tool results.

How did you verify your code works?

Tested with MCP tools and the built-in webfetch tool that return image attachments. Verified:

  • Thumbnails appear below the tool result when images are present
  • Clicking opens full-size preview in the dialog
  • Non-image attachments are unaffected
  • No rendering when tool is still running

Screenshots / recordings

Screenshot 2026-04-07 at 11 17 25 AM Screenshot 2026-04-07 at 11 17 12 AM Screenshot 2026-04-07 at 11 30 47 AM

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants