pub struct ContextOptions {
pub max_tokens: Option<usize>,
pub include_tree: bool,
pub include_stats: bool,
pub group_by_type: bool,
pub sort_by_priority: bool,
pub file_header_template: String,
pub doc_header_template: String,
pub include_toc: bool,
pub enhanced_context: bool,
}Expand description
Options for generating context for LLM consumption
Fields§
§max_tokens: Option<usize>Maximum tokens allowed in the output
include_tree: boolInclude file tree in output
include_stats: boolInclude token count statistics
group_by_type: boolGroup files by type
sort_by_priority: boolSort files by priority
file_header_template: StringTemplate for file headers
doc_header_template: StringTemplate for the document header
include_toc: boolInclude table of contents
enhanced_context: boolEnable enhanced context with file metadata
Implementations§
Source§impl ContextOptions
impl ContextOptions
Sourcepub fn from_config(config: &Config) -> Result<Self>
pub fn from_config(config: &Config) -> Result<Self>
Create ContextOptions from CLI config
Trait Implementations§
Source§impl Clone for ContextOptions
impl Clone for ContextOptions
Source§fn clone(&self) -> ContextOptions
fn clone(&self) -> ContextOptions
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 ContextOptions
impl Debug for ContextOptions
Auto Trait Implementations§
impl Freeze for ContextOptions
impl RefUnwindSafe for ContextOptions
impl Send for ContextOptions
impl Sync for ContextOptions
impl Unpin for ContextOptions
impl UnwindSafe for ContextOptions
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> 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