Context stackPro
An Oxyn original: the window as a pile of slabs under the line where it compacts by itself; each turn thickens the chat until it is pressed into a summary.
oxyn add context-stack- Chat96.4K
- Files38.2K
- Memory5.3K
- Tools18.9K
- System7.6K
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Make compaction physical: the window is a pile, the chat is the top slab, and there is a line it may not cross.
When not to use
- The context window as one stacked bar or a field of dots, with a legend that lights each kind and a Compact / Undo button: use Context bar instead.
- What fills the window as a list of kinds with their share: use Context breakdown instead.
- An Oxyn original: use Context tide instead.
Installation
Context stack is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add context-stackUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Slabs from system (bottom) to chat (top); add turns until the chat crosses the dashed line and is pressed into a summary.
- Chat96.4K
- Files38.2K
- Memory5.3K
- Tools18.9K
- System7.6K
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Early line
The line at 85 %: one more turn compacts it.
- Chat96.4K
- Files38.2K
- Memory5.3K
- Tools18.9K
- System7.6K
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Mono
Monochrome slabs with big turns.
- Chat96.4K
- Files38.2K
- Memory5.3K
- Tools18.9K
- System7.6K
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ContextStack
| Prop | Type | Default | Description |
|---|---|---|---|
parts | Option<Vec<CtxPart>> | Default::default() | The parts (the demo window when `None`). |
limit | u32 | 200_000 | Window size in tokens. |
auto | u32 | 92 | Auto-compact threshold in percent. |
per_turn | u32 | 6_000 | Tokens one turn adds. |
height | f32 | 232.0 | Column height in px. |
mono | bool | Default::default() | Greys instead of kind colours. |
on_compact | EventHandler<bool> | — | Compacted (automatically when `true`). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Add a turn, Compact, Reset |
Accessibility
- The column is an image labelled with the used tokens and percent; the legend repeats every kind as text.
- Each action says the new state in a status line, including an automatic compaction.
Responsive behaviour
- 340 px card; the legend takes the width the column leaves.
Edge cases (spec)
340 px card; the legend takes what the column leaves.
Notes for AI
- Import
ContextStackfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ContextStackElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.