MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / currentScreenSize

Function currentScreenSize

scripts/bench/agent-control-benchmark.mjs:1091–1104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1089}
1090
1091function currentScreenSize() {
1092 const result = run(
1093 simdeckBin,
1094 ["describe", "--format", "agent", "--max-depth", "1", "-i"],
1095 { timeoutMs: 10000 },
1096 );
1097 const match = result.stdout.match(
1098 /Application:[^\n]*@\S+\s+([0-9.]+)x([0-9.]+)/,
1099 );
1100 if (!match) {
1101 return { width: 402, height: 874 };
1102 }
1103 return { width: Number(match[1]), height: Number(match[2]) };
1104}
1105
1106function readVersion(command, args) {
1107 const result = run(command, args, { timeoutMs: 5000, allowFailure: true });

Callers 1

benchmarkAgentDeviceFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected