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

Function add_string_array

src/mcp/mcp.c:8434–8444  ·  view source on GitHub ↗

Build an enriched snippet response for a resolved node. */ Add a string array to a JSON object (no-op if count == 0). */

Source from the content-addressed store, hash-verified

8432/* Build an enriched snippet response for a resolved node. */
8433/* Add a string array to a JSON object (no-op if count == 0). */
8434static void add_string_array(yyjson_mut_doc *doc, yyjson_mut_val *obj, const char *key,
8435 char **strings, int count) {
8436 if (count <= 0) {
8437 return;
8438 }
8439 yyjson_mut_val *arr = yyjson_mut_arr(doc);
8440 for (int i = 0; i < count; i++) {
8441 yyjson_mut_arr_add_str(doc, arr, strings[i]);
8442 }
8443 yyjson_mut_obj_add_val(doc, obj, key, arr);
8444}
8445
8446/* get_code_snippet coverage note (#963): if the resolved node's file is
8447 * flagged parse_partial, warn that the graph may under-report this file.

Callers 1

build_snippet_responseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected