Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 46 fields pub last_changelog_version: Option<String>, pub default_provider: Option<String>, pub default_model: Option<String>, pub default_thinking_level: Option<ModelThinkingLevel>, pub transport: Option<Transport>, pub steering_mode: Option<QueueMode>, pub follow_up_mode: Option<QueueMode>, pub theme: Option<String>, pub compaction: Option<CompactionSettings>, pub branch_summary: Option<BranchSummarySettings>, pub retry: Option<RetrySettings>, pub hide_thinking_block: Option<bool>, pub show_cache_miss_notices: Option<bool>, pub external_editor: Option<String>, pub shell_path: Option<String>, pub quiet_startup: Option<bool>, pub default_project_trust: Option<DefaultProjectTrust>, pub shell_command_prefix: Option<String>, pub npm_command: Option<Vec<String>>, pub collapse_changelog: Option<bool>, pub enable_install_telemetry: Option<bool>, pub enable_analytics: Option<bool>, pub tracking_id: Option<String>, pub packages: Option<Vec<PackageSource>>, pub extensions: Option<Vec<String>>, pub skills: Option<Vec<String>>, pub prompts: Option<Vec<String>>, pub themes: Option<Vec<String>>, pub enable_skill_commands: Option<bool>, pub terminal: Option<TerminalSettings>, pub images: Option<ImageSettings>, pub enabled_models: Option<Vec<String>>, pub double_escape_action: Option<DoubleEscapeAction>, pub tree_filter_mode: Option<TreeFilterMode>, pub thinking_budgets: Option<ThinkingBudgetsSettings>, pub editor_padding_x: Option<u64>, pub output_pad: Option<OutputPad>, pub autocomplete_max_visible: Option<u64>, pub show_hardware_cursor: Option<bool>, pub markdown: Option<MarkdownSettings>, pub warnings: Option<WarningSettings>, pub session_dir: Option<String>, pub http_proxy: Option<String>, pub http_idle_timeout_ms: Option<u64>, pub websocket_connect_timeout_ms: Option<u64>, pub extra: Map<String, Value>,
}
Expand description

Typed view over a settings document.

Every field mirrors the TypeScript Settings interface. Unknown keys are preserved in Self::extra; a known key whose stored value has the wrong JSON type reads as None here while remaining untouched on disk.

Fields§

§last_changelog_version: Option<String>

Last changelog version acknowledged by the user.

§default_provider: Option<String>

Default provider identifier.

§default_model: Option<String>

Default model identifier.

§default_thinking_level: Option<ModelThinkingLevel>

Default thinking level (wire includes "off").

§transport: Option<Transport>

Streaming transport preference (default: auto).

§steering_mode: Option<QueueMode>

Steering queue drain mode (default: one-at-a-time).

§follow_up_mode: Option<QueueMode>

Follow-up queue drain mode (default: one-at-a-time).

§theme: Option<String>

Theme name or path.

§compaction: Option<CompactionSettings>

Compaction settings.

§branch_summary: Option<BranchSummarySettings>

Branch-summary settings.

§retry: Option<RetrySettings>

Retry settings.

§hide_thinking_block: Option<bool>

Hide thinking blocks in the transcript (default: false).

§show_cache_miss_notices: Option<bool>

Show prompt-cache-miss transcript notices (default: false).

§external_editor: Option<String>

Command for the Ctrl+G external editor; takes precedence over VISUAL/EDITOR.

§shell_path: Option<String>

Custom shell path; supports leading ~ expansion.

§quiet_startup: Option<bool>

Suppress startup output (default: false).

§default_project_trust: Option<DefaultProjectTrust>

Default project trust decision; honored from the global file only.

§shell_command_prefix: Option<String>

Prefix prepended to every bash command.

§npm_command: Option<Vec<String>>

argv-style command used for npm lookup/install operations.

§collapse_changelog: Option<bool>

Show condensed changelog after update (default: false).

§enable_install_telemetry: Option<bool>

Anonymous version/update ping after updates (default: true).

§enable_analytics: Option<bool>

Opt-in analytics data sharing (default: false).

§tracking_id: Option<String>

Analytics tracking identifier, generated on first analytics opt-in.

§packages: Option<Vec<PackageSource>>

npm/git package sources.

§extensions: Option<Vec<String>>

Local extension file paths or directories.

§skills: Option<Vec<String>>

Local skill file paths or directories.

§prompts: Option<Vec<String>>

Local prompt template paths or directories.

§themes: Option<Vec<String>>

Local theme file paths or directories.

§enable_skill_commands: Option<bool>

Register skills as /skill:name commands (default: true).

§terminal: Option<TerminalSettings>

Terminal settings.

§images: Option<ImageSettings>

Image settings.

§enabled_models: Option<Vec<String>>

Model patterns for cycling (same format as --models).

§double_escape_action: Option<DoubleEscapeAction>

Double-escape action with empty editor (default: tree).

§tree_filter_mode: Option<TreeFilterMode>

Default /tree filter.

§thinking_budgets: Option<ThinkingBudgetsSettings>

Custom token budgets for thinking levels.

§editor_padding_x: Option<u64>

Horizontal input-editor padding (default: 0).

§output_pad: Option<OutputPad>

Horizontal chat-output padding (default: 1).

§autocomplete_max_visible: Option<u64>

Max visible autocomplete items (default: 5).

§show_hardware_cursor: Option<bool>

Show the terminal cursor while still positioning it for IME.

§markdown: Option<MarkdownSettings>

Markdown rendering settings.

§warnings: Option<WarningSettings>

Warning toggles.

§session_dir: Option<String>

Custom session storage directory (same format as --session-dir).

§http_proxy: Option<String>

Proxy URL applied as HTTP_PROXY/HTTPS_PROXY for managed HTTP clients.

§http_idle_timeout_ms: Option<u64>

HTTP header/body idle timeout in milliseconds; 0 disables.

§websocket_connect_timeout_ms: Option<u64>

WebSocket connect/open handshake timeout in milliseconds; 0 disables.

§extra: Map<String, Value>

Unknown top-level keys preserved from the raw document.

Implementations§

Source§

impl Settings

Source

pub fn from_map(map: &Map<String, Value>) -> Self

Build the tolerant typed view over a raw settings object.

Source

pub fn to_map(&self) -> Map<String, Value>

Serialize the typed view back to a raw settings object.

extra keys are written first, then known keys, so a manually built Settings with a colliding extra key keeps the typed field’s value.

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

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 Settings

Source§

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

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

impl Default for Settings

Source§

fn default() -> Settings

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

impl PartialEq for Settings

Source§

fn eq(&self, other: &Settings) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Settings

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
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: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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