MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / recv_line

Function recv_line

src/sessions/codex_app_server.rs:345–367  ·  view source on GitHub ↗
(
    line_rx: &mpsc::Receiver<std::io::Result<String>>,
    deadline: Instant,
)

Source from the content-addressed store, hash-verified

343}
344
345fn recv_line(
346 line_rx: &mpsc::Receiver<std::io::Result<String>>,
347 deadline: Instant,
348) -> Result<String> {
349 let remaining = deadline
350 .checked_duration_since(Instant::now())
351 .unwrap_or_default();
352 if remaining.is_zero() {
353 return Err(TraceDecayError::Config {
354 message: "timed out waiting for codex app-server".to_string(),
355 });
356 }
357 match line_rx.recv_timeout(remaining) {
358 Ok(Ok(line)) => Ok(line),
359 Ok(Err(err)) => Err(err.into()),
360 Err(mpsc::RecvTimeoutError::Timeout) => Err(TraceDecayError::Config {
361 message: "timed out waiting for codex app-server".to_string(),
362 }),
363 Err(mpsc::RecvTimeoutError::Disconnected) => Err(TraceDecayError::Config {
364 message: "codex app-server closed stdout before completing".to_string(),
365 }),
366 }
367}
368
369fn collect_item_text(value: Option<&Value>) -> Option<String> {
370 match value? {

Callers 2

wait_for_responseFunction · 0.85
wait_for_turn_summaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected