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

Function echoAnswer

graph-ui/src/browser-ai/echo-answer.ts:40–51  ·  view source on GitHub ↗
(answer: string, question: string)

Source from the content-addressed store, hash-verified

38}
39
40export function echoAnswer(answer: string, question: string): boolean {
41 const words = wordsOf(answer);
42 if (!words.length) return false;
43 const asked = wordsOf(question).map(word => word.toLowerCase().replace(/`/g, ''));
44 const content = words.filter(word => {
45 const lower = word.toLowerCase().replace(/`/g, '');
46 return !STOP.has(lower) && !YES_NO.has(lower) && !asked.some(other => same(lower, other));
47 });
48 if (content.some(codeShaped)) return false;
49 if (RESTATEMENT.test(answer)) return content.length < RESTATED_WORDS;
50 return content.length === 0 && !words.some(word => YES_NO.has(word.toLowerCase()));
51}

Callers 2

sendFunction · 0.90

Calls 2

wordsOfFunction · 0.85
sameFunction · 0.70

Tested by

no test coverage detected