MCPcopy Index your code
hub / github.com/codeaashu/claude-code / zoom

Function zoom

src/utils/computerUse/executor.ts:420–444  ·  view source on GitHub ↗
(
      regionLogical: { x: number; y: number; w: number; h: number },
      allowedBundleIds: string[],
      displayId?: number,
    )

Source from the content-addressed store, hash-verified

418 },
419
420 async zoom(
421 regionLogical: { x: number; y: number; w: number; h: number },
422 allowedBundleIds: string[],
423 displayId?: number,
424 ): Promise<{ base64: string; width: number; height: number }> {
425 const d = cu.display.getSize(displayId)
426 const [outW, outH] = computeTargetDims(
427 regionLogical.w,
428 regionLogical.h,
429 d.scaleFactor,
430 )
431 return drainRunLoop(() =>
432 cu.screenshot.captureRegion(
433 withoutTerminal(allowedBundleIds),
434 regionLogical.x,
435 regionLogical.y,
436 regionLogical.w,
437 regionLogical.h,
438 outW,
439 outH,
440 SCREENSHOT_JPEG_QUALITY,
441 displayId,
442 ),
443 )
444 },
445
446 // ── Keyboard ─────────────────────────────────────────────────────────
447

Callers

nothing calls this directly

Calls 3

computeTargetDimsFunction · 0.85
drainRunLoopFunction · 0.85
withoutTerminalFunction · 0.85

Tested by

no test coverage detected