pub struct SessionDiscovery { /* private fields */ }Expand description
Session discovery engine for finding VS Code chat sessions
Implementations§
Source§impl SessionDiscovery
impl SessionDiscovery
Sourcepub fn new() -> Result<Self, CopilotError>
pub fn new() -> Result<Self, CopilotError>
Create a new session discovery using the default storage location
§Errors
Returns an error if the default storage directory cannot be determined.
Sourcepub fn with_root(storage_root: PathBuf) -> Self
pub fn with_root(storage_root: PathBuf) -> Self
Create a session discovery with a custom storage root
Sourcepub fn storage_root(&self) -> &Path
pub fn storage_root(&self) -> &Path
Get the storage root path
Sourcepub fn discover_workspaces(&self) -> Result<Vec<WorkspaceInfo>, CopilotError>
pub fn discover_workspaces(&self) -> Result<Vec<WorkspaceInfo>, CopilotError>
Discover all workspace storage directories
§Errors
Returns an error if the storage root cannot be read.
Sourcepub fn discover_sessions(&self) -> Result<Vec<DiscoveredSession>, CopilotError>
pub fn discover_sessions(&self) -> Result<Vec<DiscoveredSession>, CopilotError>
Sourcepub fn discover_sessions_for_workspace(
&self,
workspace_path: &Path,
) -> Result<Vec<DiscoveredSession>, CopilotError>
pub fn discover_sessions_for_workspace( &self, workspace_path: &Path, ) -> Result<Vec<DiscoveredSession>, CopilotError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionDiscovery
impl RefUnwindSafe for SessionDiscovery
impl Send for SessionDiscovery
impl Sync for SessionDiscovery
impl Unpin for SessionDiscovery
impl UnwindSafe for SessionDiscovery
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