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

Method bound

src/mcp/tools.ts:7435–7448  ·  view source on GitHub ↗
(
          r: { parts: SectionPart[]; covered: ExploreLineRange[]; shrunk: boolean },
        )

Source from the content-addressed store, hash-verified

7433 // site render hid in the diagnostic as a complete section.
7434 const windowed = windowsSpineIn(c.start, c.end);
7435 const bound = (
7436 r: { parts: SectionPart[]; covered: ExploreLineRange[]; shrunk: boolean },
7437 ) => {
7438 if (!Number.isFinite(ceiling) || sectionText(r.parts).length <= ceiling) return r;
7439 // Windows are subsets of spans dedupeSpans already cleared, so the record
7440 // still only ever claims source that was actually sent.
7441 // A body the window cuts says so where it is cut, with the query for
7442 // the rest (#2486): the agent otherwise learns of the cut only from a
7443 // footer whose advice — ask for the symbol by name — returns this same
7444 // window.
7445 const focus = focusLinesOf(c);
7446 const parts = noteCutBodies(windowToCeiling(r.parts, ceiling, focus), r.parts, c, focus);
7447 return { parts, covered: r.covered, shrunk: true };
7448 };
7449 if (sectionText(base.parts).length <= Math.min(cap, guard ?? Infinity)) {
7450 return { parts: base.parts, covered: base.covered, shrunk: windowed };
7451 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected