11'use client'
22
33import { type KeyboardEvent , useEffect , useRef } from 'react'
4- import { ArrowUp , Bot , ChevronDown , MessageSquarePlus , MoreHorizontal , Trash2 , X } from 'lucide-react'
4+ import {
5+ ArrowUp ,
6+ Bot ,
7+ ChevronDown ,
8+ MessageSquarePlus ,
9+ MoreHorizontal ,
10+ Trash2 ,
11+ X ,
12+ } from 'lucide-react'
513import { Button } from '@/components/ui/button'
6- import { Input } from '@/components/ui/input'
714import {
815 DropdownMenu ,
916 DropdownMenuContent ,
1017 DropdownMenuItem ,
1118 DropdownMenuTrigger ,
1219} from '@/components/ui/dropdown-menu'
20+ import { Input } from '@/components/ui/input'
21+ import type { CopilotChat } from '@/lib/copilot-api'
1322import { createLogger } from '@/lib/logs/console-logger'
14- import { type CopilotChat } from '@/lib/copilot-api'
1523
1624const logger = createLogger ( 'CopilotModal' )
1725
@@ -221,22 +229,17 @@ export function CopilotModal({
221229 ` } </ style >
222230
223231 { /* Header with chat title, management, and close button */ }
224- < div className = 'flex items-center justify-between px-4 py-3 border-b ' >
225- < div className = 'flex items-center gap-2 flex-1 ' >
232+ < div className = 'flex items-center justify-between border-b px-4 py-3' >
233+ < div className = 'flex flex-1 items-center gap-2' >
226234 { /* Chat Title Dropdown */ }
227235 < DropdownMenu >
228236 < DropdownMenuTrigger asChild >
229- < Button
230- variant = 'ghost'
231- className = 'h-8 px-3 justify-start flex-1 max-w-[300px]'
232- >
233- < span className = 'truncate' >
234- { currentChat ?. title || 'New Chat' }
235- </ span >
236- < ChevronDown className = 'h-4 w-4 ml-2 shrink-0' />
237+ < Button variant = 'ghost' className = 'h-8 max-w-[300px] flex-1 justify-start px-3' >
238+ < span className = 'truncate' > { currentChat ?. title || 'New Chat' } </ span >
239+ < ChevronDown className = 'ml-2 h-4 w-4 shrink-0' />
237240 </ Button >
238241 </ DropdownMenuTrigger >
239- < DropdownMenuContent align = 'start' className = 'w-64 z-[110]' sideOffset = { 8 } >
242+ < DropdownMenuContent align = 'start' className = 'z-[110] w-64 ' sideOffset = { 8 } >
240243 { chats . map ( ( chat ) => (
241244 < div key = { chat . id } className = 'flex items-center' >
242245 < DropdownMenuItem
@@ -273,7 +276,7 @@ export function CopilotModal({
273276 ) ) }
274277 </ DropdownMenuContent >
275278 </ DropdownMenu >
276-
279+
277280 { /* New Chat Button */ }
278281 < Button
279282 variant = 'ghost'
@@ -285,7 +288,7 @@ export function CopilotModal({
285288 < MessageSquarePlus className = 'h-4 w-4' />
286289 </ Button >
287290 </ div >
288-
291+
289292 < Button
290293 variant = 'ghost'
291294 size = 'icon'
0 commit comments