feat: add new branch option to message menubar

This commit is contained in:
kangfenmao 2025-01-02 13:41:51 +08:00
parent 5f55d8c22c
commit 3fc7911c97

View File

@ -156,9 +156,15 @@ const MessageMenubar: FC<Props> = (props) => {
key: 'edit',
icon: <EditOutlined />,
onClick: onEdit
},
{
label: t('chat.message.new.branch'),
key: 'new-branch',
icon: <ForkOutlined />,
onClick: onNewBranch
}
],
[message, onEdit, t]
[message, onEdit, onNewBranch, t]
)
const onAtModelRegenerate = async () => {
@ -212,13 +218,6 @@ const MessageMenubar: FC<Props> = (props) => {
</ActionButton>
</Tooltip>
)}
{isAssistantMessage && (
<Tooltip title={t('chat.message.new.branch')} mouseEnterDelay={0.8}>
<ActionButton className="message-action-button" onClick={onNewBranch}>
<ForkOutlined />
</ActionButton>
</Tooltip>
)}
{!isUserMessage && (
<Dropdown
menu={{