pub struct SubtaskDriver {
pub subtasks: Vec<Subtask>,
pub current_idx: usize,
pub active: bool,
}Expand description
Driver state for subtask execution.
Fields§
§subtasks: Vec<Subtask>§current_idx: usize§active: boolImplementations§
Source§impl SubtaskDriver
impl SubtaskDriver
pub fn new() -> Self
Sourcepub fn extract_from_plan(&mut self, plan_text: &str)
pub fn extract_from_plan(&mut self, plan_text: &str)
Extract subtasks from model’s plan text. Each unique file name mentioned = one subtask. Backend files first, then frontend. Filters out files mentioned only as references (e.g., “参考 ProductCenter.vue 的风格”).
Sourcepub fn current_instruction(&self) -> Option<String>
pub fn current_instruction(&self) -> Option<String>
Get the instruction to inject for the current subtask. Returns None if all subtasks are done or driver is inactive.
Sourcepub fn matches_current(&self, edited_file: &str) -> bool
pub fn matches_current(&self, edited_file: &str) -> bool
Check if an edited file matches the current subtask.
Trait Implementations§
Source§impl Clone for SubtaskDriver
impl Clone for SubtaskDriver
Source§fn clone(&self) -> SubtaskDriver
fn clone(&self) -> SubtaskDriver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubtaskDriver
impl RefUnwindSafe for SubtaskDriver
impl Send for SubtaskDriver
impl Sync for SubtaskDriver
impl Unpin for SubtaskDriver
impl UnsafeUnpin for SubtaskDriver
impl UnwindSafe for SubtaskDriver
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> 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>
Converts
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>
Converts
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