feat: simplify code project creation

This commit is contained in:
inman
2026-09-07 10:06:37 +08:00
parent f8eee430f4
commit af13aca003
15 changed files with 351 additions and 486 deletions

View File

@@ -681,6 +681,25 @@ export function CodingChatPanel({
}}
/>
)
: agents.length === 0
? (
<div className="flex min-h-0 flex-1 items-center justify-center p-6" data-testid="coding-chat-empty-agent">
<div className="max-w-sm text-center">
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-2xl bg-surface-subtle shadow-[0_0_0_1px_rgba(0,0,0,0.06)]">
<Bot className="h-5 w-5 text-muted-foreground" aria-hidden="true" />
</div>
<h1 className="mt-4 text-balance text-lg font-semibold">项目已准备好</h1>
<p className="mt-2 text-pretty text-sm leading-6 text-muted-foreground">
需要开始对话时,再创建一个项目智能体并选择模型即可。
</p>
{onOpenProjectSettings ? (
<Button className="mt-5 min-h-10 rounded-xl" onClick={onOpenProjectSettings}>
创建项目智能体
</Button>
) : null}
</div>
</div>
)
: (
<div className="min-h-0 flex-1" data-testid="coding-conversation-pending" />
)}