pub struct Settings {Show 14 fields
pub last_provider: ProviderKind,
pub last_provider_url: Option<String>,
pub last_model: Option<String>,
pub preferred_mode: AgentMode,
pub ollama_api_key: Option<String>,
pub ollama_timeout_secs: u64,
pub ollama_max_retries: u32,
pub ollama_think_type: OllamaThinkType,
pub show_thinking: bool,
pub context_limit: Option<u32>,
pub auto_accept_safe_commands: bool,
pub safe_command_prefixes: Option<Vec<String>>,
pub denied_command_prefixes: Option<Vec<String>>,
pub project_md_files: Option<Vec<String>>,
}Expand description
Persisted application settings — pure data type with no I/O.
Use SettingsStore to load and save instances of this type.
Fields§
§last_provider: ProviderKind§last_provider_url: Option<String>Last URL used for the active provider. Set automatically by --config
or by passing --url. Persisted so subsequent runs don’t re-prompt.
(default: None)
last_model: Option<String>§preferred_mode: AgentMode§ollama_api_key: Option<String>§ollama_timeout_secs: u64Timeout in seconds for Ollama requests (default: 5)
ollama_max_retries: u32Maximum number of retries for Ollama requests (default: 3)
ollama_think_type: OllamaThinkTypeControls the think/reasoning level for Ollama (default: Medium)
show_thinking: boolShow the model’s thinking/reasoning chain inline during streaming (default: false)
context_limit: Option<u32>Context limit for warning calculations only (default: None, uses model default)
auto_accept_safe_commands: boolAutomatically accept safe read-only commands in the run tool (default: true)
safe_command_prefixes: Option<Vec<String>>List of command prefixes considered safe for auto-accept (default: see get_default_safe_commands)
denied_command_prefixes: Option<Vec<String>>List of command prefixes that are always denied auto-accept, even if they match a safe prefix. Takes priority over the safe list. (default: empty)
project_md_files: Option<Vec<String>>Override the project instruction file discovery list.
When set, replaces the hardcoded default list (TINYHARNESS.md, AGENTS.md, etc.).
Use TINYHARNESS_MD_FILES env var for the highest priority override.
(default: None → use hardcoded defaults)
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn get_safe_commands(&self) -> Vec<String>
pub fn get_safe_commands(&self) -> Vec<String>
Returns the list of safe command prefixes, using defaults if not configured.
Sourcepub fn get_denied_commands(&self) -> Vec<String>
pub fn get_denied_commands(&self) -> Vec<String>
Returns the list of always-denied command prefixes. These take priority over the safe list — if a command matches both a safe prefix and a denied prefix, it is denied. Defaults to an empty list (nothing denied).