feat: add project-aware agent workspace
Generic Container CI/CD / test-build-publish (push) Successful in 2m9s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 2m39s

This commit is contained in:
2026-10-22 18:52:18 +08:00
parent c6a0e74e72
commit 2d8506fea0
191 changed files with 12373 additions and 3556 deletions
@@ -0,0 +1,29 @@
import { Droplet } from "lucide-react";
import { StartupScreen } from "@/shared/ui/startup-screen";
export type ProjectStartupState = { phase: "projects" } | { phase: "context"; projectName: string };
export function ProjectStartupScreen({ state, error, onRetry }: {
state: ProjectStartupState;
error: string | null;
onRetry: () => void;
}) {
const readingProjects = state.phase === "projects";
return (
<StartupScreen
brand={{ name: "TJWater", description: "智慧水务平台", icon: <Droplet strokeWidth={1.5} /> }}
title={error ? "暂时无法进入工作台" : readingProjects ? "正在加载授权项目" : "正在准备项目环境"}
description={error ? "请查看原因后重试。" : "正在准备你的项目工作台,完成后自动进入。"}
progressLabel="项目加载进度"
steps={[
{ id: "projects", label: "读取授权项目", state: readingProjects ? "loading" : "complete",
detail: readingProjects ? "获取当前账号可访问的项目列表" : "已获取可访问的项目" },
{ id: "context", label: "准备项目环境", state: readingProjects ? "waiting" : "loading",
detail: state.phase === "context" ? `${state.projectName}\n正在读取项目配置与访问权限` : "等待项目列表返回" }
]}
error={error}
onRetry={onRetry}
/>
);
}