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
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue