Expand description
Structured conversation compaction for context overflow handling
When conversation history exceeds context limits, this module provides tools to compact the history while preserving key information like:
- User’s original intent and requirements
- Important decisions made
- Code changes and their rationale
- Error messages and debugging information
Structs§
- Code
Change - A code change with metadata
- Compaction
Result - Compaction result with statistics
- Compaction
Strategy - Compaction strategy for preserving different types of information
- Error
Solution - An error and its solution
- Parsed
Compaction Summary - Parse a structured compaction summary
Functions§
- build_
compaction_ prompt - Build a structured compaction prompt for the LLM
- compact_
messages - Compact messages based on the given strategy
- parse_
compaction_ summary - Parse a structured compaction summary from LLM output
- summary_
to_ message - Convert a parsed compaction summary back to a message