pub struct Settings {Show 19 fields
pub active_provider: Option<String>,
pub providers: HashMap<String, ProviderConfig>,
pub agent_models: HashMap<String, ModelSettings>,
pub default_agent: String,
pub model_quality: Option<ModelCost>,
pub review_level: ReviewLevel,
pub mcp_servers: HashMap<String, McpServerConfig>,
pub run_build_test_output_mode: RunBuildTestOutputMode,
pub enable_type_analyzer: bool,
pub spawn_context_mode: SpawnContextMode,
pub xml_tool_mode: bool,
pub disable_custom_steering: bool,
pub communication_tone: CommunicationTone,
pub autonomy_level: AutonomyLevel,
pub voice: VoiceSettings,
pub skills: SkillsConfig,
pub reasoning_effort: Option<ReasoningBudget>,
pub disable_streaming: bool,
pub modules: HashMap<String, Value>,
}Expand description
Core application settings.
§Maintainer Note
When adding new settings fields, you must also update the VSCode extension settings UI in:
tycode-vscode/src/settingsProvider.ts- HTML form elementstycode-vscode/src/webview/settings.js- JavaScript state and handlers
Fields§
§active_provider: Option<String>The name of the currently active provider
providers: HashMap<String, ProviderConfig>Map of provider name to configuration
agent_models: HashMap<String, ModelSettings>Agent-specific model overrides
default_agent: StringDefault agent to use for new conversations
model_quality: Option<ModelCost>Global maximum quality tier applied across agents
review_level: ReviewLevelReview level for messages
mcp_servers: HashMap<String, McpServerConfig>MCP server configurations
run_build_test_output_mode: RunBuildTestOutputModeOutput mode for run_build_test tool
enable_type_analyzer: boolEnable type analyzer tools (search_types, get_type_docs)
spawn_context_mode: SpawnContextModeControls how sub-agent context is initialized when spawning
xml_tool_mode: boolEnable XML-based tool calling instead of native tool use
disable_custom_steering: boolDisable custom steering documents (from .tycode and external agent configs)
communication_tone: CommunicationToneCommunication tone for agent responses
autonomy_level: AutonomyLevelControls whether agent must get plan approval before implementing
voice: VoiceSettingsVoice/speech-to-text configuration
skills: SkillsConfigSkills system configuration
reasoning_effort: Option<ReasoningBudget>Global default reasoning effort applied to all agents unless overridden
disable_streaming: boolWhen true, AI responses arrive as a single complete message instead of streaming incrementally
modules: HashMap<String, Value>Enables modules to own their configuration without modifying tycode-core, supporting external/plugin modules that aren’t known at compile time.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn active_provider(&self) -> Option<&ProviderConfig>
pub fn active_provider(&self) -> Option<&ProviderConfig>
Get the active provider configuration
Sourcepub fn set_active_provider(&mut self, name: &str) -> Result<(), String>
pub fn set_active_provider(&mut self, name: &str) -> Result<(), String>
Set the active provider (returns error if provider doesn’t exist)
Sourcepub fn add_provider(&mut self, name: String, config: ProviderConfig)
pub fn add_provider(&mut self, name: String, config: ProviderConfig)
Add or update a provider configuration
Sourcepub fn remove_provider(&mut self, name: &str) -> Result<(), String>
pub fn remove_provider(&mut self, name: &str) -> Result<(), String>
Remove a provider configuration
Sourcepub fn list_providers(&self) -> Vec<String>
pub fn list_providers(&self) -> Vec<String>
List all provider names
Sourcepub fn get_module_config<T: Default + DeserializeOwned>(
&self,
namespace: &str,
) -> T
pub fn get_module_config<T: Default + DeserializeOwned>( &self, namespace: &str, ) -> T
Get module-specific configuration, deserializing from the modules map
Sourcepub fn set_module_config<T: Serialize>(&mut self, namespace: &str, config: T)
pub fn set_module_config<T: Serialize>(&mut self, namespace: &str, config: T)
Set module-specific configuration, serializing to the modules map
Sourcepub fn get_agent_model(&self, agent_name: &str) -> Option<&ModelSettings>
pub fn get_agent_model(&self, agent_name: &str) -> Option<&ModelSettings>
Get the model settings for a specific agent
Sourcepub fn set_agent_model(&mut self, agent_name: String, model: ModelSettings)
pub fn set_agent_model(&mut self, agent_name: String, model: ModelSettings)
Set the model settings for a specific agent
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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