mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
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
6f21844603
commit
053dd647ec
@ -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…
Reference in New Issue
Block a user