UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

43 lines (42 loc) 2.1 kB
/** * @fileoverview Wrapper for the OpenAI client. * * This module provides a wrapper for the OpenAI client using the class-based implementation. * This wrapper maintains backward compatibility while using the modern client architecture. */ import { ReviewType, ReviewOptions, ReviewResult, FileInfo } from '../types/review'; import { ProjectDocs } from '../utils/projectDocs'; /** * Initialize the OpenAI client * @returns Promise resolving to a boolean indicating if initialization was successful */ export declare function initializeAnyOpenAIModel(): Promise<boolean>; /** * Generate a consolidated review using the OpenAI API * @param fileInfos Array of file information objects * @param project Project name * @param reviewType Type of review to perform * @param projectDocs Optional project documentation * @param options Review options * @returns Promise resolving to the review result */ export declare function generateOpenAIConsolidatedReview(fileInfos: FileInfo[], project: string, reviewType: ReviewType, projectDocs: ProjectDocs | null, options: ReviewOptions): Promise<ReviewResult>; /** * Generate a single-file review using the OpenAI API * @param fileContent Content of the file to review * @param filePath Path to the file * @param reviewType Type of review to perform * @param projectDocs Optional project documentation * @param options Review options * @returns Promise resolving to the review result */ export declare function generateOpenAIReview(fileContent: string, filePath: string, reviewType: ReviewType, projectDocs?: ProjectDocs | null, options?: ReviewOptions): Promise<ReviewResult>; /** * Generate an architectural review using the OpenAI API * @param fileInfos Array of file information objects * @param project Project name * @param projectDocs Optional project documentation * @param options Review options * @returns Promise resolving to the review result */ export declare function generateOpenAIArchitecturalReview(fileInfos: FileInfo[], project: string, projectDocs: ProjectDocs | null, options: ReviewOptions): Promise<ReviewResult>;