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
commit fc63841169
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) => {