pub struct InteractionContext {
pub agent_id: String,
pub current_interaction: Option<InteractionEvent>,
pub recent_interactions: Vec<InteractionEvent>,
pub suggested_haptic: Option<HapticFeedback>,
pub tool_hints: Vec<ToolHint>,
pub expects_voice_response: bool,
pub session_id: Option<String>,
}Expand description
Extended agent context with interaction data
Fields§
§agent_id: StringAgent identifier
current_interaction: Option<InteractionEvent>Current interaction that triggered this context
recent_interactions: Vec<InteractionEvent>Recent interaction history (for context)
suggested_haptic: Option<HapticFeedback>Suggested haptic feedback for response
tool_hints: Vec<ToolHint>Tool selection hints based on interaction
expects_voice_response: boolWhether voice response is expected
session_id: Option<String>Session identifier for continuity
Implementations§
Source§impl InteractionContext
impl InteractionContext
Sourcepub fn with_interaction(self, event: InteractionEvent) -> Self
pub fn with_interaction(self, event: InteractionEvent) -> Self
Set the current interaction and derive tool hints
Sourcepub fn push_history(&mut self, event: InteractionEvent)
pub fn push_history(&mut self, event: InteractionEvent)
Add to recent interaction history
Trait Implementations§
Source§impl Clone for InteractionContext
impl Clone for InteractionContext
Source§fn clone(&self) -> InteractionContext
fn clone(&self) -> InteractionContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractionContext
impl Debug for InteractionContext
Source§impl Default for InteractionContext
impl Default for InteractionContext
Source§fn default() -> InteractionContext
fn default() -> InteractionContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InteractionContext
impl<'de> Deserialize<'de> for InteractionContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InteractionContext
impl RefUnwindSafe for InteractionContext
impl Send for InteractionContext
impl Sync for InteractionContext
impl Unpin for InteractionContext
impl UnwindSafe for InteractionContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].