pub trait MemoryContext: SessionContext {
// Required methods
fn active_window(&self) -> &[Message];
fn demote(&self, messages: Vec<Message>) -> Result<(), String>;
fn compact(&self, messages: Vec<Message>) -> Result<String, String>;
}Expand description
Context for memory operations (demotion, compaction).
Extends SessionContext with access to the active window
and the ability to demote or compact messages.
Required Methods§
Sourcefn active_window(&self) -> &[Message]
fn active_window(&self) -> &[Message]
Returns the current active window (recent messages in context).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".