Files
realizemultiagent/新模型初始化.bat
2026-04-02 00:59:42 +08:00

176 lines
4.9 KiB
Batchfile
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >nul
echo.
echo ========================================
echo 多Agent系统 - 新模型初始化向导
echo ========================================
echo.
echo 🤖 检测到新模型接入,正在初始化系统...
echo.
:check_system
echo [步骤1/5] 🔍 验证系统完整性...
if not exist "D:\openclaw-multi-agent\" (
echo ❌ 错误: 系统目录不存在
echo 请确保系统已正确安装
goto error
)
cd /d "D:\openclaw-multi-agent"
echo ✅ 已切换到系统目录
:load_context
echo [步骤2/5] 📚 加载系统上下文...
if exist "system-api\model-context.md" (
echo ✅ 找到模型上下文文档
echo.
echo "========================================"
echo " 系统上下文摘要"
echo "========================================"
echo.
rem 显示上下文摘要
for /f "tokens=1,* delims=:" %%a in ('findstr /n "## 🎯 重要提示" "system-api\model-context.md"') do (
set start_line=%%a
goto show_context
)
:show_context
set /a end_line=start_line+20
more +%start_line% "system-api\model-context.md" | head -n 20
) else (
echo ❌ 错误: 模型上下文文档缺失
goto error
)
:check_state
echo.
echo [步骤3/5] 📊 加载系统状态...
if exist "system-api\system-state.json" (
echo ✅ 找到系统状态文件
for /f "tokens=2 delims=:" %%a in ('findstr /c:"\"version\"" "system-api\system-state.json"') do (
set version=%%a
)
set version=%version:"=%
set version=%version:,=%
echo ℹ️ 系统版本: %version%
for /f "tokens=2 delims=:" %%a in ('findstr /c:"\"health\"" "system-api\system-state.json"') do (
set health=%%a
)
set health=%health:"=%
set health=%health:,=%
echo ℹ️ 系统健康: %health%
) else (
echo ⚠️ 警告: 系统状态文件缺失,将创建默认状态
call :create_default_state
)
:show_commands
echo.
echo [步骤4/5] 🎮 显示可用指令...
echo "========================================"
echo " 核心指令集"
echo "========================================"
echo.
echo 📋 基础指令 (最常用):
echo /网站 [需求] [时间] - 创建网站项目
echo /应用 [需求] [时间] - 创建应用项目
echo /状态 系统 - 查看系统状态
echo /项目 列表 - 列出所有项目
echo.
echo 🚀 高级指令:
echo /任务 完整 - 完整项目模板
echo /api [需求] [时间] - 创建API项目
echo /紧急 [需求] [时间] - 紧急任务
echo.
echo 🛠️ 管理指令:
echo /文件 查看 [路径] - 查看文件
echo /文件 列表 [目录] - 列出文件
echo /agent 启动 [角色] - 启动Agent
echo /agent 停止 [角色] - 停止Agent
echo.
:show_examples
echo [步骤5/5] 💡 显示使用示例...
echo "========================================"
echo " 快速开始示例"
echo "========================================"
echo.
echo 示例1: 创建网站项目
echo /网站 "企业官网,响应式设计" "2天"
echo.
echo 示例2: 创建应用项目
echo /应用 "任务管理工具" "3天"
echo.
echo 示例3: 查看系统状态
echo /状态 系统
echo.
echo 示例4: 列出所有项目
echo /项目 列表
echo.
:complete
echo "========================================"
echo " 🎉 初始化完成!"
echo "========================================"
echo.
echo ✅ 系统上下文已加载
echo ✅ 系统状态已检查
echo ✅ 可用指令已显示
echo ✅ 使用示例已提供
echo.
echo 📍 系统位置: D:\openclaw-multi-agent\
echo 📚 关键文档:
echo - 系统上下文: system-api\model-context.md
echo - 完整指令: 任务指令系统.md
echo - 快速参考: 快速指令卡.md
echo - 交互工具: 查看指令.bat
echo.
echo 🚀 下一步建议:
echo 1. 运行 "系统自检.bat" 进行全面检查
echo 2. 运行 "查看指令.bat" 交互式查看指令
echo 3. 使用 "/状态 系统" 查看详细状态
echo 4. 开始你的第一个项目!
echo.
echo 💬 记住: 所有指令以 "/" 开头
echo 系统状态自动保存,模型切换无影响
echo.
echo ========================================
echo 按任意键开始使用系统...
pause >nul
rem 启动后显示提示
echo.
echo 🦞🍊 多Agent系统已就绪!
echo 请输入指令开始工作,或输入 "/帮助" 获取帮助
goto end
:create_default_state
echo 正在创建默认系统状态...
(
echo {
echo "version": "2.0",
echo "system": {
echo "name": "多Agent协作系统",
echo "health": "initializing",
echo "status": "new_model"
echo },
echo "projects": [],
echo "tasks": [],
echo "agents": {},
echo "created": "%date% %time%"
echo }
) > "system-api\system-state.json"
echo ✅ 默认状态已创建
goto :eof
:error
echo.
echo ❌ 初始化失败
echo 请检查系统文件完整性
pause >nul
exit /b 1
:end
exit /b 0