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

Function dm_preview_metadata

tests/test_doc_mentions.c:4620–4632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4618}
4619
4620static yyjson_val *dm_preview_metadata(yyjson_val *report, size_t sample, const char *field) {
4621 yyjson_val *entries = yyjson_obj_get(report, "samples_preview");
4622 for (size_t i = 0; i < yyjson_arr_size(entries); i++) {
4623 yyjson_val *entry = yyjson_arr_get(entries, i);
4624 const char *name = yyjson_get_str(yyjson_obj_get(entry, "field"));
4625 yyjson_val *index = yyjson_obj_get(entry, "sample_index");
4626 if (name && yyjson_is_uint(index) && yyjson_get_uint(index) == sample &&
4627 strcmp(name, field) == 0) {
4628 return entry;
4629 }
4630 }
4631 return NULL;
4632}
4633
4634static bool dm_preview_metadata_matches(yyjson_val *entry, size_t original, size_t included,
4635 bool truncated, bool escaped) {

Callers 4

dm_preview_bounds_checksFunction · 0.85
dm_preview_text_caseFunction · 0.85
dm_preview_order_checksFunction · 0.85
dm_preview_retry_resultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected