Parse each transcript entry once into a typed value naming its kind, and have every consumer read those types
This commit is contained in:
@@ -13,8 +13,8 @@ from branch_chunks.cut import BranchChunk
|
||||
from transcript_archive.project_key import checkout_of
|
||||
from routing_figures.chunk import Chunk, chunk_figures, ChunkFigures, Subagent
|
||||
from git_cli.git_repo import default_ref, Git
|
||||
from claude_code.entries import Entry, parse_entry
|
||||
from failure import Failure
|
||||
from claude_code.entries import parse_entry
|
||||
from records.file_writes import replace_file
|
||||
from transcript_archive.outcomes import VERDICT_AT
|
||||
|
||||
@@ -104,7 +104,7 @@ def branch_history(checkout: str, git: Git) -> list[BranchChunk] | Failure:
|
||||
return ref if isinstance(ref, Failure) else branch_chunks(ref, functools.partial(git, cwd=checkout, timeout=GIT_TIMEOUT, guarded=True))
|
||||
|
||||
|
||||
def entries(path: pathlib.Path) -> list[dict]:
|
||||
def entries(path: pathlib.Path) -> list[Entry]:
|
||||
with open(path, "rb") as handle:
|
||||
return [entry for line in handle if (entry := parse_entry(line))]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user