pub struct SessionManager { /* private fields */ }Expand description
Manager for session storage.
Implementations§
Source§impl SessionManager
impl SessionManager
pub fn save_index(&mut self) -> Result<()>
pub fn start_new(&mut self, project_path: Option<&Path>) -> Result<&Session>
pub fn continue_last(&mut self) -> Result<Option<&Session>>
pub fn resume(&mut self, query: &str) -> Result<Option<&Session>>
pub fn save_current(&mut self) -> Result<()>
pub fn update_stats(&mut self, last_input_tokens: u32, total_output_tokens: u64)
pub fn record_compression(&mut self, entry: CompressionHistoryEntry)
pub fn set_messages(&mut self, messages: Vec<Message>)
pub fn set_compressed_messages(&mut self, compressed: Vec<Message>)
pub fn api_messages(&self) -> Option<&[Message]>
pub fn display_messages(&self) -> Option<&[Message]>
pub fn messages(&self) -> Option<&[Message]>
pub fn messages_mut(&mut self) -> Option<&mut Vec<Message>>
pub fn full_messages(&self) -> Option<&[Message]>
pub fn current_id(&self) -> Option<&str>
pub fn current_name(&self) -> Option<&str>
pub fn rename_current(&mut self, new_name: &str) -> Result<()>
pub fn clear_current(&mut self) -> Result<()>
pub fn list_sessions(&self) -> &[SessionMetadata]
pub fn cleanup_old_sessions(&mut self, max_age_days: u64) -> Result<usize>
pub fn prune_sessions(&mut self, max_sessions: usize) -> Result<usize>
pub fn session_count(&self) -> usize
pub fn has_current(&self) -> bool
pub fn current_metadata(&self) -> Option<&SessionMetadata>
pub fn history_path(&self) -> PathBuf
Auto Trait Implementations§
impl Freeze for SessionManager
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl UnwindSafe for SessionManager
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