-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-source-windows.bat
More file actions
59 lines (48 loc) · 1.47 KB
/
run-source-windows.bat
File metadata and controls
59 lines (48 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@echo off
setlocal EnableDelayedExpansion
echo ===================================================
echo AgentCHAT - Windows Source Runner
echo Multi-Agent AI Conversation Platform
echo ===================================================
echo.
cd /d "%~dp0"
:: Port Configuration
set ELECTRON_DEBUG_PORT=59847
set ELECTRON_INSPECT_PORT=61293
set DEV_SERVER_PORT=58743
echo [INFO] Working directory: %CD%
echo [INFO] Dev Server Port: %DEV_SERVER_PORT%
echo.
:: Check for Node.js
where node >nul 2>nul
if %ERRORLEVEL% neq 0 (
echo [ERROR] Node.js is not installed. Please install Node.js first.
pause
exit /b 1
)
for /f "tokens=*" %%i in ('node --version') do echo [OK] Node.js %%i
:: Install dependencies if needed
if not exist "node_modules" (
echo [SETUP] Installing dependencies...
call npm install
)
:: Kill any existing processes on our ports
for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":%DEV_SERVER_PORT% " 2^>nul') do (
echo [CLEANUP] Killing process on port %DEV_SERVER_PORT% - PID: %%a
taskkill /PID %%a /F >nul 2>nul
)
echo.
echo [START] Launching AgentCHAT...
echo.
:: Check for --dev flag
if "%1"=="--dev" (
echo [MODE] Development mode with DevTools
set NODE_ENV=development
start /B npm run dev
npx wait-on tcp:%DEV_SERVER_PORT% -t 30000
npx electron . --remote-debugging-port=%ELECTRON_DEBUG_PORT% --inspect=%ELECTRON_INSPECT_PORT%
) else (
echo [MODE] Standard development mode
call npm run electron:dev
)
pause