pub struct WrapState {Show 13 fields
pub status: WrapStatus,
pub approval_type: Option<WrapApprovalType>,
pub details: Option<String>,
pub choices: Vec<String>,
pub multi_select: bool,
pub cursor_position: usize,
pub last_output: u64,
pub last_input: u64,
pub pid: u32,
pub pane_id: Option<String>,
pub team_name: Option<String>,
pub team_member_name: Option<String>,
pub is_team_lead: bool,
}Expand description
State data for a wrapped agent
Fields§
§status: WrapStatusCurrent status
approval_type: Option<WrapApprovalType>Type of approval (if awaiting approval)
details: Option<String>Details about the current state
choices: Vec<String>Available choices (for UserQuestion)
multi_select: boolWhether multiple selections are allowed
cursor_position: usizeCurrent cursor position (1-indexed, for UserQuestion)
last_output: u64Timestamp of last output (Unix millis)
last_input: u64Timestamp of last input (Unix millis)
pid: u32Process ID of the wrapped command
pane_id: Option<String>Tmux pane ID (if known)
team_name: Option<String>Team name (if this agent is part of a team)
team_member_name: Option<String>Team member name
is_team_lead: boolWhether this agent is the team lead
Implementations§
Source§impl WrapState
impl WrapState
Sourcepub fn processing(pid: u32) -> Self
pub fn processing(pid: u32) -> Self
Create a new state for processing
Sourcepub fn awaiting_approval(
pid: u32,
approval_type: WrapApprovalType,
details: Option<String>,
) -> Self
pub fn awaiting_approval( pid: u32, approval_type: WrapApprovalType, details: Option<String>, ) -> Self
Create a new state for awaiting approval
Sourcepub fn user_question(
pid: u32,
choices: Vec<String>,
multi_select: bool,
cursor_position: usize,
) -> Self
pub fn user_question( pid: u32, choices: Vec<String>, multi_select: bool, cursor_position: usize, ) -> Self
Create a state for user question
Sourcepub fn touch_output(&mut self)
pub fn touch_output(&mut self)
Update last output timestamp
Sourcepub fn touch_input(&mut self)
pub fn touch_input(&mut self)
Update last input timestamp
Sourcepub fn with_pane_id(self, pane_id: String) -> Self
pub fn with_pane_id(self, pane_id: String) -> Self
Set pane ID
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WrapState
impl<'de> Deserialize<'de> for WrapState
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 WrapState
impl RefUnwindSafe for WrapState
impl Send for WrapState
impl Sync for WrapState
impl Unpin for WrapState
impl UnsafeUnpin for WrapState
impl UnwindSafe for WrapState
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,
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.