feat: consolidate file write, move, grep, and delete operations into unified tools and update context compaction heuristics
This commit is contained in:
@@ -71,10 +71,10 @@ internal sealed partial class ContextCompactor(IChatClient client)
|
||||
string reason = "";
|
||||
|
||||
// Rule 1: Deduplication. If we have already seen this file in a newer message (since we are walking backward), redact this one.
|
||||
if (filesRead.TryGetValue(filePath, out int count) && count >= 3)
|
||||
if (filesRead.TryGetValue(filePath, out int count) && count >= 5)
|
||||
{
|
||||
shouldRedact = true;
|
||||
reason = "deduplication — you read this file 3 or more times later";
|
||||
reason = "deduplication — you read this file 5 or more times later";
|
||||
}
|
||||
// Rule 2: TTL. If this was read 2 or more user turns ago, redact it.
|
||||
else if (userTurnsSeen >= 2)
|
||||
|
||||
Reference in New Issue
Block a user