Skip to content

Commit 226e33d

Browse files
authored
fix(config): overlay cron command flag from system configs (#1285)
1 parent 23ddc08 commit 226e33d

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

internal/config/config_extras_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ func TestApplySystemConfigs(t *testing.T) {
283283
"tools.browser.enabled": "false",
284284
"tools.browser.remote_url": "ws://chrome:9222",
285285
"tools.browser.max_pages": "9",
286+
"cron.command_enabled": "true",
286287
})
287288

288289
if cfg.Agents.Defaults.Provider != "openai" {
@@ -306,6 +307,9 @@ func TestApplySystemConfigs(t *testing.T) {
306307
if cfg.Tools.Browser.MaxPages != 9 {
307308
t.Errorf("tools.browser.max_pages: got %d", cfg.Tools.Browser.MaxPages)
308309
}
310+
if !cfg.Cron.CommandEnabled {
311+
t.Error("cron.command_enabled: got false, want true")
312+
}
309313
}
310314

311315
// --- Save / Load round-trip ---

internal/config/config_system.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func (c *Config) ApplySystemConfigs(configs map[string]string) {
9595
// Cron
9696
integer("cron.max_retries", &c.Cron.MaxRetries)
9797
str("cron.default_timezone", &c.Cron.DefaultTimezone)
98+
boolValue("cron.command_enabled", &c.Cron.CommandEnabled)
9899

99100
// Pending message compaction
100101
if _, ok := configs["compaction.threshold"]; ok {

0 commit comments

Comments
 (0)