remcode
Version:
Turn your AI assistant into a codebase expert. Intelligent code analysis, semantic search, and software engineering guidance through MCP integration.
49 lines (48 loc) • 1.46 kB
TypeScript
import { FileChange, FileAnalysis, AnalysisOptions } from './types';
export declare class FileAnalyzer {
private repoPath;
private maxFileSize;
constructor(repoPath?: string, options?: {
maxFileSizeBytes?: number;
});
/**
* Analyze a list of changed files to determine their characteristics
*/
analyzeChangedFiles(changes: FileChange[], options?: Partial<AnalysisOptions>): Promise<FileAnalysis[]>;
/**
* Analyze a single file to determine its characteristics
*/
analyzeFile(filePath: string, options: AnalysisOptions): Promise<FileAnalysis>;
/**
* Analyze JavaScript/TypeScript code
*/
private analyzeJsTs;
/**
* Analyze Python code
*/
private analyzePython;
/**
* Count source lines of code (excluding comments and blank lines)
*/
private countSourceLines;
/**
* Determine the complexity of a file based on its characteristics
*/
private determineComplexity;
/**
* Determine the initial chunking strategy based on file path and language
*/
private determineChunkingStrategy;
/**
* Refine the chunking strategy based on the detailed analysis
*/
private refineChunkingStrategy;
/**
* Detect the programming language of a file based on its extension
*/
private detectLanguage;
/**
* Categorize a file based on its path and name
*/
private categorizeFile;
}