This commit is contained in:
@@ -130,6 +130,12 @@ pub struct Settings {
|
||||
/// CPU/memory thresholds for 'am monitor' alerts (issue #50).
|
||||
#[serde(default)]
|
||||
pub monitor_thresholds: Option<MonitorThresholds>,
|
||||
/// Git repository where 'am sync' pushes the state (issue #66).
|
||||
#[serde(default)]
|
||||
pub sync_repo: Option<String>,
|
||||
/// Push automatically when the REPL exits (issue #66, opt-in).
|
||||
#[serde(default)]
|
||||
pub sync_on_exit: Option<bool>,
|
||||
}
|
||||
|
||||
/// Token price model: USD per million tokens (issue #49).
|
||||
@@ -732,6 +738,18 @@ pub fn merge(base: &mut Config, overlay: Config) {
|
||||
if o.sessions_retention_days.is_some() {
|
||||
s.sessions_retention_days = o.sessions_retention_days;
|
||||
}
|
||||
if o.cost_models.is_some() {
|
||||
s.cost_models = o.cost_models;
|
||||
}
|
||||
if o.monitor_thresholds.is_some() {
|
||||
s.monitor_thresholds = o.monitor_thresholds;
|
||||
}
|
||||
if o.sync_repo.is_some() {
|
||||
s.sync_repo = o.sync_repo;
|
||||
}
|
||||
if o.sync_on_exit.is_some() {
|
||||
s.sync_on_exit = o.sync_on_exit;
|
||||
}
|
||||
for (k, v) in o.hooks {
|
||||
s.hooks.insert(k, v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user