pub struct Session {
pub id: String,
pub dir_path: PathBuf,
pub lines: Vec<EventLine>,
pub workspace: Option<Workspace>,
}Expand description
A parsed Copilot session: the ordered event lines plus the directory id.
Fields§
§id: StringSession id (the session-state/<id>/ directory name).
dir_path: PathBufPath to the session-state directory.
lines: Vec<EventLine>Ordered, parsed lines of events.jsonl.
workspace: Option<Workspace>Git/workspace context from the sibling workspace.yaml, if present.
Implementations§
Source§impl Session
impl Session
pub fn events(&self) -> impl Iterator<Item = CopilotEvent> + '_
pub fn started_at(&self) -> Option<DateTime<Utc>>
pub fn last_activity(&self) -> Option<DateTime<Utc>>
Sourcepub fn start(&self) -> Option<SessionStart>
pub fn start(&self) -> Option<SessionStart>
The session.start payload, if present.
Sourcepub fn start_model(&self) -> Option<String>
pub fn start_model(&self) -> Option<String>
Model recorded on session.start (best-effort default model).
Sourcepub fn first_user_text(&self) -> Option<String>
pub fn first_user_text(&self) -> Option<String>
First non-empty user-message text (for listing UIs).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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