mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
fix: strip segment text to remove extra blank lines in segmented reply (#8304)
* fix: strip segment text to remove extra blank lines in segmented reply Fixes #8300 * refactor: optimize seg.strip() per PR review suggestion
This commit is contained in:
@@ -245,7 +245,8 @@ class ResultDecorateStage(Stage):
|
||||
for seg in split_response:
|
||||
if self.content_cleanup_rule:
|
||||
seg = re.sub(self.content_cleanup_rule, "", seg)
|
||||
if seg.strip():
|
||||
seg = seg.strip()
|
||||
if seg:
|
||||
new_chain.append(Plain(seg))
|
||||
else:
|
||||
# 非 Plain 类型的消息段不分段
|
||||
|
||||
Reference in New Issue
Block a user