From 75b5daab5736d2fb7b780fa32dc67da376766d3c Mon Sep 17 00:00:00 2001 From: dongsheng123132 <90887123+dongsheng123132@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:58:55 +0800 Subject: [PATCH] fix: Windows first-run opens Config.html instead of onboard - Windows-Start.bat now detects first run and opens Config.html - Added custom/relay model option for API proxy platforms --- portable/Windows-Start.bat | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/portable/Windows-Start.bat b/portable/Windows-Start.bat index 79f402d..4eb347c 100644 --- a/portable/Windows-Start.bat +++ b/portable/Windows-Start.bat @@ -84,17 +84,23 @@ if %errorlevel%==0 ( echo Starting OpenClaw on port %PORT%... echo DO NOT close this window! echo. -echo ---------------------------------------- -echo Browser will open automatically. -echo First time setup in web console: -echo 1. Choose AI model (DeepSeek / Kimi / Qwen) -echo 2. Enter API Key -echo 3. Connect chat platform (QQ / Feishu / DingTalk) -echo ---------------------------------------- -echo. cd /d "%CORE_DIR%" -start "" http://127.0.0.1:%PORT%/#token=uclaw + +REM Check if model is configured - open Config.html for first time, dashboard for returning users +set "HAS_MODEL=no" +if exist "%DATA_DIR%\config.json" ( + findstr /c:"agent" "%DATA_DIR%\config.json" >nul 2>&1 && set "HAS_MODEL=yes" +) + +if "%HAS_MODEL%"=="yes" ( + echo Opening dashboard... + start "" http://127.0.0.1:%PORT%/#token=uclaw +) else ( + echo First time - opening Config page... + start "" "%UCLAW_DIR%Config.html?port=%PORT%" +) + "%NODE_BIN%" openclaw.mjs gateway run --allow-unconfigured --force --port %PORT% echo.