An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Merge branch 'main' of https://github.com/miurla/morphic into rc-0.1.8
Yoshiki Miurae20e650d85d0
diff --cc bun.lockbindex 50d9a0e1,1df8ab2f..1df8ab2fmode 100644,100755..100644Binary files differdiff --cc components/chat-panel.tsxindex 51113493,93d95142..dde8579d--- a/components/chat-panel.tsx+++ b/components/chat-panel.tsx@@@ -5,18 -6,22 +6,23 @@@ import { cn } from '@/lib/utilsimport { UserMessage } from './user-message'import { Input } from './ui/input'import { Button } from './ui/button'- import { ArrowRight, Plus, Square } from 'lucide-react'+ import { ArrowRight, Plus } from 'lucide-react'import { EmptyScreen } from './empty-screen'+import Textarea from 'react-textarea-autosize'+ import { nanoid } from 'ai'- export function ChatPanel() {+ interface ChatPanelProps {+ messages: UIState+ }++ export function ChatPanel({ messages }: ChatPanelProps) {const [input, setInput] = useState('')- const [messages, setMessages] = useUIState<typeof AI>()- const [aiMessages, setAiMessages] = useAIState<typeof AI>()- const { submit } = useActions<typeof AI>()+ const [, setMessages] = useUIState<typeof AI>()+ const { submit } = useActions()const [isButtonPressed, setIsButtonPressed] = useState(false)- const inputRef = useRef<HTMLInputElement>(null)+ const inputRef = useRef<HTMLTextAreaElement>(null)const [showEmptyScreen, setShowEmptyScreen] = useState(false)+ const router = useRouter()// Focus on input when button is presseduseEffect(() => {if (isButtonPressed) {