UNPKG

cyclic-dependency-fixer

Version:

AI-powered tool to detect and fix circular dependencies in JavaScript/TypeScript projects. Features intelligent refactoring with Claude/GPT-4, codebase pattern learning, and context-aware fix recommendations

30 lines 1.43 kB
import { IAIProvider } from '../../domain/interfaces/IAIProvider'; import { Cycle, Module, ModulePath, FixStrategy, ManualStep } from '../../domain/models/types'; import { IFileSystem } from '../../domain/interfaces/IFileSystem'; export interface RefactoringCode { readonly filePath: string; readonly code: string; readonly description: string; readonly isNewFile: boolean; } export interface RefactoringSuggestion { readonly strategy: FixStrategy; readonly codeSnippets: readonly RefactoringCode[]; readonly instructions: readonly string[]; readonly explanation: string; readonly impact: 'low' | 'medium' | 'high'; } export declare class AIRefactoringGenerator { private readonly aiProvider; private readonly fileSystem; constructor(aiProvider: IAIProvider, fileSystem: IFileSystem); generateRefactoring(cycle: Cycle, modules: ReadonlyMap<ModulePath, Module>, strategy: FixStrategy): Promise<RefactoringSuggestion | null>; generateManualSteps(cycle: Cycle, modules: ReadonlyMap<ModulePath, Module>, strategy: FixStrategy): Promise<readonly ManualStep[]>; explainCycle(cycle: Cycle, modules: ReadonlyMap<ModulePath, Module>): Promise<string>; private extractFullCycleCode; private buildRefactoringPrompt; private getStrategyDescription; private describeCycle; private parseRefactoringSuggestion; } //# sourceMappingURL=AIRefactoringGenerator.d.ts.map