Skip to content

dependabit / detector/src / createDetectionPrompt

Function: createDetectionPrompt()

ts
function createDetectionPrompt(
   contentType, 
   filePath, 
   content): string;

Defined in: packages/detector/src/llm/prompts.ts:101

Renders a detection prompt by substituting the content-type, file path, and raw content into DETECTION_PROMPT_TEMPLATE.

Parameters

ParameterTypeDescription
contentTypestringHuman-readable label for the content (e.g. "README").
filePathstringRepository-relative file path for context.
contentstringRaw file content to analyze (not truncated here — callers should truncate before passing to stay within token budgets).

Returns

string

Rendered prompt string ready to send to an LLM provider.

Released under the MIT License.