🚀 feat: Enhance Message Editing with File Resubmission (#2347)

* chore: fix type issue with File Table fakeData

* refactor: new lazy loading image strategy and load images/files as part of Message Container

* feat: resubmit files when editing messages with attached files
This commit is contained in:
Danny Avila 2024-04-07 13:25:24 -04:00 committed by GitHub
parent caabab4489
commit 3411d7a543
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 122 additions and 90 deletions

View file

@ -53,11 +53,11 @@ export default function Part({
}
if (part.type === ContentTypes.ERROR) {
return <ErrorMessage text={part[ContentTypes.TEXT].value} className="my-2" />;
return <ErrorMessage message={message} text={part[ContentTypes.TEXT].value} className="my-2" />;
} else if (part.type === ContentTypes.TEXT) {
// Access the value property
return (
<Container>
<Container message={message}>
<div className="markdown prose dark:prose-invert light dark:text-gray-70 my-1 w-full break-words">
<DisplayMessage
text={part[ContentTypes.TEXT].value}
@ -104,7 +104,7 @@ export default function Part({
if (isImageVisionTool(toolCall)) {
if (isSubmitting && showCursor) {
return (
<Container>
<Container message={message}>
<div className="markdown prose dark:prose-invert light dark:text-gray-70 my-1 w-full break-words">
<DisplayMessage
text={''}