(msg: WSFileEventData)
| 477 | } |
| 478 | |
| 479 | handleNewFileSubjectData(msg: WSFileEventData) { |
| 480 | if (msg.fileop == "truncate") { |
| 481 | this.terminal.clear(); |
| 482 | this.heldData = []; |
| 483 | } else if (msg.fileop == "append") { |
| 484 | const decodedData = base64ToArray(msg.data64); |
| 485 | if (this.loaded) { |
| 486 | this.doTerminalWrite(decodedData, null); |
| 487 | } else { |
| 488 | this.heldData.push(decodedData); |
| 489 | } |
| 490 | } else { |
| 491 | console.log("bad fileop for terminal", msg); |
| 492 | return; |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | doTerminalWrite(data: string | Uint8Array, setPtyOffset?: number): Promise<void> { |
| 497 | if (isDev() && this.loaded) { |
nothing calls this directly
no test coverage detected