PII redactionPro
Keeps private details out of a prompt: Scan highlights names, addresses, numbers and cards, Redact replaces them with tokens such as [EMAIL_1] before anything is sent, and the answer is filled back in on return.
oxyn add pii-redactionRedact before sending
Personal data never reaches the model; the reply is restored for you.
Hi, this is Ines Varga[NAME_1]. Please change my billing email to ines.varga@fernmail.com[EMAIL_1] and call me on +1 415 555 0142[PHONE_1] if the card 4242 4242 4242 4242[CARD_1] is declined again. My manager Teo Brandt[NAME_2] approved the change.
- NameChecking
- EmailChecking
- PhoneChecking
- CardChecking
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
- Strip personal data before a prompt reaches the model and restore it for the reader afterwards.
When not to use
- Replays a multi-agent run on one clock: use Agent timeline instead.
- One model at a glance: use Model card instead.
- A small automation on a single rail: use AI workflow instead.
Installation
PII redaction 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 pii-redactionUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Scan
Scanning the sample message.
Redact before sending
Personal data never reaches the model; the reply is restored for you.
Hi, this is Ines Varga[NAME_1]. Please change my billing email to ines.varga@fernmail.com[EMAIL_1] and call me on +1 415 555 0142[PHONE_1] if the card 4242 4242 4242 4242[CARD_1] is declined again. My manager Teo Brandt[NAME_2] approved the change.
- NameChecking
- EmailChecking
- PhoneChecking
- CardChecking
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Categories
Choose what to redact (Oxyn extra).
Redact before sending
Personal data never reaches the model; the reply is restored for you.
Hi, this is Ines Varga[NAME_1]. Please change my billing email to ines.varga@fernmail.com[EMAIL_1] and call me on +1 415 555 0142[PHONE_1] if the card 4242 4242 4242 4242[CARD_1] is declined again. My manager Teo Brandt[NAME_2] approved the change.
- NameChecking
- EmailChecking
- PhoneChecking
- CardChecking
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Edit
Edit the message, then Scan.
Redact before sending
Personal data never reaches the model; the reply is restored for you.
- Name—
- Email—
- Phone—
- Card—
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
PiiRedaction
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
autoplay | bool | true | Scan on mount. |
editable | bool | true | Let the reader edit the message first. |
categories | bool | Default::default() | Show the category toggles (Oxyn extra). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Show original, the message, then the next step |
| Cmd/CtrlEnter | Scan, Redact, Send or edit again |
| SpaceorEnter | Toggle Show original or a category |
Accessibility
- Each found item reads its value and type, or its type and redacted once swapped.
- The type counts read Checking while scanning, then the count.
- Show original is a switch; categories are toggle buttons.
- The swap, the send and the reply are announced; the sample says it is simulated.
From the spec
Marks carry their type in text for screen readers; Show original is a switch; counts are in a status line. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
Each name, email, phone and card is marked with its type colour as the scan reaches it; Redact swaps marks for placeholders in place.
Timing
Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.
| Transition | Duration | Easing |
|---|---|---|
| Scan step | 120 ms per entity (SCAN_STEP_MS) | step |
| Model think | 700 ms | — |
| Reply stream | 34 ms per word tick | linear |
Reduced motion: streamed text and moves appear at their end state; progress still advances, without travel animation.
Responsive behaviour
- Placeholders and originals share one inline grid cell, so the swap never rewraps the message.
- Under 480 px the type counts become two columns.
- The safe prompt line ellipses rather than wrapping.
Edge cases (spec)
Long messages wrap; placeholders never break mid-token. Category toggles exclude a type from redaction. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the providers' coloured brand marks.
Notes for AI
- Import
PiiRedactionfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AiKitViewinoxyn_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.