MCPcopy Create free account
hub / github.com/anus-dev/ANUS / paste

Method paste

packages/cli/src/ui/hooks/useKeypress.test.ts:70–80  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

68
69 // Helper to simulate a full paste event.
70 paste(text: string) {
71 if (this.isLegacy) {
72 const PASTE_START = '\x1B[200~';
73 const PASTE_END = '\x1B[201~';
74 this.emit('data', Buffer.from(`${PASTE_START}${text}${PASTE_END}`));
75 } else {
76 this.emit('keypress', null, { name: 'paste-start' });
77 this.emit('keypress', null, { sequence: text });
78 this.emit('keypress', null, { name: 'paste-end' });
79 }
80 }
81
82 // Helper to simulate the start of a paste, without the end.
83 startPaste(text: string) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected