klyn.llm.LLMChatSession.withCompactionObserver
method
public withCompactionObserver(observer as LLMCompactionObserver) as LLMChatSession
Description

Attaches an observer notified before the context compactor starts. A LLMCompactionLifecycleObserver also receives completion and failure.

UI implementations should enqueue events because compaction runs from the request worker thread.

Example

session.withCompactionObserver(observer)