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

Function project_session_db_path

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

Source from the content-addressed store, hash-verified

33}
34
35pub fn project_session_db_path(project_root: &Path) -> PathBuf {
36 if is_hermes_profile_home(project_root) {
37 return hermes_profile_session_db_path(project_root);
38 }
39 resolve_layout_for_current_profile(project_root).map_or_else(
40 |_| {
41 let profile_root = default_profile_root()
42 .unwrap_or_else(|_| PathBuf::from(crate::config::TRACEDECAY_DIR));
43 profile_sharded_data_root(&profile_root, &default_profile_project_id(project_root))
44 .join(PROJECT_SESSION_DB_FILENAME)
45 },
46 |layout| layout.sessions_db_path,
47 )
48}
49
50pub async fn open_project_session_db(project_root: &Path) -> Option<GlobalDb> {
51 let db_path = resolved_project_session_db_path(project_root).await?;

Callers 1

Tested by

no test coverage detected