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

Function namesNotIn

graph-ui/src/browser-ai/explanation-response.ts:97–101  ·  view source on GitHub ↗
(answer: string, given: string)

Source from the content-addressed store, hash-verified

95/** Names an answer uses that the request it was given does not contain: written in
96 * backticks or shaped like an identifier (flake8, json_agg_helper). Shown under the answer (K12). */
97export function namesNotIn(answer: string, given: string): string[] {
98 const named = [...answer.matchAll(/`([^`\n]+)`/g)].map(match => match[1].trim()).concat(answer.replace(/`[^`]*`/g, ' ').match(IDENTIFIER) ?? []);
99 const known = nameCheck(given);
100 return [...new Set(named.filter(name => name && nameLike(name) && !known(name)))];
101}
102
103/** Why the model's sentence was left out, as the sentence wrote it: a claim word the source does
104 * not show ("output", "Array") or a name in neither the source nor the facts. The note under the

Callers 3

BrowserChatDockFunction · 0.90

Calls 3

nameCheckFunction · 0.85
nameLikeFunction · 0.85
knownFunction · 0.70

Tested by

no test coverage detected