pub struct ClassificationPipeline { /* private fields */ }Expand description
A pipeline that processes raw terminal output through VTE stripping, CLI-specific parsing, and turn tracking.
Implementations§
Source§impl ClassificationPipeline
impl ClassificationPipeline
Sourcepub fn new(cli_parser: Box<dyn OutputParser>) -> Self
pub fn new(cli_parser: Box<dyn OutputParser>) -> Self
Create a new pipeline wrapping the given CLI-specific parser.
Sourcepub fn process(&mut self, raw: &str) -> Vec<ParsedMessage>
pub fn process(&mut self, raw: &str) -> Vec<ParsedMessage>
Process raw terminal output through VTE strip, CLI parser, and turn tracking.
Returns classified messages with turn metadata populated.
Sourcepub fn turn_count(&self) -> u32
pub fn turn_count(&self) -> u32
Returns the current turn count.
Sourcepub fn in_response(&self) -> bool
pub fn in_response(&self) -> bool
Returns whether the pipeline is currently inside an AI response.
Sourcepub fn extract_ai_text(&self, raw_cleaned: &str) -> String
pub fn extract_ai_text(&self, raw_cleaned: &str) -> String
Delegate extract_ai_text to the underlying parser.
Sourcepub fn classify(&self, text: &str) -> MessageClass
pub fn classify(&self, text: &str) -> MessageClass
Delegate classify to the underlying parser.
Auto Trait Implementations§
impl Freeze for ClassificationPipeline
impl !RefUnwindSafe for ClassificationPipeline
impl Send for ClassificationPipeline
impl !Sync for ClassificationPipeline
impl Unpin for ClassificationPipeline
impl UnsafeUnpin for ClassificationPipeline
impl !UnwindSafe for ClassificationPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.