compactMessages
function compactMessages(options): Promise<CompactionResult>;Pure compaction step: returns a new message list when compaction applied.
The kept tail always starts at a user message so assistant/tool-call
pairs are never split across the summary boundary.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<CompactionResult>