Run mode menuPro
How much the agent may do, Ask, Plan, Work or Autoresearch, each with its own shape; Autoresearch takes a time budget from presets or typed minutes.
oxyn add run-mode-menuThe 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
- The composer chip that sets how much the agent may do: Ask (answer, change nothing), Plan (propose, run nothing), Work (talk and run code) and Autoresearch (works on its own toward a goal).
- Each mode has its own shape, so the chip reads without colour.
- Autoresearch opens a budget row with 1h, 5h, 10h and 24h presets and a minutes field (parse_budget, clamped 5 … 10 080); the chip then shows the budget (hm).
When not to use
- Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
- The model menu of an AI chat: use Model Picker instead.
- The prompt box for an agent, in six layouts: use Composer instead.
Installation
Run mode 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 run-mode-menuUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Work
Work mode; open the chip to switch.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Autoresearch
Autoresearch with a 10-hour budget.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
RunModeMenu
| Prop | Type | Default | Description |
|---|---|---|---|
mode | String | "work" | Mode id (`ask`, `plan`, `work`, `auto`). |
budget | u32 | 1440 | Budget in minutes for Autoresearch. |
up | bool | true | Open the menu upwards. |
on_change | EventHandler<(String, u32)> | — | Mode or budget changed: `(mode id, minutes)`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace | Open the menu |
| ↑or↓ | Move between modes |
| Enter | Pick; in the minutes field, set the budget |
| Esc | Close |
Accessibility
- The chip has aria-haspopup=menu; modes are menuitemradio with aria-checked.
- Each mode has its own shape, so the chip reads without colour.
From the spec
- The chip has aria-haspopup=menu and aria-expanded; modes are menuitemradio with aria-checked; the budget is a labelled group.
Motion & interaction
Timing
- Menu pops 180 ms from its corner; the label swaps with a 220 ms rise.
- Reduced motion: no pop or rise.
Responsive behaviour
- The menu opens upwards above a bottom composer.
Edge cases (spec)
- Opens upwards by default (bottom composers).
Notes for AI
- Import
RunModeMenufromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
RunModeMenuElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.