MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / capContext

Function capContext

src/core/hooks.ts:346–349  ·  view source on GitHub ↗

Cap injected context so a single hook can't blow the model's context window.

(text: string)

Source from the content-addressed store, hash-verified

344
345/** Cap injected context so a single hook can't blow the model's context window. */
346function capContext(text: string): string {
347 if (text.length <= MAX_CONTEXT_CHARS) return text
348 return text.slice(0, MAX_CONTEXT_CHARS) + "\n[…truncated by OrbCode hook context cap…]"
349}
350
351/** Keys always stripped from the hook environment (OrbCode credentials/config). */
352const HOOK_ENV_REDACT_EXACT = new Set([

Callers 1

aggregateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected