pub struct SessionStore { /* private fields */ }Implementations§
Source§impl SessionStore
impl SessionStore
pub fn open(path: &Path) -> Result<Self>
pub fn open_in_memory() -> Result<Self>
pub fn create_session(&mut self, new: NewSession) -> Result<Session>
pub fn get_session(&self, id: &str) -> Result<Option<Session>>
pub fn find_latest_session(&self, cwd: &str) -> Result<Option<Session>>
pub fn find_client_session( &self, cwd: &str, key: &str, ) -> Result<Option<Session>>
pub fn recent_sessions(&self, cwd: &str, limit: usize) -> Result<Vec<Session>>
pub fn first_user_prompt(&self, session_id: &str) -> Result<Option<String>>
pub fn rebind_client_session_key( &mut self, cwd: &str, key: &str, target_session_id: &str, ) -> Result<()>
pub fn append_item( &mut self, session_id: &str, role: Role, blocks: Vec<ContentBlock>, ) -> Result<ConversationItem>
pub fn append_assistant_item( &mut self, session_id: &str, blocks: Vec<ContentBlock>, usage: Option<Usage>, ) -> Result<ConversationItem>
pub fn append_turn_interrupted( &mut self, session_id: &str, ) -> Result<ConversationItem>
pub fn replace_branch_with_summary( &mut self, session_id: &str, summary: &str, ) -> Result<ConversationItem>
pub fn get_item(&self, id: &str) -> Result<Option<ConversationItem>>
pub fn active_branch(&self, session_id: &str) -> Result<Vec<ConversationItem>>
pub fn rewind(&mut self, session_id: &str, item_id: &str) -> Result<()>
pub fn user_checkpoints( &self, session_id: &str, ) -> Result<Vec<ConversationItem>>
pub fn count_items(&self, session_id: &str) -> Result<usize>
pub fn update_model_selection( &self, session_id: &str, provider_type: &str, model: &str, model_profile: &str, effort: Option<&str>, ) -> Result<()>
pub fn clear_session(&self, session_id: &str) -> Result<()>
pub fn record_input_history(&self, text: &str) -> Result<()>
pub fn recent_input_history(&self, limit: usize) -> Result<Vec<String>>
pub fn prune_input_history(&self, maximum: usize) -> Result<()>
pub fn set_provider_state( &self, session_id: &str, key: &str, value: &Value, ) -> Result<()>
pub fn provider_state( &self, session_id: &str, key: &str, ) -> Result<Option<Value>>
pub fn record_shell_history( &self, cwd: &str, client_session_key: Option<&str>, command: &str, exit_code: Option<i32>, started_at: i64, duration_ms: Option<i64>, pipe_status: Option<&str>, ) -> Result<()>
pub fn recent_shell_history( &self, cwd: &str, client_session_key: Option<&str>, limit: usize, ) -> Result<Vec<ShellHistoryItem>>
pub fn prune_shell_history(&self, maximum: usize) -> Result<()>
pub fn shell_history_count(&self) -> Result<usize>
Auto Trait Implementations§
impl !Freeze for SessionStore
impl !RefUnwindSafe for SessionStore
impl !Sync for SessionStore
impl !UnwindSafe for SessionStore
impl Send for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
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