(msg: TerminalResizeMessage)
| 590 | } |
| 591 | |
| 592 | private onTerminalResize(msg: TerminalResizeMessage): void { |
| 593 | if (this.terminalHandler === undefined) { |
| 594 | this.send(buildAck(msg.id, ErrorCode.INTERNAL_ERROR, 'terminal handler not wired', {})); |
| 595 | return; |
| 596 | } |
| 597 | const { session_id, terminal_id, cols, rows } = msg.payload; |
| 598 | this.terminalHandler |
| 599 | .resize(session_id, terminal_id, cols, rows) |
| 600 | .then(() => { |
| 601 | this.send(buildAck(msg.id, 0, 'success', { resized: true })); |
| 602 | }) |
| 603 | .catch((err: unknown) => { |
| 604 | this.sendTerminalErrorAck(msg.id, err, 'terminal_resize failed'); |
| 605 | }); |
| 606 | } |
| 607 | |
| 608 | private onTerminalClose(msg: TerminalCloseMessage): void { |
| 609 | if (this.terminalHandler === undefined) { |
no test coverage detected