17 lines
512 B
Rust
17 lines
512 B
Rust
pub use owlen_core::config::{
|
|
default_config_path, ensure_ollama_config, session_timeout, Config, GeneralSettings,
|
|
InputSettings, StorageSettings, UiSettings, DEFAULT_CONFIG_PATH,
|
|
};
|
|
|
|
/// Attempt to load configuration from default location
|
|
pub fn try_load_config() -> Option<Config> {
|
|
Config::load(None).ok()
|
|
}
|
|
|
|
/// Persist configuration to default path
|
|
pub fn save_config(config: &Config) -> anyhow::Result<()> {
|
|
config
|
|
.save(None)
|
|
.map_err(|e| anyhow::anyhow!(e.to_string()))
|
|
}
|