fix(backend/copilot): handle blank lines in validate_transcript

Skip empty lines instead of treating them as parse errors,
preventing silent data loss from transcripts with blank lines.

Addresses PR comment #2894841670
This commit is contained in:
Zamil Majdy
2026-03-06 19:02:12 +07:00
parent 203bf2ca32
commit ad7044995e

View File

@@ -223,6 +223,8 @@ def validate_transcript(content: str | None) -> bool:
has_assistant = False
for line in lines:
if not line.strip():
continue
try:
entry = json.loads(line)
if entry.get("type") == "assistant":