mirror of
https://github.com/openai/codex.git
synced 2026-09-15 12:08:01 +00:00
Inline compacted history shaping call
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user