refactor: 统一项目名称从OpenFang到ZCLAW
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括: - 配置文件中的项目名称 - 代码注释和文档引用 - 环境变量和路径 - 类型定义和接口名称 - 测试用例和模拟数据 同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
This commit is contained in:
30
start.ps1
30
start.ps1
@@ -3,7 +3,7 @@
|
||||
|
||||
param(
|
||||
[switch]$NoBrowser, # Skip ChromeDriver
|
||||
[switch]$NoGateway, # Skip OpenFang gateway
|
||||
[switch]$NoGateway, # Skip ZCLAW gateway
|
||||
[switch]$Dev, # Start in development mode (with hot reload)
|
||||
[switch]$Help
|
||||
)
|
||||
@@ -24,7 +24,7 @@ Usage: .\start.ps1 [options]
|
||||
|
||||
Options:
|
||||
-NoBrowser Skip starting ChromeDriver
|
||||
-NoGateway Skip starting OpenFang gateway
|
||||
-NoGateway Skip starting ZCLAW gateway
|
||||
-Dev Start in development mode with hot reload
|
||||
-Help Show this help message
|
||||
|
||||
@@ -38,7 +38,7 @@ Examples:
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "═══════════════════════════════════════════" -ForegroundColor Magenta
|
||||
Write-Host " 🦞 ZCLAW - OpenFang Desktop Client" -ForegroundColor Magenta
|
||||
Write-Host " 🦞 ZCLAW - AI Agent Desktop Client" -ForegroundColor Magenta
|
||||
Write-Host "═══════════════════════════════════════════" -ForegroundColor Magenta
|
||||
Write-Host ""
|
||||
|
||||
@@ -93,9 +93,9 @@ if (-not $NoBrowser) {
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# 2. Check/OpenFang Gateway
|
||||
# 2. Check/ZCLAW Gateway
|
||||
if (-not $NoGateway) {
|
||||
Write-Info "Checking OpenFang Gateway..."
|
||||
Write-Info "Checking ZCLAW Gateway..."
|
||||
|
||||
# Check if already running
|
||||
$gatewayRunning = $false
|
||||
@@ -103,18 +103,18 @@ if (-not $NoGateway) {
|
||||
$response = Invoke-WebRequest -Uri "http://127.0.0.1:4200/health" -TimeoutSec 2 -ErrorAction SilentlyContinue
|
||||
if ($response.StatusCode -eq 200) {
|
||||
$gatewayRunning = $true
|
||||
Write-Success "OpenFang Gateway already running on port 4200"
|
||||
Write-Success "ZCLAW Gateway already running on port 4200"
|
||||
}
|
||||
} catch {
|
||||
# Not running
|
||||
}
|
||||
|
||||
if (-not $gatewayRunning) {
|
||||
# Try to start OpenFang
|
||||
$openfang = Get-Command openfang -ErrorAction SilentlyContinue
|
||||
if ($openfang) {
|
||||
Write-Info "Starting OpenFang Gateway..."
|
||||
$gatewayProc = Start-Process -FilePath "openfang" -ArgumentList "gateway", "start" -PassThru
|
||||
# Try to start ZCLAW
|
||||
$zclaw = Get-Command zclaw -ErrorAction SilentlyContinue
|
||||
if ($zclaw) {
|
||||
Write-Info "Starting ZCLAW Gateway..."
|
||||
$gatewayProc = Start-Process -FilePath "zclaw" -ArgumentList "gateway", "start" -PassThru
|
||||
$startedProcesses += $gatewayProc
|
||||
|
||||
# Wait for gateway to start
|
||||
@@ -125,7 +125,7 @@ if (-not $NoGateway) {
|
||||
try {
|
||||
$response = Invoke-WebRequest -Uri "http://127.0.0.1:4200/health" -TimeoutSec 1 -ErrorAction SilentlyContinue
|
||||
if ($response.StatusCode -eq 200) {
|
||||
Write-Success "OpenFang Gateway started on port 4200"
|
||||
Write-Success "ZCLAW Gateway started on port 4200"
|
||||
break
|
||||
}
|
||||
} catch {}
|
||||
@@ -139,12 +139,12 @@ if (-not $NoGateway) {
|
||||
Write-Warn "Gateway did not respond within ${maxWait}s. Check logs."
|
||||
}
|
||||
} else {
|
||||
Write-Warn "OpenFang CLI not found. Gateway not started."
|
||||
Write-Info "Install OpenFang: https://github.com/openfang/openfang"
|
||||
Write-Warn "ZCLAW CLI not found. Gateway not started."
|
||||
Write-Info "Install ZCLAW: https://github.com/RightNow-AI/zclaw"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Info "Skipping OpenFang Gateway (-NoGateway)"
|
||||
Write-Info "Skipping ZCLAW Gateway (-NoGateway)"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
Reference in New Issue
Block a user