A client-side toast notification system built on top of [Sonner](https://sonner.emilkowal.ski/), providing styled toast components with variant support, progress indicators, and a specialized command approval flow. ## Key Components | Export | Type | Description | |--------|------|-------------| | `Toaster` | Component | Root provider component; wraps `SonnerToaster` with unstyled defaults and injects the `toast-progress` keyframe animation | | `ToastCard` | Component | Standard toast card with title, description, colored dot indicator, dismiss button, and animated progress bar | | `CommandApprovalToast` | Component | Expandable toast for AI/tool command approvals with approve/reject actions and optional `ToolIcon` | | `showToast` | Function | Imperative helper to fire a `ToastCard`; accepts a plain string or `ShowToastOptions` | | `showCommandApprovalToast` | Function | Imperative helper to fire a `CommandApprovalToast` | | `ToastVariant` | Type | `'default' \| 'success' \| 'warning' \| 'error' \| 'info'` | | `dotColorByVariant` | Constant | Maps each variant to an ODS background color class for the status dot | | `progressColorByVariant` | Constant | Maps each variant to an ODS background color class for the progress bar | ## Usage Example **Mount the provider once at the app root:** ```typescript import { Toaster } from '@/components/toaster' export default function RootLayout({ children }) { return ( <> {children} ) } ``` **Fire a standard toast:** ```typescript import { showToast } from '@/components/toaster' // Simple string shorthand showToast('Settings saved') // With variant and description showToast({ title: 'Connection failed', description: 'Could not reach the server.', variant: 'error', duration: 6000, }) ``` **Request command approval from the AI agent flow:** ```typescript import { showCommandApprovalToast } from '@/components/toaster' showCommandApprovalToast({ command: 'rm -rf /var/log/old-logs', toolType: 'terminal', approvalDescription: 'This will permanently delete log files.', onApprove: () => executeCommand(), onReject: () => console.log('Rejected'), }) ```