Skip to content

Commit 3c7e794

Browse files
committed
Lint
1 parent 537fbdb commit 3c7e794

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-modal/copilot-modal.tsx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
'use client'
22

33
import { 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'
513
import { Button } from '@/components/ui/button'
6-
import { Input } from '@/components/ui/input'
714
import {
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'
1322
import { createLogger } from '@/lib/logs/console-logger'
14-
import { type CopilotChat } from '@/lib/copilot-api'
1523

1624
const 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'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -457,17 +457,12 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(
457457
{/* Chat Title Dropdown */}
458458
<DropdownMenu>
459459
<DropdownMenuTrigger asChild>
460-
<Button
461-
variant='ghost'
462-
className='h-8 px-3 flex-1 justify-start min-w-0'
463-
>
464-
<span className='truncate'>
465-
{currentChat?.title || 'New Chat'}
466-
</span>
467-
<ChevronDown className='h-4 w-4 ml-2 shrink-0' />
460+
<Button variant='ghost' className='h-8 min-w-0 flex-1 justify-start px-3'>
461+
<span className='truncate'>{currentChat?.title || 'New Chat'}</span>
462+
<ChevronDown className='ml-2 h-4 w-4 shrink-0' />
468463
</Button>
469464
</DropdownMenuTrigger>
470-
<DropdownMenuContent align='start' className='w-64 z-[110]' sideOffset={8}>
465+
<DropdownMenuContent align='start' className='z-[110] w-64' sideOffset={8}>
471466
{chats.map((chat) => (
472467
<div key={chat.id} className='flex items-center'>
473468
<DropdownMenuItem
@@ -490,7 +485,7 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(
490485
<MoreHorizontal className='h-4 w-4' />
491486
</Button>
492487
</DropdownMenuTrigger>
493-
<DropdownMenuContent align='end' className='z-[120]'>
488+
<DropdownMenuContent align='end' className='z-[120]'>
494489
<DropdownMenuItem
495490
onClick={() => handleDeleteChat(chat.id)}
496491
className='cursor-pointer text-destructive'
@@ -504,13 +499,13 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(
504499
))}
505500
</DropdownMenuContent>
506501
</DropdownMenu>
507-
502+
508503
{/* New Chat Button */}
509504
<Button
510505
variant='ghost'
511506
size='sm'
512507
onClick={startNewChat}
513-
className='h-8 w-8 p-0 ml-2'
508+
className='ml-2 h-8 w-8 p-0'
514509
title='New Chat'
515510
>
516511
<MessageSquarePlus className='h-4 w-4' />

0 commit comments

Comments
 (0)