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

@@ -35,6 +35,8 @@ internal sealed class TokenTracker
RequestCount++;
}
private const int MaxContextReserve = 150_000;
/// <summary>
/// Returns true if the context is getting too large and should be compacted.
/// Triggers at min(75% of model context, 150K tokens).
@@ -44,8 +46,8 @@ internal sealed class TokenTracker
if (LastInputTokens <= 0) return false;
int threshold = ContextLength > 0
? Math.Min((int)(ContextLength * 0.75), 150_000)
: 150_000;
? Math.Min((int)(ContextLength * 0.75), MaxContextReserve)
: MaxContextReserve;
return LastInputTokens >= threshold;
}