fix display issue when a single newline appears after <think> tag

This commit is contained in:
saikidev 2025-02-13 16:48:15 +08:00
parent a899e9aceb
commit 6a25bdcf2d

View File

@ -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 <think> tag
remainText += chunk.content;
}
}