ai-chatbot icon indicating copy to clipboard operation
ai-chatbot copied to clipboard

feat: Add clipboard image paste support

Open teeverc opened this issue 1 year ago • 1 comments

This pull request introduces a new feature to handle image pasting in the PureMultimodalInput component. The main changes include adding a paste event listener and handling the image upload process.

Key changes:

  • components/multimodal-input.tsx:
    • Added handlePaste function to process pasted images, upload them, and update the attachments state.
    • Added a useEffect hook to attach and detach the paste event listener to the textarea element.

Supports:

  • Ctrl+v
  • Right click paste

teeverc avatar Dec 21 '24 08:12 teeverc

@teeverc is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 21 '24 08:12 vercel[bot]

Nice addition @teeverc - thanks!

haydenbleasel avatar Nov 01 '25 01:11 haydenbleasel