(message: Vec<String>)
| 1042 | } |
| 1043 | |
| 1044 | fn collect_run_input(message: Vec<String>) -> anyhow::Result<String> { |
| 1045 | let mut input = message.join(" "); |
| 1046 | if !io::stdin().is_terminal() { |
| 1047 | let mut piped = String::new(); |
| 1048 | io::stdin().read_to_string(&mut piped)?; |
| 1049 | if !piped.trim().is_empty() { |
| 1050 | if !input.trim().is_empty() { |
| 1051 | input.push('\n'); |
| 1052 | } |
| 1053 | input.push_str(piped.trim_end()); |
| 1054 | } |
| 1055 | } |
| 1056 | Ok(input) |
| 1057 | } |
| 1058 | |
| 1059 | #[derive(Debug, Deserialize)] |
| 1060 | struct RemoteSessionInfo { |
no test coverage detected