pub struct IntegratedLongContextProcessor { /* private fields */ }Expand description
Integrated long context processor that orchestrates all modules.
This processor coordinates:
- Unified extraction (one AI call for all information)
- AI-driven focus tracking with intelligent analysis
- Coherence-based segmentation
- Progressive compression with focus priority
- Focus message injection
- Pattern learning
Implementations§
Source§impl IntegratedLongContextProcessor
impl IntegratedLongContextProcessor
Sourcepub fn new(
provider: Box<dyn Provider>,
model: String,
config: ProcessorConfig,
) -> Self
pub fn new( provider: Box<dyn Provider>, model: String, config: ProcessorConfig, ) -> Self
Create a new integrated processor.
§Arguments
provider- Provider for AI extraction.model- Model name for extraction.config- Processor configuration.
Sourcepub fn with_defaults(provider: Box<dyn Provider>, model: String) -> Self
pub fn with_defaults(provider: Box<dyn Provider>, model: String) -> Self
Create with default configuration.
Sourcepub fn for_simple_conversation(
provider: Box<dyn Provider>,
model: String,
) -> Self
pub fn for_simple_conversation( provider: Box<dyn Provider>, model: String, ) -> Self
Create for simple conversations.
Sourcepub fn for_complex_technical(provider: Box<dyn Provider>, model: String) -> Self
pub fn for_complex_technical(provider: Box<dyn Provider>, model: String) -> Self
Create for complex technical discussions.
Sourcepub fn without_ai_focus(provider: Box<dyn Provider>, model: String) -> Self
pub fn without_ai_focus(provider: Box<dyn Provider>, model: String) -> Self
Create without AI focus tracking (rule-based only).
Sourcepub fn with_hardcode_config(self, config: HardcodeConfig) -> Self
pub fn with_hardcode_config(self, config: HardcodeConfig) -> Self
Set custom hardcode config.
Sourcepub fn config(&self) -> &ProcessorConfig
pub fn config(&self) -> &ProcessorConfig
Get configuration reference.
Sourcepub fn config_mut(&mut self) -> &mut ProcessorConfig
pub fn config_mut(&mut self) -> &mut ProcessorConfig
Get mutable configuration reference.
Sourcepub fn pattern_registry(&self) -> &PatternRegistry
pub fn pattern_registry(&self) -> &PatternRegistry
Get pattern registry reference.
Sourcepub fn pattern_registry_mut(&mut self) -> &mut PatternRegistry
pub fn pattern_registry_mut(&mut self) -> &mut PatternRegistry
Get mutable pattern registry reference.
Sourcepub async fn process(
&mut self,
messages: Vec<Message>,
session_id: Option<&str>,
project_path: Option<&str>,
) -> Result<ProcessedResult>
pub async fn process( &mut self, messages: Vec<Message>, session_id: Option<&str>, project_path: Option<&str>, ) -> Result<ProcessedResult>
Process long context with the integrated workflow.
§Workflow
- Get existing focuses from FocusManager
- Extract all information with focus selection (one AI call)
- Update FocusManager based on AI’s focus_decision
- Segment messages by coherence
- Compress segments with focus priority
- Inject focus message
- Learn patterns
§Arguments
messages- Messages to process.session_id- Optional session ID.project_path- Optional project path.
§Returns
Processed messages and extraction result.
Sourcepub async fn process_with_provider(
&mut self,
messages: Vec<Message>,
provider: Option<&dyn Provider>,
session_id: Option<&str>,
project_path: Option<&str>,
) -> Result<ProcessedResult>
pub async fn process_with_provider( &mut self, messages: Vec<Message>, provider: Option<&dyn Provider>, session_id: Option<&str>, project_path: Option<&str>, ) -> Result<ProcessedResult>
Process with a provider reference (for progressive compressor).
This variant allows using a provider for AI-based compression stages.
Sourcepub fn quick_process(
&mut self,
messages: Vec<Message>,
) -> Result<ProcessedResult>
pub fn quick_process( &mut self, messages: Vec<Message>, ) -> Result<ProcessedResult>
Quick process without AI extraction (for testing or fallback).
This skips extraction step and uses only rule-based processing.