DOCS
v0.4

AI Components / Action Receipt

Action Receipt

Receipt for an agent action that already executed: what ran, what it touched, and the specific compensating affordance for this action (not a global undo). Status is labelled with text, never color alone (WCAG 1.4.1).

ai-workflowv0.6.0

Playground

Examples

Executed action
<ai-action-receipt summary="Sent invoice #1042 to Acme Corp" compensationLabel="Void invoice" style="max-width:400px;"></ai-action-receipt>

Import

import { AiActionReceipt } from '@cognivo/components';
// Or tree-shake: import '@cognivo/components/ai-action-receipt';

Per-component imports ship only that component (~8 kB gzip).

API Reference

PropTypeDefaultDescription
summarystringWhat the action did
touchedstring[]Resources the action touched
status"executed" | "failed""executed"Action outcome
errorstringError message when status is failed
compensationLabelstringWhen set, a compensation button with this label is shown

Events

EventDetailDescription
ai-action-compensatevoidUser asked to run the compensating action