fix(config): overlay cron command flag from system configs (#1285)

This commit is contained in:
Zezae Oh authored and GitHub committed 2026-06-27 10:24:16 +07:00
1 parent 23ddc0858c
commit 226e33ddfb
2 files changed
+5

No files matched your search

+4
View File
@@ -283,6 +283,7 @@ func TestApplySystemConfigs(t *testing.T) {
"tools.browser.enabled": "false",
"tools.browser.remote_url": "ws://chrome:9222",
"tools.browser.max_pages": "9",
"cron.command_enabled": "true",
})
if cfg.Agents.Defaults.Provider != "openai" {
@@ -306,6 +307,9 @@ func TestApplySystemConfigs(t *testing.T) {
if cfg.Tools.Browser.MaxPages != 9 {
t.Errorf("tools.browser.max_pages: got %d", cfg.Tools.Browser.MaxPages)
}
if !cfg.Cron.CommandEnabled {
t.Error("cron.command_enabled: got false, want true")
}
}
// --- Save / Load round-trip ---
+1
View File
@@ -95,6 +95,7 @@ func (c *Config) ApplySystemConfigs(configs map[string]string) {
// Cron
integer("cron.max_retries", &c.Cron.MaxRetries)
str("cron.default_timezone", &c.Cron.DefaultTimezone)
boolValue("cron.command_enabled", &c.Cron.CommandEnabled)
// Pending message compaction
if _, ok := configs["compaction.threshold"]; ok {