diff --git a/frontend-web/src/components/workspace/workspace-nav-chat-list.tsx b/frontend-web/src/components/workspace/workspace-nav-chat-list.tsx index 2fca2ddf..f75996d2 100644 --- a/frontend-web/src/components/workspace/workspace-nav-chat-list.tsx +++ b/frontend-web/src/components/workspace/workspace-nav-chat-list.tsx @@ -19,6 +19,9 @@ import { BotIcon, BrainIcon, ListChecks, MessageSquarePlus, MessagesSquare, PenL import { SidebarCollapseButton } from "./workspace-header"; import { WorkspaceNavStudio } from "./workspace-nav-studio"; import { cn } from "@/lib/utils"; +import { env } from "@/env"; + +const studioEnabled = env.STUDIO_ENABLED?.toLowerCase() === "true"; // 普通导航项:默认中性色,激活态与「新对话」一致——主色浅底 + 主色文字/图标 const NAV_ITEM_CLASS = @@ -165,7 +168,7 @@ export function WorkspaceNavChatList({ )} - {!showCollapseTrigger && } + {!showCollapseTrigger && studioEnabled && } ); } diff --git a/frontend-web/src/env.ts b/frontend-web/src/env.ts index 10b6603c..dbf2ef33 100644 --- a/frontend-web/src/env.ts +++ b/frontend-web/src/env.ts @@ -8,7 +8,8 @@ function readEnv( | "VITE_NOTE_API_BASE_URL" | "VITE_NOTEBOOK_API_BASE_URL" | "VITE_STATIC_WEBSITE_ONLY" - | "VITE_GITHUB_OAUTH_TOKEN", + | "VITE_GITHUB_OAUTH_TOKEN" + | "VITE_STUDIO_ENABLED", ): EnvValue { const value = import.meta.env[key]; return typeof value === "string" && value.trim() ? value : undefined; @@ -24,4 +25,5 @@ export const env = { NEXT_PUBLIC_NOTEBOOK_API_BASE_URL: readEnv("VITE_NOTEBOOK_API_BASE_URL"), NEXT_PUBLIC_STATIC_WEBSITE_ONLY: readEnv("VITE_STATIC_WEBSITE_ONLY"), GITHUB_OAUTH_TOKEN: readEnv("VITE_GITHUB_OAUTH_TOKEN"), + STUDIO_ENABLED: readEnv("VITE_STUDIO_ENABLED"), };