Prompt Redactor
betaA privacy check before a prompt is sent: emails, card numbers and API keys swapped for placeholders, and put back in the reply.
- AI
- 2 files
- No extra npm packages
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add prompt-redactorNo npm packages are needed beyond what Dowel already requires.
import { PromptRedactor } from "@/components/ui/prompt-redactor";Default
Custom Detectors
Nothing Found
<PromptRedactor>
| Prop | Type | Default |
|---|---|---|
redactor (required) | PromptRedactorState | — |
heading | string | "Before you send" |
Plus every attribute of <section> except children.
The count of what will be replaced is a polite status region, present and empty from first paint, so the first finding is announced while the person is still typing — not at the moment they press send. Each finding is named in words ("Card number", "card ending 4242") and never shown in full, with the placeholder it will be sent as. "Send as typed" is a toggle button whose accessible name includes what it applies to. Keeping a secret adds a written warning. "What will be sent" is a native disclosure. The panel is only a named region while it has findings, so an empty one adds nothing to the landmarks, and it is data-agent-ui, so using it never takes over an agent surface.
9/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — fails
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes