Inline compacted history shaping call

This commit is contained in:
Charles Cunningham
2026-02-18 00:23:16 -08:00
parent 714e0b78ba
commit a46bcf3b8e
2 changed files with 2 additions and 8 deletions

View File

@@ -2404,13 +2404,6 @@ impl Session {
history.raw_items().to_vec()
}
pub(crate) async fn process_compacted_history(
&self,
compacted_history: Vec<ResponseItem>,
) -> Vec<ResponseItem> {
compact::process_compacted_history(compacted_history)
}
/// Append ResponseItems to the in-memory conversation history only.
pub(crate) async fn record_into_history(
&self,

View File

@@ -6,6 +6,7 @@ use crate::codex::TurnContext;
use crate::compact::AutoCompactCallsite;
use crate::compact::extract_latest_model_switch_update_from_items;
use crate::compact::extract_trailing_model_switch_update_for_compaction_request;
use crate::compact::process_compacted_history;
use crate::compact::should_keep_compacted_history_item;
use crate::context_manager::ContextManager;
use crate::context_manager::TotalTokenUsageBreakdown;
@@ -165,7 +166,7 @@ async fn run_remote_compact_task_inner_impl(
Err(err)
})
.await?;
new_history = sess.process_compacted_history(new_history).await;
new_history = process_compacted_history(new_history);
if let Some(incoming_items) = incoming_items.as_ref() {
let incoming_history_items: Vec<ResponseItem> = incoming_items
.iter()