pub struct PromptBuilder {
pub max_context_tokens: usize,
pub project_root: PathBuf,
}Expand description
Builds prompts for AI code generation
Fields§
§max_context_tokens: usizeMaximum tokens for context
project_root: PathBufProject root path
Implementations§
Source§impl PromptBuilder
impl PromptBuilder
Sourcepub fn with_max_context_tokens(self, tokens: usize) -> Self
pub fn with_max_context_tokens(self, tokens: usize) -> Self
Sets the maximum context tokens
Sourcepub fn build(
&self,
plan: &GenerationPlan,
spec_content: Option<&str>,
design_content: Option<&str>,
) -> Result<GeneratedPrompt, GenerationError>
pub fn build( &self, plan: &GenerationPlan, spec_content: Option<&str>, design_content: Option<&str>, ) -> Result<GeneratedPrompt, GenerationError>
Sourcepub fn load_steering_rules(&self) -> Result<SteeringRules, GenerationError>
pub fn load_steering_rules(&self) -> Result<SteeringRules, GenerationError>
Loads steering rules from project and workspace
Trait Implementations§
Source§impl Clone for PromptBuilder
impl Clone for PromptBuilder
Source§fn clone(&self) -> PromptBuilder
fn clone(&self) -> PromptBuilder
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 PromptBuilder
impl Debug for PromptBuilder
Auto Trait Implementations§
impl Freeze for PromptBuilder
impl RefUnwindSafe for PromptBuilder
impl Send for PromptBuilder
impl Sync for PromptBuilder
impl Unpin for PromptBuilder
impl UnwindSafe for PromptBuilder
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