MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / map_api_run_status

Function map_api_run_status

crates/opencode-tui/src/app/app.rs:3532–3544  ·  view source on GitHub ↗
(status: &crate::api::SessionStatusInfo)

Source from the content-addressed store, hash-verified

3530}
3531
3532fn map_api_run_status(status: &crate::api::SessionStatusInfo) -> SessionStatus {
3533 if status.busy {
3534 if status.status.eq_ignore_ascii_case("retry") {
3535 return SessionStatus::Retrying {
3536 message: status.message.clone().unwrap_or_default(),
3537 attempt: status.attempt.unwrap_or(0),
3538 next: status.next.unwrap_or_default(),
3539 };
3540 }
3541 return SessionStatus::Running;
3542 }
3543 SessionStatus::Idle
3544}
3545
3546fn agent_color_from_name(theme: &crate::theme::Theme, agent_name: &str) -> ratatui::style::Color {
3547 if theme.agent_colors.is_empty() {

Callers 1

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected