pub struct ActiveSession {
pub id: String,
pub tokens: u64,
pub cost: f64,
pub started_at: Option<String>,
pub last_turn_at: Option<String>,
pub model: Option<String>,
pub cwd: Option<String>,
pub project: Option<String>,
pub context_pct: Option<f64>,
pub context_window: Option<u64>,
pub last_input_tokens: u64,
}Expand description
One in-flight session for an agent — a JSONL file whose last turn is within ACTIVE_WINDOW (currently 30 minutes). Multiple of these can be live at the same time when the user runs 3-5 sessions in parallel.
Fields§
§id: String§tokens: u64§cost: f64§started_at: Option<String>§last_turn_at: Option<String>§model: Option<String>§cwd: Option<String>§project: Option<String>§context_pct: Option<f64>§context_window: Option<u64>§last_input_tokens: u64Trait Implementations§
Source§impl Clone for ActiveSession
impl Clone for ActiveSession
Source§fn clone(&self) -> ActiveSession
fn clone(&self) -> ActiveSession
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ActiveSession
impl Debug for ActiveSession
Source§impl Default for ActiveSession
impl Default for ActiveSession
Source§fn default() -> ActiveSession
fn default() -> ActiveSession
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ActiveSession
impl<'de> Deserialize<'de> for ActiveSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ActiveSession
impl RefUnwindSafe for ActiveSession
impl Send for ActiveSession
impl Sync for ActiveSession
impl Unpin for ActiveSession
impl UnsafeUnpin for ActiveSession
impl UnwindSafe for ActiveSession
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