AI AnswerPro
Streamed answer with source cards, citation chips that preview their source, copy, regenerate, feedback and follow-ups.
oxyn add ai-answerWhich city should host the spring team retreat?
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
- A streamed answer that shows where it came from: the sources it read, citation chips that preview them, and the actions people take after reading – copy, regenerate, rate, follow up.
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
AI Answer 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 ai-answerUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
The sources pop in ("Reading 8 sources"), the answer streams with a Stop button, then RELATED and the footer arrive.
Which city should host the spring team retreat?
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Finished
Finished: point at a citation chip to preview every source it cites.
Which city should host the spring team retreat?
- Notion1Retreat plan – venues and budget
- Slack2#retreat – who can travel when
- Wikipedia3Ribeira – the riverside quarter of Porto
- +5more
Porto suits the 14-person retreat best: compact, calm in the mornings and inside the budget you set.
- Dates: 22–24 April works for everyone; two people join on day two.
- Stay: two linked flats by the river come to 2,640 EUR for three nights, about 18% under the hotel.
- Flights: direct flights from Berlin and Amsterdam land before 11:00, so day one can start after lunch.
Book the flats this week – only one April weekend is still open.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Feedback
Thumbs down: "What went wrong?" and the reason chips.
Which city should host the spring team retreat?
- Notion1Retreat plan – venues and budget
- Slack2#retreat – who can travel when
- Wikipedia3Ribeira – the riverside quarter of Porto
- +5more
Porto suits the 14-person retreat best: compact, calm in the mornings and inside the budget you set.
- Dates: 22–24 April works for everyone; two people join on day two.
- Stay: two linked flats by the river come to 2,640 EUR for three nights, about 18% under the hotel.
- Flights: direct flights from Berlin and Amsterdam land before 11:00, so day one can start after lunch.
Book the flats this week – only one April weekend is still open.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Classic
Classic style: the source cards grouped in a grey band, a blue agent badge, arrows and a grey footer.
Which city should host the spring team retreat?
- Notion1Retreat plan – venues and budget
- Slack2#retreat – who can travel when
- Wikipedia3Ribeira – the riverside quarter of Porto
- +5more
Porto suits the 14-person retreat best: compact, calm in the mornings and inside the budget you set.
- Dates: 22–24 April works for everyone; two people join on day two.
- Stay: two linked flats by the river come to 2,640 EUR for three nights, about 18% under the hotel.
- Flights: direct flights from Berlin and Amsterdam land before 11:00, so day one can start after lunch.
Book the flats this week – only one April weekend is still open.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Oxyn ai answer
Extended: the answer with search, provenance and cited cards.
How should we fix the flaky token expiry test?
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AnswerCard
| Prop | Type | Default | Description |
|---|---|---|---|
question | String | Default::default() | Question heading (the demo when empty). |
sources | Vec<AnswerSource> | Default::default() | Sources; the first three are cards, the rest add to "+N". |
more | usize | Default::default() | Sources beyond the list, counted in the "+N more" tile. |
text | String | Default::default() | Answer markup (see `AnswerDoc::parse`). |
related | Vec<String> | Default::default() | Follow-up prompts under RELATED. |
took | String | "2.9s" | Footer time, e.g. "3.4s". |
autoplay | bool | true | Stream from the start (else show the finished answer). |
wps | u64 | 38 | Words a second. |
reasons | Vec<String> | Default::default() | Reasons offered after a thumbs-down. |
vote | String | Default::default() | Start with a thumbs-down and its reasons (`up`, `down` or empty). |
nowrequired | ClockMs | — | The clock. |
style | String | Default::default() | `clean`, `classic`, or empty to follow `data-cstyle`. |
on_action | EventHandler<(String, String)> | — | (`copy` | `regenerate` | `stop` | `vote` | `reason` | `follow-up`, detail). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Source cards, citation chips, follow-ups, then the footer actions |
| Focus a chip | Opens its source preview |
| Esc | Closes the preview |
Accessibility
- The answer is a polite live region, busy while it streams; the status line reads Reading, Writing or Answer.
- Citation chips are buttons named "Source: <titles>" and describe their tooltip (role=tooltip) while it is open.
- Thumbs are toggle buttons (aria-pressed); thumbs down is aria-expanded over the reason chips; Copied and the thanks are announced.
Responsive behaviour
- Fills its container up to 640 px (480 in the demo); three source cards fit the row with a "+N" tile, two below 480 px, one below 340 px.
Edge cases (spec)
Up to 640 px; three cards and "+N", two below 480 px, one below 340 px; the tooltip stays inside the card (max 80% of it).
Notes for AI
- Import
AnswerCardfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AnswerCardElinoxyn_gpui. - Props to set first:
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.