three bugs fixed - gatewayclient, coord, claw3doctor

This commit is contained in:
gsknnft
2026-04-09 19:24:06 -04:00
parent 17fb6eaf86
commit fdc668c2ce
3 changed files with 16 additions and 4 deletions
+12 -1
View File
@@ -4,13 +4,24 @@ export const DOCTOR_STATUSES = {
fail: "FAIL",
};
const VALID_ADAPTER_TYPES = new Set(["openclaw", "hermes", "demo", "custom"]);
const VALID_ADAPTER_TYPES = new Set([
"openclaw",
"nemoclaw",
"hermes",
"demo",
"local",
"claw3d",
"custom",
]);
const TUNNEL_HOST_PATTERN =
/(cloudflare|trycloudflare|ngrok|tailscale|ts\.net|tunnel)/i;
const DEFAULT_GATEWAY_URL_BY_ADAPTER = {
openclaw: "ws://localhost:18789",
nemoclaw: "ws://localhost:18789",
hermes: "ws://localhost:18789",
demo: "ws://localhost:18789",
local: "http://localhost:7770",
claw3d: "http://localhost:3000/api/runtime/custom",
custom: "http://localhost:7770",
};
+1 -1
View File
@@ -430,7 +430,7 @@ export const isGatewayDisconnectLikeError = (err: unknown): boolean => {
return true;
}
const match = msg.match(/gateway closed \\((\\d+)\\)/);
const match = msg.match(/gateway closed \((\d+)\)/);
if (!match) return false;
const code = Number(match[1]);
return Number.isFinite(code) && code === 1012;
+3 -2
View File
@@ -366,9 +366,10 @@ export class StudioSettingsCoordinator {
if (this.pendingLoadPromise) {
return this.pendingLoadPromise;
}
} else if (this.pendingLoadPromise) {
return this.pendingLoadPromise;
}
// force=true bypasses both cache and any in-flight request so callers
// that need authoritative state (e.g. useGatewayConnection on startup)
// always get a fresh fetch rather than a possibly-stale pending one.
const loadPromise = this.transport
.fetchSettings()