Skip to content

Commit 4095f20

Browse files
committed
feat(prompt-input): add file property to attachment messages for persistent storage
1 parent ce0f8cb commit 4095f20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/elements/src/prompt-input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export const PromptInputActionAddAttachments = ({
430430

431431
export type PromptInputMessage = {
432432
text: string;
433-
files: FileUIPart[];
433+
files: (FileUIPart & { file?: File })[];
434434
};
435435

436436
export type PromptInputProps = Omit<
@@ -731,7 +731,7 @@ export const PromptInput = ({
731731
return item;
732732
})
733733
)
734-
.then((convertedFiles: FileUIPart[]) => {
734+
.then((convertedFiles: (FileUIPart & { file?: File })[]) => {
735735
try {
736736
const result = onSubmit({ text, files: convertedFiles }, event);
737737

0 commit comments

Comments
 (0)