buildUserContextBlock function presentation ✓ 100.0%

Last updated: 2026-03-03T11:04:37.495Z

Metrics

LOC: 7 Complexity: 3 Params: 1 Coverage: 100.0% (2/2 lines, 14x executed)

Signature

buildUserContextBlock(userContext?: string): : string

Summary

Builds the optional user-context block to inject into the prompt. Returns an empty string when no context is present.

Source Code

function buildUserContextBlock(userContext?: string): string {
  if (!userContext || userContext.trim().length === 0) return "";
  return (
    `\nADDITIONAL CONTEXT PROVIDED BY THE USER (use this to guide the generated values):\n` +
    `"""\n${userContext.trim()}\n"""\n`
  );
}

No outgoing dependencies.

Impact (Incoming)

graph LR buildUserContextBlock["buildUserContextBlock"] buildPrompt["buildPrompt"] buildPrompt -->|calls| buildUserContextBlock style buildUserContextBlock fill:#dbeafe,stroke:#2563eb,stroke-width:2px click buildUserContextBlock "a527b402d9512707.html" click buildPrompt "08d57f01dde07ece.html"
SourceType
buildPrompt calls