fix(session): preserve Unicode separators during JSONL migration

This commit is contained in:
Jin Long authored and chengyongru committed 2026-10-18 19:30:29 +08:00
1 parent 0a8b18fa58
commit ba406fc624
2 files changed
+25 -1

No files matched your search

+2 -1
View File
@@ -92,7 +92,8 @@ def read_jsonl(path: Path) -> tuple[Session, list[_LegacyFile]]:
messages: list[dict[str, Any]] = []
provider: ProviderConversationState | None = None
provider_seen = False
for line in source.content.decode("utf-8").splitlines():
# Unicode line separators are valid inside legacy JSON strings.
for line in source.content.decode("utf-8").split("\n"):
if not line.strip():
continue
item = _record(line)