mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-18 13:41:35 +00:00
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
15 lines
312 B
TypeScript
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);
|
|
}
|