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

Function viewQuestion

graph-ui/src/browser-ai/question-intent.ts:116–122  ·  view source on GitHub ↗
(prompt: string, names: readonly string[])

Source from the content-addressed store, hash-verified

114 * "what am I looking at"), "detail" for the same asking for detail, undefined otherwise (H1).
115 * `names` are the selection's: "die Hierarchie von .github" is the view too. */
116export function viewQuestion(prompt: string, names: readonly string[]): 'general' | 'detail' | undefined {
117 const text = normalize(prompt, names);
118 const detail = new RegExp(DETAIL.source, 'u').test(text);
119 const asked = detail ? text.replace(DETAIL, ' ').replace(/\s+/g, ' ').trim() : text;
120 if (!VIEW_QUESTIONS.some(pattern => pattern.test(asked))) return undefined;
121 return detail ? 'detail' : 'general';
122}
123
124/** Greetings and probes: a prompt of only these asks nothing. */
125const GREETINGS = new Set(['hi', 'hey', 'hello', 'hallo', 'moin', 'servus', 'huhu', 'yo', 'test', 'testing', 'tests', 'ok', 'okay', 'danke', 'thanks', 'thank', 'you',

Callers 2

sendFunction · 0.90

Calls 1

normalizeFunction · 0.70

Tested by

no test coverage detected