/** * Learning Mode - remember user preferences and coding style */ export interface UserPreferences { codeStyle: { indentation: 'tabs' | 'spaces'; indentSize: number; quotes: 'single' | 'double'; semicolons: boolean; trailingComma: 'none' | 'es5' | 'all'; lineWidth: number; }; naming: { variables: 'camelCase' | 'snake_case' | 'PascalCase'; functions: 'camelCase' | 'snake_case' | 'PascalCase'; classes: 'PascalCase' | 'camelCase'; constants: 'UPPER_CASE' | 'camelCase'; files: 'kebab-case' | 'camelCase' | 'PascalCase' | 'snake_case'; }; frameworks: { frontend?: string; backend?: string; testing?: string; styling?: string; stateManagement?: string; }; languages: { primary?: string; preferTypeScript: boolean; preferAsyncAwait: boolean; }; patterns: { importStyle?: 'named' | 'default' | 'mixed'; exportStyle?: 'named' | 'default' | 'mixed'; componentStyle?: 'functional' | 'class'; errorHandling?: 'try-catch' | 'then-catch' | 'result-type'; }; preferredLibraries: string[]; customRules: string[]; lastUpdated: number; sampleCount: number; } export interface ProjectPreferences extends UserPreferences { projectPath: string; } /** * Load global preferences */ export declare function loadGlobalPreferences(): UserPreferences; /** * Save global preferences */ export declare function saveGlobalPreferences(prefs: UserPreferences): void; /** * Load project-specific preferences */ export declare function loadProjectPreferences(projectRoot: string): UserPreferences; /** * Save project-specific preferences */ export declare function saveProjectPreferences(projectRoot: string, prefs: Partial): void; /** * Analyze code to learn preferences */ export declare function learnFromCode(code: string, filename: string, currentPrefs: UserPreferences): Partial; /** * Learn from multiple files in a project */ export declare function learnFromProject(projectRoot: string, files: string[]): UserPreferences; /** * Format preferences for system prompt */ export declare function formatPreferencesForPrompt(prefs: UserPreferences): string; /** * Add a custom rule */ export declare function addCustomRule(rule: string, projectRoot?: string): void; /** * Remove a custom rule */ export declare function removeCustomRule(rule: string, projectRoot?: string): void; /** * Reset preferences */ export declare function resetPreferences(projectRoot?: string): void; /** * Get learning status */ export declare function getLearningStatus(projectRoot?: string): string;