fix(desktop): external gateway mode and start script alignment

- Add desktop env for non-embedded gateway (OCLAW_DESKTOP_EMBED_BACKEND, base URL, skip channel).
- Wire start_all/start_desktop to pass gateway URL when keeping existing gateway; fix root start_all flags.
- Prefer electron.cmd for background desktop launch; admin static theme presets and chat boot timeouts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-06 11:06:16 +08:00
parent 19e51e2c12
commit 16169b3de2
12 changed files with 566 additions and 45 deletions

View file

@ -3,10 +3,12 @@ param(
[int]$Port = 8787,
[switch]$SkipInstall = $false,
[switch]$Background = $false,
[switch]$WithWeixin = $false,
[switch]$WithoutWeixin = $false,
[switch]$WithoutWhatsApp = $false,
[bool]$WithWikiWorker = $true,
[string]$WeixinChannelId = "oclaw-weixin",
[string]$WeixinGatewayBaseUrl = ""
[string]$WeixinGatewayBaseUrl = "",
[string]$WhatsAppChannelId = "whatsapp"
)
$ErrorActionPreference = "Stop"
@ -16,5 +18,14 @@ if (-not (Test-Path $real)) {
throw "Forward script target not found: $real"
}
& $real -BindHost $BindHost -Port $Port -SkipInstall:$SkipInstall -Background:$Background -WithWeixin:$WithWeixin -WithWikiWorker:$WithWikiWorker -WeixinChannelId $WeixinChannelId -WeixinGatewayBaseUrl $WeixinGatewayBaseUrl
& $real `
-BindHost $BindHost `
-Port $Port `
-SkipInstall:$SkipInstall `
-Background:$Background `
-WithoutWeixin:$WithoutWeixin `
-WithoutWhatsApp:$WithoutWhatsApp `
-WithWikiWorker:$WithWikiWorker `
-WeixinChannelId $WeixinChannelId `
-WeixinGatewayBaseUrl $WeixinGatewayBaseUrl `
-WhatsAppChannelId $WhatsAppChannelId

View file

@ -1,6 +1,8 @@
param(
[switch]$SkipInstall = $false,
[switch]$Background = $false,
[switch]$KeepExistingGateway = $false,
[string]$GatewayBaseUrl = "",
[bool]$WithWikiWorker = $true
)
@ -11,5 +13,5 @@ if (-not (Test-Path $real)) {
throw "Forward script target not found: $real"
}
& $real -SkipInstall:$SkipInstall -Background:$Background -WithWikiWorker:$WithWikiWorker
& $real -SkipInstall:$SkipInstall -Background:$Background -KeepExistingGateway:$KeepExistingGateway -GatewayBaseUrl $GatewayBaseUrl -WithWikiWorker:$WithWikiWorker