Open kleneway opened 1 month ago
JACoB here...
You mentioned me on this issue and I am busy taking a look at it.
I'll continue to comment on this issue with status as I make progress.
I've completed my initial work on this issue and have created a pull request: JACoB PR for Issue Add image upload feature to chat interface.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
I've updated this pull request: JACoB PR for Issue Add image upload feature to chat interface.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
I've updated this pull request: JACoB PR for Issue Add image upload feature to chat interface.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
I've updated this pull request: JACoB PR for Issue Add image upload feature to chat interface.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
I've updated this pull request: JACoB PR for Issue Add image upload feature to chat interface.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
Add Image Upload Feature to Chat Interface
Description:
Add a new button to the chat interface that allows users to upload an image. The image will be sent to the
/api/image/upload
API endpoint, and the returned URL will be saved and passed along with future chat messages to the backend.Requirements:
/api/image/upload
API endpoint.Files to Update:
src/app/dashboard/[org]/[repo]/[developer]/components/chat/Chat.tsx
Acceptance Criteria:
/api/image/upload
API endpoint and URL is returned.@jacob-ai-bot
Steps to Address Issue: 1. Add an upload button with an upload icon to the chat interface. 2. Implement a function to open a file picker dialog when the button is clicked. 3. Implement image validation to ensure the file is under 20MB and either PNG or JPEG. 4. Implement the functionality to send the selected image to the /api/image/upload API endpoint. 5. Handle the response from the API and save the returned URL. 6. Pass the URL along with future chat messages to the backend. 7. Display an error message using a toast notification if the upload fails or if a non-image file is uploaded. 8. Manage the loading state during the upload process. 9. Ensure the upload button is placed to the left of the send message button. 10. Implement functionality to handle multiple image uploads in parallel.
Files to Update: /src/app/dashboard/[org]/[repo]/[developer]/components/chat/Chat.tsx
task assigned to: @jacob-ai-bot