fix(history_text): preserve recent entries when truncating transcript#12
Open
kvpratama wants to merge 1 commit intorasbt:mainfrom
Open
fix(history_text): preserve recent entries when truncating transcript#12kvpratama wants to merge 1 commit intorasbt:mainfrom
kvpratama wants to merge 1 commit intorasbt:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clip() kept the head of the assembled transcript, but history is built oldest-first, so truncation silently dropped the most recent entries exactly the ones the recency-weighting logic (900 vs 180 char limits) was designed to protect.
Add tail_clip(), which mirrors clip() but keeps the tail, and use it in history_text(). A truncation notice at the top of the string lets the model know older context was dropped.
Also add a regression test for the history_text() truncation behaviour.