Skip to main content

Module reader

Module reader 

Source
Expand description

JSONL parsing + session assembly for Pi session files.

Structs§

PiSession
In-memory representation of a Pi session file (plus optional parent).
SessionMeta
Lightweight summary of a session on disk.

Constants§

DEFAULT_MAX_PARENT_DEPTH
Default maximum depth when following parentSession chains.

Functions§

count_entries
Count the number of non-header entries in a session file (by counting non-empty lines and subtracting 1 for the header).
list_session_files
List all *.jsonl session files in a project’s directory, sorted by modification time descending (newest first).
peek_header
Public: read only the header of a session file. Used by io.rs to build SessionMeta without parsing every entry.
read_session
Read a session by ID from within a project.
read_session_from_file
Read and parse a session JSONL file. Does NOT follow parentSession.
read_session_with_parent
Read a session and, if it has a parentSession, recursively attach the parent.