refactor(chat): change file.type to file.data_type in ChatMessage component and ChatMessageType type definition

This commit is contained in:
Gabriel Almeida 2023-04-26 00:59:35 -03:00
commit 4292b95175
2 changed files with 5 additions and 5 deletions

View file

@ -58,7 +58,7 @@ export default function ChatMessage({ chat }: { chat: ChatMessageType }) {
<div key={index} className="my-2 w-full">
<FileCard
fileName={"Generated File"}
fileType={file.type}
fileType={file.data_type}
content={file.data}
/>
</div>

View file

@ -3,8 +3,8 @@ import { FlowType } from "../flow";
export type ChatType = { flow: FlowType; reactFlowInstance: ReactFlowInstance };
export type ChatMessageType = {
message: string;
isSend: boolean;
thought?: string;
files?: Array<{data:string,type:string}>;
message: string;
isSend: boolean;
thought?: string;
files?: Array<{ data: string; type: string; data_type: string }>;
};