MCPcopy
hub / github.com/google-gemini/gemini-cli / simulateClick

Function simulateClick

packages/cli/src/test-utils/render.tsx:486–497  ·  view source on GitHub ↗
(
  stdin: XtermStdin,
  col: number,
  row: number,
  button: 0 | 1 | 2 = 0, // 0 for left, 1 for middle, 2 for right
)

Source from the content-addressed store, hash-verified

484};
485
486export const simulateClick = async (
487 stdin: XtermStdin,
488 col: number,
489 row: number,
490 button: 0 | 1 | 2 = 0, // 0 for left, 1 for middle, 2 for right
491) => {
492 // Terminal mouse events are 1-based, so convert if necessary.
493 const mouseEventString = `\x1b[<${button};${col};${row}M`;
494 await act(async () => {
495 stdin.write(mouseEventString);
496 });
497};
498
499export const mockSettings = createMockSettings();
500

Callers 4

renderWithProvidersFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected