pub struct ClaudeHistoryAdapter {
base_dirs: Vec<PathBuf>,
}Fields§
§base_dirs: Vec<PathBuf>All base directories to scan for project folders.
Implementations§
Source§impl ClaudeHistoryAdapter
impl ClaudeHistoryAdapter
pub fn new() -> Self
Sourcefn count_subagents(session_dir: &Path) -> u32
fn count_subagents(session_dir: &Path) -> u32
Count subagent JSONL files in a session’s subagents/ directory.
Sourcefn decode_project_path(encoded: &str) -> String
fn decode_project_path(encoded: &str) -> String
Decode a project directory name back to a path. e.g., “C–Users-asafe–claw-agentx-workspace” → “C:/Users/asafe/.claw/agentx-workspace” This is lossy — real hyphens are indistinguishable from path separators.
Trait Implementations§
Source§impl HistoryAdapter for ClaudeHistoryAdapter
impl HistoryAdapter for ClaudeHistoryAdapter
Source§fn provider(&self) -> &str
fn provider(&self) -> &str
Provider identifier (e.g., “claude”, “codex”, “gemini”, “kimi”, “openclaw”, “pi”).
Source§fn discover_files(&self) -> Result<Vec<DiscoveredFile>, HistoryError>
fn discover_files(&self) -> Result<Vec<DiscoveredFile>, HistoryError>
Discover all session file paths on disk.
Returns (file_path, mtime_ms) pairs, sorted by mtime descending.
Source§fn extract_meta(
&self,
file_path: &str,
) -> Result<Option<SessionMeta>, HistoryError>
fn extract_meta( &self, file_path: &str, ) -> Result<Option<SessionMeta>, HistoryError>
Extract lightweight metadata without full parsing.
Source§fn parse_file(
&self,
file_path: &str,
) -> Result<Option<HistorySession>, HistoryError>
fn parse_file( &self, file_path: &str, ) -> Result<Option<HistorySession>, HistoryError>
Parse a single session file into a full HistorySession.
Auto Trait Implementations§
impl Freeze for ClaudeHistoryAdapter
impl RefUnwindSafe for ClaudeHistoryAdapter
impl Send for ClaudeHistoryAdapter
impl Sync for ClaudeHistoryAdapter
impl Unpin for ClaudeHistoryAdapter
impl UnwindSafe for ClaudeHistoryAdapter
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.