Sliding window compaction strategy.
This strategy keeps the most recent N messages, discarding older ones. Simple and predictable, but loses conversation history.
Configuration
:window_size- Number of messages to keep (default: 20)
Example
{:ok, compacted} = Puck.Compaction.compact(context, {Puck.Compaction.SlidingWindow, %{
window_size: 30
}})