UNPKG

repomix

Version:

A tool to pack repository contents to single file for AI consumption

27 lines 2.14 kB
import type { RepomixConfigMerged } from '../../config/configSchema.js'; import type { RepomixProgressCallback } from '../../shared/types.js'; import type { ProcessedFile } from '../file/fileTypes.js'; import type { GitDiffResult } from '../git/gitDiffHandle.js'; export interface CalculateMetricsResult { totalFiles: number; totalCharacters: number; totalTokens: number; fileCharCounts: Record<string, number>; fileTokenCounts: Record<string, number>; gitDiffTokenCount: number; } export declare const calculateMetrics: (processedFiles: ProcessedFile[], output: string, progressCallback: RepomixProgressCallback, config: RepomixConfigMerged, gitDiffResult: GitDiffResult | undefined, deps?: { calculateAllFileMetrics: (processedFiles: ProcessedFile[], tokenCounterEncoding: import("tiktoken").TiktokenEncoding, progressCallback: RepomixProgressCallback, deps?: { initTaskRunner: <T, R>(numOfTasks: number, workerPath: string) => import("../../shared/processConcurrency.js").TaskRunner<T, R>; }) => Promise<import("./workers/types.js").FileMetrics[]>; calculateSelectiveFileMetrics: (processedFiles: ProcessedFile[], targetFilePaths: string[], tokenCounterEncoding: import("tiktoken").TiktokenEncoding, progressCallback: RepomixProgressCallback, deps?: { initTaskRunner: <T, R>(numOfTasks: number, workerPath: string) => import("../../shared/processConcurrency.js").TaskRunner<T, R>; }) => Promise<import("./workers/types.js").FileMetrics[]>; calculateOutputMetrics: (content: string, encoding: import("tiktoken").TiktokenEncoding, path?: string, deps?: { initTaskRunner: <T, R>(numOfTasks: number, workerPath: string) => import("../../shared/processConcurrency.js").TaskRunner<T, R>; }) => Promise<number>; calculateGitDiffMetrics: (config: RepomixConfigMerged, gitDiffResult: GitDiffResult | undefined, deps?: { initTaskRunner: <T, R>(numOfTasks: number, workerPath: string) => import("../../shared/processConcurrency.js").TaskRunner<T, R>; }) => Promise<number>; }) => Promise<CalculateMetricsResult>; //# sourceMappingURL=calculateMetrics.d.ts.map