replaceHistoryWithTLDR

suspend fun AIAgentLLMWriteSession.replaceHistoryWithTLDR(    strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory,     preserveMemory: Boolean = true)(source)

Rewrites LLM message history, leaving only user message and resulting TLDR.

Default is null, which means entire history will be used.

Parameters

preserveMemory

Whether to preserve memory-related messages in the history.