pub struct SessionTree {
pub rows: Vec<TreeRow>,
pub session_id: String,
pub file_path: String,
pub source: SessionSource,
/* private fields */
}Expand description
The full parsed session tree.
Fields§
§rows: Vec<TreeRow>Flattened display rows (only user/assistant messages)
session_id: StringSession metadata
file_path: String§source: SessionSourceImplementations§
Source§impl SessionTree
impl SessionTree
Sourcepub fn from_file(file_path: &str) -> Result<Self, String>
pub fn from_file(file_path: &str) -> Result<Self, String>
Parse a JSONL session file into a tree structure.
Sourcepub fn branch_count(&self) -> usize
pub fn branch_count(&self) -> usize
Number of branch points (nodes with >1 child in display graph)
Sourcepub fn get_full_content(&self, uuid: &str) -> Option<String>
pub fn get_full_content(&self, uuid: &str) -> Option<String>
Get the full content of a message by reading its JSONL line from file.
Auto Trait Implementations§
impl Freeze for SessionTree
impl RefUnwindSafe for SessionTree
impl Send for SessionTree
impl Sync for SessionTree
impl Unpin for SessionTree
impl UnsafeUnpin for SessionTree
impl UnwindSafe for SessionTree
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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