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

Function project_context

src/project_cmd.rs:60–74  ·  view source on GitHub ↗
(db: &GlobalDb, selector: &str)

Source from the content-addressed store, hash-verified

58}
59
60async fn project_context(db: &GlobalDb, selector: &str) -> Option<ProjectRegistryContext> {
61 if let Some(context) = db.project_registry_context_by_id(selector).await {
62 return Some(context);
63 }
64 let selector_path = Path::new(selector);
65 if let Some(context) = db.project_registry_context_by_alias(selector_path).await {
66 return Some(context);
67 }
68 if !GlobalDb::is_explicit_project_path_selector(selector) {
69 return None;
70 }
71 let git_common_dir = tracedecay::worktree::git_common_dir(selector_path);
72 db.project_registry_context_by_identity(selector_path, git_common_dir.as_deref())
73 .await
74}
75
76fn print_projects(
77 label: &str,

Callers 1

handle_projects_actionFunction · 0.85

Tested by

no test coverage detected