pub struct SessionState {
pub session_id: String,
pub transcript_path: String,
pub cwd: String,
pub started_at: DateTime<Utc>,
pub events: Vec<SessionEvent>,
pub pre_edit_hashes: HashMap<String, String>,
pub ai_modified_files: Vec<String>,
}Expand description
Tracks file states during an active AI session
Fields§
§session_id: String§transcript_path: String§cwd: String§started_at: DateTime<Utc>§events: Vec<SessionEvent>§pre_edit_hashes: HashMap<String, String>file path -> content hash before AI modification
ai_modified_files: Vec<String>files modified by AI during this session
Implementations§
Source§impl SessionState
impl SessionState
pub fn new(event: &HookEvent) -> Self
pub fn record_event(&mut self, event: &HookEvent)
pub fn record_pre_edit_hash(&mut self, file_path: &str, hash: &str)
Sourcepub fn session_dir(&self) -> PathBuf
pub fn session_dir(&self) -> PathBuf
Path to session data directory: .tracevault/sessions/<session_id>/
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
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 SessionState
impl Debug for SessionState
Source§impl<'de> Deserialize<'de> for SessionState
impl<'de> Deserialize<'de> for SessionState
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 SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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