Revert "fix(web): use env flag to hide graph menu at build time"

This reverts commit e2060de810.
This commit is contained in:
肖泽涛 2026-03-01 17:53:40 +08:00
parent 9c30c74d41
commit 76e247052e
4 changed files with 1 additions and 21 deletions

View File

@ -104,10 +104,6 @@ services:
context: .
dockerfile: docker/web.Dockerfile
target: production
args:
VITE_API_URL: ${VITE_API_URL:-http://api:5050}
VITE_USE_RUNS_API: ${VITE_USE_RUNS_API:-false}
VITE_ENABLE_KNOWLEDGE_GRAPH: ${YUXI_ENABLE_KNOWLEDGE_GRAPH:-true}
image: yuxi-web:0.5.prod
container_name: web-prod
ports:
@ -120,7 +116,6 @@ services:
- NODE_ENV=production
- VITE_API_URL=http://api:5050
- VITE_USE_RUNS_API=${VITE_USE_RUNS_API:-false}
- VITE_ENABLE_KNOWLEDGE_GRAPH=${YUXI_ENABLE_KNOWLEDGE_GRAPH:-true}
command: nginx -g "daemon off;"
restart: unless-stopped

View File

@ -139,7 +139,6 @@ services:
- NODE_ENV=development
- VITE_API_URL=http://api:5050
- VITE_USE_RUNS_API=${VITE_USE_RUNS_API:-false}
- VITE_ENABLE_KNOWLEDGE_GRAPH=${YUXI_ENABLE_KNOWLEDGE_GRAPH:-true}
command: pnpm run server
restart: unless-stopped

View File

@ -28,14 +28,6 @@ WORKDIR /app
# 安装 pnpm
RUN npm install -g pnpm@latest
# 构建阶段注入前端环境变量Vite 在 build 时读取)
ARG VITE_API_URL=http://api:5050
ARG VITE_USE_RUNS_API=false
ARG VITE_ENABLE_KNOWLEDGE_GRAPH=true
ENV VITE_API_URL=${VITE_API_URL}
ENV VITE_USE_RUNS_API=${VITE_USE_RUNS_API}
ENV VITE_ENABLE_KNOWLEDGE_GRAPH=${VITE_ENABLE_KNOWLEDGE_GRAPH}
# 复制依赖文件
COPY ./web/package*.json ./
COPY ./web/pnpm-lock.yaml* ./

View File

@ -37,11 +37,6 @@ const showDebugModal = ref(false)
// Add state for settings modal
const showSettingsModal = ref(false)
const graphMenuVisible = computed(() => {
const value = String(import.meta.env.VITE_ENABLE_KNOWLEDGE_GRAPH ?? 'true').toLowerCase()
return value === 'true'
})
// Provide settings modal methods to child components
const openSettingsModal = () => {
showSettingsModal.value = true
@ -105,8 +100,7 @@ const mainList = computed(() => {
name: '图谱',
path: '/graph',
icon: Waypoints,
activeIcon: Waypoints,
hidden: !graphMenuVisible.value
activeIcon: Waypoints
},
{
name: '知识库',