mirror of
https://github.com/openai/codex.git
synced 2026-04-30 11:21:34 +03:00
codex: address PR review feedback (#17579)
This commit is contained in:
@@ -310,24 +310,20 @@ impl Session {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn inject_timer_into_active_turn(&self, item: PendingInputItem) -> bool {
|
async fn inject_timer_into_active_turn(&self, item: PendingInputItem) -> bool {
|
||||||
let turn_state = {
|
|
||||||
let active = self.active_turn.lock().await;
|
let active = self.active_turn.lock().await;
|
||||||
let Some(active_turn) = active.as_ref() else {
|
let Some(active_turn) = active.as_ref() else {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
match active_turn.tasks.first().map(|(_, task)| task.kind) {
|
match active_turn.tasks.first().map(|(_, task)| task.kind) {
|
||||||
Some(crate::state::TaskKind::Regular) => Arc::clone(&active_turn.turn_state),
|
Some(crate::state::TaskKind::Regular) => {
|
||||||
Some(crate::state::TaskKind::Review | crate::state::TaskKind::Compact) | None => {
|
let mut turn_state = active_turn.turn_state.lock().await;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut turn_state = turn_state.lock().await;
|
|
||||||
turn_state.push_pending_input(item);
|
turn_state.push_pending_input(item);
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
Some(crate::state::TaskKind::Review | crate::state::TaskKind::Compact) | None => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn spawn_timer_task(
|
fn spawn_timer_task(
|
||||||
self: &Arc<Self>,
|
self: &Arc<Self>,
|
||||||
|
|||||||
Reference in New Issue
Block a user