mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Revert "breakout new chat button from dropdown menu"
This reverts commit 05100d295e.
This commit is contained in:
3 files changed
+16
-25
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import {
|
||||
MessageSquarePlus,
|
||||
History,
|
||||
Folder,
|
||||
Copy,
|
||||
@@ -21,6 +22,7 @@ import { useQueryClient } from '@tanstack/react-query';
|
||||
interface ProjectTitleMenuProps {
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
onNewChat: () => void;
|
||||
onGitHistory: () => void;
|
||||
onDuplicate: () => void;
|
||||
onDelete: () => void;
|
||||
@@ -32,6 +34,7 @@ interface ProjectTitleMenuProps {
|
||||
export function ProjectTitleMenu({
|
||||
projectId,
|
||||
projectName,
|
||||
onNewChat,
|
||||
onGitHistory,
|
||||
onDuplicate,
|
||||
onDelete,
|
||||
@@ -104,6 +107,15 @@ export function ProjectTitleMenu({
|
||||
Rollback
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuItem
|
||||
onClick={onNewChat}
|
||||
disabled={isAILoading}
|
||||
className="gap-2"
|
||||
>
|
||||
<MessageSquarePlus className="h-4 w-4" />
|
||||
New Chat
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuItem
|
||||
onClick={onDuplicate}
|
||||
disabled={isAnyLoading}
|
||||
|
||||
@@ -118,7 +118,6 @@
|
||||
"emailUpdates": "Email Updates",
|
||||
"emailUpdatesDescription": "Subscribe to Shakespeare updates and resources",
|
||||
"newProject": "New Project",
|
||||
"newChat": "New Chat",
|
||||
"importRepository": "Import Repository",
|
||||
"noProjectsYet": "No projects yet",
|
||||
"createFirstProject": "Create your first project to get started",
|
||||
|
||||
@@ -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, MessageSquarePlus } from 'lucide-react';
|
||||
import { ArrowLeft, MessageSquare, Eye, Code, Menu, Loader2 } from 'lucide-react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useIsMobile } from '@/hooks/useIsMobile';
|
||||
import { ProjectTitleMenu } from '@/components/ProjectTitleMenu';
|
||||
@@ -212,6 +212,7 @@ export function ProjectView() {
|
||||
<ProjectTitleMenu
|
||||
projectId={project.id}
|
||||
projectName={project.name}
|
||||
onNewChat={handleNewChat}
|
||||
onGitHistory={() => setGitHistoryOpen(true)}
|
||||
onDuplicate={() => setDuplicateDialogOpen(true)}
|
||||
onDelete={() => setDeleteDialogOpen(true)}
|
||||
@@ -228,16 +229,6 @@ 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"
|
||||
@@ -252,7 +243,6 @@ 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>
|
||||
@@ -451,6 +441,7 @@ export function ProjectView() {
|
||||
<ProjectTitleMenu
|
||||
projectId={project.id}
|
||||
projectName={project.name}
|
||||
onNewChat={handleNewChat}
|
||||
onGitHistory={() => setGitHistoryOpen(true)}
|
||||
onDuplicate={() => setDuplicateDialogOpen(true)}
|
||||
onDelete={() => setDeleteDialogOpen(true)}
|
||||
@@ -464,20 +455,10 @@ export function ProjectView() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right side - New Chat, Deploy and Sync buttons */}
|
||||
{/* Right side - 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"
|
||||
@@ -492,7 +473,6 @@ 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>
|
||||
|
||||
Reference in new issue
Block a user