pub struct PendingQuestionSet {
pub turn: TurnId,
pub call_id: ToolCallId,
pub questions: Vec<Question>,
pub active: usize,
pub selections: Vec<QuestionSelection>,
pub review_cursor: usize,
pub editing_note: bool,
pub remember: bool,
}Expand description
A batch of questions awaiting the user’s answers, plus live modal selection
state. The reducer owns this; it mirrors PendingApproval.
Fields§
§turn: TurnId§call_id: ToolCallId§questions: Vec<Question>§active: usizeActive tab. 0..questions.len() selects a question; a value equal to
questions.len() is the “Review your answers” screen.
selections: Vec<QuestionSelection>Per-question live selection state, parallel to questions.
review_cursor: usizeHighlighted row on the review screen: 0 = Submit answers, 1 = Cancel.
editing_note: boolWhen true, keystrokes edit the active question’s note (toggled with n).
remember: boolWhen true, the user opted to remember these answers across sessions
(toggled with r); the tool persists answers keyed by memory_key.
Implementations§
Source§impl PendingQuestionSet
impl PendingQuestionSet
pub fn new(turn: TurnId, call_id: ToolCallId, questions: Vec<Question>) -> Self
Sourcepub fn skips_review(&self) -> bool
pub fn skips_review(&self) -> bool
Skip the review screen only for the atomic case: a single single-select question, where picking an option is the whole answer (Claude Code resolves it immediately). Every other shape (multi-question, or any multi-select) confirms via the Submit/review screen.
Sourcepub fn row_count(&self, idx: usize) -> usize
pub fn row_count(&self, idx: usize) -> usize
Number of navigable rows for a Select/MultiSelect question at idx:
options, the Other row, and (multi-select only) the Submit row.
Sourcepub fn other_row(&self, idx: usize) -> usize
pub fn other_row(&self, idx: usize) -> usize
Row index of the “Other” free-text row for the question at idx.
Sourcepub fn submit_row(&self, idx: usize) -> Option<usize>
pub fn submit_row(&self, idx: usize) -> Option<usize>
Row index of the Submit row for a multi-select question, if any.
Sourcepub fn build_answers(&self) -> Vec<QuestionAnswer>
pub fn build_answers(&self) -> Vec<QuestionAnswer>
Build the final answers from current selections. Each answer carries the
selected option labels plus any typed “Other” text; a question left
untouched yields an empty selected (surfaced to the model as “(no
selection)”).
Trait Implementations§
Source§impl Clone for PendingQuestionSet
impl Clone for PendingQuestionSet
Source§fn clone(&self) -> PendingQuestionSet
fn clone(&self) -> PendingQuestionSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PendingQuestionSet
impl Debug for PendingQuestionSet
Source§impl PartialEq for PendingQuestionSet
impl PartialEq for PendingQuestionSet
impl StructuralPartialEq for PendingQuestionSet
Auto Trait Implementations§
impl Freeze for PendingQuestionSet
impl RefUnwindSafe for PendingQuestionSet
impl Send for PendingQuestionSet
impl Sync for PendingQuestionSet
impl Unpin for PendingQuestionSet
impl UnsafeUnpin for PendingQuestionSet
impl UnwindSafe for PendingQuestionSet
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more