@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
27 lines (26 loc) • 1.29 kB
TypeScript
/**
* @fileoverview Output manager module.
*
* This module is responsible for formatting and saving review outputs to files.
* It centralizes the logic for generating output paths and writing review results.
*/
import { ReviewResult, ReviewOptions, FileInfo } from '../types/review';
/**
* Add file tree visualization to a review
* @param formattedOutput Formatted review output (markdown or JSON)
* @param files Files included in the review
* @param outputFormat Output format (markdown or json)
* @returns Enhanced output with file tree
*/
export declare function addFileTreeToReview(formattedOutput: string, files: FileInfo[], outputFormat: string): string;
/**
* Format and save a review result to a file
* @param review Review result to save
* @param options Review options
* @param outputBaseDir Base directory for output
* @param modelName Name of the model used for the review
* @param targetName Name of the target file or directory
* @param files Optional array of file information to include in the review
* @returns Promise resolving to the path of the saved file
*/
export declare function saveReviewOutput(review: ReviewResult, options: ReviewOptions, outputBaseDir: string, modelName: string, targetName: string, files?: FileInfo[]): Promise<string>;