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:
Charlie Marsh
2026-11-23 17:13:13 +00:00
committed by copyberry
parent ed02716c09
commit af81d2770f
@@ -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,