Skip to content

Conversation

gary149
Copy link
Collaborator

@gary149 gary149 commented Sep 26, 2025

Summary

  • Add support for image attachments in router examples
  • Add "Weird painting" example with castle image

Changes

  • Add RouterExampleAttachment type with src field
  • Add attachments field to RouterExample type
  • Implement image loading in startExample function to fetch and attach files
  • Add castle-example.jpg to static assets
  • Add "Weird painting" example that demonstrates image attachment functionality

Test plan

  • Click "Weird painting" example button
  • Verify castle image loads and attaches to the message
  • Verify prompt "is this a real painting?" appears in input
  • Submit and verify model receives the image attachment

- Simplified RouterExampleAttachment type to only require src field
- Removed resolveExampleSrc helper function in favor of direct path construction
- Let browser infer MIME types from blob response
- Reduced code complexity while maintaining functionality
@gary149 gary149 changed the title Simplify image attachment implementation for router examples Add image attachment support to router examples Sep 26, 2025
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.

1 participant