Message store for virtualized chat history.
This module provides data structures and management for message virtualization, allowing the TUI to handle large message histories efficiently by keeping only a sliding window of widgets in the DOM while storing all message data as lightweight dataclasses.
The approach is inspired by Textual's Log widget, which only keeps N lines
in the DOM and recreates older ones on demand.