diff --git a/supernote/server/services/processor_modules/summary.py b/supernote/server/services/processor_modules/summary.py index f08a0992..f174e81b 100644 --- a/supernote/server/services/processor_modules/summary.py +++ b/supernote/server/services/processor_modules/summary.py @@ -226,7 +226,7 @@ async def process( for seg in segments_data: date_range = seg.get("date_range", "Unknown Date") - text = seg.get("summary", "") + text = seg.get("summary", "").replace("\\n", "\n") dates = seg.get("extracted_dates", []) page_refs = seg.get("page_refs", []) diff --git a/supernote/server/static/js/api/client.js b/supernote/server/static/js/api/client.js index 8dfe7748..c4f5cb4f 100644 --- a/supernote/server/static/js/api/client.js +++ b/supernote/server/static/js/api/client.js @@ -179,7 +179,7 @@ export async function fetchTranscript(fileId) { 'Content-Type': 'application/json', 'x-access-token': currentToken }, - body: JSON.stringify({ fileId: parseInt(fileId) }) + body: JSON.stringify({ fileId: String(fileId) }) }); if (!response.ok) return ''; @@ -203,7 +203,7 @@ export async function fetchSummaries(fileId) { 'x-access-token': currentToken }, // Extension endpoint expects { fileId: ... } - body: JSON.stringify({ fileId: fileId }) + body: JSON.stringify({ fileId: String(fileId) }) }); if (!response.ok) {