MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / same_dir

Function same_dir

atomic-agent/src/transcript/opencode.rs:165–172  ·  view source on GitHub ↗

Compare two directories, canonicalizing when possible.

(a: &Path, b: &Path)

Source from the content-addressed store, hash-verified

163
164/// Compare two directories, canonicalizing when possible.
165fn same_dir(a: &Path, b: &Path) -> bool {
166 let ca = std::fs::canonicalize(a);
167 let cb = std::fs::canonicalize(b);
168 match (ca, cb) {
169 (Ok(ca), Ok(cb)) => ca == cb,
170 _ => a == b,
171 }
172}
173
174/// Messages of the session in chronological order: `(id, role)`.
175fn read_messages(conn: &Connection, session_id: &str) -> Option<Vec<(String, String)>> {

Callers 1

read_turnFunction · 0.85

Calls 1

canonicalizeFunction · 0.85

Tested by

no test coverage detected