merge: integrate upstream main with local Makelore changes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { ArrowLeft } from 'lucide-react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { AI_MODULE_SELECTION_PATH, aiModules, getAiModuleForPath } from '@/lib/ai-modules';
|
||||
@@ -21,14 +22,19 @@ export function ModuleSwitcher({ sidebarCollapsed, compact = false }: { sidebarC
|
||||
title="返回首页"
|
||||
onClick={() => navigate(AI_MODULE_SELECTION_PATH)}
|
||||
className={cn(
|
||||
'motion-press items-center bg-transparent text-left font-semibold text-foreground transition-colors duration-100 hover:bg-surface-subtle',
|
||||
'motion-press group items-center bg-transparent text-left font-semibold text-foreground transition-colors duration-100 hover:bg-surface-subtle',
|
||||
compactTrigger
|
||||
? 'inline-flex min-h-9 w-fit translate-y-2 justify-start rounded-xl p-2 text-xs'
|
||||
? 'inline-flex min-h-9 w-fit translate-y-2 justify-start gap-1.5 rounded-xl p-2 text-xs'
|
||||
: 'flex min-h-11 w-full justify-between gap-2 rounded-2xl p-3 text-sm',
|
||||
sidebarCollapsed ? 'justify-center px-0' : '',
|
||||
)}
|
||||
>
|
||||
{!sidebarCollapsed ? <span className="min-w-0 whitespace-nowrap">{activeModuleLabel}</span> : null}
|
||||
<ArrowLeft
|
||||
data-testid="sidebar-module-return-icon"
|
||||
aria-hidden="true"
|
||||
className="h-4 w-4 shrink-0 -translate-y-px text-muted-foreground transition-[color,transform] duration-150 group-hover:-translate-x-0.5 group-hover:text-brand"
|
||||
/>
|
||||
{!sidebarCollapsed ? <span className="min-w-0 whitespace-nowrap leading-4">{activeModuleLabel}</span> : null}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -436,7 +436,7 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
|
||||
const enterProject = async (project: CodingProjectSummary) => {
|
||||
const result = await loadProjectConfig(project.id);
|
||||
if (result.status !== 'valid' || !result.config) {
|
||||
showProjectEntryError(project, result.status === 'missing' ? '项目缺少 .niancode/project.json' : result.error ?? '项目配置无效');
|
||||
showProjectEntryError(project, result.status === 'missing' ? '项目缺少必要的配置文件' : result.error ?? '项目配置无效');
|
||||
return;
|
||||
}
|
||||
await setActiveProject(project.id);
|
||||
@@ -665,7 +665,7 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
|
||||
)}
|
||||
>
|
||||
<span className="min-w-0 flex-1 truncate text-sm font-semibold">{project.name}</span>
|
||||
<div className="flex shrink-0 -space-x-1.5" aria-label="项目 Agent">
|
||||
<div className="flex shrink-0 -space-x-1.5" aria-label="项目智能体">
|
||||
{projectConfig?.agents.map((agent) => (
|
||||
<span
|
||||
key={agent.id}
|
||||
@@ -1066,7 +1066,7 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
|
||||
>
|
||||
<h2 className="text-xl font-semibold">项目配置不可用</h2>
|
||||
<p className="mt-2 text-sm font-medium leading-6 text-muted-foreground">
|
||||
无法进入项目,请检查 .niancode/project.json。
|
||||
无法进入项目,请检查项目目录中的配置文件是否完整。
|
||||
</p>
|
||||
<pre className="mt-3 max-h-32 overflow-auto rounded-md border border-foreground/15 bg-white p-2 text-xs font-medium">
|
||||
{projectEntryError.message}
|
||||
|
||||
@@ -119,7 +119,7 @@ function ProductTitleBar({
|
||||
overlay ? 'bg-transparent' : 'bg-background',
|
||||
)}
|
||||
style={{
|
||||
right: overlay ? '0px' : 'var(--agent-browser-titlebar-logo-gap, 48px)',
|
||||
right: '0px',
|
||||
}}
|
||||
>
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user