Revert "fix(mobile-mcp): strip bounds attributes from UI hierarchy dump"

This reverts commit 5be74c99ca.
This commit is contained in:
LaZzyMan 2026-07-09 11:51:11 +08:00
parent 5be74c99ca
commit 3ef4859e10

View file

@ -1247,8 +1247,7 @@ export const createMcpServer = (): McpServer => {
{ readOnlyHint: true },
async ({ device, compressed, output_path }) => {
const robot = getAndroidRobotFromDevice(device, 'mobile_ui_dump');
let xml = await robot.dumpUiHierarchy(compressed ?? false);
xml = xml.replace(/ bounds="\[[0-9,]+\]\[[0-9,]+\]"/g, '');
const xml = await robot.dumpUiHierarchy(compressed ?? false);
if (output_path) {
validateOutputPath(output_path);
fs.writeFileSync(output_path, xml, 'utf-8');