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

Function normalizeSystemText

packages/e2e-tests/src/cache-analysis.ts:97–99  ·  view source on GitHub ↗

Normalize the per-request billing nonce so it isn't seen as a content change.

(text: string)

Source from the content-addressed store, hash-verified

95
96/** Normalize the per-request billing nonce so it isn't seen as a content change. */
97function normalizeSystemText(text: string): string {
98 return text.replace(/cch=[^;]*;/g, "cch=<NONCE>;");
99}
100
101function blockText(block: unknown): string {
102 if (block && typeof block === "object" && typeof (block as Json).text === "string") {

Callers 1

buildSegmentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected