pub enum PlanContentReference {
Inline(String),
ReadFromFile {
primary_path: PathBuf,
fallback_path: Option<PathBuf>,
description: String,
},
}Expand description
Specialized reference for PLAN content.
When PLAN is too large, instructs the agent to read from PLAN.md with optional fallback to the XML plan file.
Variants§
Inline(String)
PLAN is small enough to embed inline.
ReadFromFile
PLAN is too large; agent should read from file.
Implementations§
Source§impl PlanContentReference
impl PlanContentReference
Sourcepub fn from_plan(
plan_content: String,
plan_path: &Path,
xml_fallback_path: Option<&Path>,
) -> Self
pub fn from_plan( plan_content: String, plan_path: &Path, xml_fallback_path: Option<&Path>, ) -> Self
Create a plan reference, choosing inline vs file path based on size.
If plan_content.len() <= MAX_INLINE_CONTENT_SIZE, the plan is stored inline.
Otherwise, instructions to read from file are provided.
§Arguments
plan_content- The plan contentplan_path- Path to the primary plan filexml_fallback_path- Optional path to XML fallback
Sourcepub fn render_for_template(&self) -> String
pub fn render_for_template(&self) -> String
Get the content for template rendering.
For inline: returns the plan content directly. For file path: returns instructions to read from the file.
Trait Implementations§
Source§impl Clone for PlanContentReference
impl Clone for PlanContentReference
Source§fn clone(&self) -> PlanContentReference
fn clone(&self) -> PlanContentReference
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 PlanContentReference
impl Debug for PlanContentReference
Source§impl PartialEq for PlanContentReference
impl PartialEq for PlanContentReference
impl Eq for PlanContentReference
impl StructuralPartialEq for PlanContentReference
Auto Trait Implementations§
impl Freeze for PlanContentReference
impl RefUnwindSafe for PlanContentReference
impl Send for PlanContentReference
impl Sync for PlanContentReference
impl Unpin for PlanContentReference
impl UnwindSafe for PlanContentReference
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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