Skip to content
Back

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-redaction

Redact before sending

Personal data never reaches the model; the reply is restored for you.

Your message

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
Scanning…Working
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

  • Strip personal data before a prompt reaches the model and restore it for the reader afterwards.

When not to use

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.

Terminal
oxyn add pii-redaction

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

Scan

Scanning the sample message.

Redact before sending

Personal data never reaches the model; the reply is restored for you.

Your message

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
Scanning…Working
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

Categories

Choose what to redact (Oxyn extra).

Redact before sending

Personal data never reaches the model; the reply is restored for you.

Your message

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
Scanning…Working
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

Edit

Edit the message, then Scan.

Redact before sending

Personal data never reaches the model; the reply is restored for you.

Your message
  • Name—
  • Email—
  • Phone—
  • Card—
Nothing sent yet
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

PiiRedaction

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
autoplaybooltrueScan on mount.
editablebooltrueLet the reader edit the message first.
categoriesboolDefault::default()Show the category toggles (Oxyn extra).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabShow original, the message, then the next step
Cmd/CtrlEnterScan, Redact, Send or edit again
SpaceorEnterToggle 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.

TransitionDurationEasing
Scan step120 ms per entity (SCAN_STEP_MS)step
Model think700 ms—
Reply stream34 ms per word ticklinear

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 PiiRedaction from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView in oxyn_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.

Guides

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