Update channel dispatch UX and harden sidecar startup behavior.

This aligns Weixin/WhatsApp with admin-managed model routing by adding channel/account-level specialist controls, improves OSS startup resilience by skipping missing sidecars gracefully, and refreshes runbook/readme guidance for the new default behavior and Weixin OpenAI-key silent handling.

Made-with: Cursor
This commit is contained in:
oliver 2026-04-28 22:58:50 +08:00
parent b1a0f94cd6
commit 5ab69e88d3
29 changed files with 1226 additions and 100 deletions

View file

@ -4,9 +4,11 @@
[switch]$SkipInstall = $false,
[switch]$Background = $false,
[switch]$WithoutWeixin = $false,
[switch]$WithoutWhatsApp = $false,
[bool]$WithWikiWorker = $true,
[string]$WeixinChannelId = "oclaw-weixin",
[string]$WeixinGatewayBaseUrl = ""
[string]$WeixinGatewayBaseUrl = "",
[string]$WhatsAppChannelId = "whatsapp"
)
$ErrorActionPreference = "Stop"
@ -15,6 +17,10 @@ function Write-Step([string]$msg) {
Write-Host "==> $msg" -ForegroundColor Cyan
}
function Warn([string]$msg) {
Write-Host "[WARN] $msg" -ForegroundColor Yellow
}
$repoRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $PSScriptRoot))
$repoParent = Split-Path -Parent $repoRoot
Set-Location $repoRoot
@ -43,7 +49,20 @@ if (-not $WithoutWeixin) {
$gwBase = "http://$BindHost`:$Port"
}
Write-Step "Starting weixin sidecar"
& "$PSScriptRoot/weixin_start.ps1" -ChannelId $WeixinChannelId -GatewayBaseUrl $gwBase
try {
& "$PSScriptRoot/weixin_start.ps1" -ChannelId $WeixinChannelId -GatewayBaseUrl $gwBase
} catch {
Warn "weixin sidecar skipped: $($_.Exception.Message)"
}
}
if (-not $WithoutWhatsApp) {
$waBase = "http://$BindHost`:$Port"
Write-Step "Starting whatsapp sidecar"
try {
& "$PSScriptRoot/whatsapp_start.ps1" -ChannelId $WhatsAppChannelId -GatewayBaseUrl $waBase
} catch {
Warn "whatsapp sidecar skipped: $($_.Exception.Message)"
}
}
Write-Host ""
Write-Host "All started." -ForegroundColor Green