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

Function questionLanguage

graph-ui/src/browser-ai/chat-context.ts:73–75  ·  view source on GitHub ↗
(prompt: string)

Source from the content-addressed store, hash-verified

71 * follow-ups such as "mehr" (B4). */
72const GERMAN = /[äöüß]|\b(?:ich|du|der|das|und|ist|nicht|wie|wer|wo|warum|wieso|weshalb|kannst|kann|mir|mich|diese[rsnm]?|dise[rsnm]?|datei|sagen|erkl\w*|zeig\w*|welche\w*|gibt|wird|macht|mach|mcht|tut|klasse|klase|funktion|methode|modul|hallo|moin|servus|danke|bitte|kurz\w*|antwort\w*|sehr|ein|eine[rsnm]?|sind|noch|auch|hier|zeile\w*|genau|beschreib\w*|detailliert\w*|ausf\w*|mehr|weiter|sonst|dann)\b/i;
73export function questionLanguage(prompt: string): 'en' | 'de' {
74 return GERMAN.test(prompt) ? 'de' : 'en';
75}
76
77/** Said instead of asking the model when a question has nothing to stand on: no
78 * selection, no open file, no attached code (K11). */

Callers 5

sendFunction · 0.90
makeRequestFunction · 0.90
BrowserChatDockFunction · 0.90
missingContextAnswerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected