pub struct Folio {
pub source: PathBuf,
pub turns: Vec<Turn>,
}Expand description
One rendered session: the unit the tool turns into a single HTML file.
Fields§
§source: PathBuf§turns: Vec<Turn>Implementations§
Source§impl Folio
impl Folio
Sourcepub fn read(source: &Path) -> Result<Self>
pub fn read(source: &Path) -> Result<Self>
Reads a session JSONL file, keeping only the lines that carry conversation.
pub fn session_id(&self) -> &str
Sourcepub fn peek(source: &Path) -> SessionPeek
pub fn peek(source: &Path) -> SessionPeek
Cheaply scans a session’s listing metadata (its title and working
directory) without parsing the conversation, tolerating malformed lines
so one bad session never breaks a picker that lists every session. This
is deliberately lenient where Folio::read is strict: a label is
best-effort, a render is not.
Sourcepub fn output(&self) -> Option<u64>
pub fn output(&self) -> Option<u64>
The output across the session, or None when no turn reports usage.
Output totals, since each turn produces its own.
Sourcepub fn largest_input(&self) -> Option<u64>
pub fn largest_input(&self) -> Option<u64>
The largest input any one turn took, or None when no turn reports
usage: how big the conversation ever got. A high-water mark rather than
a sum, since every turn is sent the whole conversation and summing that
would count the same text once per turn that saw it.