fix: chat log not showing correctly (#9777)

This commit is contained in:
Hash Brown
2024-10-24 16:21:50 +08:00
committed by GitHub
parent b674c598f9
commit fc63841169
2 changed files with 69 additions and 88 deletions

View File

@@ -1,5 +1,6 @@
import type { ThoughtItem } from '@/app/components/base/chat/chat/type'
import type { FileEntity } from '@/app/components/base/file-uploader/types'
import type { VisionFile } from '@/types/app'
export const sortAgentSorts = (list: ThoughtItem[]) => {
if (!list)
@@ -11,7 +12,7 @@ export const sortAgentSorts = (list: ThoughtItem[]) => {
return temp
}
export const addFileInfos = (list: ThoughtItem[], messageFiles: FileEntity[]) => {
export const addFileInfos = (list: ThoughtItem[], messageFiles: (FileEntity | VisionFile)[]) => {
if (!list || !messageFiles)
return list
return list.map((item) => {