@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
36 lines (35 loc) • 1.16 kB
TypeScript
/**
* @fileoverview File discovery and filtering module.
*
* This module is responsible for finding, filtering, and reading files for review.
* It handles gitignore patterns, test exclusions, and file system operations.
*/
/**
* File information structure
*/
export interface FileInfo {
path: string;
relativePath: string;
content: string;
}
/**
* Discover files for review based on the target path and options
* @param target The target file or directory path
* @param projectPath The project root path
* @param includeTests Whether to include test files
* @returns Array of file paths to review
*/
export declare function discoverFiles(target: string, projectPath: string, includeTests?: boolean): Promise<string[]>;
/**
* Read file contents and prepare file information for review
* @param filePaths Array of file paths to read
* @param projectPath The project root path
* @returns Array of FileInfo objects with file contents
*/
export declare function readFilesContent(filePaths: string[], projectPath: string): Promise<{
fileInfos: FileInfo[];
errors: Array<{
path: string;
error: string;
}>;
}>;