jacob-ai-bot / jacob

Just Another Coding Bot
https://jacb.ai
Apache License 2.0
84 stars 10 forks source link

Add image upload feature to chat interface #44

Open kleneway opened 1 month ago

kleneway commented 1 month ago

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:

Files to Update:

Acceptance Criteria:

@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

jacob-ai-bot[bot] commented 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.

jacob-ai-bot[bot] commented 1 month ago

Update

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.

jacob-ai-bot[bot] commented 1 month ago

Update

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.

jacob-ai-bot[bot] commented 1 month ago

Update

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.

jacob-ai-bot[bot] commented 1 month ago

Update

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.

jacob-ai-bot[bot] commented 1 month ago

Update

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.