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

Function config_container_description

internal/cbm/extract_defs.c:10225–10241  ·  view source on GitHub ↗

First non-empty description value among `container`'s direct pairs, scanned in config_desc_keys priority order.

Source from the content-addressed store, hash-verified

10223// First non-empty description value among `container`'s direct pairs, scanned
10224// in config_desc_keys priority order.
10225static const char *config_container_description(CBMExtractCtx *ctx, TSNode container,
10226 const char *pair_kind) {
10227 uint32_t n = ts_node_named_child_count(container);
10228 for (const char *const *k = config_desc_keys; *k; k++) {
10229 for (uint32_t i = 0; i < n; i++) {
10230 TSNode pair = ts_node_named_child(container, i);
10231 if (strcmp(ts_node_type(pair), pair_kind) != 0) {
10232 continue;
10233 }
10234 const char *v = config_pair_value_if_key(ctx, pair, *k);
10235 if (v && v[0]) {
10236 return v;
10237 }
10238 }
10239 }
10240 return NULL;
10241}
10242
10243/* #519 entry point: the file-level description a config document declares about
10244 * itself, promoted onto the Module node by cbm_extract_definitions so

Callers 1

Calls 1

config_pair_value_if_keyFunction · 0.85

Tested by

no test coverage detected