Archive each chunk in its own folder, and add a stop to a verdict already archived

This commit is contained in:
2026-10-02 16:40:30 +02:00
parent 236ee08a59
commit aca7594658
8 changed files with 62 additions and 31 deletions
@@ -14,6 +14,12 @@ def read_transcript(path: str) -> list[dict] | Failure:
return Failure(f"could not read the transcript {path}: {failure.strerror}")
# The lines before it, such as the session's title, are the same for every chunk of a project.
def first_timestamped_line(raw: bytes) -> bytes:
lines = raw.splitlines()
return next((line for line in lines if "timestamp" in (parse_entry(line) or {})), lines[0] if lines else b"")
def human_turns(entries: list[dict]) -> int:
return sum(1 for entry in entries if human_text(entry) is not None)