Skip to main content

RepoMapConfigBuilder

Struct RepoMapConfigBuilder 

Source
pub struct RepoMapConfigBuilder { /* private fields */ }
Expand description

Builder for RepoMapConfig.

Implementations§

Source§

impl RepoMapConfigBuilder

Source

pub fn map_tokens(self, n: usize) -> Self

Set the token budget for map output (default: 1024).

Source

pub fn root(self, path: impl Into<PathBuf>) -> Self

Set the repository root directory.

Source

pub fn repo_content_prefix(self, prefix: impl Into<String>) -> Self

Set a prefix prepended to every map output string.

Source

pub fn verbose(self, v: bool) -> Self

Enable or disable verbose diagnostic output.

Source

pub fn max_context_window(self, n: Option<usize>) -> Self

Set the LLM context window size.

When set and no chat files are provided, the effective token budget is multiplied by map_mul_no_files (default 8×).

Source

pub fn map_mul_no_files(self, n: usize) -> Self

Set the no-chat-files budget multiplier (default: 8).

Source

pub fn refresh(self, mode: RefreshMode) -> Self

Set the map cache refresh mode.

Source

pub fn force_refresh(self, v: bool) -> Self

Force cache recomputation on the next call.

Source

pub fn exclude_unranked(self, v: bool) -> Self

Exclude files whose PageRank score is ≤ 0.0001.

Source

pub fn self_edge_weight(self, w: f64) -> Self

Set the self-edge weight added for each file (default: 0.1).

Source

pub fn max_line_length(self, n: usize) -> Self

Truncate rendered lines longer than this many characters (default: 100).

Source

pub fn pagerank_damping(self, d: f64) -> Self

Set the PageRank damping factor (default: 0.85).

Source

pub fn pagerank_tol(self, t: f64) -> Self

Set the PageRank convergence tolerance (default: 1e-6).

Source

pub fn pagerank_max_iter(self, n: usize) -> Self

Set the maximum number of PageRank iterations (default: 100).

Source

pub fn anchor_fnames(self, fnames: Vec<PathBuf>) -> Self

Files always included in the map and used as PageRank restart seeds.

Source

pub fn anchor_idents(self, idents: HashSet<String>) -> Self

Identifiers whose defining files are used as PageRank restart seeds.

Source

pub fn anchor_scoped(self, scoped: Vec<(PathBuf, String)>) -> Self

Scoped anchors: (file, ident) pairs — file is the restart seed, ident gets an edge-weight boost.

Source

pub fn anchor_weight_multiplier(self, m: f64) -> Self

Personalization weight multiplier for anchor files (default: 10.0).

Source

pub fn build(self) -> RepoMap

Build the RepoMap from this configuration.

Trait Implementations§

Source§

impl Debug for RepoMapConfigBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RepoMapConfigBuilder

Source§

fn default() -> RepoMapConfigBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more