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

Method bound

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

Source from the content-addressed store, hash-verified

7411 // site render hid in the diagnostic as a complete section.
7412 const windowed = windowsSpineIn(c.start, c.end);
7413 const bound = (
7414 r: { parts: SectionPart[]; covered: ExploreLineRange[]; shrunk: boolean },
7415 ) => {
7416 if (!Number.isFinite(ceiling) || sectionText(r.parts).length <= ceiling) return r;
7417 // Windows are subsets of spans dedupeSpans already cleared, so the record
7418 // still only ever claims source that was actually sent.
7419 // A body the window cuts says so where it is cut, with the query for
7420 // the rest (#2486): the agent otherwise learns of the cut only from a
7421 // footer whose advice — ask for the symbol by name — returns this same
7422 // window.
7423 const focus = focusLinesOf(c);
7424 const parts = noteCutBodies(windowToCeiling(r.parts, ceiling, focus), r.parts, c, focus);
7425 return { parts, covered: r.covered, shrunk: true };
7426 };
7427 if (sectionText(base.parts).length <= Math.min(cap, guard ?? Infinity)) {
7428 return { parts: base.parts, covered: base.covered, shrunk: windowed };
7429 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected