UNPKG

apply-multi-diff

Version:

A zero-dependency library to apply unified diffs and search-and-replace patches, with support for fuzzy matching.

19 lines (16 loc) 714 B
import { ApplyDiffResult } from '../types.js'; declare const getToolDescription: (cwd: string) => string; type SearchReplaceBlock = { search: string; replace: string; }; declare const _parseDiff_for_debug: (diffContent: string) => SearchReplaceBlock[] | null; declare const _findBestMatch_for_debug: (sourceLines: readonly string[], searchLines: readonly string[], startLine: number, endLine: number) => { index: number; distance: number; } | null; declare const applyDiff: (original_content: string, diff_content: string, options?: { start_line?: number; end_line?: number; }) => ApplyDiffResult; export { _findBestMatch_for_debug, _parseDiff_for_debug, applyDiff, getToolDescription };