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

Function fl_display_name

src/ui/atlas_flows.c:614–629  ·  view source on GitHub ↗

A display name with context when the bare name is ambiguous: dunders and * very short names get their file stem prefixed ("datastructures.__init__"), * because "__init__ → clone" teaches nobody anything. */

Source from the content-addressed store, hash-verified

612 * very short names get their file stem prefixed ("datastructures.__init__"),
613 * because "__init__ → clone" teaches nobody anything. */
614static void fl_display_name(const flow_node_t *node, char *out, size_t cap) {
615 const char *name = node->name ? node->name : "?";
616 bool ambiguous = name[0] == '_' || strlen(name) <= 3;
617 if (ambiguous && node->file_path) {
618 const char *base = strrchr(node->file_path, '/');
619 base = base ? base + 1 : node->file_path;
620 char stem[128];
621 snprintf(stem, sizeof(stem), "%s", base);
622 char *dot = strrchr(stem, '.');
623 if (dot && dot != stem)
624 *dot = '\0';
625 snprintf(out, cap, "%s.%s", stem, name);
626 return;
627 }
628 snprintf(out, cap, "%s", name);
629}
630
631char *cbm_atlas_flows_json(cbm_store_t *store, const char *project) {
632 if (!store || !project)

Callers 1

cbm_atlas_flows_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected