mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
core/compact: stop locking Session.state; use Session::record_into_history during streaming
This commit is contained in:
@@ -267,8 +267,7 @@ async fn drain_to_completed(
|
||||
};
|
||||
match event {
|
||||
Ok(ResponseEvent::OutputItemDone(item)) => {
|
||||
let mut state = sess.state.lock().await;
|
||||
state.record_items(std::slice::from_ref(&item));
|
||||
sess.record_into_history(std::slice::from_ref(&item)).await;
|
||||
}
|
||||
Ok(ResponseEvent::Completed { .. }) => {
|
||||
return Ok(());
|
||||
|
||||
Reference in New Issue
Block a user