mirror of
https://github.com/openai/codex.git
synced 2026-05-02 20:32:04 +03:00
Move metadata calculation out of client (#10589)
Model client shouldn't be responsible for this.
This commit is contained in:
@@ -337,9 +337,8 @@ async fn drain_to_completed(
|
||||
turn_context: &TurnContext,
|
||||
prompt: &Prompt,
|
||||
) -> CodexResult<()> {
|
||||
let mut client_session = turn_context
|
||||
.client
|
||||
.new_session(Some(turn_context.cwd.clone()));
|
||||
let turn_metadata_header = turn_context.resolve_turn_metadata_header().await;
|
||||
let mut client_session = turn_context.client.new_session(turn_metadata_header);
|
||||
let mut stream = client_session.stream(prompt).await?;
|
||||
loop {
|
||||
let maybe_event = stream.next().await;
|
||||
|
||||
Reference in New Issue
Block a user