MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / why_project_root

Function why_project_root

src/ui/atlas_why.c:264–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262/* ── Shared plumbing ────────────────────────────────────────────── */
263
264static bool why_project_root(struct sqlite3 *db, const char *project, char *root, size_t root_cap) {
265 root[0] = '\0';
266 sqlite3_stmt *st = NULL;
267 if (sqlite3_prepare_v2(db, "SELECT root_path FROM projects WHERE name=?1", -1, &st, NULL) !=
268 SQLITE_OK)
269 return false;
270 sqlite3_bind_text(st, 1, project, -1, SQLITE_STATIC);
271 if (sqlite3_step(st) == SQLITE_ROW) {
272 const char *r = (const char *)sqlite3_column_text(st, 0);
273 if (r)
274 snprintf(root, root_cap, "%s", r);
275 }
276 sqlite3_finalize(st);
277 return root[0] != '\0';
278}
279
280static int why_edge_line(const char *properties_json) {
281 if (!properties_json)

Callers 2

cbm_atlas_why_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected