Run biome check and add ChatError component

This commit is contained in:
James Blair 2026-05-08 20:33:24 +12:00
parent 6a5041be43
commit 08f45451bb
Signed by: james
SSH key fingerprint: SHA256:hsDR3ENI2ZMgh+CNb+0PrFsj29DI007R+BMKUVGi6zQ
13 changed files with 228 additions and 136 deletions

View file

@ -1,9 +1,10 @@
"use client";
import { ChatMessages } from "./chat-messages";
import { ChatForm } from "./chat-form";
import { DefaultChatTransport } from "ai";
import { useChat } from "@ai-sdk/react";
import { DefaultChatTransport } from "ai";
import { ChatError } from "./chat-error";
import { ChatForm } from "./chat-form";
import { ChatMessages } from "./chat-messages";
export function Chat() {
const { messages, sendMessage, status, error } = useChat({
@ -13,7 +14,8 @@ export function Chat() {
});
return (
<div className="max-w-2xl flex flex-col gap-2">
<div className="max-w-2xl flex flex-col gap-4">
<ChatError error={error} />
<ChatMessages messages={messages} />
<ChatForm
onMessage={sendMessage}