Skip to content
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

feat: add image support in chat #132

Merged
merged 6 commits into from
Nov 26, 2024
Merged

feat: add image support in chat #132

merged 6 commits into from
Nov 26, 2024

Conversation

kevin-on
Copy link
Collaborator

Image Support for Chat Messages

This PR adds support for image uploads and display in chat messages, enabling users to include images in their conversations.

Key Changes

  • Added image upload button in chat input
  • Image paste support via ImagePastePlugin
  • Preview of uploaded images in the chat interface
  • Add support for handling image content in messages across LLM providers

- Add support for pasting images directly into chat input
- Create new MentionableImage type for handling image data
- Add image preview in chat input alongside file content preview
- Add visual indicator for focused mentionable badge
- Add support for handling image content in messages across LLM providers (Anthropic, Gemini, Groq, OpenAI)
- Modify PromptGenerator to include image data URLs in message content
- Define new types for content parts (TextContent and ImageContentPart) in request.ts
- Add ImageUploadButton component for direct image uploads
- Refactor image handling to support multiple images at once
@kevin-on kevin-on linked an issue Nov 24, 2024 that may be closed by this pull request
Copy link
Owner

@glowingjade glowingjade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is getting too crowded. How about simplifying it by displaying only the icons without labels and using tooltips to inform users of each icon's purpose?

Screenshot 2024-11-25 at 3 27 06 PM

@glowingjade
Copy link
Owner

It looks like the drag and drop feature for images isn't working. Could you please take a look at that?

@kevin-on
Copy link
Collaborator Author

It looks like the drag and drop feature for images isn't working. Could you please take a look at that?

I didn't implement drag and drop feature yet. I'll check it out.

@kevin-on
Copy link
Collaborator Author

kevin-on commented Nov 25, 2024

Added support for image drag and drop and fix ChatUserInput style to be responsive.
Now model names are truncated like this:

image

glowingjade
glowingjade previously approved these changes Nov 25, 2024
@kevin-on kevin-on merged commit 5dc627f into main Nov 26, 2024
1 check passed
@kevin-on kevin-on deleted the feat/chat-image-support branch November 26, 2024 04:32
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.

feat: Support image inputs
2 participants