e2e: long_session cuts the last file of a turn to the budget (a whole file overshot the 256k context)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
f8f4fbbec6
commit
c40531f071
@@ -45,7 +45,7 @@ def take(files, start, chars):
|
||||
parts, used, i = [], 0, start
|
||||
while i < len(files) and used < chars:
|
||||
with open(files[i], encoding="utf-8", errors="replace") as f:
|
||||
text = f.read()
|
||||
text = f.read()[: chars - used] # the last file is cut to the budget, so a turn never overshoots by a whole file
|
||||
parts.append("// ==== " + os.path.relpath(files[i], os.path.dirname(files[0])).replace("\\", "/") + "\n" + text)
|
||||
used += len(text)
|
||||
i += 1
|
||||
|
||||
Reference in New Issue
Block a user