pub struct PromptContext {
pub workspace: Option<PathBuf>,
pub languages: Vec<String>,
pub project_type: Option<String>,
pub available_tools: Vec<String>,
pub user_preferences: Option<UserPreferences>,
}
Expand description
Context information for prompt generation
Fields§
§workspace: Option<PathBuf>
Current workspace path
languages: Vec<String>
Detected programming languages
project_type: Option<String>
Project type (if detected)
available_tools: Vec<String>
Available tools
user_preferences: Option<UserPreferences>
User preferences
Implementations§
Source§impl PromptContext
impl PromptContext
Sourcepub fn from_workspace(workspace: PathBuf) -> Self
pub fn from_workspace(workspace: PathBuf) -> Self
Create context from workspace
Sourcepub fn add_language(&mut self, language: String)
pub fn add_language(&mut self, language: String)
Add detected language
Sourcepub fn set_project_type(&mut self, project_type: String)
pub fn set_project_type(&mut self, project_type: String)
Set project type
Trait Implementations§
Source§impl Clone for PromptContext
impl Clone for PromptContext
Source§fn clone(&self) -> PromptContext
fn clone(&self) -> PromptContext
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 PromptContext
impl Debug for PromptContext
Auto Trait Implementations§
impl Freeze for PromptContext
impl RefUnwindSafe for PromptContext
impl Send for PromptContext
impl Sync for PromptContext
impl Unpin for PromptContext
impl UnwindSafe for PromptContext
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