makePrompt function test

Last updated: 2026-03-01T23:25:47.067Z

Metrics

LOC: 17 Complexity: 1 Params: 3

Signature

makePrompt( overrides: Partial<StructuredPrompt<unknown, unknown>> = {}, ): : StructuredPrompt<unknown, unknown>

Source Code

function makePrompt(
  overrides: Partial<StructuredPrompt<unknown, unknown>> = {},
): StructuredPrompt<unknown, unknown> {
  return {
    id: "test-prompt",
    version: "1.0.0",
    role: "system",
    persona: "You are a test assistant.",
    task: "Do something useful.",
    rules: ["Rule 1", "Rule 2"],
    outputSchema: undefined,
    examples: [],
    buildPrompt: () => "",
    parseResponse: () => null,
    ...overrides,
  };
}

Dependencies (Outgoing)

graph LR makePrompt["makePrompt"] renderOutputSchema["renderOutputSchema"] renderPromptBase["renderPromptBase"] renderSystemPrompt["renderSystemPrompt"] StructuredPrompt["StructuredPrompt"] PromptOutputField["PromptOutputField"] makePrompt -->|uses| renderOutputSchema makePrompt -->|uses| renderPromptBase makePrompt -->|uses| renderSystemPrompt makePrompt -->|uses| StructuredPrompt makePrompt -->|uses| PromptOutputField makePrompt -->|calls| makePrompt style makePrompt fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makePrompt "ea0597fcfc9fdb16.html" click renderOutputSchema "a94ee40c258cb1af.html" click renderPromptBase "1d807d7283d93d7a.html" click renderSystemPrompt "eaffa002075266b5.html" click StructuredPrompt "a828ccf4d3eb7bb7.html" click PromptOutputField "a24a06f1b274d092.html"

Impact (Incoming)

graph LR makePrompt["makePrompt"] makePrompt -->|calls| makePrompt style makePrompt fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makePrompt "ea0597fcfc9fdb16.html"
SourceType
makePrompt calls