import type { DevToolsSys } from "../types";
import type { Credentials } from "./credentials";
import type { CLIArgs } from "cli";
import type { SessionContext } from "./codegen";
import type { CodebaseSearchOptions, CodebaseSearchResponse, RepoInfo } from "$/ai-utils";
export interface GitRankingParams {
    sys: DevToolsSys;
    appRootDir: string;
    allFiles: string[];
    files: string[];
    hiddenFiles: string[];
    selectedFilePaths: Map<string, number>;
    promptRelevantFiles: string[];
}
export declare function processGitBasedRanking({ sys, appRootDir, allFiles, files, hiddenFiles, selectedFilePaths, promptRelevantFiles, }: GitRankingParams): Promise<void>;
export declare function shouldIncludeFile(inputFile: string, ctx: {
    foundFiles: string[];
    allFiles: string[];
    selectedFilePaths: Map<string, number>;
    cwd: string;
    appRootDir: string;
    fallbackImportance: number | 0;
}): number | 0;
export interface GitFileInfo {
    filePath: string;
    lastModified: Date;
    frequency: number;
    commitIds: string[];
    relatedFiles: Set<string>;
}
export declare function getFileMetadata(sys: DevToolsSys, appRootDir: string, file: string): {
    tokens: number;
    content: string;
};
export declare function calculateMaxFileTokens(fileImportance: number, highImportanceCount: number): number;
/**
 * Get recently modified files using git commands with commit relationship tracking
 */
export declare function getGitModifiedFiles(sys: DevToolsSys, appRootDir: string, commitCount?: number): Promise<Map<string, GitFileInfo>>;
/**
 * Update file relationships based on files modified in the same commit
 */
export declare function updateFileRelationships(fileInfoMap: Map<string, GitFileInfo>, files: string[], commitId: string): void;
/**
 * Calculate importance based on git history and relevant paths
 */
export declare function calculateGitImportance(file: string, gitFiles: Map<string, GitFileInfo>, baseImportance: number, relevantPaths: string[]): number;
export declare function shouldIncludeHiddenFile(sys: DevToolsSys, file: string): boolean;
export declare function performSearch(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, sessionContext: SessionContext, repoInfo: RepoInfo, files: string[], hiddenFiles: string[], userPrompt: string, allFiles: string[], packageJson: any, signal: AbortSignal | undefined): Promise<CodebaseSearchResponse | null>;
export declare function searchCodeBase(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, signal: AbortSignal | undefined, body: CodebaseSearchOptions): Promise<CodebaseSearchResponse | null>;
