Commit Graph

4 Commits

Author SHA1 Message Date
Soulter af444ea6cc feat: implement context compression logic with dynamic threshold and token tracking 2026-01-05 14:12:13 +08:00
Soulter 00471f904e perf 2026-01-05 11:19:32 +08:00
Soulter e23a7e2505 feat: add MockProvider for LLM compression tests 2026-01-05 10:57:00 +08:00
Soulter 1ed4d9f484 Add comprehensive tests for ContextManager and ContextTruncator
- Implemented a full test suite for ContextManager covering initialization, message processing, token-based compression, and error handling.
- Added tests for ContextTruncator focusing on message fixing, truncation by turns, dropping oldest turns, and halving.
- Ensured that both test suites validate edge cases and maintain expected behavior with various message types, including system and tool messages.
2026-01-05 10:48:00 +08:00