fix issue#762: upon clicking to resend, the conversation content is cleared.
If there is no subsequent message or if the next message is from the user, this message should be resent. delete the old message after processing is complete.
This commit is contained in:
parent
8eac836e05
commit
e4f4c6cd86
@ -96,9 +96,9 @@ const MessageMenubar: FC<Props> = (props) => {
|
||||
})
|
||||
}
|
||||
|
||||
if (!nextMessage) {
|
||||
onDeleteMessage?.(message)
|
||||
if (!nextMessage || nextMessage.role === 'user') {
|
||||
EventEmitter.emit(EVENT_NAMES.SEND_MESSAGE, { ...message, id: uuid() })
|
||||
onDeleteMessage?.(message)
|
||||
}
|
||||
}, [assistantModel?.id, message, model?.id, onDeleteMessage, onGetMessages])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user