添加智能启动功能,彻底解决目录结构问题

- 创建 start.js 智能启动脚本,自动检测项目结构
- 更新 quick-start 脚本,添加目录自动切换功能
- 简化克隆命令,用户可以使用标准方式克隆
- 无需用户手动调整,项目自动适配各种目录结构
- 提升用户体验,真正实现零配置部署
This commit is contained in:
KQL
2025-08-24 14:30:06 +08:00
parent 984421aa68
commit c477fc1826
6 changed files with 140 additions and 43 deletions

View File

@@ -43,6 +43,21 @@ echo ""
echo "正在安装依赖..."
npm install
# 检查是否存在 index.html
if [ ! -f "index.html" ]; then
echo ""
echo "⚠️ 警告:当前目录没有 index.html"
# 检查是否在 agent 子目录中
if [ -f "agent/index.html" ]; then
echo "检测到项目在 agent 子目录中,正在切换..."
cd agent
elif [ -f "../index.html" ]; then
echo "检测到项目在上级目录,正在切换..."
cd ..
fi
fi
echo ""
echo "======================================"
echo "🚀 启动服务器..."