MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / write

Method write

src/components/terminal/terminal.js:902–915  ·  view source on GitHub ↗

* Write data to terminal * @param {string} data - Data to write

(data)

Source from the content-addressed store, hash-verified

900 * @param {string} data - Data to write
901 */
902 write(data) {
903 if (
904 this.serverMode &&
905 this.isConnected &&
906 this.websocket &&
907 this.websocket.readyState === WebSocket.OPEN
908 ) {
909 // Send data through WebSocket instead of direct write
910 this.websocket.send(data);
911 } else {
912 // For local mode or disconnected terminals, write directly
913 this.terminal.write(data);
914 }
915 }
916
917 /**
918 * Write line to terminal

Callers 2

createTerminalMethod · 0.95

Calls 2

sendMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected