MCPcopy Create free account
hub / github.com/douglance/devsql / list_sessions

Method list_sessions

crates/ccql/src/datasources/transcript.rs:271–285  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

269 }
270
271 pub fn list_sessions(&self) -> Result<Vec<SessionInfo>> {
272 let mut sessions = Vec::new();
273 for file in discover_transcript_files(&self.config) {
274 let metadata = std::fs::metadata(&file.path).ok();
275 sessions.push(SessionInfo {
276 session_id: file.source_file.trim_end_matches(".jsonl").to_string(),
277 path: file.path,
278 size_bytes: metadata.as_ref().map(|m| m.len()).unwrap_or(0),
279 modified: metadata.and_then(|m| m.modified().ok()),
280 });
281 }
282
283 sessions.sort_by_key(|s| std::cmp::Reverse(s.modified));
284 Ok(sessions)
285 }
286
287 pub async fn load_session(&self, session_id: &str) -> Result<Vec<serde_json::Value>> {
288 let path = discover_transcript_files(&self.config)

Callers 4

sessionsFunction · 0.80
load_all_sessionsMethod · 0.80
search_in_sessionsMethod · 0.80

Calls 1