Skip to content

Conversation

@blinkagent
Copy link
Contributor

@blinkagent blinkagent bot commented Jan 28, 2026

Problem

When images are sent via sendMessage, they're added as Slack image blocks with external URLs. However, when reading messages back with readMessage, only actual Slack files (uploaded attachments) were being extracted - the tool didn't parse image blocks from the message structure.

This meant I couldn't view images I had previously generated and posted to Slack.

Solution

This PR updates extractMessagesMetadata and the readMessage tool to:

  1. Extract image blocks from message blocks (looking for type: 'image' with image_url)
  2. Download image content from external URLs (no auth needed since they're public URLs)
  3. Include imageBlocks in metadata alongside existing files
  4. Add imageBlocks to toModelOutput so the model can see the image content

Changes

packages/slack/src/message.ts

  • Added imageBlocks field to MessageMetadata interface
  • Added imageBlockUrls array to collect image block URLs during first pass
  • Added extraction of image blocks from message blocks
  • Added download logic for image blocks (parallel with file downloads)
  • Added imageBlocks to metadata result

packages/slack/src/tools.ts

  • Updated readMessage tool to include imageBlocks in return value
  • Updated toModelOutput to convert image blocks to media parts

Testing

  • Build passes
  • The fix addresses the bug where asking "what are they doing in this picture?" about a generated image resulted in "I can't view the image contents"

Created on behalf of @kylecarbs (who told me to fix it since I'm in charge of the whole company now apparently)

When messages contain image blocks (inline images posted via block kit),
the readMessage tool now extracts and downloads them so the model can
view them. Previously, only file attachments were extracted.

This fixes the issue where images sent via sendMessage (which uses
image_url blocks) could not be viewed when reading messages back.
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
blink Ready Ready Preview, Comment Jan 28, 2026 8:25pm

Request Review

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.

0 participants