-
Notifications
You must be signed in to change notification settings - Fork 14
Generated with Hive: Start tasks with images as an attachment #2851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kevkevinpal
wants to merge
11
commits into
master
Choose a base branch
from
bugfix/fix-image-display-405-error-1769627388
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Generated with Hive: Start tasks with images as an attachment #2851
kevkevinpal
wants to merge
11
commits into
master
from
bugfix/fix-image-display-405-error-1769627388
Conversation
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
- Add drag-and-drop file upload with visual feedback overlay - Add file picker button for image selection - Display image previews above card with remove functionality - Support paste from clipboard - Validate file types (JPEG, PNG, GIF, WebP) and size (10MB limit) - Pass image files to onStart callback for task creation - Disable image upload in agent and workflow modes - Complete implementation matching ChatInput functionality
- Update handleStart to accept images parameter from TaskStartInput - Upload each image to S3 using presigned URLs after task creation - Pass attachment metadata (s3Path, filename, mimeType, size) to sendMessage - Handle upload errors gracefully with toast notifications - Continue task creation even if image upload fails
- Add attachments to ChatMessage UI creation in sendMessage - Convert attachment metadata to Attachment objects for display - Add image grid display in ChatMessage component below message bubble - Use presigned URL endpoint to fetch and display images - Support multiple images in 2-column grid layout - Images display for both USER and ASSISTANT messages
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
- Made image attachments clickable with cursor-pointer and hover effect - Added Dialog modal for enlarged image view with dark backdrop - Added close button (X) and backdrop click-to-close functionality - Images display at full size (max 95vw/90vh) centered on screen - Uses shadcn Dialog component for accessibility
…ame instead of fileName) Fixed TypeScript error where attachment.s3Key was used instead of attachment.path and attachment.fileName was used instead of attachment.filename to match the Prisma schema definition.
- Reverted to commit 97be8c6 and rebuilt with fallback UI - Added state tracking for failed images - Show placeholder UI with filename and error message when image fails - Placeholder displays: image icon, filename, and 'Failed to load image' text - Non-clickable for failed images, maintains click-to-enlarge for working ones - Re-applied fix to ensure attachments included in API response - Graceful degradation: users see what failed instead of empty space
63c44ca to
e31b215
Compare
The attachment objects were being created with wrong field names: - s3Key -> path (Prisma uses 'path') - fileName -> filename - fileType -> mimeType - fileSize -> size This caused attachments to have undefined 'path' values when rendered, resulting in 'undefined' being passed to the presigned URL endpoint. Now attachments are created with the correct Prisma schema fields: id, messageId, path, filename, mimeType, size, createdAt, updatedAt
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.
Summary
Right now we have no way of including images so that hive can give us results based on those
This PR lets a user add an image/attachment to their task (async) and then it is saved to s3 and that url is sent to Stakwork to process the image