1
0

feat: add EditTools.cs to implement file manipulation functions like replace_lines, delete_range, and batch_edit, updating README.md to reflect new tools and command descriptions.

This commit is contained in:
2026-03-06 03:20:48 +01:00
parent 8f2c72b3c5
commit 4fbbde32e3
3 changed files with 8 additions and 173 deletions

View File

@@ -352,8 +352,8 @@ internal static partial class EditTools
}
}
// Sort operations bottom-to-top (by start index descending) for safe application
var sortedOps = resolvedOps.OrderByDescending(x => x.StartIdx).ToList();
// Sort operations top-to-bottom (by start index ascending) because we build a new list sequentially
var sortedOps = resolvedOps.OrderBy(x => x.StartIdx).ToList();
// Apply all operations to a single buffer
var result = new List<string>(lines.Length);