diff --git a/frontend/src/views/ChatView.vue b/frontend/src/views/ChatView.vue index b7fe7054..d08e225c 100644 --- a/frontend/src/views/ChatView.vue +++ b/frontend/src/views/ChatView.vue @@ -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 = () => {