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

Function junior

graph-ui/src/twin/render-model.ts:914–939  ·  view source on GitHub ↗
(ir: SemanticIR, presentation: ResolvedPresentation)

Source from the content-addressed store, hash-verified

912}
913
914function junior(ir: SemanticIR, presentation: ResolvedPresentation): TwinViewModel {
915 const facets = presentation.facets;
916 const sections = visibleSections(ir, presentation);
917 const showSteps = facets.has(Facet.Logic) || facets.has(Facet.Calls);
918 const steps = showSteps ? juniorSteps(ir) : [];
919 const paragraphs = [overviewClauses(ir, facets).join(' ')];
920 if (showSteps) {
921 // The lead is only honest when there is an order to lead into, and the
922 // sentence about there being none is honest only when the reader asked
923 // for the lens that would have shown one.
924 paragraphs.push(steps.length > 0 ? JUNIOR_ORDER_LEAD : JUNIOR_NO_STEPS);
925 }
926 const notes = emptyNotes(sections);
927 return {
928 ...emptyModel(ir, presentation, 'guided'),
929 paragraphs,
930 notes,
931 steps,
932 terms: juniorTerms(ir, facets),
933 rewritable: readerLines([
934 ...paragraphs.map((text, index) => ({ id: `p${index}`, text })),
935 ...steps.map((step) => ({ id: step.id, text: step.text })),
936 ...notes.map((text, index) => ({ id: `n${index}`, text }))
937 ])
938 };
939}
940
941// ---------------------------------------------------------------------------
942// level 3, senior: what it costs

Callers 1

buildTwinViewModelFunction · 0.85

Calls 8

readerLinesFunction · 0.90
visibleSectionsFunction · 0.85
juniorStepsFunction · 0.85
overviewClausesFunction · 0.85
emptyNotesFunction · 0.85
emptyModelFunction · 0.85
juniorTermsFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected