jacob-ai-bot / jacob

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

Add image upload feature to chat interface #42

Closed kleneway closed 3 months ago

kleneway commented 3 months 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 file picker dialog that opens when the button is clicked. 3. Create a function to send the selected image to the /api/image/upload API endpoint. 4. Save the returned URL and ensure it is passed along with future chat messages. 5. Implement image validation to ensure the file is under 20MB and either PNG or JPEG. 6. Display an error message using a toast notification if the upload fails or if a non-image file is uploaded. 7. Handle multiple image uploads in parallel. 8. Manage the loading state during the upload process.

Files to Update: /src/app/dashboard/[org]/[repo]/[developer]/components/chat/Chat.tsx

task assigned to: @jacob-ai-bot

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