pub struct ConvoIO { /* private fields */ }Implementations§
Source§impl ConvoIO
impl ConvoIO
pub fn new() -> Self
pub fn with_resolver(resolver: PathResolver) -> Self
pub fn resolver(&self) -> &PathResolver
pub fn gemini_dir_path(&self) -> Result<PathBuf>
pub fn exists(&self) -> bool
pub fn list_projects(&self) -> Result<Vec<String>>
pub fn list_sessions(&self, project_path: &str) -> Result<Vec<String>>
pub fn list_chat_files( &self, project_path: &str, session_uuid: &str, ) -> Result<Vec<String>>
pub fn project_exists(&self, project_path: &str) -> bool
pub fn session_exists( &self, project_path: &str, session_id: &str, ) -> Result<bool>
Sourcepub fn read_chat(
&self,
project_path: &str,
session_uuid: &str,
chat_name: &str,
) -> Result<ChatFile>
pub fn read_chat( &self, project_path: &str, session_uuid: &str, chat_name: &str, ) -> Result<ChatFile>
Read a single chat file by name.
Sourcepub fn read_all_chats(
&self,
project_path: &str,
session_uuid: &str,
) -> Result<Vec<(String, ChatFile)>>
pub fn read_all_chats( &self, project_path: &str, session_uuid: &str, ) -> Result<Vec<(String, ChatFile)>>
Read every chat file inside a session UUID directory.
Sourcepub fn read_session(
&self,
project_path: &str,
session_id: &str,
) -> Result<Conversation>
pub fn read_session( &self, project_path: &str, session_id: &str, ) -> Result<Conversation>
Load a full session.
session_id may be:
- A main-session file stem (e.g.
session-2026-04-17T18-09-b26d7f99) — the file is read, and a sibling<inner-sessionId>/dir (if present) contributes sub-agent chats. - A full session UUID (the
sessionIdfield inside a main chat file, e.g.f7cc36c0-980c-4914-ae79-439567272478) —chats/*.jsonis scanned for a file whose innersessionIdmatches. This is how Gemini CLI itself resolves--resume <uuid>. - A UUID directory name with no backing main file — every
*.jsonfile inside is loaded; the one withoutkind: "subagent"becomes the main.
Sourcepub fn read_session_metadata(
&self,
project_path: &str,
session_id: &str,
) -> Result<ConversationMetadata>
pub fn read_session_metadata( &self, project_path: &str, session_id: &str, ) -> Result<ConversationMetadata>
Lightweight metadata for a single session.
Accepts any identifier ConvoIO::read_session accepts:
filename stem, inner session UUID, or a bare UUID directory name.
pub fn list_session_metadata( &self, project_path: &str, ) -> Result<Vec<ConversationMetadata>>
pub fn read_logs(&self, project_path: &str) -> Result<Vec<LogEntry>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConvoIO
impl RefUnwindSafe for ConvoIO
impl Send for ConvoIO
impl Sync for ConvoIO
impl Unpin for ConvoIO
impl UnsafeUnpin for ConvoIO
impl UnwindSafe for ConvoIO
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