fix delete log annotation (#4201)

Co-authored-by: langyong <langyong@lixiang.com>
This commit is contained in:
Louie Long 2024-05-09 12:53:06 +08:00 committed by GitHub
parent a79941df22
commit ca5081e327
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 7 deletions

View File

@ -260,11 +260,7 @@ const Chat: FC<IChatProps> = ({
return {
...item,
content: item.content,
annotation: {
...(item.annotation || {}),
id: '',
logAnnotation: undefined, // remove log
} as Annotation,
annotation: undefined,
}
}
return item

View File

@ -137,8 +137,8 @@ const getFormattedChatList = (messages: ChatMessage[], conversationId: string, t
if (item.annotation) {
return {
id: '',
authorName: '',
id: item.annotation.id,
authorName: item.annotation.account.name,
logAnnotation: item.annotation,
created_at: 0,
}

View File

@ -57,6 +57,7 @@ export type ModelConfigDetail = {
}
export type LogAnnotation = {
id: string
content: string
account: {
id: string