@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
32 lines (31 loc) • 1.49 kB
TypeScript
/**
* @fileoverview Utilities for extracting and parsing code review results.
*
* This module provides functions for extracting actionable items from code review results,
* including parsing sections by priority, identifying file locations, and extracting code snippets.
*/
import { FixPriority, FixSuggestion } from './types';
/**
* Extract fix suggestions from review content
* @param reviewContent The content of the review
* @param projectPath Base path of the project
* @param priorityLevel Optional priority level to extract (if not provided, extracts all)
* @returns Array of fix suggestions
*/
export declare function extractFixSuggestions(reviewContent: string, projectPath: string, priorityLevel?: FixPriority): Promise<FixSuggestion[]>;
/**
* Extract a section from the review content
* @param content Full review content
* @param startMarker Start marker for the section
* @param endMarker End marker for the section
* @returns The extracted section or null if not found
*/
export declare function extractSection(content: string, startMarker: string, endMarker: string): string | null;
/**
* Parse suggestions from a section of the review
* @param sectionContent Content of the section
* @param priority Priority level of the suggestions
* @param projectPath Base path of the project
* @returns Array of fix suggestions
*/
export declare function parseSuggestions(sectionContent: string, priority: FixPriority, projectPath: string): Promise<FixSuggestion[]>;