MCPcopy Create free account
hub / github.com/coder/ghostty-web / processTerminalResponses

Method processTerminalResponses

lib/terminal.ts:1753–1763  ·  view source on GitHub ↗

* Process any pending terminal responses and emit them via onData. * * This handles escape sequences that require the terminal to send a response * back to the PTY, such as: * - DSR 6 (cursor position): Shell sends \x1b[6n, terminal responds with \x1b[row;colR * - DSR 5 (operating sta

()

Source from the content-addressed store, hash-verified

1751 * will hang waiting for a response that never comes.
1752 */
1753 private processTerminalResponses(): void {
1754 if (!this.wasmTerm) return;
1755
1756 // Read any pending responses from the WASM terminal
1757 const response = this.wasmTerm.readResponse();
1758 if (response) {
1759 // Send response back to the PTY via onData
1760 // This is the same path as user keyboard input
1761 this.dataEmitter.fire(response);
1762 }
1763 }
1764
1765 /**
1766 * Check for title changes in written data (OSC sequences)

Callers 1

writeInternalMethod · 0.95

Calls 2

readResponseMethod · 0.80
fireMethod · 0.45

Tested by

no test coverage detected