klyn.llm.LLMChatSession.withCompactor
method

    public withCompactor(strategy as String, threshold as Int) as LLMChatSession:

Description

Configures context compaction.

The system prompt is preserved while older exchanges may be summarized once the configured limit is reached. When a token context window is configured, token usage is authoritative and the character threshold is used only as a fallback for sessions without token accounting.