diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index bd71fedc84..4eb4a14d6a 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -2331,9 +2331,9 @@ async fn handle_response_item( input, call_id, ) - .await, + .await, ) - }, + } ResponseItem::FunctionCallOutput { .. } => { debug!("unexpected FunctionCallOutput from stream"); None diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 73445ad8f2..149bc7b5af 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -112,7 +112,6 @@ use codex_git_tooling::create_ghost_commit; use codex_git_tooling::restore_ghost_commit; use codex_utils_readiness::Readiness; use codex_utils_readiness::ReadinessFlag; -use tokio::task::spawn_blocking; use tracing::warn; const MAX_TRACKED_GHOST_COMMITS: usize = 20; @@ -1139,28 +1138,23 @@ impl ChatWidget { tokio::spawn(async move { let readiness_token = readiness_to_mark.subscribe().await.ok(); if capture_snapshot { - let event = match spawn_blocking(move || { - let options = CreateGhostCommitOptions::new(repo_path.as_path()); - create_ghost_commit(&options) - }) - .await - { - Ok(Ok(commit)) => { + let event = match create_ghost_commit(&CreateGhostCommitOptions::new( + repo_path.as_path(), + )) { + Ok(commit) => { AppEvent::GhostSnapshotResult(GhostSnapshotEvent::Success(commit)) } - Ok(Err(err)) => { + Err(err) => { warn!("failed to create ghost snapshot: {err}"); let (message, hint) = match &err { GitToolingError::NotAGitRepository { .. } => ( - "Snapshots disabled: current directory is not a Git repository." - .to_string(), + "Snapshots disabled: current directory is not a Git repository.".to_string(), None, ), _ => ( format!("Snapshots disabled after error: {err}"), Some( - "Restart Codex after resolving the issue to re-enable snapshots." - .to_string(), + "Restart Codex after resolving the issue to re-enable snapshots.".to_string(), ), ), }; @@ -1169,16 +1163,6 @@ impl ChatWidget { hint, }) } - Err(err) => { - warn!("failed to join ghost snapshot task: {err}"); - AppEvent::GhostSnapshotResult(GhostSnapshotEvent::Disabled { - message: format!("Snapshots disabled after internal error: {err}"), - hint: Some( - "Restart Codex after resolving the issue to re-enable snapshots." - .to_string(), - ), - }) - } }; app_event_tx.send(event); }