chore(release): v0.13.3

- 修复 #212 AI 消息气泡空白
- 修复 #215 HTTPS 下 WebSocket Mixed Content
- 修复 #219 多实例版本检测错误
- 修复引擎切换后仪表盘无限加载
- 修复热更新假更新循环(macOS/Linux)
- CI release 构建前自动同步版本号
This commit is contained in:
晴天
2026-04-16 13:55:26 +08:00
parent 55e8365cab
commit 36eaa64bf4
25 changed files with 204 additions and 50 deletions

View File

@@ -388,7 +388,8 @@ async function testWebSocketAdv(page) {
const rawToken = config?.gateway?.auth?.token
const token = (typeof rawToken === 'string') ? rawToken : ''
const wsHost = isTauriRuntime() ? `127.0.0.1:${port}` : location.host
const url = `ws://${wsHost}/ws?token=${encodeURIComponent(token)}`
const wsScheme = location.protocol === 'https:' ? 'wss' : 'ws'
const url = `${wsScheme}://${wsHost}/ws?token=${encodeURIComponent(token)}`
log(`${url}`)
const ws = new WebSocket(url)

View File

@@ -126,19 +126,20 @@ async function _loadDashboardDataInner(page, fullRefresh) {
promise,
new Promise((_, reject) => setTimeout(() => reject(new Error(`超时(${ms/1000}s)`)), ms))
])
const coreP = withTimeout(Promise.allSettled([
api.getServicesStatus(),
api.readOpenclawConfig(),
// 每个请求独立超时:避免单个慢请求拖垮整体渲染
const coreP = Promise.allSettled([
withTimeout(api.getServicesStatus(), 12000),
withTimeout(api.readOpenclawConfig(), 5000),
// 版本信息:首次加载或手动刷新时才查询(避免 ARM 设备上频繁查 npm registry
(!_dashboardInitialized || fullRefresh || !_dashboardVersionCache) ? api.getVersionInfo() : Promise.resolve(_dashboardVersionCache),
api.readPanelConfig(),
]), 15000)
const secondaryP = withTimeout(Promise.allSettled([
api.listAgents(),
api.readMcpConfig(),
api.listBackups(),
api.listConfiguredPlatforms().catch(() => []),
]), 15000).catch(() => [{ status: 'rejected' }, { status: 'rejected' }, { status: 'rejected' }, { status: 'rejected' }])
(!_dashboardInitialized || fullRefresh || !_dashboardVersionCache) ? withTimeout(api.getVersionInfo(), 8000) : Promise.resolve(_dashboardVersionCache),
withTimeout(api.readPanelConfig(), 5000),
])
const secondaryP = Promise.allSettled([
withTimeout(api.listAgents(), 10000),
withTimeout(api.readMcpConfig(), 10000),
withTimeout(api.listBackups(), 10000),
withTimeout(api.listConfiguredPlatforms(), 10000).catch(() => []),
])
const logsP = api.readLogTail('gateway', 20).catch(() => '')
// 第一波:服务状态 + 配置 + 版本 → 立即渲染统计卡片
@@ -200,7 +201,7 @@ async function _loadDashboardDataInner(page, fullRefresh) {
if (shouldLoadStatusSummary) {
try {
statusSummary = (!_dashboardInitialized || fullRefresh || !_dashboardStatusSummaryCache)
? await withTimeout(api.getStatusSummary(), 15000)
? await withTimeout(api.getStatusSummary(), 10000)
: _dashboardStatusSummaryCache
_dashboardStatusSummaryCache = statusSummary
} catch {