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

Function juniorSteps

graph-ui/src/twin/render-model.ts:860–876  ·  view source on GitHub ↗

* The calls in the order the body reaches them, joined by a word. * * The connective is the whole point of this level and it is also the place * where a builder is most tempted to lie. "First", "then", "after that" are * claims about order, and order is exactly what the index records: the call

(ir: SemanticIR)

Source from the content-addressed store, hash-verified

858 * dropped one would be a different order from the one the code runs.
859 */
860function juniorSteps(ir: SemanticIR): TwinStepLine[] {
861 const calls = ir.steps.value;
862 return calls.map((call, index) => {
863 const last = index === calls.length - 1 && calls.length > 1;
864 const connective = index === 0
865 ? STEP_CONNECTIVES[0]
866 : (last ? STEP_CONNECTIVE_LAST : STEP_CONNECTIVES[1 + ((index - 1) % (STEP_CONNECTIVES.length - 1))]);
867 const where = locationLabel(call.targetFile, call.targetLine ?? call.line);
868 return {
869 id: `s${index}`,
870 order: index + 1,
871 text: `${juniorStep(connective, call.targetName)}${where === undefined ? '' : juniorStepAt(where)}.`,
872 target: stepTarget(call),
873 factPath: `steps[${index}]`
874 };
875 });
876}
877
878/**
879 * The words this level used, explained once each, and only the ones it used.

Callers 1

juniorFunction · 0.85

Calls 4

locationLabelFunction · 0.90
juniorStepFunction · 0.90
juniorStepAtFunction · 0.90
stepTargetFunction · 0.90

Tested by

no test coverage detected