Skip to content
Back

AI commandPro

A ⌘K palette with an AI mode: search pages and actions, or press Tab to ask; the answer streams in place with numbered sources and next steps you can run, and the palette never changes size.

oxyn add ai-command
Ask AIClaude Sonnet 4.5
Suggested questions
Ask a question
The code is part of Oxyn Pro

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.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • One shortcut for both finding and asking: jump to a page or run an action, or ask a question about the workspace and act on the answer without leaving the palette.

When not to use

Installation

AI command 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.

Terminal
oxyn add ai-command

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Answer

Streams an answer with sources and next steps.

Ask AIClaude Sonnet 4.5
Suggested questions
Ask a question
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Search

Pages and actions; Tab asks.

Claude Sonnet 4.5
Pages
WebhooksDocs
1 result
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Suggested

Ask mode, empty: suggested questions.

Ask AIClaude Sonnet 4.5
Suggested questions
Ask a question
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

AiCommand

PropTypeDefaultDescription
itemsrequiredVec<Command>—Pages and actions.
suggested_questionsVec<String>Default::default()Questions offered while Ask is open and empty.
modelString"Claude Sonnet"The model that answers.
default_modeString"search"`search` · `ask`.
default_queryStringDefault::default()Initial query.
thinking_labelString"Searching your workspace"Status before text arrives.
heightf32392.0Results height px.
elevatedboolDefault::default()Floating shadow.
answerrequiredScriptedAnswer—The answer streamed for any question (demo engine).
autoplayboolDefault::default()Ask on mount with the default query (demo).
nowrequiredClockMs—Clock.
widthf32600.0Width px.
on_selectEventHandler<String>—A page or action was chosen.
on_askEventHandler<String>—A question was asked.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑or↓Move
EnterOpen, ask, or run the highlighted step
TabSwitch between Search and Ask AI
EscClose the answer, back to search, then close

Accessibility

  • The answer is a region marked aria-busy while it streams; the footer status is a polite live region.
  • Citations are buttons named by their source.
From the spec

Combobox for the field; the answer is a region with aria-busy while streaming; the footer status announces Thinking, Answer ready and step results. Citations are buttons named "Source n: <title>".

Motion & interaction

The palette never resizes: views crossfade inside a fixed body. Sources pop in as they are first cited; citations pop as they stream. Steps show a spinner then a check.

Timing
TransitionDurationEasingReduced motion
View crossfade160 ms + 60 ms delayease.outinstant
Thinking900 ms—same
Stream~45 chars / slinearfull text at once
Step run900 ms—same

Responsive behaviour

  • Fixed results height so typing, switching modes and streaming never resize it.
Edge cases (spec)

Empty questions don't ask. Asking again replaces the answer. Very long answers scroll inside the fixed body. Running a step twice is prevented.

Notes for AI

  • Import AiCommand, ScriptedAnswer from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: AiCommandEl in oxyn_gpui.
  • Props to set first: items, answer, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI