mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:27:39 +00:00
refactor: remove bridge protocol
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
type BridgeLike = {
|
||||
listConnected?: () => Array<{ platform?: string | null }>;
|
||||
};
|
||||
import type { NodeRegistry } from "./node-registry.js";
|
||||
|
||||
const isMobilePlatform = (platform: unknown): boolean => {
|
||||
const p = typeof platform === "string" ? platform.trim().toLowerCase() : "";
|
||||
@@ -8,7 +6,7 @@ const isMobilePlatform = (platform: unknown): boolean => {
|
||||
return p.startsWith("ios") || p.startsWith("ipados") || p.startsWith("android");
|
||||
};
|
||||
|
||||
export function hasConnectedMobileNode(bridge: BridgeLike | null): boolean {
|
||||
const connected = bridge?.listConnected?.() ?? [];
|
||||
export function hasConnectedMobileNode(registry: NodeRegistry): boolean {
|
||||
const connected = registry.listConnected();
|
||||
return connected.some((n) => isMobilePlatform(n.platform));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user