MCPcopy Create free account
hub / github.com/cortexkit/magic-context / blockText

Function blockText

packages/e2e-tests/src/cache-analysis.ts:101–106  ·  view source on GitHub ↗
(block: unknown)

Source from the content-addressed store, hash-verified

99}
100
101function blockText(block: unknown): string {
102 if (block && typeof block === "object" && typeof (block as Json).text === "string") {
103 return (block as Json).text as string;
104 }
105 return JSON.stringify(stripCacheControl(block));
106}
107
108/** Build the wire-order segment list: system blocks first, then every message. */
109export function buildSegments(body: MinimalRequest["body"]): WireSegment[] {

Callers 2

buildSegmentsFunction · 0.70
rawSegmentTextFunction · 0.70

Calls 1

stripCacheControlFunction · 0.70

Tested by

no test coverage detected