diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 0a30c29..7d2a2ea 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -1,11 +1,8 @@ -import { useRef, useState, useEffect } from 'react' import { type AgentState, type ReceivedMessage, useChat } from '@livekit/components-react' import { Keyboard, Loader, Plus, SendHorizontal, Trash2 } from 'lucide-react' import { useEffect, useRef, useState } from 'react' -import { AgentChatTranscript } from '@/components/agents-ui/agent-chat-transcript' import { Conversation, ConversationContent, ConversationScrollButton } from '@/components/ai-elements/conversation' -import { Button } from '@/components/ui/button' import { Bubble, BubbleContent } from '@/components/ui/bubble' import { Button } from '@/components/ui/button' import { Drawer, DrawerContent, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from '@/components/ui/drawer' @@ -61,69 +58,62 @@ export function Chat({ agentState, messages }: ChatProps) { -
- - Chat - -
- {messages.length === 0 ? ( -
- No messages yet. Start a conversation! -
- ) : ( - - - {messages.length > 0 && - (() => { - return ( - - Conversation started - - ) - })()} - {messages.map((msg) => ( - - - - {msg.content} - - {formatTime(msg.timestamp)} - - - ))} - {messages.length > 0 && ( - - )} - - - - )} + + + Chat + + + + + {messages.length > 0 && + (() => { + return ( + + Conversation started + + ) + })()} + {messages.map((msg) => ( + + + + {msg.content} + + {formatTime(msg.timestamp)} + + + ))} + + + + +
+