ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
138 lines • 3.54 kB
TypeScript
/**
* File Change Monitor
* Monitors file system changes during development with automatic screenshot capture
* Core utility for Code Quality Integration
*/
export interface FileChangeConfig {
projectPath: string;
filePatterns: string[];
screenshotOnChange: boolean;
sessionId: string;
session: any;
}
export interface FileChange {
id: string;
timestamp: number;
path: string;
type: 'created' | 'modified' | 'deleted';
size: number;
linesChanged?: number;
files?: Array<{
path: string;
linesChanged: number;
}>;
}
export interface ChangeImpactAnalysis {
change: FileChange | null;
uiImpact: 'high' | 'medium' | 'low' | 'none';
functionalityImpact: 'high' | 'medium' | 'low' | 'none';
performanceImpact: 'positive' | 'negative' | 'neutral';
visualDiff?: {
screenshotsCompared: number;
similarity: number;
changesDetected: number;
};
performanceAnalysis?: {
loadTimeChange: number;
bundleSizeChange: number;
memoryImpact: number;
};
recommendations: string[];
}
export interface MonitoringReport {
duration: string;
changedFiles: Array<{
path: string;
changeCount: number;
lastChanged: number;
}>;
totalChanges: number;
screenshotsCaptured: number;
uiStabilityScore?: number;
detailedReport?: string;
}
export declare class FileChangeMonitor {
private isMonitoring;
private monitorId?;
private config?;
private changes;
private screenshots;
private startTime?;
private watchers;
/**
* Start monitoring file changes
*/
startMonitoring(config: FileChangeConfig): Promise<{
monitorId: string;
watchedFiles: number;
}>;
/**
* Stop monitoring and generate report
*/
stopMonitoring(generateReport?: boolean): Promise<MonitoringReport | null>;
/**
* Get change impact analysis for a specific change
*/
getChangeImpactAnalysis(options: {
changeId?: string;
includeVisualDiff?: boolean;
includePerformanceImpact?: boolean;
}): Promise<ChangeImpactAnalysis>;
/**
* Handle individual file changes
*/
private handleFileChange;
/**
* Get files to watch based on patterns
*/
private getFilesToWatch;
/**
* Setup directory watchers for new files
*/
private setupDirectoryWatchers;
/**
* Count lines changed in a file (simplified implementation)
*/
private countLinesChanged;
/**
* Capture screenshot when file changes
*/
private captureScreenshotForChange;
/**
* Assess UI impact of a change
*/
private assessUIImpact;
/**
* Assess functionality impact of a change
*/
private assessFunctionalityImpact;
/**
* Assess performance impact of a change
*/
private assessPerformanceImpact;
/**
* Generate recommendations based on change analysis
*/
private generateRecommendations;
/**
* Perform visual diff analysis
*/
private performVisualDiffAnalysis;
/**
* Perform performance analysis
*/
private performPerformanceAnalysis;
/**
* Calculate UI stability score
*/
private calculateUIStabilityScore;
/**
* Generate detailed report
*/
private generateDetailedReport;
/**
* Format duration string
*/
private formatDuration;
}
//# sourceMappingURL=file-change-monitor.d.ts.map