Skip to content

Commit af7355c

Browse files
committed
fix: 修复首页异常弹出未登录提示
1 parent 371f717 commit af7355c

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

docker/api.Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ ENV TZ=Asia/Shanghai \
1313
# 设置代理和时区,更换镜像源,安装系统依赖 - 合并为一个RUN减少层数
1414
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
1515
# 更换为阿里云镜像源加速下载
16-
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
17-
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
16+
sed -i 's|http://deb.debian.org/debian|http://mirrors.tuna.tsinghua.edu.cn/debian|g' /etc/apt/sources.list.d/debian.sources && \
17+
sed -i 's|http://security.debian.org/debian-security|http://mirrors.tuna.tsinghua.edu.cn/debian-security|g' /etc/apt/sources.list.d/debian.sources && \
18+
# sed -i 's|mirrors.aliyun.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources && \
1819
# 清理apt缓存并更新,避免空间不足问题
1920
apt-get clean && \
2021
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \
2122
apt-get update && \
2223
# 安装系统依赖,减少缓存占用
23-
apt-get install -y --no-install-recommends \
24+
apt-get install -y --no-install-recommends --fix-missing \
2425
python3-dev \
2526
ffmpeg \
2627
libsm6 \
@@ -46,7 +47,10 @@ ENV HTTP_PROXY=$HTTP_PROXY \
4647

4748
# 如果网络还是不好,可以在后面添加 --index-url https://pypi.tuna.tsinghua.edu.cn/simple
4849
RUN --mount=type=cache,target=/root/.cache/uv \
49-
uv sync --no-dev --no-install-project
50+
uv sync --no-dev
51+
52+
# 激活虚拟环境并添加到PATH
53+
ENV PATH="/app/.venv/bin:$PATH"
5054

5155
# 复制代码到容器中
5256
COPY ../src /app/src

src/config/static/models.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,22 @@ MODEL_NAMES:
3535
default: glm-4.5-flash
3636
env: ZHIPUAI_API_KEY
3737
models:
38-
- glm-4.5
38+
- glm-4.6
3939
- glm-4.5-air
4040
- glm-4.5-flash
4141

4242
siliconflow:
4343
name: SiliconFlow
4444
url: https://cloud.siliconflow.cn/models
4545
base_url: https://api.siliconflow.cn/v1
46-
default: zai-org/GLM-4.5
46+
default: deepseek-ai/DeepSeek-V3.2-Exp
4747
env: SILICONFLOW_API_KEY
4848
models:
49+
- deepseek-ai/DeepSeek-V3.2-Exp
4950
- Qwen/Qwen3-235B-A22B-Thinking-2507
5051
- Qwen/Qwen3-235B-A22B-Instruct-2507
51-
- moonshotai/Kimi-K2-Instruct
52-
- zai-org/GLM-4.5
52+
- moonshotai/Kimi-K2-Instruct-0905
53+
- zai-org/GLM-4.6
5354

5455
together.ai:
5556
name: Together.ai

web/src/App.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<script setup>
22
import { themeConfig } from '@/assets/theme'
33
import { useAgentStore } from '@/stores/agent'
4+
import { useUserStore } from '@/stores/user'
45
import { onMounted } from 'vue'
56
67
const agentStore = useAgentStore();
8+
const userStore = useUserStore();
79
810
onMounted(async () => {
9-
await agentStore.initialize();
11+
if (userStore.isLoggedIn) {
12+
await agentStore.initialize();
13+
}
1014
})
1115
</script>
1216
<template>

0 commit comments

Comments
 (0)