pub struct HardcodeConfig {Show 28 fields
pub min_word_length: usize,
pub min_substantial_text_length: usize,
pub long_text_threshold: usize,
pub very_long_text_threshold: usize,
pub max_simple_truncation_length: usize,
pub code_content_threshold: usize,
pub max_context_length: usize,
pub preserve_content_threshold: usize,
pub fallback_topic_word_count: usize,
pub brief_summary_sentence_count: usize,
pub detailed_summary_sentence_count: usize,
pub max_question_extract_length: usize,
pub max_compressed_sentence_count: usize,
pub short_summary_word_count: usize,
pub min_messages_for_compression: usize,
pub large_conversation_threshold: usize,
pub medium_conversation_threshold: usize,
pub max_recent_context_count: usize,
pub min_focus_history_size: usize,
pub min_question_length: usize,
pub max_question_length: usize,
pub min_sentence_length: usize,
pub max_compressed_output_length: usize,
pub code_detection_length_threshold: usize,
pub max_truncated_context_length: usize,
pub max_trimmed_content_length: usize,
pub summary_length_threshold: usize,
pub focus_cache_capacity: usize,
}Expand description
Unified configuration for all hardcoded values in compression system.
Fields§
§min_word_length: usizeMinimum word length to consider as meaningful (for coherence, focus)
min_substantial_text_length: usizeMinimum text length to consider as substantial message
long_text_threshold: usizeThreshold for “long text” that needs compression
very_long_text_threshold: usizeThreshold for “very long text” (needs aggressive compression)
max_simple_truncation_length: usizeMaximum text length before truncation in simple mode
code_content_threshold: usizeThreshold for considering content as “code-heavy”
max_context_length: usizeMaximum context length before aggressive truncation
preserve_content_threshold: usizeThreshold for message content to be preserved
fallback_topic_word_count: usizeNumber of words to extract as fallback topic
brief_summary_sentence_count: usizeNumber of sentences to extract in brief summary
detailed_summary_sentence_count: usizeNumber of sentences to extract in detailed summary
max_question_extract_length: usizeMaximum characters in extracted question
max_compressed_sentence_count: usizeMaximum sentences to keep in compressed output
short_summary_word_count: usizeNumber of words to keep in short summary
min_messages_for_compression: usizeMinimum messages to trigger compression
large_conversation_threshold: usizeLarge conversation threshold (many messages)
medium_conversation_threshold: usizeMedium conversation threshold
max_recent_context_count: usizeMaximum recent context snippets to keep
min_focus_history_size: usizeMinimum focus history size to consider
min_question_length: usizeMinimum question length (chars)
max_question_length: usizeMaximum question length (chars)
min_sentence_length: usizeMinimum sentence length to keep
max_compressed_output_length: usizeMaximum compressed output length
code_detection_length_threshold: usizeThreshold for detecting code blocks (combined with keyword check)
max_truncated_context_length: usizeMaximum truncated context length
max_trimmed_content_length: usizeMaximum trimmed content length
summary_length_threshold: usizeSummary length threshold
focus_cache_capacity: usizeCache capacity for focus tracking
Implementations§
Source§impl HardcodeConfig
impl HardcodeConfig
Sourcepub fn simple_conversation() -> Self
pub fn simple_conversation() -> Self
Create config for simple conversations (more aggressive compression)
Sourcepub fn complex_technical() -> Self
pub fn complex_technical() -> Self
Create config for complex technical discussions (conservative compression)
Sourcepub fn from_complexity(level: ComplexityLevel) -> Self
pub fn from_complexity(level: ComplexityLevel) -> Self
Create config from complexity level
Sourcepub fn is_short_text(&self, len: usize) -> bool
pub fn is_short_text(&self, len: usize) -> bool
Check if text is “short” (below substantial threshold)
Sourcepub fn is_long_text(&self, len: usize) -> bool
pub fn is_long_text(&self, len: usize) -> bool
Check if text is “long” (needs compression)
Sourcepub fn is_very_long_text(&self, len: usize) -> bool
pub fn is_very_long_text(&self, len: usize) -> bool
Check if text is “very long” (needs aggressive compression)
Sourcepub fn is_large_conversation(&self, message_count: usize) -> bool
pub fn is_large_conversation(&self, message_count: usize) -> bool
Check if conversation is “large”
Sourcepub fn is_medium_conversation(&self, message_count: usize) -> bool
pub fn is_medium_conversation(&self, message_count: usize) -> bool
Check if conversation is “medium”
Sourcepub fn is_meaningful_word(&self, word_len: usize) -> bool
pub fn is_meaningful_word(&self, word_len: usize) -> bool
Check if word is meaningful
Sourcepub fn is_valid_question_length(&self, len: usize) -> bool
pub fn is_valid_question_length(&self, len: usize) -> bool
Check if question is valid length
Trait Implementations§
Source§impl Clone for HardcodeConfig
impl Clone for HardcodeConfig
Source§fn clone(&self) -> HardcodeConfig
fn clone(&self) -> HardcodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more