/** * Simple implementation of flexibleSearchAndReplace that only uses the basic search and replace * * @param texts - Array containing [searchText, replaceText, originalText] * @returns The modified text or undefined if unsuccessful */ export declare function flexiJustSearchAndReplace(texts: string[]): string | undefined; /** * Directly applies a diff hunk to content using search and replace * * @param content - The original content to modify * @param hunk - Array of strings representing the diff hunk * @returns The modified content or undefined if the hunk couldn't be applied */ export declare function directlyApplyHunk(content: string, hunk: string[]): string | undefined; /** * Converts a unified diff hunk into before and after text blocks. * * @param hunk - Array of strings representing the diff hunk lines * @param returnLines - Whether to return arrays of lines instead of joined strings * @returns A tuple containing the before and after text/lines */ export declare function hunkToBeforeAfter(hunk: string[], returnLines?: boolean): [string[] | string, string[] | string]; /** * Normalizes a diff hunk by cleaning up whitespace and reformatting * * @param hunk - Array of strings representing the diff hunk lines * @returns Normalized diff hunk as an array of lines */ export declare function normalizeHunk(hunk: string[]): string[]; /** * Process a fenced code block to extract diff hunks. * * @param lines Array of lines with newline characters preserved * @param startLineNum Starting line number of the fenced block content * @returns Tuple of [endLineNum, edits] where endLineNum is the line after the closing fence * and edits is an array of [path, hunk] tuples */ export declare function processFencedBlock(lines: string[], startLineNum: number): [number, Array<[string | null, string[]]>]; /** * Finds diff blocks in the given content. * We can always fence with triple-quotes, because all the udiff content * is prefixed with +/-/space. * * @param content The content to search for diffs * @returns Array of edits, where each edit is a tuple of [path, hunk] */ export declare function findDiffs(content: string): Array<{ oldFileName: string; newFileName: string; hunks: string[][]; }>;