11'use client' ;
22
3- import { type HTMLAttributes , useEffect , useRef , useState } from 'react' ;
3+ import { useEffect , useRef , type HTMLAttributes , useState } from 'react' ;
44import { Track } from 'livekit-client' ;
5- import { Loader , MessageSquareTextIcon , SendHorizontal } from 'lucide-react' ;
65import { motion } from 'motion/react' ;
76import { useChat } from '@livekit/components-react' ;
8- import { AgentDisconnectButton } from '@/components/agents-ui/agent-disconnect-button' ;
9- import { AgentTrackControl } from '@/components/agents-ui/agent-track-control' ;
7+ import { Loader , MessageSquareTextIcon , SendHorizontal } from 'lucide-react' ;
8+ import { Toggle } from '@/components/ui/toggle' ;
9+ import { Button } from '@/components/ui/button' ;
1010import {
1111 AgentTrackToggle ,
1212 agentTrackToggleVariants ,
1313} from '@/components/agents-ui/agent-track-toggle' ;
14- import { Button } from '@/components/ui/button ' ;
15- import { Toggle } from '@/components/ui/toggle ' ;
14+ import { AgentTrackControl } from '@/components/agents- ui/agent-track-control ' ;
15+ import { AgentDisconnectButton } from '@/components/agents- ui/agent-disconnect-button ' ;
1616import {
17- type UseInputControlsProps ,
1817 useInputControls ,
1918 usePublishPermissions ,
19+ type UseInputControlsProps ,
2020} from '@/hooks/agents-ui/use-agent-control-bar' ;
2121import { cn } from '@/lib/utils' ;
2222
@@ -195,14 +195,15 @@ export function AgentControlBar({
195195 < div
196196 aria-label = "Voice assistant controls"
197197 className = { cn (
198- 'bg-background border-input/50 dark:border-muted flex flex-col border p-3 drop-shadow-md/3' ,
198+ 'bg-background border-input/50 dark:border-muted flex flex-col border drop-shadow-md/3 p- 3' ,
199199 variant === 'livekit' ? 'rounded-[31px]' : 'rounded-lg' ,
200- className
200+ className ,
201201 ) }
202202 { ...props }
203203 >
204204 < motion . div
205205 { ...MOTION_PROPS }
206+ // @ts -ignore
206207 inert = { ! ( isChatOpen || isChatOpenUncontrolled ) }
207208 animate = { isChatOpen || isChatOpenUncontrolled ? 'visible' : 'hidden' }
208209 className = "border-input/50 flex w-full items-start overflow-hidden border-b"
@@ -233,7 +234,7 @@ export function AgentControlBar({
233234 variant === 'livekit' && [
234235 TOGGLE_VARIANT_1 ,
235236 'rounded-full [&_button:first-child]:rounded-l-full [&_button:last-child]:rounded-r-full' ,
236- ]
237+ ] ,
237238 ) }
238239 />
239240 ) }
@@ -255,7 +256,7 @@ export function AgentControlBar({
255256 variant === 'livekit' && [
256257 TOGGLE_VARIANT_1 ,
257258 'rounded-full [&_button:first-child]:rounded-l-full [&_button:last-child]:rounded-r-full' ,
258- ]
259+ ] ,
259260 ) }
260261 />
261262 ) }
@@ -300,7 +301,7 @@ export function AgentControlBar({
300301 disabled = { ! isConnected }
301302 className = { cn (
302303 variant === 'livekit' &&
303- 'bg-destructive/10 dark:bg-destructive/10 text-destructive hover:bg-destructive/20 dark:hover:bg-destructive/20 focus:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/4 rounded-full font-mono text-xs font-bold tracking-wider'
304+ 'rounded-full bg-destructive/10 dark:bg-destructive/10 text-destructive hover:bg-destructive/20 dark:hover:bg-destructive/20 focus:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/4 font-mono text-xs font-bold tracking-wider' ,
304305 ) }
305306 >
306307 < span className = "hidden md:inline" > END CALL</ span >
0 commit comments