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

Function take

graph-ui/src/browser-ai/relationship-answer.ts:118–124  ·  view source on GitHub ↗
(side: Side, name: string | undefined)

Source from the content-addressed store, hash-verified

116 const sides = new Set<Side>();
117 let subject: string | undefined, named = false;
118 const take = (side: Side, name: string | undefined): void => {
119 const word = name?.replace(/[.:/]+$/, '');
120 if (!word || NOT_A_NAME.has(word.toLowerCase())) return;
121 sides.add(side);
122 if (!SELF.has(word.toLowerCase()) && !subject) subject = word;
123 named = true;
124 };
125 for (const phrasing of PHRASINGS) take(phrasing.side, phrasing.pattern.exec(prompt)?.[1]);
126 const which = WHICH_CALLS.exec(prompt);
127 if (which) take(which[1].toLowerCase() === 'welche' && /(?:en|[^s]s)$/iu.test(which[2]) ? 'outgoing' : 'incoming', which[3]);

Callers 1

relationshipQuestionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected