MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / getInput

Function getInput

src/utils/computerUse/executor.ts:361–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359 // Uses the same interface so all callsites can use `getInput()` uniformly.
360 type Input = ReturnType<typeof requireComputerUseInput>
361 const getInput = (): Input => {
362 if (isDarwin) return requireComputerUseInput()
363 const p = platform!.input
364 return {
365 moveMouse: (x: number, y: number, _animated: boolean) => p.moveMouse(x, y),
366 key: (k: string, a: 'press' | 'release') => p.key(k, a),
367 keys: (parts: string[]) => p.keys(parts),
368 mouseLocation: () => p.mouseLocation(),
369 mouseButton: (btn: 'left' | 'right' | 'middle', a: 'click' | 'press' | 'release', count?: number) =>
370 p.click(0, 0, btn), // simplified — real coords handled by caller via moveMouse
371 mouseScroll: (amount: number, dir: 'vertical' | 'horizontal') => p.scroll(amount, dir),
372 typeText: (text: string) => p.typeText(text),
373 getFrontmostAppInfo: () => {
374 const info = platform!.apps.getFrontmostApp()
375 return info ? { bundleId: info.id, appName: info.appName } : null
376 },
377 isSupported: true,
378 } as any as Input
379 }
380
381 const terminalBundleId = getTerminalBundleId()
382 const surrogateHost = terminalBundleId ?? CLI_HOST_BUNDLE_ID

Callers 11

keyFunction · 0.85
holdKeyFunction · 0.85
typeFunction · 0.85
moveMouseFunction · 0.85
clickFunction · 0.85
mouseDownFunction · 0.85
mouseUpFunction · 0.85
getCursorPositionFunction · 0.85
dragFunction · 0.85
scrollFunction · 0.85
getFrontmostAppFunction · 0.85

Calls 9

requireComputerUseInputFunction · 0.85
moveMouseMethod · 0.65
keyMethod · 0.65
keysMethod · 0.65
mouseLocationMethod · 0.65
clickMethod · 0.65
scrollMethod · 0.65
typeTextMethod · 0.65
getFrontmostAppMethod · 0.65

Tested by

no test coverage detected