mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
core: cancel git enrichment on task-run abort
This commit is contained in:
@@ -162,6 +162,9 @@ impl Session {
|
||||
// immediately following turns observe the correct switch state.
|
||||
sess.set_previous_model(Some(model_slug)).await;
|
||||
if let Some(reason) = abort_reason {
|
||||
ctx_for_finish
|
||||
.turn_metadata_state
|
||||
.cancel_git_enrichment_task();
|
||||
// Emit TurnAborted from the spawn site so the rollout flush above
|
||||
// makes the interrupt marker durable before clients observe the event.
|
||||
sess.emit_turn_aborted(ctx_for_finish.as_ref(), reason)
|
||||
|
||||
Reference in New Issue
Block a user