(
line_rx: &mpsc::Receiver<std::io::Result<String>>,
deadline: Instant,
id: i64,
)
| 287 | } |
| 288 | |
| 289 | fn wait_for_response( |
| 290 | line_rx: &mpsc::Receiver<std::io::Result<String>>, |
| 291 | deadline: Instant, |
| 292 | id: i64, |
| 293 | ) -> Result<Value> { |
| 294 | loop { |
| 295 | let line = recv_line(line_rx, deadline)?; |
| 296 | let value: Value = serde_json::from_str(&line)?; |
| 297 | if value.get("id").and_then(Value::as_i64) != Some(id) { |
| 298 | continue; |
| 299 | } |
| 300 | if let Some(error) = value.get("error") { |
| 301 | return Err(TraceDecayError::Config { |
| 302 | message: format!("codex app-server request {id} failed: {error}"), |
| 303 | }); |
| 304 | } |
| 305 | return Ok(value); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | fn wait_for_turn_summary( |
| 310 | line_rx: &mpsc::Receiver<std::io::Result<String>>, |
no test coverage detected