feat: Introduce Hashline encoding/validation, implement core REPL and chat session logic, and establish initial project structure with a license and editor configuration.
This commit is contained in:
@@ -64,15 +64,7 @@ internal static partial class EditTools
|
||||
Log($"REPLACE_LINES: {path}");
|
||||
Log($" Range: {startAnchor} -> {endAnchor}");
|
||||
Log($" Replacing {endAnchor.Split(':')[0]}-{startAnchor.Split(':')[0]} lines with {newLines.Length} new lines");
|
||||
/*Log($" New content (first 5 lines):");
|
||||
foreach (var line in newLines.Take(5))
|
||||
{
|
||||
Log($" + {line}");
|
||||
}
|
||||
if (newLines.Length > 5)
|
||||
{
|
||||
Log($" ... and {newLines.Length - 5} more lines");
|
||||
}*/
|
||||
|
||||
if (!File.Exists(path))
|
||||
return $"ERROR: File not found: {path}";
|
||||
|
||||
@@ -109,15 +101,7 @@ internal static partial class EditTools
|
||||
Log($"INSERT_AFTER: {path}");
|
||||
Log($" Anchor: {anchor}");
|
||||
Log($" Inserting {newLines.Length} lines after line {anchor.Split(':')[0]}");
|
||||
/*Log($" New content (first 5 lines):");
|
||||
foreach (var line in newLines.Take(5))
|
||||
{
|
||||
Log($" + {line}");
|
||||
}
|
||||
if (newLines.Length > 5)
|
||||
{
|
||||
Log($" ... and {newLines.Length - 5} more lines");
|
||||
}*/
|
||||
|
||||
|
||||
if (!File.Exists(path))
|
||||
return $"ERROR: File not found: {path}";
|
||||
@@ -129,8 +113,7 @@ internal static partial class EditTools
|
||||
if (!HashlineValidator.TryResolve(anchor, lines, out int idx, out string error))
|
||||
return $"ERROR: {error}";
|
||||
|
||||
// Log the anchor line we're inserting after
|
||||
//Log($" Inserting after line {idx + 1}: {lines[idx]}");
|
||||
|
||||
|
||||
var result = new List<string>(lines.Length + newLines.Length);
|
||||
result.AddRange(lines[..(idx + 1)]);
|
||||
|
||||
Reference in New Issue
Block a user