Context breakdownPro
What fills the window as a list of kinds with their share; open one to see its files, tools or turns and unload what you do not need.
oxyn add context-breakdown- billing/invoice.rs14.6K
- api/routes.ts11.2K
- README.md6.9K
- schema.sql5.5K
About 2 turns before it compacts at 92 %.
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
- Answer "what exactly is in there" and let the user unload a file or tool to give room back.
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.
- An Oxyn original: use Context stack instead.
- An Oxyn original: use Context tide instead.
Installation
Context breakdown 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-breakdownUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Files open
Files opened: each file with its tokens and an Unload button that gives the room back.
- billing/invoice.rs14.6K
- api/routes.ts11.2K
- README.md6.9K
- schema.sql5.5K
About 2 turns before it compacts at 92 %.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Load order
Kinds in the order they load – system first, chat last – instead of by size.
About 2 turns before it compacts at 92 %.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Read only
No Unload buttons: a breakdown to read, monochrome.
- Turns 1–1241.2K
- Turns 13–2433.8K
- Turns 25–3121.4K
About 2 turns before it compacts at 92 %.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ContextBreakdown
| 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. |
default_open | Option<usize> | Default::default() | Starts with this kind open. |
default_sort | String | "size" | `size` (largest first) or `load` (load order). |
droppable | bool | true | Files and tools get an Unload button. |
mono | bool | Default::default() | Greys instead of kind colours. |
on_drop | EventHandler<(usize, usize)> | — | An item was unloaded: (part index, item index) in the parts as given. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Order switch, each kind, then its Unload buttons |
| EnterorSpace on a kind | Opens or closes it |
Accessibility
- Each kind is a button with aria-expanded; its items are a list under it.
- The fill pill is text (83%) and turns amber when high and red at the compaction line – the colour is extra.
- Unloading says what was freed in a status line.
Responsive behaviour
- 360 px card; the share bar flexes and names never wrap.
Edge cases (spec)
360 px card; the share bar flexes, names never wrap.
Notes for AI
- Import
ContextBreakdownfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ContextBreakdownElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.