pub struct SessionSummary {
pub name: Option<String>,
pub preview: Option<String>,
pub empty: bool,
pub bytes: u64,
}Expand description
A cheap, display-oriented summary of one JSONL session file.
The session pickers (-r and /session) need enough context to tell saved
sessions apart. The header-only [JsonlSessionMetadata] carries no name and
no transcript, so a list built from it renders as a wall of identical
2026-09-25T15-05-15-847Z_… file names — including the many header-only
sessions an abandoned launch leaves behind. This reads just the head (and a
small tail, for a late --name//name fact) of the file to recover:
- the session display name, when one was recorded;
- the first user prompt, single-lined and truncated, for a readable label;
- whether the file is header-only (nothing to resume).
It intentionally does not parse the whole log: sessions can be tens of megabytes, and the picker runs over every session at startup.
Fields§
§name: Option<String>The session display name (--name / /name), if one was recorded.
preview: Option<String>The first user prompt, single-lined and trimmed to a label-sized length.
empty: boolTrue when the file holds only its header (a session with no content).
bytes: u64On-disk size in bytes (a rough content-volume hint for the picker).
Trait Implementations§
Source§impl Clone for SessionSummary
impl Clone for SessionSummary
Source§impl Debug for SessionSummary
impl Debug for SessionSummary
Source§impl Default for SessionSummary
impl Default for SessionSummary
impl Eq for SessionSummary
Source§impl PartialEq for SessionSummary
impl PartialEq for SessionSummary
impl StructuralPartialEq for SessionSummary
Auto Trait Implementations§
impl Freeze for SessionSummary
impl RefUnwindSafe for SessionSummary
impl Send for SessionSummary
impl Sync for SessionSummary
impl Unpin for SessionSummary
impl UnsafeUnpin for SessionSummary
impl UnwindSafe for SessionSummary
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().