pub struct ExpandPastes { /* private fields */ }Expand description
Expands embedded pastes in user text before a request leaves
(rhema_core::paste): the session carries the compact chip form a
UI renders, the model sees only the plain text. Wrapped around
every provider the agent is built with, so fresh and resumed
histories expand alike. Public so a driver that assembles its own
Agent — the resident handler — wraps the same seam instead of
growing a second expansion.
Implementations§
Source§impl ExpandPastes
impl ExpandPastes
Sourcepub fn new(inner: Arc<dyn ModelProvider>) -> ExpandPastes
pub fn new(inner: Arc<dyn ModelProvider>) -> ExpandPastes
The wrapper over inner.
Trait Implementations§
Source§impl ModelProvider for ExpandPastes
impl ModelProvider for ExpandPastes
Source§fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
req: ModelRequest,
sink: &'life1 mut dyn EventSink,
) -> Pin<Box<dyn Future<Output = Result<ModelOutput, ProviderError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ExpandPastes: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
req: ModelRequest,
sink: &'life1 mut dyn EventSink,
) -> Pin<Box<dyn Future<Output = Result<ModelOutput, ProviderError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ExpandPastes: 'async_trait,
Stream deltas to
sink; return the assembled final output.Auto Trait Implementations§
impl !RefUnwindSafe for ExpandPastes
impl !UnwindSafe for ExpandPastes
impl Freeze for ExpandPastes
impl Send for ExpandPastes
impl Sync for ExpandPastes
impl Unpin for ExpandPastes
impl UnsafeUnpin for ExpandPastes
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