1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
// SPDX-License-Identifier: AGPL-3.0-or-later pub mod claude; pub mod codex; pub mod copilot_cli; pub mod copilot_vscode; pub mod cursor; pub mod goose; pub mod openclaw; pub mod opencode; use std::path::Path; /// Earliest mtime (ms) of `.jsonl` files in `dir`. Returns 0 on failure. pub fn dir_mtime_ms(dir: &Path) -> u64 { std::fs::read_dir(dir) .ok() .into_iter() .flatten() .filter_map(|e| e.ok()) .filter(|e| e.path().extension().map(|x| x == "jsonl").unwrap_or(false)) .filter_map(|e| e.metadata().ok()?.modified().ok()) .map(|t| { t.duration_since(std::time::UNIX_EPOCH) .unwrap_or_default() .as_millis() as u64 }) .min() .unwrap_or(0) }