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

Function handle_atlas_tree

src/ui/http_server.c:2414–2424  ·  view source on GitHub ↗

GET /api/tree?project=X&path=src/foo — Modules aggregates. */

Source from the content-addressed store, hash-verified

2412
2413/* GET /api/tree?project=X&path=src/foo — Modules aggregates. */
2414static void handle_atlas_tree(cbm_http_conn_t *c, const cbm_http_req_t *req) {
2415 char project[256] = {0};
2416 cbm_store_t *store = atlas_open_project(c, req, project, sizeof(project));
2417 if (!store)
2418 return;
2419 char path[512] = {0};
2420 cbm_http_query_param(req->query, "path", path, (int)sizeof(path));
2421 char *json = cbm_atlas_tree_json(store, project, path);
2422 cbm_store_close(store);
2423 atlas_reply_json(c, json, 500, "{\"error\":\"tree computation failed\"}");
2424}
2425
2426/* GET /api/symbol?project=X&id=N (or &qn=...) — the symbol bundle. */
2427static void handle_atlas_symbol(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_atlas_tree_jsonFunction · 0.85
cbm_store_closeFunction · 0.85
atlas_reply_jsonFunction · 0.85

Tested by

no test coverage detected