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

Function priorityOf

graph-ui/src/compiler/card-compiler.ts:524–549  ·  view source on GitHub ↗
(klass: QuestionClass)

Source from the content-addressed store, hash-verified

522 * the back of.
523 */
524export function priorityOf(klass: QuestionClass): (kind: CardKind) => number {
525 const base: Record<CardKind, number> = {
526 subject: 0,
527 calls: 20,
528 raises: 30,
529 caller: 40,
530 callee: 50,
531 route: 60,
532 entry: 62,
533 overview: 64,
534 compare: 66,
535 observed: 70,
536 absence: 100,
537 };
538 const lift: Partial<Record<QuestionClass, Partial<Record<CardKind, number>>>> = {
539 'who-calls': { caller: 10, observed: 15 },
540 'what-if': { caller: 10, observed: 15 },
541 'why-error': { raises: 10, callee: 15, observed: 18 },
542 'where-entry': { route: 5, entry: 6, overview: 8 },
543 overview: { overview: 5, entry: 6, route: 8 },
544 compare: { compare: 5 },
545 'what-is': { calls: 10, raises: 12 },
546 };
547 const overrides = lift[klass] ?? {};
548 return (kind) => overrides[kind] ?? base[kind];
549}
550
551// ------------------------------------------------------------ the compiler --
552

Callers 2

compileCardsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected