| 204 | } |
| 205 | |
| 206 | void HandleConsoleEvent(const nlohmann::json& event) { |
| 207 | if (event.value("type", "") == "console.data") { |
| 208 | const std::string bytes = StripHostTerminalQueries(HexToBytes(event.value("data_hex", ""))); |
| 209 | if (!bytes.empty()) { |
| 210 | (void)::write(STDOUT_FILENO, bytes.data(), bytes.size()); |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | void PrintDetached(RawTerminal& raw) { |
| 216 | raw.Restore(); |
no test coverage detected