breakout new chat button from dropdown menu

This commit is contained in:
lemonknowsall committed 2026-01-16 13:55:29 -08:00
1 parent a4271de370
commit 05100d295e
3 files changed
+25 -16

No files matched your search

+24 -4
View File
@@ -11,7 +11,7 @@ import { DeleteProjectDialog } from '@/components/DeleteProjectDialog';
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@/components/ui/resizable';
import { Button } from '@/components/ui/button';
import { Skeleton } from '@/components/ui/skeleton';
import { ArrowLeft, MessageSquare, Eye, Code, Menu, Loader2 } from 'lucide-react';
import { ArrowLeft, MessageSquare, Eye, Code, Menu, Loader2, MessageSquarePlus } from 'lucide-react';
import { useNavigate } from 'react-router-dom';
import { useIsMobile } from '@/hooks/useIsMobile';
import { ProjectTitleMenu } from '@/components/ProjectTitleMenu';
@@ -212,7 +212,6 @@ export function ProjectView() {
<ProjectTitleMenu
projectId={project.id}
projectName={project.name}
onNewChat={handleNewChat}
onGitHistory={() => setGitHistoryOpen(true)}
onDuplicate={() => setDuplicateDialogOpen(true)}
onDelete={() => setDeleteDialogOpen(true)}
@@ -230,6 +229,16 @@ export function ProjectView() {
<div className="flex items-center gap-4 px-3">
{project ? (
<>
<Button
variant="ghost"
size="sm"
onClick={handleNewChat}
disabled={isAILoading}
className="size-8 p-0 group"
title={t('newChat')}
>
<MessageSquarePlus className="size-5 group-hover:text-foreground text-muted-foreground" />
</Button>
<GitSyncButton
projectId={project.id}
className="h-8 w-8"
@@ -244,6 +253,7 @@ export function ProjectView() {
<>
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
</>
)}
</div>
@@ -442,7 +452,6 @@ export function ProjectView() {
<ProjectTitleMenu
projectId={project.id}
projectName={project.name}
onNewChat={handleNewChat}
onGitHistory={() => setGitHistoryOpen(true)}
onDuplicate={() => setDuplicateDialogOpen(true)}
onDelete={() => setDeleteDialogOpen(true)}
@@ -457,10 +466,20 @@ export function ProjectView() {
</div>
</div>
{/* Right side - Deploy and Sync buttons */}
{/* Right side - New Chat, Deploy and Sync buttons */}
<div className="flex items-center gap-2">
{project ? (
<>
<Button
variant="ghost"
size="sm"
onClick={handleNewChat}
disabled={isAILoading}
className="size-8 p-0 group"
title={t('newChat')}
>
<MessageSquarePlus className="size-5 group-hover:text-foreground text-muted-foreground" />
</Button>
<GitSyncButton
projectId={project.id}
className="h-8 w-8"
@@ -475,6 +494,7 @@ export function ProjectView() {
<>
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
</>
)}
</div>