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

Function matches

graph-ui/src/compiler/question-classifier.ts:362–374  ·  view source on GitHub ↗

Whether one rule fires on the folded question.

(rule: ClassRule, folded: string)

Source from the content-addressed store, hash-verified

360
361/** Whether one rule fires on the folded question. */
362function matches(rule: ClassRule, folded: string): boolean {
363 for (const fragment of rule.fragments) {
364 if (fragmentMatches(folded, fragment)) {
365 return true;
366 }
367 }
368 for (const pattern of rule.patterns ?? []) {
369 if (pattern.test(folded)) {
370 return true;
371 }
372 }
373 return false;
374}
375
376/**
377 * Sort one question, deterministically.

Callers 1

classifyQuestionFunction · 0.70

Calls 1

fragmentMatchesFunction · 0.85

Tested by

no test coverage detected