import { SearchInWorkspaceResult } from '@theia/search-in-workspace/lib/common/search-in-workspace-interface'; import { URI } from '@theia/core'; /** * Interface for workspace scope path resolution. * This allows the utility to work with multi-root workspaces. */ export interface WorkspacePathResolver { toWorkspaceRelativePath(uri: URI): string | undefined; } /** * Optimizes search results for token efficiency while preserving all information. * - Groups matches by file to reduce repetition * - Trims leading/trailing whitespace from line text * - Uses root-prefixed relative file paths (e.g., "rootName/src/file.ts"), falling back to the absolute * path for hits outside the workspace roots * - Preserves all line numbers and content */ export declare function optimizeSearchResults(results: SearchInWorkspaceResult[], workspacePathResolver: WorkspacePathResolver): Array<{ file: string; matches: Array<{ line: number; text: string; }>; }>; //# sourceMappingURL=workspace-search-provider-util.d.ts.map