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

Function type

src/utils/computerUse/executor.ts:509–519  ·  view source on GitHub ↗
(text: string, opts: { viaClipboard: boolean })

Source from the content-addressed store, hash-verified

507 },
508
509 async type(text: string, opts: { viaClipboard: boolean }): Promise<void> {
510 const input = requireComputerUseInput()
511 if (opts.viaClipboard) {
512 // keys(['command','v']) inside needs the pump.
513 await drainRunLoop(() => typeViaClipboard(input, text))
514 return
515 }
516 // `toolCalls.ts` handles the grapheme loop + 8ms sleeps and calls this
517 // once per grapheme. typeText doesn't dispatch to the main queue.
518 await input.typeText(text)
519 },
520
521 readClipboard: readClipboardViaPbpaste,
522

Callers

nothing calls this directly

Calls 3

requireComputerUseInputFunction · 0.85
drainRunLoopFunction · 0.85
typeViaClipboardFunction · 0.85

Tested by

no test coverage detected