pub struct Folio {
pub source: PathBuf,
pub recorded: Vec<Recorded>,
}Expand description
One rendered session: the unit the tool turns into a single HTML file.
Fields§
§source: PathBuf§recorded: Vec<Recorded>The session as read, in file order, so a harness note keeps its place among the turns it stands between.
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 the lines that carry conversation and the notes the harness wrote around them.
Sourcepub fn turns(&self) -> impl Iterator<Item = &Turn>
pub fn turns(&self) -> impl Iterator<Item = &Turn>
The conversation alone, for the figures that are about what the model was sent and what it wrote.
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.
Sourcepub fn panels(&self) -> Vec<Panel>
pub fn panels(&self) -> Vec<Panel>
Folds the raw stream into the display one: drops /clear boundaries,
merges each tool-result turn back into the assistant turn it answers so
a call and its result render as one panel, and lifts the turns the
harness wrote for itself out of the conversation and into glosses.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Folio
impl RefUnwindSafe for Folio
impl Send for Folio
impl Sync for Folio
impl Unpin for Folio
impl UnsafeUnpin for Folio
impl UnwindSafe for Folio
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more