mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
f561f4cfd9
After /compact, BuildContext emitted [summary, post-compact, kept] which placed an older kept user/assistant turn after the latest post-compaction turn. This broke user/assistant alternation and caused the model to respond as if the post-compaction turn never happened on the next user message. - Emit kept messages chronologically before post-compaction messages - Mirror the same order in GetContextEntryIDs so cut-point to entry-ID mapping stays aligned across repeat compactions - Update TestCompactionWithNewMessagesAfterCompaction to assert the correct chronological order