Files
openclaw/ui/src/lib/gateway-methods.ts
Shakker 65e12328aa feat: refactor the Control UI architecture
Refactor the Control UI around route-owned page lifecycle and state while preserving existing behavior and design.

Prepared head SHA: bd51b6fa76
Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com>
Reviewed-by: @shakkernerd
2026-07-04 23:19:38 +01:00

15 lines
312 B
TypeScript

export function isGatewayMethodAdvertised(
host: {
hello?: {
features?: { methods?: string[] } | null;
} | null;
},
method: string,
): boolean | null {
const methods = host.hello?.features?.methods;
if (!Array.isArray(methods)) {
return null;
}
return methods.includes(method);
}