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

Function find_channel_src

src/pipeline/pass_parallel.c:1253–1265  ·  view source on GitHub ↗

Find channel source node (enclosing function or file). */

Source from the content-addressed store, hash-verified

1251
1252/* Find channel source node (enclosing function or file). */
1253static const cbm_gbuf_node_t *find_channel_src(cbm_pipeline_ctx_t *ctx, const CBMChannel *ch,
1254 const char *rel) {
1255 const cbm_gbuf_node_t *node = NULL;
1256 if (ch->enclosing_func_qn && ch->enclosing_func_qn[0]) {
1257 node = cbm_gbuf_find_by_qn(ctx->gbuf, ch->enclosing_func_qn);
1258 }
1259 if (!node) {
1260 char *file_qn = cbm_pipeline_fqn_compute(ctx->project_name, rel, "__file__");
1261 node = cbm_gbuf_find_by_qn(ctx->gbuf, file_qn);
1262 free(file_qn);
1263 }
1264 return node;
1265}
1266
1267/* Create Channel nodes + EMITS/LISTENS_ON edges for one file. */
1268static void create_channel_edges(cbm_pipeline_ctx_t *ctx, const CBMFileResult *result,

Callers 1

create_channel_edgesFunction · 0.85

Calls 2

cbm_gbuf_find_by_qnFunction · 0.85
cbm_pipeline_fqn_computeFunction · 0.85

Tested by

no test coverage detected