pub struct ShellSession {
pub id: SessionId,
pub pid: u32,
pub shell: Option<String>,
pub cwd: PathBuf,
pub current_project_id: Option<ProjectId>,
pub started_at: OffsetDateTime,
pub last_heartbeat: OffsetDateTime,
pub ended_at: Option<OffsetDateTime>,
}Expand description
A shell session tracked by the hook.
Each terminal gets a session record. The hook updates last_heartbeat
on every prompt render and sets ended_at when the shell exits.
Fields§
§id: SessionIdUnique identifier.
pid: u32Shell process PID.
shell: Option<String>Shell type (e.g., “bash”, “zsh”, “fish”).
cwd: PathBufLast known working directory.
current_project_id: Option<ProjectId>The project currently active in this session.
started_at: OffsetDateTimeWhen this session started.
last_heartbeat: OffsetDateTimeLast heartbeat from the shell hook.
ended_at: Option<OffsetDateTime>When this session ended (None if still active).
Trait Implementations§
Source§impl Clone for ShellSession
impl Clone for ShellSession
Source§fn clone(&self) -> ShellSession
fn clone(&self) -> ShellSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShellSession
impl Debug for ShellSession
Source§impl PartialEq for ShellSession
impl PartialEq for ShellSession
impl StructuralPartialEq for ShellSession
Auto Trait Implementations§
impl Freeze for ShellSession
impl RefUnwindSafe for ShellSession
impl Send for ShellSession
impl Sync for ShellSession
impl Unpin for ShellSession
impl UnsafeUnpin for ShellSession
impl UnwindSafe for ShellSession
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