@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
28 lines (27 loc) • 1.35 kB
TypeScript
/**
* @fileoverview Utilities for loading prompt templates.
*
* IMPORTANT: This module provides functions for loading prompt templates from BUNDLED PROMPTS ONLY.
* The system prioritizes bundled prompts and only falls back to file system prompts if a bundled prompt is not found.
*
* All core prompts are defined in the bundledPrompts.ts file and accessed through the PromptManager.
* This ensures that the system always has access to the prompts it needs, regardless of
* where it's installed or how it's packaged.
*
* This module is a compatibility layer that uses the PromptManager internally.
*/
import { ReviewType, ReviewOptions } from '../../types/review';
/**
* Load a prompt template
* @param reviewType Type of review to perform
* @param options Review options including language
* @returns Promise resolving to the prompt template
*
* IMPORTANT: This function prioritizes bundled prompts.
* The system will first try to use bundled prompts defined in bundledPrompts.ts.
* Only if a bundled prompt is not found will it fall back to custom templates.
*
* This ensures that the system always has access to the prompts it needs,
* regardless of where it's installed or how it's packaged.
*/
export declare function loadPromptTemplate(reviewType: ReviewType, languageOrOptions?: string | ReviewOptions): Promise<string>;