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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user