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

Function compare_node_callback

src/mcp/mcp.c:3517–3530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3515}
3516
3517static bool compare_node_callback(void *context, bool added,
3518 const cbm_graph_node_identity_t *node) {
3519 compare_response_t *response = (compare_response_t *)context;
3520 compare_result_set_t *set = added ? &response->nodes_added : &response->nodes_removed;
3521 if (set->returned >= response->limit || set->budget_exhausted) {
3522 return true;
3523 }
3524 yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
3525 yyjson_mut_val *item = doc ? compare_node_json(doc, node) : NULL;
3526 if (doc && item) {
3527 yyjson_mut_doc_set_root(doc, item);
3528 }
3529 return compare_append_item(response, set, doc, item);
3530}
3531
3532static bool compare_edge_callback(void *context, bool added,
3533 const cbm_graph_edge_identity_t *edge) {

Callers

nothing calls this directly

Calls 2

compare_node_jsonFunction · 0.85
compare_append_itemFunction · 0.85

Tested by

no test coverage detected