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

Function computeTargetDims

src/utils/computerUse/executor.ts:60–68  ·  view source on GitHub ↗

Logical → physical → API target dims. See `targetImageSize` + COORDINATES.md.

(
  logicalW: number,
  logicalH: number,
  scaleFactor: number,
)

Source from the content-addressed store, hash-verified

58
59/** Logical → physical → API target dims. See `targetImageSize` + COORDINATES.md. */
60function computeTargetDims(
61 logicalW: number,
62 logicalH: number,
63 scaleFactor: number,
64): [number, number] {
65 const physW = Math.round(logicalW * scaleFactor)
66 const physH = Math.round(logicalH * scaleFactor)
67 return targetImageSize(physW, physH, API_RESIZE_PARAMS)
68}
69
70async function readClipboardViaPbpaste(): Promise<string> {
71 const { stdout, code } = await execFileNoThrow('pbpaste', [], {

Callers 3

resolvePrepareCaptureFunction · 0.85
screenshotFunction · 0.85
zoomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected