Skip to main content

WindowOpts

Struct WindowOpts 

Source
pub struct WindowOpts {
    pub tool_head: usize,
    pub tool_tail: usize,
    pub per_msg_chars: usize,
    pub budget_chars: Option<usize>,
    pub tool_byte_cap: usize,
}

Fields§

§tool_head: usize

Lines kept at the head of a folded tool result.

§tool_tail: usize

Lines kept at the tail of a folded tool result.

§per_msg_chars: usize

Char cap for a single user/assistant message (head+tail beyond it).

§budget_chars: Option<usize>

Total char budget across the rendered turns; None folds the whole session. When set, the most RECENT turns are kept (walk from the end).

§tool_byte_cap: usize

Byte cap for a single folded tool result. Line folding alone can’t bound a result that is one enormous line, so the folded text is additionally clipped to this many bytes (on a char boundary).

Trait Implementations§

Source§

impl Default for WindowOpts

Source§

fn default() -> Self

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, 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.