fix(chat): export the complete conversation across PDF pages (#6921)

This commit is contained in:
red person
2026-11-03 00:30:07 +00:00
committed by GitHub
parent 596e1421e4
commit 1e34f938cc
4 changed files with 118 additions and 16 deletions
+12 -1
View File
@@ -561,10 +561,21 @@ function initializeEventListeners() {
// Export: PDF
const exportPdfBtn = el('export-pdf-btn');
let preparingPdf = false;
if (exportPdfBtn) {
exportPdfBtn.addEventListener('click', (e) => {
exportPdfBtn.addEventListener('click', async (e) => {
e.stopPropagation();
exportMenu.classList.remove('open');
if (preparingPdf) return;
preparingPdf = true;
try {
await sessionModule.prepareHistoryForPrint();
} catch (error) {
uiModule.showError(error?.message || 'Could not prepare the chat for PDF export.');
return;
} finally {
preparingPdf = false;
}
const meta = sessionModule.getSessions().find(s => s.id === sessionModule.getCurrentSessionId());
const sessionName = meta ? meta.name : 'Odysseus Chat';
const originalTitle = document.title;