From 31b5bb2b0d74c7af57b576fde0721f0c0b6821ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=83=E5=B2=9A=E4=B9=8B=E5=A4=8F?= <108566281+Blueteemo@users.noreply.github.com> Date: Sat, 23 May 2026 13:58:01 +0000 Subject: [PATCH] fix: strip segment text to remove extra blank lines in segmented reply Fixes #8300 --- astrbot/core/pipeline/result_decorate/stage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrbot/core/pipeline/result_decorate/stage.py b/astrbot/core/pipeline/result_decorate/stage.py index 7e5d2287f2..1f667f976a 100644 --- a/astrbot/core/pipeline/result_decorate/stage.py +++ b/astrbot/core/pipeline/result_decorate/stage.py @@ -246,7 +246,7 @@ async def process( if self.content_cleanup_rule: seg = re.sub(self.content_cleanup_rule, "", seg) if seg.strip(): - new_chain.append(Plain(seg)) + new_chain.append(Plain(seg.strip())) else: # 非 Plain 类型的消息段不分段 new_chain.append(comp) @@ -368,7 +368,7 @@ async def process( return if time.time() - render_start > 3: logger.warning( - "文本转图片耗时超过了 3 秒,如果觉得很慢可以使用 /t2i 关闭文本转图片模式。", + "文本转图片耗时超过了 3 秒,如果觉得很慢可以在 WebUI 中关闭文本转图片模式。", ) if url: if url.startswith("http"):