From 354a179f6d41d4492419d9a68b64f8f578b89041 Mon Sep 17 00:00:00 2001 From: Algorithm5838 <108630393+Algorithm5838@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:34:50 +0300 Subject: [PATCH] perf: skip processChineseContent for non-Chinese content (#23162) --- src/lib/utils/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 800ab5398..c8e4eb2ce 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -103,6 +103,7 @@ function isChineseChar(char: string): boolean { // Tackle "Model output issue not following the standard Markdown/LaTeX format" in Chinese. function processChineseContent(content: string): string { // This function is used to process the response content before the response content is rendered. + if (!/[\u4e00-\u9fa5]/.test(content)) return content; const lines = content.split('\n'); const processedLines = lines.map((line) => { if (/[\u4e00-\u9fa5]/.test(line)) {