MCPcopy Create free account
hub / github.com/Louisym/MiniCC / parse_auto_compaction_threshold

Function parse_auto_compaction_threshold

rust/crates/runtime/src/conversation.rs:346–351  ·  view source on GitHub ↗
(value: Option<&str>)

Source from the content-addressed store, hash-verified

344
345#[must_use]
346fn parse_auto_compaction_threshold(value: Option<&str>) -> u32 {
347 value
348 .and_then(|raw| raw.trim().parse::<u32>().ok())
349 .filter(|threshold| *threshold > 0)
350 .unwrap_or(DEFAULT_AUTO_COMPACTION_INPUT_TOKENS_THRESHOLD)
351}
352
353fn build_assistant_message(
354 events: Vec<AssistantEvent>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected