feat: move plugin workspace into project settings

This commit is contained in:
inman
2026-09-07 10:06:37 +08:00
parent f8eee430f4
commit be1764e016
19 changed files with 363 additions and 76 deletions

View File

@@ -38,6 +38,7 @@ export function MainLayout() {
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
const isChatWorkspace = location.pathname === '/chat';
const isInitializationSafeRoute = location.pathname === '/project-config'
|| location.pathname.startsWith('/project-config/')
|| location.pathname === '/plugins'
|| !isProgrammingModule;

View File

@@ -12,7 +12,6 @@ import {
FolderKanban,
LogOut,
Plus,
Puzzle,
Settings as SettingsIcon,
UserCircle2,
} from 'lucide-react';
@@ -584,23 +583,6 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
<Plus className="h-4 w-4 shrink-0 text-brand" />
{!sidebarCollapsed && '新建项目'}
</button>
<div className="mt-3 grid gap-1">
<button
type="button"
data-testid="sidebar-nav-plugins"
aria-current={location.pathname === '/plugins' ? 'page' : undefined}
aria-label="插件"
onClick={() => navigate(activeProject ? '/plugins?scope=project' : '/plugins?scope=all')}
className={cn(
'motion-press flex min-h-10 w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm font-medium transition-colors duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/35',
location.pathname === '/plugins' ? 'bg-brand-selected text-foreground' : 'text-foreground hover:bg-surface-subtle',
sidebarCollapsed && 'justify-center px-0',
)}
>
<Puzzle className="h-4 w-4 shrink-0 text-brand" />
{!sidebarCollapsed ? <span></span> : null}
</button>
</div>
<div className="mt-3">
<button
type="button"