/** * ErrorCard - Actionable error display * * Displays errors with context and suggestions for fixing. * More helpful than generic error messages. */ import React from 'react'; /** * Suggestion for fixing the error */ export interface ErrorSuggestion { /** Explanation of what might have caused the error */ reason: string; } /** * Props for the ErrorCard component */ export interface ErrorCardProps { /** Error title (short description) */ title: string; /** Detailed error message */ message?: string; /** Possible reasons for the error */ suggestions?: ErrorSuggestion[]; /** Action command to fix the error (e.g., "/init") */ action?: string; /** Description of the action */ actionDescription?: string; /** Optional tip text */ tip?: string; } /** * ErrorCard component * * Displays an error with context and actionable suggestions. * * @example * ```tsx * * ``` */ export declare function ErrorCard({ title, message, suggestions, action, actionDescription, tip, }: ErrorCardProps): React.ReactElement; /** * Pre-configured error cards for common errors */ export declare const CommonErrors: { /** * API key invalid error */ apiKeyInvalid: () => ErrorCardProps; /** * Rate limit error */ rateLimit: () => ErrorCardProps; /** * Network error */ networkError: () => ErrorCardProps; /** * Project not initialized error */ notInitialized: () => ErrorCardProps; /** * File not found error */ fileNotFound: (path: string) => ErrorCardProps; };