Skip to main content

SettingsState

Struct SettingsState 

Source
pub struct SettingsState {
Show 48 fields pub selected: usize, pub tab: SettingsTab, pub model: String, pub model_options: Vec<String>, pub chosen_models: Vec<String>, pub theme_name: String, pub theme_options: Vec<String>, pub thinking_level: ThinkingLevel, pub max_tokens: u32, pub max_turns: u32, pub observation_mask: f64, pub sidebar_style: SidebarStyle, pub tool_output: ToolOutputDisplay, pub tool_output_lines: usize, pub read_max_lines: usize, pub sidebar_width: u16, pub word_wrap: bool, pub animations: AnimationLevel, pub chat_tool_display: ChatToolDisplay, pub auto_open_sidebar: bool, pub sidebar_auto_open_width: u16, pub thinking_lines: usize, pub streaming_lines: usize, pub mouse_scroll_lines: usize, pub keyboard_scroll_lines: usize, pub show_timestamps: bool, pub show_cost: bool, pub show_context_usage: bool, pub notify_on_agent_complete: bool, pub continue_policy: ContinuePolicy, pub improve_auto_turn_budget: u32, pub loop_turn_budget: u32, pub web_search_provider: Option<SearchProvider>, pub mana_scope: ManaScopePreference, pub mana_auto_commit: bool, pub mana_auto_close_parent: bool, pub mana_verify_timeout: u64, pub mana_run_background: bool, pub mana_max_workers: u32, pub mana_review_after_run: bool, pub mana_continue_after_failure: bool, pub tavily_api_key: String, pub exa_api_key: String, pub tavily_configured: bool, pub exa_configured: bool, pub editing_number: bool, pub edit_buffer: String, pub dirty: bool,
}
Expand description

State for the settings overlay.

Fields§

§selected: usize§tab: SettingsTab§model: String§model_options: Vec<String>§chosen_models: Vec<String>§theme_name: String§theme_options: Vec<String>§thinking_level: ThinkingLevel§max_tokens: u32§max_turns: u32§observation_mask: f64§sidebar_style: SidebarStyle§tool_output: ToolOutputDisplay§tool_output_lines: usize§read_max_lines: usize§sidebar_width: u16§word_wrap: bool§animations: AnimationLevel§chat_tool_display: ChatToolDisplay§auto_open_sidebar: bool§sidebar_auto_open_width: u16§thinking_lines: usize§streaming_lines: usize§mouse_scroll_lines: usize§keyboard_scroll_lines: usize§show_timestamps: bool§show_cost: bool§show_context_usage: bool§notify_on_agent_complete: bool§continue_policy: ContinuePolicy§improve_auto_turn_budget: u32§loop_turn_budget: u32§web_search_provider: Option<SearchProvider>§mana_scope: ManaScopePreference§mana_auto_commit: bool§mana_auto_close_parent: bool§mana_verify_timeout: u64§mana_run_background: bool§mana_max_workers: u32§mana_review_after_run: bool§mana_continue_after_failure: bool§tavily_api_key: String§exa_api_key: String§tavily_configured: bool§exa_configured: bool§editing_number: bool§edit_buffer: String§dirty: bool

Implementations§

Source§

impl SettingsState

Source

pub fn switch_tab_forward(&mut self)

Source

pub fn switch_tab_backward(&mut self)

Source

pub fn new( config: &Config, model_name: &str, models: &[ModelMeta], auth_store: &AuthStore, ) -> Self

Source

pub fn current_field(&self) -> SettingsField

Source

pub fn move_up(&mut self)

Source

pub fn move_down(&mut self)

Source

pub fn cycle_forward(&mut self)

Cycle the current field’s value forward.

Source

pub fn cycle_backward(&mut self)

Cycle the current field’s value backward.

Source

pub fn start_edit(&mut self)

Begin direct numeric input for the current field.

Source

pub fn push_char(&mut self, c: char)

Source

pub fn pop_char(&mut self)

Source

pub fn commit_edit(&mut self)

Commit the edit buffer to the underlying field value.

Source

pub fn apply_to_config(&self, config: &mut Config)

Write current settings into a Config for saving and in-session use.

Trait Implementations§

Source§

impl Clone for SettingsState

Source§

fn clone(&self) -> SettingsState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SettingsState

Source§

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

Formats the value using the given formatter. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> MaybeSend for T
where T: Send,