giga-code
Version:
A personal AI CLI assistant powered by Grok for local development.
33 lines (32 loc) • 934 B
TypeScript
import { CodeChunk } from './rag-service';
import { RAGConfig } from '../utils/rag-config';
export interface ChunkingStats {
totalFiles: number;
processedFiles: number;
totalChunks: number;
skippedFiles: number;
errors: string[];
}
export declare class ChunkingService {
private config;
private projectPath;
constructor(projectPath?: string, config?: RAGConfig);
chunkProject(): Promise<{
chunks: CodeChunk[];
stats: ChunkingStats;
}>;
chunkFile(filePath: string): Promise<CodeChunk[]>;
private findFiles;
private shouldExcludeFile;
private createFixedChunks;
private generateChunkId;
private getLanguageFromPath;
updateConfig(newConfig: RAGConfig): void;
getConfig(): RAGConfig;
getProjectStats(): Promise<{
totalFiles: number;
includedFiles: number;
excludedFiles: number;
estimatedChunks: number;
}>;
}