Skip to Content
UI Kit
Components (172)

Context Compaction

Context Compaction — an agent's context window filling up and being compacted, in a single self-contained file.

Open preview
Loading Context Compaction…

Usage

import { ContextCompaction } from "ui-kit/components/context-compaction";

Props

PropTypeDefaultDescription
entries*ContextEntry[]——
limit*number—The window's size in tokens
thresholdnumber0.8Share of the limit at which it compacts on its own – the dashed mark (0–1, default 0.8)
compactingstring[][]Ids of the entries being compacted right now – they shimmer until a summary replaces them
titlestring"Context"—
modelstring—A small tag beside the title, e.g. the model
onCompact() => void—Shows a Compact now button in the last row
rowsnumber7How many rows the list shows before it scrolls (default 7)
classNamestring——

On this page