feat: annotation management frontend (#1764)
This commit is contained in:
parent
96d2de2258
commit
65fd4b39ce
122 changed files with 4718 additions and 214 deletions
|
|
@ -613,6 +613,22 @@ const Main: FC<IMainProps> = ({
|
|||
))
|
||||
}
|
||||
},
|
||||
onAnnotationReply: (annotationReply) => {
|
||||
responseItem.content = annotationReply.answer
|
||||
const newListWithAnswer = produce(
|
||||
getChatList().filter(item => item.id !== responseItem.id && item.id !== placeholderAnswerId),
|
||||
(draft) => {
|
||||
if (!draft.find(item => item.id === questionId))
|
||||
draft.push({ ...questionItem })
|
||||
|
||||
draft.push({
|
||||
...responseItem,
|
||||
id: annotationReply.id,
|
||||
})
|
||||
})
|
||||
setChatList(newListWithAnswer)
|
||||
tempNewConversationId = annotationReply.conversation_id
|
||||
},
|
||||
onError() {
|
||||
setResponsingFalse()
|
||||
// role back placeholder answer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue