mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-05 06:41:26 +08:00
fix: improve text handling in append_text function and add test for newline preservation
This commit is contained in:
@@ -517,7 +517,7 @@ def _split_web_agent_output(text: str) -> list[dict]:
|
||||
|
||||
def append_text(content: str) -> None:
|
||||
"""将工具汇总行从普通文本中拆出,便于前端独立展示。"""
|
||||
if not content or not content.strip():
|
||||
if not content:
|
||||
return
|
||||
lines = content.splitlines(keepends=True)
|
||||
buffer = ""
|
||||
|
||||
Reference in New Issue
Block a user