Context + Effort menuPro
One model chip whose dropdown sets both the context window (1M tagged “Higher usage”) and the effort, in two radio groups.
oxyn add context-effort-menuContext window
Effort
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
- Set the context window and the effort of the current model in one dropdown, from one chip in the composer.
When not to use
- A card with the effort's name and what it does over a dense tick ruler: use Ruler card instead.
- A model's details with a notched reasoning slider (R steps it: use Reasoning panel instead.
- A chip with the current effort that opens a plain list of levels above it, the chosen one checked: use Effort list instead.
Installation
Context + Effort menu 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-effort-menuUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Open
Two groups in one dropdown: the context window, where 1M carries a “Higher usage” tag, and the effort from default to max.
Context window
Effort
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Big
1M window and max effort chosen; max is the one red word.
Context window
Effort
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Closed
Closed: the chip sums up both choices.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ContextEffortMenu
| Prop | Type | Default | Description |
|---|---|---|---|
model | String | "Atlas 6 Swift" | The model name on the trigger. |
windows | Option<Vec<ContextOption>> | Default::default() | Context windows (512K and 1M when `None`). |
levels | Option<Vec<EffortLevel>> | Default::default() | Effort scale (default, low … max when `None`). |
default_window | usize | Default::default() | Starting window index. |
default_effort | usize | Default::default() | Starting effort index. |
default_open | bool | Default::default() | Starts open (for previews). |
on_window_change | EventHandler<usize> | — | The window changed. |
on_effort_change | EventHandler<usize> | — | The effort changed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ↑or↓ on the chip | Opens the menu |
| ↑or↓ · HomeorEnd | One list across both groups (wraps) |
| EnterorSpace | Picks; the menu stays open so both can be set |
| Escape | Closes back to the chip |
Accessibility
- Each group is role=group named by its heading; rows are menuitemradio with aria-checked.
- The chip's name says the model and both choices, e.g. “Atlas 6 Swift, 512K · high”.
Responsive behaviour
- 220 px menu; the chip ellipsises its summary when narrow.
Edge cases (spec)
220 px menu, capped at the viewport minus 32 px; the chip ellipsises its summary.
Notes for AI
- Import
ContextEffortMenufromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ContextEffortMenuElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.