Run biome check and add ChatError component
This commit is contained in:
parent
6a5041be43
commit
08f45451bb
13 changed files with 228 additions and 136 deletions
14
components/chat/chat-error.tsx
Normal file
14
components/chat/chat-error.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { AlertTriangleIcon } from "lucide-react";
|
||||
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
|
||||
|
||||
export function ChatError({ error }: { error?: Error }) {
|
||||
if (!error) return null;
|
||||
|
||||
return (
|
||||
<Alert variant="destructive">
|
||||
<AlertTriangleIcon />
|
||||
<AlertTitle>{error.name}</AlertTitle>
|
||||
<AlertDescription>{error.message}</AlertDescription>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue