This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-01 02:53:22 -05:00
1 parent 0016266c06
commit 4b08d65597
5 files changed
+25 -13

No files matched your search

+3 -1
View File
@@ -7,6 +7,7 @@
import { downloadChatAsPDF } from '$lib/apis/utils';
import { copyToClipboard, createMessagesList } from '$lib/utils';
import { getOutputText } from '$lib/components/chat/Messages/structuredOutput';
import {
showControls,
@@ -59,7 +60,8 @@
const history = chat.chat.history;
const messages = createMessagesList(history, history.currentId);
const chatText = messages.reduce((a, message, i, arr) => {
return `${a}### ${message.role.toUpperCase()}\n${message.content}\n\n`;
const content = getOutputText(message.output) || message.content || '';
return `${a}### ${message.role.toUpperCase()}\n${content}\n\n`;
}, '');
return chatText.trim();