MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / record

Function record

src/ui-server/api/steps.ts:685–708  ·  view source on GitHub ↗
(
    fn: Node,
    hop: HopSite,
    guards: readonly BranchGuard[],
    what: { step?: string; link?: string; into?: string },
    trigger: WireStepTrigger | null = null,
    loops: readonly SiteLoop[] = []
  )

Source from the content-addressed store, hash-verified

683 */
684 const programs = new Map<string, Map<string, ProgramSite>>();
685 const record = (
686 fn: Node,
687 hop: HopSite,
688 guards: readonly BranchGuard[],
689 what: { step?: string; link?: string; into?: string },
690 trigger: WireStepTrigger | null = null,
691 loops: readonly SiteLoop[] = []
692 ): void => {
693 let sites = programs.get(fn.id);
694 if (!sites) {
695 sites = new Map();
696 programs.set(fn.id, sites);
697 }
698 const key = `${hop.line}:${hop.column}:${what.step ?? what.into ?? ''}`;
699 if (sites.has(key)) return;
700 sites.set(key, {
701 ...what,
702 at: { line: hop.line, column: hop.column, end: hop.end },
703 ...(hop.within ? { within: hop.within } : {}),
704 guards: [...guards],
705 ...(loops.length > 0 ? { loops: [...loops] } : {}),
706 ...(trigger ? { trigger } : {}),
707 });
708 };
709 const truncated = { steps: 0, hubs: 0, chrome: 0 };
710 let effectScans = 0;
711 const fanIn = new Map<string, number>();

Callers 2

effectLinkFunction · 0.70
buildStepsFunction · 0.70

Calls 3

hasMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected