pub struct SystemContext {
pub content: String,
}Expand description
Loaded and merged SYSTEM.md context.
Fields§
§content: StringMerged content ready for system prompt.
Implementations§
Source§impl SystemContext
impl SystemContext
Sourcepub fn load_and_merge(paths: &[PathBuf]) -> Result<Self>
pub fn load_and_merge(paths: &[PathBuf]) -> Result<Self>
Load and merge SYSTEM.md files from discovered paths.
Files are processed in precedence order (highest first). Mode is determined by front matter or defaults to Append.
Sourcepub fn apply_to_default(&self, default: &str, mode: SystemMode) -> String
pub fn apply_to_default(&self, default: &str, mode: SystemMode) -> String
Combine with default system prompt according to mode.
If mode is Replace, returns only custom content. If mode is Append, returns default + custom.
Trait Implementations§
Source§impl Clone for SystemContext
impl Clone for SystemContext
Source§fn clone(&self) -> SystemContext
fn clone(&self) -> SystemContext
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 SystemContext
impl Debug for SystemContext
Source§impl Default for SystemContext
impl Default for SystemContext
Source§fn default() -> SystemContext
fn default() -> SystemContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SystemContext
impl RefUnwindSafe for SystemContext
impl Send for SystemContext
impl Sync for SystemContext
impl Unpin for SystemContext
impl UnwindSafe for SystemContext
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