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

Function lsp_idx_insert_leaf

src/pipeline/pass_parallel.c:2196–2210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2194}
2195
2196static bool lsp_idx_insert_leaf(CBMHashTable *index, CBMResolvedCall *candidate, const char *leaf,
2197 bool exact_site, const cbm_gbuf_t *gbuf, const char *project_name,
2198 bool allow_tail_match) {
2199 if (!index || !candidate || !candidate->caller_qn || !leaf || !leaf[0]) {
2200 return false;
2201 }
2202 char *key = lsp_idx_key(candidate->caller_qn, leaf, exact_site, candidate->site_start_byte,
2203 candidate->site_end_byte, candidate->source_origin);
2204 if (!key) {
2205 return false;
2206 }
2207 bool inserted = lsp_idx_keep_best(index, key, candidate, gbuf, project_name, allow_tail_match);
2208 free(key);
2209 return inserted;
2210}
2211
2212static const CBMResolvedCall *lsp_idx_lookup(const CBMHashTable *index, const CBMCall *call,
2213 bool exact_site, bool *key_built, bool *ambiguous) {

Callers 1

resolve_file_callsFunction · 0.85

Calls 2

lsp_idx_keyFunction · 0.85
lsp_idx_keep_bestFunction · 0.85

Tested by

no test coverage detected