pub struct SessionInfo {
pub id: String,
pub messages: usize,
pub updated_ms: u64,
pub preview: String,
pub title: Option<String>,
pub origin: String,
pub pinned: bool,
pub archived: bool,
pub cost: Option<TurnCost>,
}Fields§
§id: String§messages: usize§updated_ms: u64Unix milliseconds of the last record (0 if empty/unknown).
preview: StringFirst user message, truncated.
title: Option<String>Name set with rename, if any.
origin: StringWhere the session came from: native, jsonl (imported) or subagent:<parent>:<route>.
pinned: boolSet with pin: the session sorts first in every listing and no retention policy
deletes it.
archived: boolSet with archive: out of every listing, still in the search, and out of a prune’s
reach unless the prune asks for it (#240).
cost: Option<TurnCost>The last turn’s numbers, so a row can show what a session cost without a run in flight
(#344). None for a session that has never finished a turn.
Implementations§
Source§impl SessionInfo
impl SessionInfo
Sourcepub fn subagent(&self) -> Option<SubagentOrigin<'_>>
pub fn subagent(&self) -> Option<SubagentOrigin<'_>>
Set when the session is a child that a delegate call ran, not a conversation.
Sourcepub fn bot(&self) -> Option<&str>
pub fn bot(&self) -> Option<&str>
The bot whose conversation this is, when it is one (#509).
A name with a : in it never parses: the name is checked at load for exactly that reason,
and a row written by something else is not allowed to look like two names.
Sourcepub fn is_bot(&self) -> bool
pub fn is_bot(&self) -> bool
Whether this session belongs to a bot rather than to the person at the keyboard.
Sourcepub fn flare(&self) -> Option<FlareOrigin<'_>>
pub fn flare(&self) -> Option<FlareOrigin<'_>>
The flare run and position this session belongs to, when it is a flare (#171).
The tail must parse as a number: flare:run:two is not a flare this build wrote, and
reading it as one would put a row in a run listing under a position nothing can address.
Sourcepub fn is_flare(&self) -> bool
pub fn is_flare(&self) -> bool
Whether this session is one worker of a flare run rather than a conversation.
Sourcepub fn tagged_label(&self) -> String
pub fn tagged_label(&self) -> String
label, with [subagent · route] in front of a child’s, [bot · name] in
front of a bot’s and [flare · run/n] in front of a flare’s — the places that list
sessions beside conversations and have no room for the parent’s id.