pub enum Prompt {
Text(String),
File {
path: PathBuf,
args: Option<HashMap<String, String>>,
cwd: PathBuf,
},
McpInstructions(BTreeMap<String, String>),
}Variants§
Text(String)
File
McpInstructions(BTreeMap<String, String>)
MCP server instructions keyed by server name. BTreeMap gives a
stable render order, which is useful for prompt-caching
Implementations§
Source§impl Prompt
impl Prompt
pub fn text(str: &str) -> Self
pub fn file(path: impl Into<PathBuf>, cwd: impl Into<PathBuf>) -> Self
Sourcepub fn from_sources(
workspace_root: &Path,
sources: &[PromptSource],
) -> Result<Vec<Prompt>, PromptSourceError>
pub fn from_sources( workspace_root: &Path, sources: &[PromptSource], ) -> Result<Vec<Prompt>, PromptSourceError>
Resolve a slice of PromptSource declarations into runtime Prompt values.
Trait Implementations§
impl StructuralPartialEq for Prompt
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnsafeUnpin for Prompt
impl UnwindSafe for Prompt
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