MCPcopy Index your code
hub / github.com/coder/code-server / doFocus

Method doFocus

test/e2e/models/CodeServer.ts:383–392  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381 */
382 async focusTerminal() {
383 const doFocus = async (): Promise<boolean> => {
384 await this.executeCommandViaMenus("Terminal: Create New Terminal")
385 try {
386 await this.page.waitForLoadState("load")
387 await this.page.waitForSelector("textarea.xterm-helper-textarea:focus-within", { timeout: 5000 })
388 return true
389 } catch (error) {
390 return false
391 }
392 }
393
394 let attempts = 1
395 while (!(await doFocus())) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected