diff --git a/frontend/src/components/chat/ChatPanel.vue b/frontend/src/components/chat/ChatPanel.vue index fef3aef..bfec2de 100644 --- a/frontend/src/components/chat/ChatPanel.vue +++ b/frontend/src/components/chat/ChatPanel.vue @@ -198,7 +198,7 @@ onMounted(() => { /* 面板 */ .chat-panel { - width: 380px; + width: 480px; max-width: 100vw; height: 100vh; background: var(--paper-50); diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..8d1ead7 --- /dev/null +++ b/start.bat @@ -0,0 +1,49 @@ +@echo off +chcp 65001 >nul +title Noval - 小说创作应用 + +echo ======================================== +echo Noval 启动中... +echo ======================================== +echo. + +:: 检查后端虚拟环境 +if not exist "backend\.venv\Scripts\uvicorn.exe" ( + echo [!] 未检测到后端虚拟环境,正在初始化... + cd backend + py -3 -m venv .venv + .venv\Scripts\pip install -r requirements.txt + cd .. + echo. +) + +:: 检查前端依赖 +if not exist "frontend\node_modules" ( + echo [!] 未检测到前端依赖,正在安装... + cd frontend + call npm install + cd .. + echo. +) + +echo [1/2] 启动后端 (port 8000)... +start "Noval-Backend" cmd /c "cd backend && .venv\Scripts\uvicorn app.main:app --port 8000" + +echo [2/2] 启动前端 (port 5173)... +start "Noval-Frontend" cmd /c "cd frontend && npm run dev" + +:: 等待服务就绪后打开浏览器 +timeout /t 3 /nobreak >nul +start http://localhost:5173 + +echo. +echo ======================================== +echo Noval 已启动! +echo 前端: http://localhost:5173 +echo 后端: http://localhost:8000/docs +echo ======================================== +echo 关闭此窗口不会停止服务 +echo 如需停止,请关闭 Noval-Backend 和 +echo Noval-Frontend 两个终端窗口 +echo ======================================== +pause