mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Ungate idle lifecycle from goals feature
This commit is contained in:
@@ -56,18 +56,11 @@ impl ThreadGoalRequestProcessor {
|
||||
.map(|()| None)
|
||||
}
|
||||
|
||||
pub(crate) async fn emit_resume_goal_snapshot_and_continue(
|
||||
&self,
|
||||
thread_id: ThreadId,
|
||||
thread: &CodexThread,
|
||||
) {
|
||||
pub(crate) async fn emit_resume_goal_snapshot(&self, thread_id: ThreadId) {
|
||||
if !self.config.features.enabled(Feature::Goals) {
|
||||
return;
|
||||
}
|
||||
self.emit_thread_goal_snapshot(thread_id).await;
|
||||
// App-server owns resume response and snapshot ordering, so wait until
|
||||
// those are sent before letting extensions start idle work.
|
||||
thread.continue_idle_extension_work().await;
|
||||
}
|
||||
|
||||
pub(crate) async fn pending_resume_goal_state(
|
||||
|
||||
@@ -596,9 +596,7 @@ pub(super) async fn handle_pending_thread_resume_request(
|
||||
}
|
||||
}
|
||||
|
||||
if pending.emit_thread_goal_update {
|
||||
conversation.emit_thread_resume_lifecycle().await;
|
||||
}
|
||||
conversation.emit_thread_resume_lifecycle().await;
|
||||
|
||||
let ThreadConfigSnapshot {
|
||||
model,
|
||||
@@ -669,9 +667,7 @@ pub(super) async fn handle_pending_thread_resume_request(
|
||||
.await;
|
||||
// App-server owns resume response and snapshot ordering, so wait until
|
||||
// replay completes before letting extensions start idle work.
|
||||
if pending.emit_thread_goal_update {
|
||||
conversation.continue_idle_extension_work().await;
|
||||
}
|
||||
conversation.continue_idle_extension_work().await;
|
||||
}
|
||||
|
||||
pub(super) async fn send_thread_goal_snapshot_notification(
|
||||
|
||||
@@ -2727,8 +2727,11 @@ impl ThreadRequestProcessor {
|
||||
.await;
|
||||
}
|
||||
self.thread_goal_processor
|
||||
.emit_resume_goal_snapshot_and_continue(thread_id, codex_thread.as_ref())
|
||||
.emit_resume_goal_snapshot(thread_id)
|
||||
.await;
|
||||
// App-server owns resume response and snapshot ordering, so wait
|
||||
// until those are sent before letting extensions start idle work.
|
||||
codex_thread.continue_idle_extension_work().await;
|
||||
}
|
||||
Err(err) => {
|
||||
let error = internal_error(format!("error resuming thread: {err}"));
|
||||
|
||||
Reference in New Issue
Block a user