File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -196,25 +196,17 @@ impl CodexThread {
196196 pub ( crate ) async fn append_message ( & self , message : ResponseItem ) -> CodexResult < String > {
197197 let submission_id = uuid:: Uuid :: new_v4 ( ) . to_string ( ) ;
198198 let pending_item = pending_message_input_item ( & message) ?;
199- if self
199+ if let Err ( items ) = self
200200 . codex
201201 . session
202202 . inject_response_items ( vec ! [ pending_item] )
203203 . await
204- . is_err ( )
205204 {
206- let turn_context = self . codex . session . new_default_turn ( ) . await ;
207- if self . codex . session . reference_context_item ( ) . await . is_none ( ) {
208- self . codex
209- . session
210- . record_context_updates_and_set_reference_context_item ( turn_context. as_ref ( ) )
211- . await ;
212- }
213205 self . codex
214206 . session
215- . record_conversation_items ( turn_context . as_ref ( ) , std :: slice :: from_ref ( & message ) )
207+ . queue_response_items_for_next_turn ( items )
216208 . await ;
217- self . codex . session . flush_rollout ( ) . await ? ;
209+ self . codex . session . maybe_start_turn_for_pending_work ( ) . await ;
218210 }
219211
220212 Ok ( submission_id)
You can’t perform that action at this time.
0 commit comments