fix build error

This commit is contained in:
sophie committed 2026-05-26 11:19:40 +08:00
1 parent 03570dbf5a
commit f3bd1334d0
1 file changed
+6 -6
+6 -6
View File
@@ -1614,16 +1614,16 @@ const confirmLeaveSubmission = async (msg: any) => {
}
};
const getMessageCopyText = (msg: { role?: string; content?: string; type?: string }) => {
const content = String(msg?.content ?? '').trim();
const getMessageCopyText = (message: { role?: string; content?: string; type?: string }) => {
const content = String(message?.content ?? '').trim();
if (content) return content;
return '';
};
const copyToClipboard = async (msg: { role?: string; content?: string; type?: string }, index: number) => {
const text = getMessageCopyText(msg);
const copyToClipboard = async (message: { role?: string; content?: string; type?: string }, index: number) => {
const text = getMessageCopyText(message);
if (!text) {
showMessageDialog('warning', t('chat.actions.copyEmpty'));
msg.warning(t('chat.actions.copyEmpty'));
return;
}
@@ -1636,7 +1636,7 @@ const copyToClipboard = async (msg: { role?: string; content?: string; type?: st
return;
}
showMessageDialog('error', t('chat.actions.copyFailed'));
msg.warning(t('chat.actions.copyFailed'));
};
const regenerate = () => {