import { InstantiationService } from "../../base/common/instantiation/instantiationService";
import { CodeFile } from "../../codemodel/CodeElement";
import { CodeAnalysisResult } from "../CodeAnalysisResult";
import { AppConfig } from "../../types/AppConfig";
import { ApiResource } from "@autodev/worker-core";
export declare class CodeAnalyzer {
    private serviceProvider;
    private structurerManager;
    private fileScanner;
    private codeCollector;
    private analyzers;
    private markdownAnalyser;
    private config;
    private httpApiAnalyser;
    constructor(instantiationService: InstantiationService, config?: Partial<AppConfig>);
    updateConfig(config: AppConfig): void;
    private filesInDir;
    private markdownFilesInDir;
    /**
     * Initialize and parse files in the directory
     * @param fileFilter Optional function to filter files by name
     * @returns Array of parsed CodeFile objects
     */
    initializeFiles(fileFilter?: (fileName: string) => boolean): Promise<CodeFile[]>;
    /**
     * 通用的文件名过滤器生成函数
     * @param patterns 文件名应匹配的模式数组
     * @returns 过滤函数
     */
    static createFileNameFilter(patterns: string[]): (fileName: string) => boolean;
    analyzeDirectory(): Promise<CodeAnalysisResult>;
    parseCodeStructures(files: string[]): Promise<CodeFile[]>;
    private analyzeMarkdownFiles;
    generateLearningMaterials(result: CodeAnalysisResult, outputDir?: string): Promise<string[]>;
    convertToList(result: CodeAnalysisResult, targetDir?: string): Promise<{
        path: string;
        content: string;
    }[]>;
    /**
     * Generate content for an interface and its implementations
     */
    private generateInterfaceContent;
    /**
     * Generate content for a class extension hierarchy
     */
    private generateExtensionContent;
    private generateMarkdownBlockContent;
    /**
     * 从文件中读取指定位置的代码段
     */
    private readCodeSection;
    private sanitizeFileName;
    /**
     * Escape code content for safe inclusion in Markdown code blocks
     */
    private escapeCodeForMarkdown;
    analyzeApi(files: CodeFile[]): Promise<ApiResource[]>;
}
