From 6a25bdcf2de30489640e6cd9ca3d6d3ca95c61ff Mon Sep 17 00:00:00 2001 From: saikidev Date: Thu, 13 Feb 2025 16:48:15 +0800 Subject: [PATCH] fix display issue when a single newline appears after tag --- app/utils/chat.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/utils/chat.ts b/app/utils/chat.ts index efc496f2c..4187f3cf4 100644 --- a/app/utils/chat.ts +++ b/app/utils/chat.ts @@ -615,7 +615,8 @@ export function streamWithThink( if (chunk.content.includes("\n\n")) { const lines = chunk.content.split("\n\n"); remainText += lines.join("\n\n> "); - } else { + } else if (chunk.content != "\n") { + // deal with single newline after tag remainText += chunk.content; } }