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

Function handle_atlas_impact_analysis

src/ui/http_server.c:2476–2489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2474}
2475
2476static void handle_atlas_impact_analysis(cbm_http_conn_t *c, const cbm_http_req_t *req) {
2477 char project[256] = {0}, file[CBM_SZ_2K] = {0}, node[CBM_SZ_2K] = {0}, refresh[8] = {0};
2478 cbm_store_t *store = atlas_open_project(c, req, project, sizeof(project));
2479 if (!store)
2480 return;
2481 cbm_http_query_param(req->query, "file", file, sizeof(file));
2482 cbm_http_query_param(req->query, "node", node, sizeof(node));
2483 cbm_http_query_param(req->query, "refresh", refresh, sizeof(refresh));
2484 int64_t id = node[0] == '#' ? strtoll(node + 1, NULL, 10) : -1;
2485 char *json = cbm_atlas_impact_analysis_request(
2486 store, project, file, id, node[0] && node[0] != '#' ? node : NULL, !strcmp(refresh, "1"));
2487 cbm_store_close(store);
2488 atlas_reply_json(c, json, 500, "{\"error\":\"impact analysis unavailable\"}");
2489}
2490
2491/* GET /api/metrics?project=X — the Dashboard payload. */
2492static void handle_atlas_metrics(cbm_http_conn_t *c, const cbm_http_req_t *req) {

Callers 1

dispatch_requestFunction · 0.85

Calls 5

atlas_open_projectFunction · 0.85
cbm_http_query_paramFunction · 0.85
cbm_store_closeFunction · 0.85
atlas_reply_jsonFunction · 0.85

Tested by

no test coverage detected