Skip to main content

apply_all

Function apply_all 

Source
pub fn apply_all(messages: &mut Vec<Message>) -> ExperimentalStats
Expand description

Apply the default-safe experimental strategies in order, mutating messages in place. Returns aggregate statistics suitable for logging.

Order matters:

  1. dedup::dedup_tool_outputs runs before text cleanup so repeated tool outputs collapse against the original bytes.
  2. lingua::prune_low_entropy runs after that to strip formatting noise from older assistant text without touching semantics.

ยงExamples

use codetether_agent::provider::{ContentPart, Message, Role};
use codetether_agent::session::helper::experimental::apply_all;

let mut msgs: Vec<Message> = Vec::new();
let stats = apply_all(&mut msgs);
assert_eq!(stats.total_bytes_saved, 0);