pub struct ThoughtData {Show 14 fields
pub thought: String,
pub thought_number: usize,
pub total_thoughts: usize,
pub next_thought_needed: bool,
pub is_revision: bool,
pub revises_thought: Option<usize>,
pub branch_from_thought: Option<usize>,
pub branch_id: Option<String>,
pub recommended_tools: Vec<ToolRecommendation>,
pub current_step: Option<StepDescription>,
pub previous_steps: Vec<StepDescription>,
pub remaining_steps: Vec<String>,
pub confidence: f32,
pub timestamp: u64,
}Expand description
Enhanced thought data structure inspired by MCP sequential-thinking
Fields§
§thought: StringThe actual thought content
thought_number: usizeCurrent thought number in the sequence
total_thoughts: usizeTotal estimated thoughts needed
next_thought_needed: boolWhether another thought step is needed
is_revision: boolWhether this thought revises a previous one
revises_thought: Option<usize>Which thought number is being revised (if is_revision is true)
branch_from_thought: Option<usize>If branching, which thought is the branch point
branch_id: Option<String>Identifier for the current branch (if any)
recommended_tools: Vec<ToolRecommendation>Tools recommended for this thinking step
current_step: Option<StepDescription>Current step description
previous_steps: Vec<StepDescription>Previous steps that have been completed
remaining_steps: Vec<String>Remaining high-level steps
confidence: f32Confidence level for this thought (0.0 to 1.0)
timestamp: u64Timestamp when this thought was created
Implementations§
Source§impl ThoughtData
impl ThoughtData
Sourcepub fn new(
thought: String,
thought_number: usize,
total_thoughts: usize,
) -> Self
pub fn new( thought: String, thought_number: usize, total_thoughts: usize, ) -> Self
Create a new thought with basic information
Sourcepub const fn as_revision(self, revises: usize) -> Self
pub const fn as_revision(self, revises: usize) -> Self
Mark this thought as a revision of a previous thought
Sourcepub fn with_branch(self, branch_from: usize, branch_id: String) -> Self
pub fn with_branch(self, branch_from: usize, branch_id: String) -> Self
Set this thought as part of a branch
Sourcepub fn with_tools(self, tools: Vec<ToolRecommendation>) -> Self
pub fn with_tools(self, tools: Vec<ToolRecommendation>) -> Self
Add tool recommendations to this thought
Sourcepub const fn with_confidence(self, confidence: f32) -> Self
pub const fn with_confidence(self, confidence: f32) -> Self
Set the confidence level for this thought
Trait Implementations§
Source§impl Clone for ThoughtData
impl Clone for ThoughtData
Source§fn clone(&self) -> ThoughtData
fn clone(&self) -> ThoughtData
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 ThoughtData
impl Debug for ThoughtData
Source§impl<'de> Deserialize<'de> for ThoughtData
impl<'de> Deserialize<'de> for ThoughtData
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>,
Auto Trait Implementations§
impl Freeze for ThoughtData
impl RefUnwindSafe for ThoughtData
impl Send for ThoughtData
impl Sync for ThoughtData
impl Unpin for ThoughtData
impl UnsafeUnpin for ThoughtData
impl UnwindSafe for ThoughtData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>, which can then be
downcast into Box<dyn 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>, which 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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit 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