1
0

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:
2026-03-04 14:54:36 +01:00
parent 928ca8c454
commit 31cf7cb4c1
12 changed files with 492 additions and 327 deletions

View File

@@ -71,6 +71,8 @@ internal static class HashlineEncoder
/// Computes a short file-level fingerprint: XOR of all per-line hashes (as bytes).
/// Useful for cheap full-file staleness checks.
/// </summary>
/// <param name="lines">All lines of the file (without trailing newlines).</param>
/// <returns>A 2-character hex fingerprint.</returns>
public static string FileFingerprint(string[] lines)
{
int fp = 0;

View File

@@ -83,6 +83,13 @@ internal static class HashlineValidator
/// <summary>
/// Validates both a start and end anchor, and ensures start &lt;= end.
/// </summary>
/// <param name="startAnchor">The starting anchor string.</param>
/// <param name="endAnchor">The ending anchor string.</param>
/// <param name="lines">Current file lines (without newlines).</param>
/// <param name="startIndex">Resolved 0-based start index on success.</param>
/// <param name="endIndex">Resolved 0-based end index on success.</param>
/// <param name="error">Human-readable error message on failure.</param>
/// <returns>True if the range is valid; false otherwise.</returns>
public static bool TryResolveRange(
string startAnchor,
string endAnchor,