/** * File Chunker Module * Handles large files by chunking them intelligently and generating summaries * so important context isn't lost during analysis. * * Strategy: * 1. Chunk large files by logical boundaries (functions, classes) * 2. Generate brief summaries of each chunk * 3. Provide full chunk content on demand */ import type { FileChunk } from './types.js'; /** Default chunk size (50KB) */ declare const DEFAULT_CHUNK_SIZE = 50000; /** Maximum file size to process (500KB - anything larger gets skeleton only) */ declare const MAX_PROCESSABLE_SIZE = 500000; /** * Chunk file by logical boundaries when possible */ export declare function smartChunkFile(content: string, ext: string, chunkSize?: number): FileChunk[]; /** * Extract a skeleton/outline from a chunk (no LLM needed) */ export declare function extractChunkSkeleton(chunk: FileChunk, ext: string): string; /** * Generate a brief description of what's in a chunk (pattern-based, no LLM) */ export declare function describeChunk(chunk: FileChunk, _ext: string): string; /** Processed large file result */ export interface ProcessedLargeFile { /** Original file path */ path: string; /** Total size in bytes */ size: number; /** Number of chunks */ chunkCount: number; /** Skeleton/outline of the file */ skeleton: string; /** Brief description of each chunk */ chunkDescriptions: string[]; /** Full chunks (for on-demand access) */ chunks: FileChunk[]; /** Whether file was too large to fully process */ truncated: boolean; } /** * Process a large file for analysis */ export declare function processLargeFile(content: string, filePath: string, options?: { chunkSize?: number; maxSize?: number; }): ProcessedLargeFile; /** * Create a summary representation of a large file for the LLM */ export declare function createLargeFileSummary(processed: ProcessedLargeFile): string; /** * Get a specific chunk's full content */ export declare function getChunkContent(processed: ProcessedLargeFile, chunkIndex: number): string | null; export { DEFAULT_CHUNK_SIZE, MAX_PROCESSABLE_SIZE, }; //# sourceMappingURL=file-chunker.d.ts.map