-
Notifications
You must be signed in to change notification settings - Fork 11.9k
webui: Allow editing file attachments when editing messages. #13645
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
base: master
Are you sure you want to change the base?
Conversation
<Dropzone | ||
noClick | ||
onDrop={(files: File[]) => { | ||
setIsDrag(false); | ||
extraContext.onFileAdded(files); | ||
}} | ||
onDragEnter={() => setIsDrag(true)} | ||
onDragLeave={() => setIsDrag(false)} | ||
multiple={true} | ||
> | ||
{({ getRootProps, getInputProps }) => ( | ||
<div | ||
className="flex flex-col w-full" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think copy-paste this whole code is not a good approach. It will make the code base become highly difficult to maintain in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, I've removed the old textarea and buttons in ChatMessage
and refactored ChatInput
to handle editing. Now ChatScreen
and ChatMessage
editing both use ChatInput
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't test this right now, could you upload a screen recording?
Btw thinking about the UI/UX, I think maybe we should redesign ChatInput
component to make it more flexible, so that it can be shown in the middle when user creates a new conversion (same UI on chatgpt/claude), this will also make the ChatInput
to looks better in the case we edit the message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds the ability to edit (add/remote) file attachments when editing messages.