fix: clarify openclaw gateway offline error
This commit is contained in:
parent
0b45992081
commit
cd8c34efe0
@ -230,6 +230,12 @@ extension AppControllerDesktopRuntimeHelpers on AppController {
|
||||
if (lowered.contains('gateway not connected') ||
|
||||
lowered.contains('code: offline') ||
|
||||
lowered.contains('offlin') && lowered.contains('gateway')) {
|
||||
if (target.isGateway) {
|
||||
return appText(
|
||||
'OpenClaw Gateway 当前未连接。请确认 xworkmate-bridge 节点本机 127.0.0.1:18789 可用后重试。',
|
||||
'OpenClaw Gateway is not connected. Confirm the xworkmate-bridge host can reach 127.0.0.1:18789, then try again.',
|
||||
);
|
||||
}
|
||||
final profile = gatewayProfileForAssistantExecutionTargetInternal(target);
|
||||
final address = gatewayAddressLabelInternal(profile);
|
||||
return address == appText('未连接目标', 'No target')
|
||||
|
||||
@ -122,6 +122,22 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'labels gateway offline errors as OpenClaw runtime failures',
|
||||
() async {
|
||||
final controller = await _isolatedController();
|
||||
addTearDown(controller.dispose);
|
||||
|
||||
final label = controller.gatewayExecutionErrorLabelInternal(
|
||||
'gateway not connected',
|
||||
target: AssistantExecutionTarget.gateway,
|
||||
);
|
||||
|
||||
expect(label, contains('OpenClaw Gateway 当前未连接'));
|
||||
expect(label, isNot(contains('xworkmate-bridge 未连接')));
|
||||
},
|
||||
);
|
||||
|
||||
test('keeps signed-out generic runtime failures disconnected', () async {
|
||||
final controller = await _isolatedController();
|
||||
addTearDown(controller.dispose);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user