Get the oldest visible messages that should be pruned.
Returns a contiguous run of messages from the START of the visible window. Stops at the active streaming message to avoid creating gaps in the visible window (which would desync store state from the DOM).
get_messages_to_prune(
self,
count: int | None = None,
) -> list[MessageData]| Name | Type | Description |
|---|---|---|
count | int | None | Default: NoneNumber of messages to prune, or None to prune enough to get back to WINDOW_SIZE. |