fix: pass down id to append

This commit is contained in:
shadcn 2023-06-15 11:31:03 +04:00
parent fd99ff634f
commit 92309d77ec
4 changed files with 14 additions and 6 deletions

View file

@ -21,6 +21,7 @@ export interface ChatPanelProps
}
export function ChatPanel({
id,
isLoading,
stop,
append,
@ -58,8 +59,9 @@ export function ChatPanel({
</div>
<div className="space-y-4 border-t bg-background px-4 py-2 shadow-lg sm:rounded-t-xl sm:border md:py-4">
<PromptForm
onSubmit={value => {
append({
onSubmit={async value => {
await append({
id,
content: value,
role: 'user'
})