feat(version): upgrade openclaw version 4.11 (#845)

This commit is contained in:
Haze
2026-04-13 19:11:28 +08:00
committed by GitHub
Unverified
parent 5482acd43d
commit 03c40985e1
9 changed files with 595 additions and 759 deletions

View File

@@ -1,8 +1,8 @@
import type { GatewayStatus } from '@/types/gateway';
export const CHAT_HISTORY_RPC_TIMEOUT_MS = 35_000;
export const CHAT_HISTORY_STARTUP_RETRY_DELAYS_MS = [600] as const;
export const CHAT_HISTORY_STARTUP_CONNECTION_GRACE_MS = 15_000;
export const CHAT_HISTORY_STARTUP_RETRY_DELAYS_MS = [800, 2_000, 4_000, 8_000] as const;
export const CHAT_HISTORY_STARTUP_CONNECTION_GRACE_MS = 30_000;
export const CHAT_HISTORY_STARTUP_RUNNING_WINDOW_MS =
CHAT_HISTORY_RPC_TIMEOUT_MS + CHAT_HISTORY_STARTUP_CONNECTION_GRACE_MS;
export const CHAT_HISTORY_DEFAULT_LOADING_SAFETY_TIMEOUT_MS = 15_000;
@@ -11,11 +11,20 @@ export const CHAT_HISTORY_LOADING_SAFETY_TIMEOUT_MS =
+ CHAT_HISTORY_STARTUP_RETRY_DELAYS_MS.reduce((sum, delay) => sum + delay, 0)
+ 2_000;
export type HistoryRetryErrorKind = 'timeout' | 'gateway_unavailable';
export type HistoryRetryErrorKind = 'timeout' | 'gateway_unavailable' | 'gateway_startup';
export function classifyHistoryStartupRetryError(error: unknown): HistoryRetryErrorKind | null {
const message = String(error).toLowerCase();
if (
message.includes('unavailable during gateway startup')
|| message.includes('unavailable during startup')
|| message.includes('not yet ready')
|| message.includes('service not initialized')
) {
return 'gateway_startup';
}
if (
message.includes('rpc timeout: chat.history')
|| message.includes('gateway rpc timeout: chat.history')
@@ -47,6 +56,11 @@ export function shouldRetryStartupHistoryLoad(
): boolean {
if (!gatewayStatus || !errorKind) return false;
// The gateway explicitly told us it's still initializing -- always retry
if (errorKind === 'gateway_startup') {
return true;
}
if (gatewayStatus.state === 'starting') {
return true;
}