mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Avoid cloning turn history in thread/fork (#63382)
Move the turns into the fork response and clone only the thread metadata. The `thread/started` notification already omits turns. GitOrigin-RevId: 8ffcefa3b6ed0908b511a58b53d034674ee8b668
This commit is contained in:
@@ -6082,8 +6082,12 @@ impl ThreadRequestProcessor {
|
||||
let active_permission_profile =
|
||||
thread_response_active_permission_profile(config_snapshot.active_permission_profile);
|
||||
let thread_originator = config_snapshot.originator.clone();
|
||||
let turns = std::mem::take(&mut thread.turns);
|
||||
let response = ThreadForkResponse {
|
||||
thread: thread.clone(),
|
||||
thread: Thread {
|
||||
turns,
|
||||
..thread.clone()
|
||||
},
|
||||
disabled_plugin_ids: config_snapshot.disabled_plugin_ids,
|
||||
model: config_snapshot.model.clone(),
|
||||
model_provider: session_configured.model_provider_id,
|
||||
|
||||
Reference in New Issue
Block a user