MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / resolved_project_session_db_path

Function resolved_project_session_db_path

src/sessions/cursor.rs:55–75  ·  view source on GitHub ↗
(project_root: &Path)

Source from the content-addressed store, hash-verified

53}
54
55pub async fn resolved_project_session_db_path(project_root: &Path) -> Option<PathBuf> {
56 if is_hermes_profile_home(project_root) {
57 return Some(hermes_profile_session_db_path(project_root));
58 }
59
60 match crate::storage::read_enrollment_marker(project_root) {
61 Ok(Some(_)) => {
62 return resolve_layout_for_current_profile(project_root)
63 .ok()
64 .map(|layout| layout.sessions_db_path);
65 }
66 Ok(None) => {}
67 Err(_) => return None,
68 }
69 if let Some(db_path) = registry_profile_session_db_path(project_root).await {
70 return Some(db_path);
71 }
72 resolve_layout_for_current_profile(project_root)
73 .ok()
74 .map(|layout| layout.sessions_db_path)
75}
76
77async fn registry_profile_session_db_path(project_root: &Path) -> Option<PathBuf> {
78 let profile_root = crate::storage::default_profile_root().ok()?;