fix: 修复首页异常弹出未登录提示
This commit is contained in:
parent
371f717881
commit
af7355ce8b
@ -13,14 +13,15 @@ ENV TZ=Asia/Shanghai \
|
||||
# 设置代理和时区,更换镜像源,安装系统依赖 - 合并为一个RUN减少层数
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
|
||||
# 更换为阿里云镜像源加速下载
|
||||
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
|
||||
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
|
||||
sed -i 's|http://deb.debian.org/debian|http://mirrors.tuna.tsinghua.edu.cn/debian|g' /etc/apt/sources.list.d/debian.sources && \
|
||||
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 && \
|
||||
# sed -i 's|mirrors.aliyun.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/debian.sources && \
|
||||
# 清理apt缓存并更新,避免空间不足问题
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \
|
||||
apt-get update && \
|
||||
# 安装系统依赖,减少缓存占用
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt-get install -y --no-install-recommends --fix-missing \
|
||||
python3-dev \
|
||||
ffmpeg \
|
||||
libsm6 \
|
||||
@ -46,7 +47,10 @@ ENV HTTP_PROXY=$HTTP_PROXY \
|
||||
|
||||
# 如果网络还是不好,可以在后面添加 --index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --no-dev --no-install-project
|
||||
uv sync --no-dev
|
||||
|
||||
# 激活虚拟环境并添加到PATH
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
# 复制代码到容器中
|
||||
COPY ../src /app/src
|
||||
|
||||
@ -35,7 +35,7 @@ MODEL_NAMES:
|
||||
default: glm-4.5-flash
|
||||
env: ZHIPUAI_API_KEY
|
||||
models:
|
||||
- glm-4.5
|
||||
- glm-4.6
|
||||
- glm-4.5-air
|
||||
- glm-4.5-flash
|
||||
|
||||
@ -43,13 +43,14 @@ MODEL_NAMES:
|
||||
name: SiliconFlow
|
||||
url: https://cloud.siliconflow.cn/models
|
||||
base_url: https://api.siliconflow.cn/v1
|
||||
default: zai-org/GLM-4.5
|
||||
default: deepseek-ai/DeepSeek-V3.2-Exp
|
||||
env: SILICONFLOW_API_KEY
|
||||
models:
|
||||
- deepseek-ai/DeepSeek-V3.2-Exp
|
||||
- Qwen/Qwen3-235B-A22B-Thinking-2507
|
||||
- Qwen/Qwen3-235B-A22B-Instruct-2507
|
||||
- moonshotai/Kimi-K2-Instruct
|
||||
- zai-org/GLM-4.5
|
||||
- moonshotai/Kimi-K2-Instruct-0905
|
||||
- zai-org/GLM-4.6
|
||||
|
||||
together.ai:
|
||||
name: Together.ai
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
<script setup>
|
||||
import { themeConfig } from '@/assets/theme'
|
||||
import { useAgentStore } from '@/stores/agent'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const agentStore = useAgentStore();
|
||||
const userStore = useUserStore();
|
||||
|
||||
onMounted(async () => {
|
||||
await agentStore.initialize();
|
||||
if (userStore.isLoggedIn) {
|
||||
await agentStore.initialize();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user