@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
37 lines (36 loc) • 1.49 kB
TypeScript
/**
* @fileoverview Utilities for formatting prompts for AI models.
*
* This module provides functions for formatting prompts for different AI models,
* including handling code blocks, project context, and review instructions.
*/
import { ProjectDocs } from '../../utils/projectDocs';
/**
* Format a code block with the appropriate language
* @param fileContent The content of the file
* @param filePath The path to the file
* @returns The formatted code block
*/
export declare function formatCodeBlock(fileContent: string, filePath: string): string;
/**
* Format a single file review prompt
* @param promptTemplate The prompt template
* @param fileContent The content of the file
* @param filePath The path to the file
* @param projectDocs Optional project documentation
* @returns The formatted prompt
*/
export declare function formatSingleFileReviewPrompt(promptTemplate: string, fileContent: string, filePath: string, projectDocs?: ProjectDocs | null): string;
/**
* Format a consolidated review prompt
* @param promptTemplate The prompt template
* @param projectName The name of the project
* @param files Array of file information
* @param projectDocs Optional project documentation
* @returns The formatted prompt
*/
export declare function formatConsolidatedReviewPrompt(promptTemplate: string, projectName: string, files: Array<{
relativePath?: string;
content: string;
sizeInBytes: number;
}>, projectDocs?: ProjectDocs | null): string;