fix build error
This commit is contained in:
1 parent
03570dbf5a
commit
f3bd1334d0
1 file changed
+6
-6
@@ -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 = () => {
|
||||
|
||||
Reference in new issue
Block a user