From 63a9bb9fe2d5f6ddcd9c83a76be75d8e25e6f188 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Fri, 14 Feb 2025 14:05:14 +0800 Subject: [PATCH] fix: remove references tag in output --- src/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 17946100..28e6e2b7 100644 --- a/src/app.ts +++ b/src/app.ts @@ -41,13 +41,13 @@ function buildMdFromAnswer(answer: AnswerAction) { return `[^${i + 1}]: [${escapedQuote}](${ref.url})`; }).join('\n\n'); - return `${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)} + return ` +${answer.answer.replace(/\(REF_(\d+)\)/g, (_, num) => `[^${num}]`)} - ${references} -`; +`.trim(); } async function* streamTextNaturally(text: string, streamingState: StreamingState) {