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:3028–3042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3026}
3027
3028static bool lsp_idx_insert_leaf(CBMHashTable *index, CBMResolvedCall *candidate, const char *leaf,
3029 bool exact_site, const cbm_gbuf_t *gbuf, const char *project_name,
3030 bool allow_tail_match) {
3031 if (!index || !candidate || !candidate->caller_qn || !leaf || !leaf[0]) {
3032 return false;
3033 }
3034 char *key = lsp_idx_key(candidate->caller_qn, leaf, exact_site, candidate->site_start_byte,
3035 candidate->site_end_byte, candidate->source_origin);
3036 if (!key) {
3037 return false;
3038 }
3039 bool inserted = lsp_idx_keep_best(index, key, candidate, gbuf, project_name, allow_tail_match);
3040 free(key);
3041 return inserted;
3042}
3043
3044static const CBMResolvedCall *lsp_idx_lookup(const CBMHashTable *index, const CBMCall *call,
3045 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