fix: use ai/react

This commit is contained in:
shadcn 2023-06-14 16:05:03 +04:00
parent f2c71a0f9d
commit 5c01f8a637
4 changed files with 6 additions and 6 deletions

View file

@ -1,9 +1,9 @@
import { type Metadata } from 'next'
import { auth } from '@clerk/nextjs'
import { Chat } from '@/components/chat'
import { getChat } from '@/app/actions'
import { Header } from '@/components/header'
import { auth } from '@clerk/nextjs'
// export const runtime = 'edge'
export const preferredRegion = 'home'
@ -29,7 +29,7 @@ export default async function ChatPage({ params }: ChatPageProps) {
const chat = await getChat(params.id, user?.id ?? '')
return (
<div className="flex flex-col min-h-screen">
<div className="flex min-h-screen flex-col">
{/* @ts-ignore */}
<Header />
<main className="flex-1 bg-muted/50">

View file

@ -1,4 +1,4 @@
import { type UseChatHelpers } from 'ai-connector'
import { type UseChatHelpers } from 'ai-connector/react'
import { Button } from '@/components/ui/button'
import { ExternalLink } from '@/components/external-link'

View file

@ -1,8 +1,8 @@
import { cn } from '@/lib/utils'
import { UseChatHelpers } from 'ai-connector/react'
import { Button } from '@/components/ui/button'
import { ExternalLink } from '@/components/external-link'
import { IconArrowRight } from '@/components/ui/icons'
import { UseChatHelpers } from 'ai-connector'
const exampleMessages = [
{

View file

@ -1,6 +1,7 @@
import * as React from 'react'
import Link from 'next/link'
import Textarea from 'react-textarea-autosize'
import { UseChatHelpers } from 'ai-connector/react'
import { useEnterSubmit } from '@/lib/hooks/use-enter-submit'
import { cn } from '@/lib/utils'
@ -12,7 +13,6 @@ import {
TooltipTrigger
} from '@/components/ui/tooltip'
import { IconArrowElbow, IconPlus } from '@/components/ui/icons'
import { UseChatHelpers } from 'ai-connector'
export interface PromptProps
extends Pick<UseChatHelpers, 'input' | 'setInput'> {