mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 05:39:05 +08:00
refactor: Rename onResend to onResendUserMessage for clarity
This commit is contained in:
parent
af1a9868db
commit
da6c80ebc2
@ -155,7 +155,7 @@ const MessageMenubar: FC<Props> = (props) => {
|
|||||||
resendMessage && onResend()
|
resendMessage && onResend()
|
||||||
}, [message, onEditMessage, onResend, t])
|
}, [message, onEditMessage, onResend, t])
|
||||||
|
|
||||||
const onResend = useCallback(async () => {
|
const onResendUserMessage = useCallback(async () => {
|
||||||
await onEditMessage?.({ ...message, content: message.content })
|
await onEditMessage?.({ ...message, content: message.content })
|
||||||
onResend && onResend()
|
onResend && onResend()
|
||||||
}, [message, onEditMessage, onResend])
|
}, [message, onEditMessage, onResend])
|
||||||
@ -300,7 +300,7 @@ const MessageMenubar: FC<Props> = (props) => {
|
|||||||
<MenusBar className={`menubar ${isLastMessage && 'show'}`}>
|
<MenusBar className={`menubar ${isLastMessage && 'show'}`}>
|
||||||
{message.role === 'user' && (
|
{message.role === 'user' && (
|
||||||
<Tooltip title={t('common.regenerate')} mouseEnterDelay={0.8}>
|
<Tooltip title={t('common.regenerate')} mouseEnterDelay={0.8}>
|
||||||
<ActionButton className="message-action-button" onClick={onResend}>
|
<ActionButton className="message-action-button" onClick={onResendUserMessage}>
|
||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user